From 357cf30a54ef6d9bda874ac796b150af87626e1e Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Mon, 11 Sep 2023 22:53:24 +0000 Subject: [PATCH] Initialize sorbet --- bin/tapioca | 27 + .../dependabot/bundler/file_updater_spec.rb | 2 +- .../spec/dependabot/dependency_file_spec.rb | 2 +- sorbet/config | 5 + sorbet/rbi/annotations/faraday.rbi | 17 + sorbet/rbi/annotations/rainbow.rbi | 269 + sorbet/rbi/annotations/webmock.rbi | 9 + sorbet/rbi/gems/addressable@2.8.5.rbi | 1960 + sorbet/rbi/gems/ast@2.4.2.rbi | 584 + sorbet/rbi/gems/aws-eventstream@1.2.0.rbi | 379 + sorbet/rbi/gems/aws-partitions@1.820.0.rbi | 693 + sorbet/rbi/gems/aws-sdk-codecommit@1.59.0.rbi | 8 + sorbet/rbi/gems/aws-sdk-core@3.181.0.rbi | 16946 +++++ sorbet/rbi/gems/aws-sdk-ecr@1.64.0.rbi | 6613 ++ sorbet/rbi/gems/aws-sigv4@1.6.0.rbi | 595 + sorbet/rbi/gems/backport@1.2.0.rbi | 522 + sorbet/rbi/gems/base64@0.1.1.rbi | 172 + sorbet/rbi/gems/benchmark@0.2.1.rbi | 596 + sorbet/rbi/gems/citrus@3.0.2.rbi | 1233 + sorbet/rbi/gems/commonmarker@0.23.10.rbi | 378 + sorbet/rbi/gems/crack@0.4.5.rbi | 144 + sorbet/rbi/gems/diff-lcs@1.5.0.rbi | 1083 + sorbet/rbi/gems/docker_registry2@1.18.0.rbi | 218 + sorbet/rbi/gems/domain_name@0.5.20190701.rbi | 260 + sorbet/rbi/gems/e2mmap@0.1.0.rbi | 8 + sorbet/rbi/gems/erubi@1.12.0.rbi | 146 + sorbet/rbi/gems/excon@0.102.0.rbi | 1430 + sorbet/rbi/gems/faraday-net_http@3.0.2.rbi | 146 + sorbet/rbi/gems/faraday-retry@2.2.0.rbi | 207 + sorbet/rbi/gems/faraday@2.7.10.rbi | 2894 + sorbet/rbi/gems/gitlab@4.19.0.rbi | 8421 +++ sorbet/rbi/gems/gpgme@2.0.22.rbi | 2929 + sorbet/rbi/gems/hashdiff@1.0.1.rbi | 350 + sorbet/rbi/gems/http-accept@1.7.0.rbi | 378 + sorbet/rbi/gems/http-cookie@1.0.5.rbi | 993 + sorbet/rbi/gems/httparty@0.21.0.rbi | 2094 + sorbet/rbi/gems/io-console@0.6.0.rbi | 8 + sorbet/rbi/gems/irb@1.8.1.rbi | 342 + sorbet/rbi/gems/jaro_winkler@1.5.6.rbi | 19 + sorbet/rbi/gems/jmespath@1.6.2.rbi | 1920 + sorbet/rbi/gems/json@2.6.3.rbi | 1541 + sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi | 127 + sorbet/rbi/gems/kramdown@2.4.0.rbi | 3271 + sorbet/rbi/gems/kwalify@0.7.2.rbi | 1401 + .../language_server-protocol@3.17.0.3.rbi | 14237 ++++ .../rbi/gems/mime-types-data@3.2023.0808.rbi | 126 + sorbet/rbi/gems/mime-types@3.5.1.rbi | 1251 + sorbet/rbi/gems/mini_mime@1.1.5.rbi | 172 + sorbet/rbi/gems/mini_portile2@2.8.4.rbi | 8 + sorbet/rbi/gems/multi_xml@0.6.0.rbi | 101 + sorbet/rbi/gems/netrc@0.11.0.rbi | 158 + sorbet/rbi/gems/nokogiri@1.15.4.rbi | 7317 ++ sorbet/rbi/gems/octokit@6.1.1.rbi | 10851 +++ sorbet/rbi/gems/parallel@1.23.0.rbi | 273 + sorbet/rbi/gems/parallel_tests@4.2.1.rbi | 245 + sorbet/rbi/gems/parseconfig@1.0.8.rbi | 136 + sorbet/rbi/gems/parser@3.2.2.3.rbi | 7252 ++ sorbet/rbi/gems/prettier_print@1.2.1.rbi | 951 + sorbet/rbi/gems/psych@5.1.0.rbi | 1760 + sorbet/rbi/gems/public_suffix@5.0.3.rbi | 935 + sorbet/rbi/gems/racc@1.7.1.rbi | 161 + sorbet/rbi/gems/rainbow@3.1.1.rbi | 402 + sorbet/rbi/gems/rake@13.0.6.rbi | 3021 + sorbet/rbi/gems/rbi@0.0.17.rbi | 2972 + sorbet/rbi/gems/rbs@2.8.4.rbi | 5530 ++ sorbet/rbi/gems/rdoc@6.5.0.rbi | 12429 ++++ sorbet/rbi/gems/reek@6.1.4.rbi | 5549 ++ sorbet/rbi/gems/regexp_parser@2.8.1.rbi | 3749 + sorbet/rbi/gems/reline@0.3.8.rbi | 8 + sorbet/rbi/gems/rest-client@2.1.0.rbi | 1898 + sorbet/rbi/gems/reverse_markdown@2.1.1.rbi | 389 + sorbet/rbi/gems/rexml@3.2.6.rbi | 4887 ++ sorbet/rbi/gems/rspec-core@3.12.2.rbi | 10791 +++ sorbet/rbi/gems/rspec-expectations@3.12.3.rbi | 8100 +++ sorbet/rbi/gems/rspec-its@1.3.0.rbi | 197 + sorbet/rbi/gems/rspec-mocks@3.12.6.rbi | 5310 ++ sorbet/rbi/gems/rspec-support@3.12.1.rbi | 1644 + sorbet/rbi/gems/rspec@3.12.0.rbi | 82 + sorbet/rbi/gems/rubocop-ast@1.29.0.rbi | 7036 ++ .../rbi/gems/rubocop-performance@1.19.0.rbi | 3157 + sorbet/rbi/gems/rubocop@1.56.3.rbi | 56598 ++++++++++++++++ sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi | 1317 + sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi | 8 + sorbet/rbi/gems/sawyer@0.9.2.rbi | 719 + sorbet/rbi/gems/solargraph@0.49.0.rbi | 9383 +++ sorbet/rbi/gems/spoom@1.2.3.rbi | 3203 + sorbet/rbi/gems/stackprof@0.2.25.rbi | 241 + sorbet/rbi/gems/stringio@3.0.8.rbi | 8 + sorbet/rbi/gems/syntax_tree@6.1.1.rbi | 22855 +++++++ sorbet/rbi/gems/tapioca@0.11.8.rbi | 3349 + sorbet/rbi/gems/terminal-table@3.0.2.rbi | 8 + sorbet/rbi/gems/thor@1.2.2.rbi | 3965 ++ sorbet/rbi/gems/tilt@2.2.0.rbi | 934 + sorbet/rbi/gems/toml-rb@2.2.0.rbi | 418 + sorbet/rbi/gems/unf@0.1.4.rbi | 38 + sorbet/rbi/gems/unf_ext@0.0.8.2.rbi | 8 + .../rbi/gems/unicode-display_width@2.4.2.rbi | 65 + sorbet/rbi/gems/unparser@0.6.8.rbi | 4525 ++ sorbet/rbi/gems/vcr@6.2.0.rbi | 3036 + sorbet/rbi/gems/webmock@3.19.1.rbi | 1820 + sorbet/rbi/gems/webrick@1.8.1.rbi | 2606 + sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 428 + sorbet/rbi/gems/yard@0.9.34.rbi | 18312 +++++ sorbet/rbi/todo.rbi | 16 + sorbet/tapioca/config.yml | 13 + sorbet/tapioca/require.rb | 4 + 106 files changed, 318300 insertions(+), 2 deletions(-) create mode 100755 bin/tapioca create mode 100644 sorbet/config create mode 100644 sorbet/rbi/annotations/faraday.rbi create mode 100644 sorbet/rbi/annotations/rainbow.rbi create mode 100644 sorbet/rbi/annotations/webmock.rbi create mode 100644 sorbet/rbi/gems/addressable@2.8.5.rbi create mode 100644 sorbet/rbi/gems/ast@2.4.2.rbi create mode 100644 sorbet/rbi/gems/aws-eventstream@1.2.0.rbi create mode 100644 sorbet/rbi/gems/aws-partitions@1.820.0.rbi create mode 100644 sorbet/rbi/gems/aws-sdk-codecommit@1.59.0.rbi create mode 100644 sorbet/rbi/gems/aws-sdk-core@3.181.0.rbi create mode 100644 sorbet/rbi/gems/aws-sdk-ecr@1.64.0.rbi create mode 100644 sorbet/rbi/gems/aws-sigv4@1.6.0.rbi create mode 100644 sorbet/rbi/gems/backport@1.2.0.rbi create mode 100644 sorbet/rbi/gems/base64@0.1.1.rbi create mode 100644 sorbet/rbi/gems/benchmark@0.2.1.rbi create mode 100644 sorbet/rbi/gems/citrus@3.0.2.rbi create mode 100644 sorbet/rbi/gems/commonmarker@0.23.10.rbi create mode 100644 sorbet/rbi/gems/crack@0.4.5.rbi create mode 100644 sorbet/rbi/gems/diff-lcs@1.5.0.rbi create mode 100644 sorbet/rbi/gems/docker_registry2@1.18.0.rbi create mode 100644 sorbet/rbi/gems/domain_name@0.5.20190701.rbi create mode 100644 sorbet/rbi/gems/e2mmap@0.1.0.rbi create mode 100644 sorbet/rbi/gems/erubi@1.12.0.rbi create mode 100644 sorbet/rbi/gems/excon@0.102.0.rbi create mode 100644 sorbet/rbi/gems/faraday-net_http@3.0.2.rbi create mode 100644 sorbet/rbi/gems/faraday-retry@2.2.0.rbi create mode 100644 sorbet/rbi/gems/faraday@2.7.10.rbi create mode 100644 sorbet/rbi/gems/gitlab@4.19.0.rbi create mode 100644 sorbet/rbi/gems/gpgme@2.0.22.rbi create mode 100644 sorbet/rbi/gems/hashdiff@1.0.1.rbi create mode 100644 sorbet/rbi/gems/http-accept@1.7.0.rbi create mode 100644 sorbet/rbi/gems/http-cookie@1.0.5.rbi create mode 100644 sorbet/rbi/gems/httparty@0.21.0.rbi create mode 100644 sorbet/rbi/gems/io-console@0.6.0.rbi create mode 100644 sorbet/rbi/gems/irb@1.8.1.rbi create mode 100644 sorbet/rbi/gems/jaro_winkler@1.5.6.rbi create mode 100644 sorbet/rbi/gems/jmespath@1.6.2.rbi create mode 100644 sorbet/rbi/gems/json@2.6.3.rbi create mode 100644 sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi create mode 100644 sorbet/rbi/gems/kramdown@2.4.0.rbi create mode 100644 sorbet/rbi/gems/kwalify@0.7.2.rbi create mode 100644 sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi create mode 100644 sorbet/rbi/gems/mime-types-data@3.2023.0808.rbi create mode 100644 sorbet/rbi/gems/mime-types@3.5.1.rbi create mode 100644 sorbet/rbi/gems/mini_mime@1.1.5.rbi create mode 100644 sorbet/rbi/gems/mini_portile2@2.8.4.rbi create mode 100644 sorbet/rbi/gems/multi_xml@0.6.0.rbi create mode 100644 sorbet/rbi/gems/netrc@0.11.0.rbi create mode 100644 sorbet/rbi/gems/nokogiri@1.15.4.rbi create mode 100644 sorbet/rbi/gems/octokit@6.1.1.rbi create mode 100644 sorbet/rbi/gems/parallel@1.23.0.rbi create mode 100644 sorbet/rbi/gems/parallel_tests@4.2.1.rbi create mode 100644 sorbet/rbi/gems/parseconfig@1.0.8.rbi create mode 100644 sorbet/rbi/gems/parser@3.2.2.3.rbi create mode 100644 sorbet/rbi/gems/prettier_print@1.2.1.rbi create mode 100644 sorbet/rbi/gems/psych@5.1.0.rbi create mode 100644 sorbet/rbi/gems/public_suffix@5.0.3.rbi create mode 100644 sorbet/rbi/gems/racc@1.7.1.rbi create mode 100644 sorbet/rbi/gems/rainbow@3.1.1.rbi create mode 100644 sorbet/rbi/gems/rake@13.0.6.rbi create mode 100644 sorbet/rbi/gems/rbi@0.0.17.rbi create mode 100644 sorbet/rbi/gems/rbs@2.8.4.rbi create mode 100644 sorbet/rbi/gems/rdoc@6.5.0.rbi create mode 100644 sorbet/rbi/gems/reek@6.1.4.rbi create mode 100644 sorbet/rbi/gems/regexp_parser@2.8.1.rbi create mode 100644 sorbet/rbi/gems/reline@0.3.8.rbi create mode 100644 sorbet/rbi/gems/rest-client@2.1.0.rbi create mode 100644 sorbet/rbi/gems/reverse_markdown@2.1.1.rbi create mode 100644 sorbet/rbi/gems/rexml@3.2.6.rbi create mode 100644 sorbet/rbi/gems/rspec-core@3.12.2.rbi create mode 100644 sorbet/rbi/gems/rspec-expectations@3.12.3.rbi create mode 100644 sorbet/rbi/gems/rspec-its@1.3.0.rbi create mode 100644 sorbet/rbi/gems/rspec-mocks@3.12.6.rbi create mode 100644 sorbet/rbi/gems/rspec-support@3.12.1.rbi create mode 100644 sorbet/rbi/gems/rspec@3.12.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-ast@1.29.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-performance@1.19.0.rbi create mode 100644 sorbet/rbi/gems/rubocop@1.56.3.rbi create mode 100644 sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi create mode 100644 sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi create mode 100644 sorbet/rbi/gems/sawyer@0.9.2.rbi create mode 100644 sorbet/rbi/gems/solargraph@0.49.0.rbi create mode 100644 sorbet/rbi/gems/spoom@1.2.3.rbi create mode 100644 sorbet/rbi/gems/stackprof@0.2.25.rbi create mode 100644 sorbet/rbi/gems/stringio@3.0.8.rbi create mode 100644 sorbet/rbi/gems/syntax_tree@6.1.1.rbi create mode 100644 sorbet/rbi/gems/tapioca@0.11.8.rbi create mode 100644 sorbet/rbi/gems/terminal-table@3.0.2.rbi create mode 100644 sorbet/rbi/gems/thor@1.2.2.rbi create mode 100644 sorbet/rbi/gems/tilt@2.2.0.rbi create mode 100644 sorbet/rbi/gems/toml-rb@2.2.0.rbi create mode 100644 sorbet/rbi/gems/unf@0.1.4.rbi create mode 100644 sorbet/rbi/gems/unf_ext@0.0.8.2.rbi create mode 100644 sorbet/rbi/gems/unicode-display_width@2.4.2.rbi create mode 100644 sorbet/rbi/gems/unparser@0.6.8.rbi create mode 100644 sorbet/rbi/gems/vcr@6.2.0.rbi create mode 100644 sorbet/rbi/gems/webmock@3.19.1.rbi create mode 100644 sorbet/rbi/gems/webrick@1.8.1.rbi create mode 100644 sorbet/rbi/gems/yard-sorbet@0.8.1.rbi create mode 100644 sorbet/rbi/gems/yard@0.9.34.rbi create mode 100644 sorbet/rbi/todo.rbi create mode 100644 sorbet/tapioca/config.yml create mode 100644 sorbet/tapioca/require.rb diff --git a/bin/tapioca b/bin/tapioca new file mode 100755 index 0000000000..a6ae7576e6 --- /dev/null +++ b/bin/tapioca @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'tapioca' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("tapioca", "tapioca") diff --git a/bundler/spec/dependabot/bundler/file_updater_spec.rb b/bundler/spec/dependabot/bundler/file_updater_spec.rb index eab2469abf..43e7d9f360 100644 --- a/bundler/spec/dependabot/bundler/file_updater_spec.rb +++ b/bundler/spec/dependabot/bundler/file_updater_spec.rb @@ -448,7 +448,7 @@ stub_const( "#{described_class}::RubyRequirementSetter::RUBY_VERSIONS", - described_class::RubyRequirementSetter::RUBY_VERSIONS + ["99.0.0"] + Dependabot::Bundler::FileUpdater::RubyRequirementSetter::RUBY_VERSIONS + ["99.0.0"] ) end diff --git a/common/spec/dependabot/dependency_file_spec.rb b/common/spec/dependabot/dependency_file_spec.rb index 5b9c6a22ec..a89d3d6d48 100644 --- a/common/spec/dependabot/dependency_file_spec.rb +++ b/common/spec/dependabot/dependency_file_spec.rb @@ -314,7 +314,7 @@ let(:file) do described_class.new( name: "example.gem", - content_encoding: described_class::ContentEncoding::BASE64, + content_encoding: Dependabot::DependencyFile::ContentEncoding::BASE64, content: "YWJj\n" ) end diff --git a/sorbet/config b/sorbet/config new file mode 100644 index 0000000000..ada39b83da --- /dev/null +++ b/sorbet/config @@ -0,0 +1,5 @@ +--dir +. +--ignore=tmp/ +--ignore=vendor/ +--ignore=updater/ diff --git a/sorbet/rbi/annotations/faraday.rbi b/sorbet/rbi/annotations/faraday.rbi new file mode 100644 index 0000000000..c992c1afed --- /dev/null +++ b/sorbet/rbi/annotations/faraday.rbi @@ -0,0 +1,17 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Faraday + class << self + sig { params(url: T.untyped, options: T::Hash[Symbol, T.untyped], block: T.nilable(T.proc.params(connection: Faraday::Connection).void)).returns(Faraday::Connection) } + def new(url = nil, options = {}, &block); end + end +end + +class Faraday::Response + sig { returns(T::Boolean) } + def success?; end +end diff --git a/sorbet/rbi/annotations/rainbow.rbi b/sorbet/rbi/annotations/rainbow.rbi new file mode 100644 index 0000000000..227f8797a7 --- /dev/null +++ b/sorbet/rbi/annotations/rainbow.rbi @@ -0,0 +1,269 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Rainbow + # @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12 + sig { returns(T::Boolean) } + attr_accessor :enabled + + class Color + sig { returns(Symbol) } + attr_reader :ground + + sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) } + def self.build(ground, values); end + + sig { params(hex: String).returns([Integer, Integer, Integer]) } + def self.parse_hex_color(hex); end + + class Indexed < Rainbow::Color + sig { returns(Integer) } + attr_reader :num + + sig { params(ground: Symbol, num: Integer).void } + def initialize(ground, num); end + + sig { returns(T::Array[Integer]) } + def codes; end + end + + class Named < Rainbow::Color::Indexed + NAMES = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + end + + class RGB < Rainbow::Color::Indexed + sig { returns(Integer) } + attr_reader :r, :g, :b + + sig { params(ground: Symbol, values: Integer).void } + def initialize(ground, *values); end + + sig { returns(T::Array[Integer]) } + def codes; end + + sig { params(value: Numeric).returns(Integer) } + def self.to_ansi_domain(value); end + end + + class X11Named < Rainbow::Color::RGB + include Rainbow::X11ColorNames + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + end + end + + sig { returns(Wrapper) } + def self.global; end + + sig { returns(T::Boolean) } + def self.enabled; end + + sig { params(value: T::Boolean).returns(T::Boolean) } + def self.enabled=(value); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + + class NullPresenter < String + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def bg(*values); end + + sig { returns(NullPresenter) } + def reset; end + + sig { returns(NullPresenter) } + def bright; end + + sig { returns(NullPresenter) } + def faint; end + + sig { returns(NullPresenter) } + def italic; end + + sig { returns(NullPresenter) } + def underline; end + + sig { returns(NullPresenter) } + def blink; end + + sig { returns(NullPresenter) } + def inverse; end + + sig { returns(NullPresenter) } + def hide; end + + sig { returns(NullPresenter) } + def cross_out; end + + sig { returns(NullPresenter) } + def black; end + + sig { returns(NullPresenter) } + def red; end + + sig { returns(NullPresenter) } + def green; end + + sig { returns(NullPresenter) } + def yellow; end + + sig { returns(NullPresenter) } + def blue; end + + sig { returns(NullPresenter) } + def magenta; end + + sig { returns(NullPresenter) } + def cyan; end + + sig { returns(NullPresenter) } + def white; end + + sig { returns(NullPresenter) } + def bold; end + + sig { returns(NullPresenter) } + def dark; end + + sig { returns(NullPresenter) } + def strike; end + end + + class Presenter < String + TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def bg(*values); end + + sig { returns(Presenter) } + def reset; end + + sig { returns(Presenter) } + def bright; end + + sig { returns(Presenter) } + def faint; end + + sig { returns(Presenter) } + def italic; end + + sig { returns(Presenter) } + def underline; end + + sig { returns(Presenter) } + def blink; end + + sig { returns(Presenter) } + def inverse; end + + sig { returns(Presenter) } + def hide; end + + sig { returns(Presenter) } + def cross_out; end + + sig { returns(Presenter) } + def black; end + + sig { returns(Presenter) } + def red; end + + sig { returns(Presenter) } + def green; end + + sig { returns(Presenter) } + def yellow; end + + sig { returns(Presenter) } + def blue; end + + sig { returns(Presenter) } + def magenta; end + + sig { returns(Presenter) } + def cyan; end + + sig { returns(Presenter) } + def white; end + + sig { returns(Presenter) } + def bold; end + + sig { returns(Presenter) } + def dark; end + + sig { returns(Presenter) } + def strike; end + end + + class StringUtils + sig { params(string: String, codes: T::Array[Integer]).returns(String) } + def self.wrap_with_sgr(string, codes); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + end + + VERSION = T.let(nil, String) + + class Wrapper + sig { returns(T::Boolean) } + attr_accessor :enabled + + sig { params(enabled: T::Boolean).void } + def initialize(enabled = true); end + + sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) } + def wrap(string); end + end + + module X11ColorNames + NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]]) + end +end + +sig { params(string: String).returns(Rainbow::Presenter) } +def Rainbow(string); end diff --git a/sorbet/rbi/annotations/webmock.rbi b/sorbet/rbi/annotations/webmock.rbi new file mode 100644 index 0000000000..16456ddf49 --- /dev/null +++ b/sorbet/rbi/annotations/webmock.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +class Minitest::Test + include WebMock::API +end diff --git a/sorbet/rbi/gems/addressable@2.8.5.rbi b/sorbet/rbi/gems/addressable@2.8.5.rbi new file mode 100644 index 0000000000..932b611eac --- /dev/null +++ b/sorbet/rbi/gems/addressable@2.8.5.rbi @@ -0,0 +1,1960 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `addressable` gem. +# Please instead update this file by running `bin/tapioca gem addressable`. + +# Addressable is a library for processing links and URIs. +# +# source://addressable//lib/addressable/version.rb#22 +module Addressable; end + +# source://addressable//lib/addressable/idna/pure.rb#21 +module Addressable::IDNA + class << self + # source://addressable//lib/addressable/idna/pure.rb#117 + def _deprecated_unicode_normalize_kc(value); end + + # Converts from a Unicode internationalized domain name to an ASCII + # domain name as described in RFC 3490. + # + # source://addressable//lib/addressable/idna/pure.rb#67 + def to_ascii(input); end + + # Converts from an ASCII domain name to a Unicode internationalized + # domain name as described in RFC 3490. + # + # source://addressable//lib/addressable/idna/pure.rb#93 + def to_unicode(input); end + + # @deprecated Use {String#unicode_normalize(:nfkc)} instead + def unicode_normalize_kc(*args, **_arg1, &block); end + + private + + # source://addressable//lib/addressable/idna/pure.rb#140 + def lookup_unicode_lowercase(codepoint); end + + # Bias adaptation method + # + # source://addressable//lib/addressable/idna/pure.rb#488 + def punycode_adapt(delta, numpoints, firsttime); end + + # @return [Boolean] + # + # source://addressable//lib/addressable/idna/pure.rb#456 + def punycode_basic?(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#334 + def punycode_decode(punycode); end + + # Returns the numeric value of a basic codepoint + # (for use in representing integers) in the range 0 to + # base - 1, or PUNYCODE_BASE if codepoint does not represent a value. + # + # source://addressable//lib/addressable/idna/pure.rb#474 + def punycode_decode_digit(codepoint); end + + # @return [Boolean] + # + # source://addressable//lib/addressable/idna/pure.rb#461 + def punycode_delimiter?(codepoint); end + + # source://addressable//lib/addressable/idna/pure.rb#213 + def punycode_encode(unicode); end + + # source://addressable//lib/addressable/idna/pure.rb#466 + def punycode_encode_digit(d); end + + # Unicode aware downcase method. + # + # @api private + # @param input [String] The input string. + # @return [String] The downcased result. + # + # source://addressable//lib/addressable/idna/pure.rb#132 + def unicode_downcase(input); end + end +end + +# source://addressable//lib/addressable/idna/pure.rb#183 +Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#40 +Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#172 +Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/idna/pure.rb#185 +Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#189 +Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#192 +Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#190 +Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#191 +Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#194 +Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#196 +Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#188 +Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#187 +Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#186 +Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer) + +# Input is invalid. +# +# source://addressable//lib/addressable/idna/pure.rb#207 +class Addressable::IDNA::PunycodeBadInput < ::StandardError; end + +# Output would exceed the space provided. +# +# source://addressable//lib/addressable/idna/pure.rb#209 +class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end + +# Input needs wider integers to process. +# +# source://addressable//lib/addressable/idna/pure.rb#211 +class Addressable::IDNA::PunycodeOverflow < ::StandardError; end + +# source://addressable//lib/addressable/idna/pure.rb#163 +Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/idna/pure.rb#150 +Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#148 +Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#151 +Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#149 +Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#153 +Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#154 +Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#152 +Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#182 +Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/idna/pure.rb#36 +Addressable::IDNA::UNICODE_TABLE = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/idna/pure.rb#42 +Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/idna/pure.rb#53 +Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp) + +# This is an implementation of a URI template based on +# RFC 6570 (http://tools.ietf.org/html/rfc6570). +# +# source://addressable//lib/addressable/template.rb#27 +class Addressable::Template + # Creates a new Addressable::Template object. + # + # @param pattern [#to_str] The URI Template pattern. + # @return [Addressable::Template] The initialized Template object. + # + # source://addressable//lib/addressable/template.rb#234 + def initialize(pattern); end + + # Returns true if the Template objects are equal. This method + # does NOT normalize either Template before doing the comparison. + # + # @param template [Object] The Template to compare. + # @return [TrueClass, FalseClass] true if the Templates are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/template.rb#274 + def ==(template); end + + # Returns true if the Template objects are equal. This method + # does NOT normalize either Template before doing the comparison. + # Addressable::Template makes no distinction between `==` and `eql?`. + # + # @param template [Object] The Template to compare. + # @return [TrueClass, FalseClass] true if the Templates are equivalent, false + # otherwise. + # @see #== + # + # source://addressable//lib/addressable/template.rb#274 + def eql?(template); end + + # Expands a URI template into a full URI. + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError + # exception will be raised if the value is invalid. The transform + # method should return the transformed variable value as a String. + # If a transform method is used, the value will not be percent + # encoded automatically. Unicode normalization will be performed both + # before and after sending the value to the transform method. + # + # @example + # class ExampleProcessor + # def self.validate(name, value) + # return !!(value =~ /^[\w ]+$/) if name == "query" + # return true + # end + # + # def self.transform(name, value) + # return value.gsub(/ /, "+") if name == "query" + # return value + # end + # end + # + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).expand( + # {"query" => "an example search query"}, + # ExampleProcessor + # ).to_str + # #=> "http://example.com/search/an+example+search+query/" + # + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).expand( + # {"query" => "an example search query"} + # ).to_str + # #=> "http://example.com/search/an%20example%20search%20query/" + # + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).expand( + # {"query" => "bogus!"}, + # ExampleProcessor + # ).to_str + # #=> Addressable::Template::InvalidTemplateValueError + # @param mapping [Hash] The mapping that corresponds to the pattern. + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [Addressable::URI] The expanded URI template. + # + # source://addressable//lib/addressable/template.rb#591 + def expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end + + # Extracts a mapping from the URI using a URI Template pattern. + # + # @example + # class ExampleProcessor + # def self.restore(name, value) + # return value.gsub(/\+/, " ") if name == "query" + # return value + # end + # + # def self.match(name) + # return ".*?" if name == "first" + # return ".*" + # end + # end + # + # uri = Addressable::URI.parse( + # "http://example.com/search/an+example+search+query/" + # ) + # Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).extract(uri, ExampleProcessor) + # #=> {"query" => "an example search query"} + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # Addressable::Template.new( + # "http://example.com/{first}/{second}/" + # ).extract(uri, ExampleProcessor) + # #=> {"first" => "a", "second" => "b/c"} + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # Addressable::Template.new( + # "http://example.com/{first}/{-list|/|second}/" + # ).extract(uri) + # #=> {"first" => "a", "second" => ["b", "c"]} + # @param uri [Addressable::URI, #to_str] The URI to extract from. + # @param processor [#restore, #match] A template processor object may optionally be supplied. + # + # The object should respond to either the restore or + # match messages or both. The restore method should + # take two parameters: `[String] name` and `[String] value`. + # The restore method should reverse any transformations that + # have been performed on the value to ensure a valid URI. + # The match method should take a single + # parameter: `[String] name`. The match method should return + # a String containing a regular expression capture group for + # matching on that particular variable. The default value is `".*?"`. + # The match method has no effect on multivariate operator + # expansions. + # @return [Hash, NilClass] The Hash mapping that was extracted from the URI, or + # nil if the URI didn't match the template. + # + # source://addressable//lib/addressable/template.rb#342 + def extract(uri, processor = T.unsafe(nil)); end + + # Freeze URI, initializing instance variables. + # + # @return [Addressable::URI] The frozen URI object. + # + # source://addressable//lib/addressable/template.rb#245 + def freeze; end + + # Returns a String representation of the Template object's state. + # + # @return [String] The Template object's state, as a String. + # + # source://addressable//lib/addressable/template.rb#260 + def inspect; end + + # Returns an Array of variables used within the template pattern. + # The variables are listed in the Array in the order they appear within + # the pattern. Multiple occurrences of a variable within a pattern are + # not represented in this Array. + # + # @return [Array] The variables present in the template's pattern. + # + # source://addressable//lib/addressable/template.rb#607 + def keys; end + + # Extracts match data from the URI using a URI Template pattern. + # + # @example + # class ExampleProcessor + # def self.restore(name, value) + # return value.gsub(/\+/, " ") if name == "query" + # return value + # end + # + # def self.match(name) + # return ".*?" if name == "first" + # return ".*" + # end + # end + # + # uri = Addressable::URI.parse( + # "http://example.com/search/an+example+search+query/" + # ) + # match = Addressable::Template.new( + # "http://example.com/search/{query}/" + # ).match(uri, ExampleProcessor) + # match.variables + # #=> ["query"] + # match.captures + # #=> ["an example search query"] + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # match = Addressable::Template.new( + # "http://example.com/{first}/{+second}/" + # ).match(uri, ExampleProcessor) + # match.variables + # #=> ["first", "second"] + # match.captures + # #=> ["a", "b/c"] + # + # uri = Addressable::URI.parse("http://example.com/a/b/c/") + # match = Addressable::Template.new( + # "http://example.com/{first}{/second*}/" + # ).match(uri) + # match.variables + # #=> ["first", "second"] + # match.captures + # #=> ["a", ["b", "c"]] + # @param uri [Addressable::URI, #to_str] The URI to extract from. + # @param processor [#restore, #match] A template processor object may optionally be supplied. + # + # The object should respond to either the restore or + # match messages or both. The restore method should + # take two parameters: `[String] name` and `[String] value`. + # The restore method should reverse any transformations that + # have been performed on the value to ensure a valid URI. + # The match method should take a single + # parameter: `[String] name`. The match method should return + # a String containing a regular expression capture group for + # matching on that particular variable. The default value is `".*?"`. + # The match method has no effect on multivariate operator + # expansions. + # @return [Hash, NilClass] The Hash mapping that was extracted from the URI, or + # nil if the URI didn't match the template. + # + # source://addressable//lib/addressable/template.rb#413 + def match(uri, processor = T.unsafe(nil)); end + + # Returns the named captures of the coerced `Regexp`. + # + # @api private + # @return [Hash] The named captures of the `Regexp` given by {#to_regexp}. + # + # source://addressable//lib/addressable/template.rb#651 + def named_captures; end + + # Returns an Array of variables used within the template pattern. + # The variables are listed in the Array in the order they appear within + # the pattern. Multiple occurrences of a variable within a pattern are + # not represented in this Array. + # + # @return [Array] The variables present in the template's pattern. + # + # source://addressable//lib/addressable/template.rb#607 + def names; end + + # Expands a URI template into another URI template. + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError + # exception will be raised if the value is invalid. The transform + # method should return the transformed variable value as a String. + # If a transform method is used, the value will not be percent + # encoded automatically. Unicode normalization will be performed both + # before and after sending the value to the transform method. + # + # @example + # Addressable::Template.new( + # "http://example.com/{one}/{two}/" + # ).partial_expand({"one" => "1"}).pattern + # #=> "http://example.com/1/{two}/" + # + # Addressable::Template.new( + # "http://example.com/{?one,two}/" + # ).partial_expand({"one" => "1"}).pattern + # #=> "http://example.com/?one=1{&two}/" + # + # Addressable::Template.new( + # "http://example.com/{?one,two,three}/" + # ).partial_expand({"one" => "1", "three" => 3}).pattern + # #=> "http://example.com/?one=1{&two}&three=3" + # @param mapping [Hash] The mapping that corresponds to the pattern. + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [Addressable::Template] The partially expanded URI template. + # + # source://addressable//lib/addressable/template.rb#524 + def partial_expand(mapping, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end + + # @return [String] The Template object's pattern. + # + # source://addressable//lib/addressable/template.rb#254 + def pattern; end + + # Returns the source of the coerced `Regexp`. + # + # @api private + # @return [String] The source of the `Regexp` given by {#to_regexp}. + # + # source://addressable//lib/addressable/template.rb#641 + def source; end + + # Coerces a template into a `Regexp` object. This regular expression will + # behave very similarly to the actual template, and should match the same + # URI values, but it cannot fully handle, for example, values that would + # extract to an `Array`. + # + # @return [Regexp] A regular expression which should match the template. + # + # source://addressable//lib/addressable/template.rb#630 + def to_regexp; end + + # Returns a mapping of variables to their default values specified + # in the template. Variables without defaults are not returned. + # + # @return [Hash] Mapping of template variables to their defaults + # + # source://addressable//lib/addressable/template.rb#618 + def variable_defaults; end + + # Returns an Array of variables used within the template pattern. + # The variables are listed in the Array in the order they appear within + # the pattern. Multiple occurrences of a variable within a pattern are + # not represented in this Array. + # + # @return [Array] The variables present in the template's pattern. + # + # source://addressable//lib/addressable/template.rb#607 + def variables; end + + private + + # Takes a set of values, and joins them together based on the + # operator. + # + # @param operator [String, Nil] One of the operators from the set + # (?,&,+,#,;,/,.), or nil if there wasn't one. + # @param return_value [Array] The set of return values (as [variable_name, value] tuples) that will + # be joined together. + # @return [String] The transformed mapped value + # + # source://addressable//lib/addressable/template.rb#861 + def join_values(operator, return_value); end + + # Generates a hash with string keys + # + # @param mapping [Hash] A mapping hash to normalize + # @return [Hash] A hash with stringified keys + # + # source://addressable//lib/addressable/template.rb#924 + def normalize_keys(mapping); end + + # Takes a set of values, and joins them together based on the + # operator. + # + # @param value [Hash, Array, String] Normalizes unicode keys and values with String#unicode_normalize (NFC) + # @return [Hash, Array, String] The normalized values + # + # source://addressable//lib/addressable/template.rb#898 + def normalize_value(value); end + + # source://addressable//lib/addressable/template.rb#656 + def ordered_variable_defaults; end + + # Generates the Regexp that parses a template pattern. + # + # @param pattern [String] The URI template pattern. + # @param processor [#match] The template processor to use. + # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be + # used to parse a template pattern + # + # source://addressable//lib/addressable/template.rb#968 + def parse_new_template_pattern(pattern, processor = T.unsafe(nil)); end + + # Generates the Regexp that parses a template pattern. Memoizes the + # value if template processor not set (processors may not be deterministic) + # + # @param pattern [String] The URI template pattern. + # @param processor [#match] The template processor to use. + # @return [Array, Regexp] An array of expansion variables nad a regular expression which may be + # used to parse a template pattern + # + # source://addressable//lib/addressable/template.rb#950 + def parse_template_pattern(pattern, processor = T.unsafe(nil)); end + + # Transforms a mapped value so that values can be substituted into the + # template. + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError exception + # will be raised if the value is invalid. The transform method + # should return the transformed variable value as a String. If a + # transform method is used, the value will not be percent encoded + # automatically. Unicode normalization will be performed both before and + # after sending the value to the transform method. + # + # @param mapping [Hash] The mapping to replace captures + # @param capture [String] The expression to replace + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [String] The expanded expression + # + # source://addressable//lib/addressable/template.rb#753 + def transform_capture(mapping, capture, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end + + # Loops through each capture and expands any values available in mapping + # + # The object should respond to either the validate or + # transform messages or both. Both the validate and + # transform methods should take two parameters: name and + # value. The validate method should return true + # or false; true if the value of the variable is valid, + # false otherwise. An InvalidTemplateValueError exception + # will be raised if the value is invalid. The transform method + # should return the transformed variable value as a String. If a + # transform method is used, the value will not be percent encoded + # automatically. Unicode normalization will be performed both before and + # after sending the value to the transform method. + # + # @param mapping [Hash] Set of keys to expand + # @param capture [String] The expression to expand + # @param processor [#validate, #transform] An optional processor object may be supplied. + # @param normalize_values [Boolean] Optional flag to enable/disable unicode normalization. Default: true + # @return [String] The expanded expression + # + # source://addressable//lib/addressable/template.rb#694 + def transform_partial_capture(mapping, capture, processor = T.unsafe(nil), normalize_values = T.unsafe(nil)); end +end + +# source://addressable//lib/addressable/template.rb#58 +Addressable::Template::EXPRESSION = T.let(T.unsafe(nil), Regexp) + +# Raised if an invalid template operator is used in a pattern. +# +# source://addressable//lib/addressable/template.rb#85 +class Addressable::Template::InvalidTemplateOperatorError < ::StandardError; end + +# Raised if an invalid template value is supplied. +# +# source://addressable//lib/addressable/template.rb#80 +class Addressable::Template::InvalidTemplateValueError < ::StandardError; end + +# source://addressable//lib/addressable/template.rb#70 +Addressable::Template::JOINERS = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/template.rb#62 +Addressable::Template::LEADERS = T.let(T.unsafe(nil), Hash) + +# This class represents the data that is extracted when a Template +# is matched against a URI. +# +# source://addressable//lib/addressable/template.rb#96 +class Addressable::Template::MatchData + # Creates a new MatchData object. + # MatchData objects should never be instantiated directly. + # + # @param uri [Addressable::URI] The URI that the template was matched against. + # @return [MatchData] a new instance of MatchData + # + # source://addressable//lib/addressable/template.rb#103 + def initialize(uri, template, mapping); end + + # Accesses captured values by name or by index. + # + # @param key [String, Symbol, Fixnum] Capture index or name. Note that when accessing by with index + # of 0, the full URI will be returned. The intention is to mimic + # the ::MatchData#[] behavior. + # @param len [#to_int, nil] If provided, an array of values will be returend with the given + # parameter used as length. + # @return [Array, String, nil] The captured value corresponding to the index or name. If the + # value was not provided or the key is unknown, nil will be + # returned. + # + # If the second parameter is provided, an array of that length will + # be returned instead. + # + # source://addressable//lib/addressable/template.rb#170 + def [](key, len = T.unsafe(nil)); end + + # @return [Array] The list of values that were captured by the Template. + # Note that this list will include nils for any variables which + # were in the Template, but did not appear in the URI. + # + # source://addressable//lib/addressable/template.rb#143 + def captures; end + + # Returns a String representation of the MatchData's state. + # + # @return [String] The MatchData's state, as a String. + # + # source://addressable//lib/addressable/template.rb#213 + def inspect; end + + # @return [Array] The list of variables that were present in the Template. + # Note that this list will include variables which do not appear + # in the mapping because they were not present in URI. + # + # source://addressable//lib/addressable/template.rb#132 + def keys; end + + # @return [Hash] The mapping that resulted from the match. + # Note that this mapping does not include keys or values for + # variables that appear in the Template, but are not present + # in the URI. + # + # source://addressable//lib/addressable/template.rb#125 + def mapping; end + + # @return [Array] The list of variables that were present in the Template. + # Note that this list will include variables which do not appear + # in the mapping because they were not present in URI. + # + # source://addressable//lib/addressable/template.rb#132 + def names; end + + # Dummy method for code expecting a ::MatchData instance + # + # @return [String] An empty string. + # + # source://addressable//lib/addressable/template.rb#222 + def post_match; end + + # Dummy method for code expecting a ::MatchData instance + # + # @return [String] An empty string. + # + # source://addressable//lib/addressable/template.rb#222 + def pre_match; end + + # @return [String] The matched URI as String. + # + # source://addressable//lib/addressable/template.rb#191 + def string; end + + # @return [Addressable::Template] The Template used for the match. + # + # source://addressable//lib/addressable/template.rb#117 + def template; end + + # @return [Array] Array with the matched URI as first element followed by the captured + # values. + # + # source://addressable//lib/addressable/template.rb#184 + def to_a; end + + # @return [String] The matched URI as String. + # + # source://addressable//lib/addressable/template.rb#191 + def to_s; end + + # @return [Addressable::URI] The URI that the Template was matched against. + # + # source://addressable//lib/addressable/template.rb#112 + def uri; end + + # @return [Array] The list of values that were captured by the Template. + # Note that this list will include nils for any variables which + # were in the Template, but did not appear in the URI. + # + # source://addressable//lib/addressable/template.rb#143 + def values; end + + # Returns multiple captured values at once. + # + # @param *indexes [String, Symbol, Fixnum] Indices of the captures to be returned + # @return [Array] Values corresponding to given indices. + # @see Addressable::Template::MatchData#[] + # + # source://addressable//lib/addressable/template.rb#205 + def values_at(*indexes); end + + # @return [Array] The list of variables that were present in the Template. + # Note that this list will include variables which do not appear + # in the mapping because they were not present in URI. + # + # source://addressable//lib/addressable/template.rb#132 + def variables; end +end + +# source://addressable//lib/addressable/template.rb#40 +Addressable::Template::RESERVED = T.let(T.unsafe(nil), String) + +# Raised if an invalid template operator is used in a pattern. +# +# source://addressable//lib/addressable/template.rb#90 +class Addressable::Template::TemplateOperatorAbortedError < ::StandardError; end + +# source://addressable//lib/addressable/template.rb#42 +Addressable::Template::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/template.rb#54 +Addressable::Template::VARIABLE_LIST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/template.rb#50 +Addressable::Template::VARNAME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/template.rb#52 +Addressable::Template::VARSPEC = T.let(T.unsafe(nil), Regexp) + +# This is an implementation of a URI parser based on +# RFC 3986, +# RFC 3987. +# +# source://addressable//lib/addressable/uri.rb#31 +class Addressable::URI + # Creates a new uri object from component parts. + # + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @option [String, + # @param [String, [Hash] a customizable set of options + # @return [Addressable::URI] The constructed URI object. + # + # source://addressable//lib/addressable/uri.rb#819 + def initialize(options = T.unsafe(nil)); end + + # Joins two URIs together. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#1878 + def +(uri); end + + # Returns true if the URI objects are equal. This method + # normalizes both URIs before doing the comparison. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2228 + def ==(uri); end + + # Returns true if the URI objects are equal. This method + # normalizes both URIs before doing the comparison, and allows comparison + # against Strings. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2206 + def ===(uri); end + + # Determines if the URI is absolute. + # + # @return [TrueClass, FalseClass] true if the URI is absolute. false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#1868 + def absolute?; end + + # The authority component for this URI. + # Combines the user, password, host, and port components. + # + # @return [String] The authority component. + # + # source://addressable//lib/addressable/uri.rb#1223 + def authority; end + + # Sets the authority component for this URI. + # + # @param new_authority [String, #to_str] The new authority component. + # + # source://addressable//lib/addressable/uri.rb#1263 + def authority=(new_authority); end + + # The basename, if any, of the file in the path component. + # + # @return [String] The path's basename. + # + # source://addressable//lib/addressable/uri.rb#1577 + def basename; end + + # The default port for this URI's scheme. + # This method will always returns the default port for the URI's scheme + # regardless of the presence of an explicit port in the URI. + # + # @return [Integer] The default port. + # + # source://addressable//lib/addressable/uri.rb#1443 + def default_port; end + + # This method allows you to make several changes to a URI simultaneously, + # which separately would cause validation errors, but in conjunction, + # are valid. The URI will be revalidated as soon as the entire block has + # been executed. + # + # @param block [Proc] A set of operations to perform on a given URI. + # + # source://addressable//lib/addressable/uri.rb#2385 + def defer_validation; end + + # Creates a URI suitable for display to users. If semantic attacks are + # likely, the application should try to detect these and warn the user. + # See RFC 3986, + # section 7.6 for more information. + # + # @return [Addressable::URI] A URI suitable for display purposes. + # + # source://addressable//lib/addressable/uri.rb#2190 + def display_uri; end + + # Returns the public suffix domain for this host. + # + # @example + # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" + # + # source://addressable//lib/addressable/uri.rb#1214 + def domain; end + + # Clones the URI object. + # + # @return [Addressable::URI] The cloned URI. + # + # source://addressable//lib/addressable/uri.rb#2260 + def dup; end + + # Determines if the URI is an empty string. + # + # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. + # + # source://addressable//lib/addressable/uri.rb#2322 + def empty?; end + + # source://addressable//lib/addressable/uri.rb#2395 + def encode_with(coder); end + + # Returns true if the URI objects are equal. This method + # does NOT normalize either URI before doing the comparison. + # + # @param uri [Object] The URI to compare. + # @return [TrueClass, FalseClass] true if the URIs are equivalent, false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#2242 + def eql?(uri); end + + # The extname, if any, of the file in the path component. + # Empty string if there is no extension. + # + # @return [String] The path's extname. + # + # source://addressable//lib/addressable/uri.rb#1587 + def extname; end + + # The fragment component for this URI. + # + # @return [String] The fragment component. + # + # source://addressable//lib/addressable/uri.rb#1799 + def fragment; end + + # Sets the fragment component for this URI. + # + # @param new_fragment [String, #to_str] The new fragment component. + # + # source://addressable//lib/addressable/uri.rb#1824 + def fragment=(new_fragment); end + + # Freeze URI, initializing instance variables. + # + # @return [Addressable::URI] The frozen URI object. + # + # source://addressable//lib/addressable/uri.rb#859 + def freeze; end + + # A hash value that will make a URI equivalent to its normalized + # form. + # + # @return [Integer] A hash of the URI. + # + # source://addressable//lib/addressable/uri.rb#2252 + def hash; end + + # The host component for this URI. + # + # @return [String] The host component. + # + # source://addressable//lib/addressable/uri.rb#1109 + def host; end + + # Sets the host component for this URI. + # + # @param new_host [String, #to_str] The new host component. + # + # source://addressable//lib/addressable/uri.rb#1145 + def host=(new_host); end + + # This method is same as URI::Generic#host except + # brackets for IPv6 (and 'IPvFuture') addresses are removed. + # + # @return [String] The hostname for this URI. + # @see Addressable::URI#host + # + # source://addressable//lib/addressable/uri.rb#1167 + def hostname; end + + # This method is same as URI::Generic#host= except + # the argument can be a bare IPv6 address (or 'IPvFuture'). + # + # @param new_hostname [String, #to_str] The new hostname for this URI. + # @see Addressable::URI#host= + # + # source://addressable//lib/addressable/uri.rb#1179 + def hostname=(new_hostname); end + + # The inferred port component for this URI. + # This method will normalize to the default port for the URI's scheme if + # the port isn't explicitly specified in the URI. + # + # @return [Integer] The inferred port component. + # + # source://addressable//lib/addressable/uri.rb#1429 + def inferred_port; end + + # source://addressable//lib/addressable/uri.rb#2406 + def init_with(coder); end + + # Returns a String representation of the URI object's state. + # + # @return [String] The URI object's state, as a String. + # + # source://addressable//lib/addressable/uri.rb#2373 + def inspect; end + + # Determines if the scheme indicates an IP-based protocol. + # + # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. + # false otherwise. + # + # source://addressable//lib/addressable/uri.rb#1844 + def ip_based?; end + + # Joins two URIs together. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#1878 + def join(uri); end + + # Destructive form of join. + # + # @param The [String, Addressable::URI, #to_str] URI to join with. + # @return [Addressable::URI] The joined URI. + # @see Addressable::URI#join + # + # source://addressable//lib/addressable/uri.rb#1981 + def join!(uri); end + + # Merges a URI with a Hash of components. + # This method has different behavior from join. Any + # components present in the hash parameter will override the + # original components. The path component is not treated specially. + # + # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @return [Addressable::URI] The merged URI. + # @see Hash#merge + # + # source://addressable//lib/addressable/uri.rb#1996 + def merge(hash); end + + # Destructive form of merge. + # + # @param The [Hash, Addressable::URI, #to_hash] components to merge with. + # @return [Addressable::URI] The merged URI. + # @see Addressable::URI#merge + # + # source://addressable//lib/addressable/uri.rb#2061 + def merge!(uri); end + + # Returns a normalized URI object. + # + # NOTE: This method does not attempt to fully conform to specifications. + # It exists largely to correct other people's failures to read the + # specifications, and also to deal with caching issues since several + # different URIs may represent the same resource and should not be + # cached multiple times. + # + # @return [Addressable::URI] The normalized URI. + # + # source://addressable//lib/addressable/uri.rb#2153 + def normalize; end + + # Destructively normalizes this URI object. + # + # @return [Addressable::URI] The normalized URI. + # @see Addressable::URI#normalize + # + # source://addressable//lib/addressable/uri.rb#2179 + def normalize!; end + + # The authority component for this URI, normalized. + # + # @return [String] The authority component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1241 + def normalized_authority; end + + # The fragment component for this URI, normalized. + # + # @return [String] The fragment component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1805 + def normalized_fragment; end + + # The host component for this URI, normalized. + # + # @return [String] The host component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1115 + def normalized_host; end + + # The password component for this URI, normalized. + # + # @return [String] The password component, normalized. + # + # source://addressable//lib/addressable/uri.rb#991 + def normalized_password; end + + # The path component for this URI, normalized. + # + # @return [String] The path component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1524 + def normalized_path; end + + # The port component for this URI, normalized. + # + # @return [Integer] The port component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1381 + def normalized_port; end + + # The query component for this URI, normalized. + # + # @return [String] The query component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1602 + def normalized_query(*flags); end + + # The scheme component for this URI, normalized. + # + # @return [String] The scheme component, normalized. + # + # source://addressable//lib/addressable/uri.rb#885 + def normalized_scheme; end + + # The normalized combination of components that represent a site. + # Combines the scheme, user, password, host, and port components. + # Primarily useful for HTTP and HTTPS. + # + # For example, "http://example.com/path?query" would have a + # site value of "http://example.com". + # + # @return [String] The normalized components that identify a site. + # + # source://addressable//lib/addressable/uri.rb#1474 + def normalized_site; end + + # The user component for this URI, normalized. + # + # @return [String] The user component, normalized. + # + # source://addressable//lib/addressable/uri.rb#936 + def normalized_user; end + + # The userinfo component for this URI, normalized. + # + # @return [String] The userinfo component, normalized. + # + # source://addressable//lib/addressable/uri.rb#1057 + def normalized_userinfo; end + + # Omits components from a URI. + # + # @example + # uri = Addressable::URI.parse("http://example.com/path?query") + # #=> # + # uri.omit(:scheme, :authority) + # #=> # + # @param *components [Symbol] The components to be omitted. + # @return [Addressable::URI] The URI with components omitted. + # + # source://addressable//lib/addressable/uri.rb#2286 + def omit(*components); end + + # Destructive form of omit. + # + # @param *components [Symbol] The components to be omitted. + # @return [Addressable::URI] The URI with components omitted. + # @see Addressable::URI#omit + # + # source://addressable//lib/addressable/uri.rb#2313 + def omit!(*components); end + + # The origin for this URI, serialized to ASCII, as per + # RFC 6454, section 6.2. + # + # @return [String] The serialized origin. + # + # source://addressable//lib/addressable/uri.rb#1303 + def origin; end + + # Sets the origin for this URI, serialized to ASCII, as per + # RFC 6454, section 6.2. This assignment will reset the `userinfo` + # component. + # + # @param new_origin [String, #to_str] The new origin component. + # + # source://addressable//lib/addressable/uri.rb#1322 + def origin=(new_origin); end + + # The password component for this URI. + # + # @return [String] The password component. + # + # source://addressable//lib/addressable/uri.rb#985 + def password; end + + # Sets the password component for this URI. + # + # @param new_password [String, #to_str] The new password component. + # + # source://addressable//lib/addressable/uri.rb#1014 + def password=(new_password); end + + # The path component for this URI. + # + # @return [String] The path component. + # + # source://addressable//lib/addressable/uri.rb#1517 + def path; end + + # Sets the path component for this URI. + # + # @param new_path [String, #to_str] The new path component. + # + # source://addressable//lib/addressable/uri.rb#1556 + def path=(new_path); end + + # The port component for this URI. + # This is the port number actually given in the URI. This does not + # infer port numbers from default values. + # + # @return [Integer] The port component. + # + # source://addressable//lib/addressable/uri.rb#1375 + def port; end + + # Sets the port component for this URI. + # + # @param new_port [String, Integer, #to_s] The new port component. + # + # source://addressable//lib/addressable/uri.rb#1397 + def port=(new_port); end + + # The query component for this URI. + # + # @return [String] The query component. + # + # source://addressable//lib/addressable/uri.rb#1596 + def query; end + + # Sets the query component for this URI. + # + # @param new_query [String, #to_str] The new query component. + # + # source://addressable//lib/addressable/uri.rb#1630 + def query=(new_query); end + + # Converts the query component to a Hash value. + # + # @example + # Addressable::URI.parse("?one=1&two=2&three=3").query_values + # #=> {"one" => "1", "two" => "2", "three" => "3"} + # Addressable::URI.parse("?one=two&one=three").query_values(Array) + # #=> [["one", "two"], ["one", "three"]] + # Addressable::URI.parse("?one=two&one=three").query_values(Hash) + # #=> {"one" => "three"} + # Addressable::URI.parse("?").query_values + # #=> {} + # Addressable::URI.parse("").query_values + # #=> nil + # @param return_type [Class] The return type desired. Value must be either + # `Hash` or `Array`. + # @return [Hash, Array, nil] The query string parsed as a Hash or Array + # or nil if the query string is blank. + # + # source://addressable//lib/addressable/uri.rb#1661 + def query_values(return_type = T.unsafe(nil)); end + + # Sets the query component for this URI from a Hash object. + # An empty Hash or Array will result in an empty query string. + # + # @example + # uri.query_values = {:a => "a", :b => ["c", "d", "e"]} + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['a', 'a'], ['b', 'c'], ['b', 'd'], ['b', 'e']] + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['a', 'a'], ['b', ['c', 'd', 'e']]] + # uri.query + # # => "a=a&b=c&b=d&b=e" + # uri.query_values = [['flag'], ['key', 'value']] + # uri.query + # # => "flag&key=value" + # @param new_query_values [Hash, #to_hash, Array] The new query values. + # + # source://addressable//lib/addressable/uri.rb#1712 + def query_values=(new_query_values); end + + # Determines if the URI is relative. + # + # @return [TrueClass, FalseClass] true if the URI is relative. false + # otherwise. + # + # source://addressable//lib/addressable/uri.rb#1858 + def relative?; end + + # The HTTP request URI for this URI. This is the path and the + # query string. + # + # @return [String] The request URI required for an HTTP request. + # + # source://addressable//lib/addressable/uri.rb#1763 + def request_uri; end + + # Sets the HTTP request URI for this URI. + # + # @param new_request_uri [String, #to_str] The new HTTP request URI. + # + # source://addressable//lib/addressable/uri.rb#1775 + def request_uri=(new_request_uri); end + + # Returns the shortest normalized relative form of this URI that uses the + # supplied URI as a base for resolution. Returns an absolute URI if + # necessary. This is effectively the opposite of route_to. + # + # @param uri [String, Addressable::URI, #to_str] The URI to route from. + # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. + # + # source://addressable//lib/addressable/uri.rb#2074 + def route_from(uri); end + + # Returns the shortest normalized relative form of the supplied URI that + # uses this URI as a base for resolution. Returns an absolute URI if + # necessary. This is effectively the opposite of route_from. + # + # @param uri [String, Addressable::URI, #to_str] The URI to route to. + # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. + # + # source://addressable//lib/addressable/uri.rb#2139 + def route_to(uri); end + + # The scheme component for this URI. + # + # @return [String] The scheme component. + # + # source://addressable//lib/addressable/uri.rb#879 + def scheme; end + + # Sets the scheme component for this URI. + # + # @param new_scheme [String, #to_str] The new scheme component. + # + # source://addressable//lib/addressable/uri.rb#906 + def scheme=(new_scheme); end + + # The combination of components that represent a site. + # Combines the scheme, user, password, host, and port components. + # Primarily useful for HTTP and HTTPS. + # + # For example, "http://example.com/path?query" would have a + # site value of "http://example.com". + # + # @return [String] The components that identify a site. + # + # source://addressable//lib/addressable/uri.rb#1456 + def site; end + + # Sets the site value for this URI. + # + # @param new_site [String, #to_str] The new site value. + # + # source://addressable//lib/addressable/uri.rb#1495 + def site=(new_site); end + + # Returns the top-level domain for this host. + # + # @example + # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" + # + # source://addressable//lib/addressable/uri.rb#1196 + def tld; end + + # Sets the top-level domain for this URI. + # + # @param new_tld [String, #to_str] The new top-level domain. + # + # source://addressable//lib/addressable/uri.rb#1204 + def tld=(new_tld); end + + # Returns a Hash of the URI components. + # + # @return [Hash] The URI as a Hash of components. + # + # source://addressable//lib/addressable/uri.rb#2356 + def to_hash; end + + # Converts the URI to a String. + # + # @return [String] The URI's String representation. + # + # source://addressable//lib/addressable/uri.rb#2330 + def to_s; end + + # Converts the URI to a String. + # URI's are glorified Strings. Allow implicit conversion. + # + # @return [String] The URI's String representation. + # + # source://addressable//lib/addressable/uri.rb#2330 + def to_str; end + + # The user component for this URI. + # + # @return [String] The user component. + # + # source://addressable//lib/addressable/uri.rb#930 + def user; end + + # Sets the user component for this URI. + # + # @param new_user [String, #to_str] The new user component. + # + # source://addressable//lib/addressable/uri.rb#959 + def user=(new_user); end + + # The userinfo component for this URI. + # Combines the user and password components. + # + # @return [String] The userinfo component. + # + # source://addressable//lib/addressable/uri.rb#1041 + def userinfo; end + + # Sets the userinfo component for this URI. + # + # @param new_userinfo [String, #to_str] The new userinfo component. + # + # source://addressable//lib/addressable/uri.rb#1080 + def userinfo=(new_userinfo); end + + protected + + # Converts the string to be UTF-8 if it is not already UTF-8 + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2550 + def force_utf8_encoding_if_needed(str); end + + # Resets composite values for the entire URI + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2541 + def remove_composite_values; end + + # Replaces the internal state of self with the specified URI's state. + # Used in destructive operations to avoid massive code repetition. + # + # @param uri [Addressable::URI] The URI to replace self with. + # @return [Addressable::URI] self. + # + # source://addressable//lib/addressable/uri.rb#2508 + def replace_self(uri); end + + # Splits path string with "/" (slash). + # It is considered that there is empty string after last slash when + # path ends with slash. + # + # @param path [String] The path to split. + # @return [Array] An array of parts of path. + # + # source://addressable//lib/addressable/uri.rb#2531 + def split_path(path); end + + # Ensures that the URI is valid. + # + # source://addressable//lib/addressable/uri.rb#2465 + def validate; end + + private + + # Resets instance variables + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2562 + def reset_ivs; end + + class << self + # Converts a path to a file scheme URI. If the path supplied is + # relative, it will be returned as a relative URI. If the path supplied + # is actually a non-file URI, it will parse the URI as if it had been + # parsed with Addressable::URI.parse. Handles all of the + # various Microsoft-specific formats for specifying paths. + # + # @example + # base = Addressable::URI.convert_path("/absolute/path/") + # uri = Addressable::URI.convert_path("relative/path") + # (base + uri).to_s + # #=> "file:///absolute/path/relative/path" + # + # Addressable::URI.convert_path( + # "c:\\windows\\My Documents 100%20\\foo.txt" + # ).to_s + # #=> "file:///c:/windows/My%20Documents%20100%20/foo.txt" + # + # Addressable::URI.convert_path("http://example.com/").to_s + # #=> "http://example.com/" + # @param path [String, Addressable::URI, #to_str] Typically a String path to a file or directory, but + # will return a sensible return value if an absolute URI is supplied + # instead. + # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI + # scheme was provided. + # + # source://addressable//lib/addressable/uri.rb#279 + def convert_path(path); end + + # Percent encodes any special characters in the URI. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#605 + def encode(uri, return_type = T.unsafe(nil)); end + + # Percent encodes a URI component. + # + # '9' to be percent encoded. If a Regexp is passed, the + # value /[^b-zB-Z0-9]/ would have the same effect. A set of + # useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # + # @example + # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component( + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through + # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # @return [String] The encoded component. + # + # source://addressable//lib/addressable/uri.rb#390 + def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end + + # Percent encodes any special characters in the URI. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#605 + def escape(uri, return_type = T.unsafe(nil)); end + + # Percent encodes a URI component. + # + # '9' to be percent encoded. If a Regexp is passed, the + # value /[^b-zB-Z0-9]/ would have the same effect. A set of + # useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # + # @example + # Addressable::URI.encode_component("simple/example", "b-zB-Z0-9") + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component("simple/example", /[^b-zB-Z0-9]/) + # => "simple%2Fex%61mple" + # Addressable::URI.encode_component( + # "simple/example", Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' through + # @param upcase_encoded [Regexp] A string of characters that may already be percent encoded, and whose + # encodings should be upcased. This allows normalization of percent + # encodings for characters not included in the + # character_class. + # @return [String] The encoded component. + # + # source://addressable//lib/addressable/uri.rb#390 + def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end + + # Encodes a set of key/value pairs according to the rules for the + # application/x-www-form-urlencoded MIME type. + # + # @param form_values [#to_hash, #to_ary] The form values to encode. + # @param sort [TrueClass, FalseClass] Sort the key/value pairs prior to encoding. + # Defaults to false. + # @return [String] The encoded value. + # + # source://addressable//lib/addressable/uri.rb#729 + def form_encode(form_values, sort = T.unsafe(nil)); end + + # Decodes a String according to the rules for the + # application/x-www-form-urlencoded MIME type. + # + # @param encoded_value [String, #to_str] The form values to decode. + # @return [Array] The decoded values. + # This is not a Hash because of the possibility for + # duplicate keys. + # + # source://addressable//lib/addressable/uri.rb#782 + def form_unencode(encoded_value); end + + # Converts an input to a URI. The input does not have to be a valid + # URI — the method will use heuristics to guess what URI was intended. + # This is not standards-compliant, merely user-friendly. + # + # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # No parsing is performed if the object is already an + # Addressable::URI. + # @param hints [Hash] A Hash of hints to the heuristic parser. + # Defaults to {:scheme => "http"}. + # @return [Addressable::URI] The parsed URI. + # + # source://addressable//lib/addressable/uri.rb#178 + def heuristic_parse(uri, hints = T.unsafe(nil)); end + + # Returns an array of known ip-based schemes. These schemes typically + # use a similar URI form: + # //:@:/ + # + # source://addressable//lib/addressable/uri.rb#1358 + def ip_based_schemes; end + + # Joins several URIs together. + # + # @example + # base = "http://example.com/" + # uri = Addressable::URI.parse("relative/path") + # Addressable::URI.join(base, uri) + # #=> # + # @param *uris [String, Addressable::URI, #to_str] The URIs to join. + # @return [Addressable::URI] The joined URI. + # + # source://addressable//lib/addressable/uri.rb#330 + def join(*uris); end + + # Normalizes the encoding of a URI component. + # + # @example + # Addressable::URI.normalize_component("simpl%65/%65xampl%65", "b-zB-Z") + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", /[^b-zB-Z]/ + # ) + # => "simple%2Fex%61mple" + # Addressable::URI.normalize_component( + # "simpl%65/%65xampl%65", + # Addressable::URI::CharacterClasses::UNRESERVED + # ) + # => "simple%2Fexample" + # Addressable::URI.normalize_component( + # "one%20two%2fthree%26four", + # "0-9a-zA-Z &/", + # "/" + # ) + # => "one two%2Fthree&four" + # @param component [String, #to_str] The URI component to encode. + # @param character_class [String, Regexp] The characters which are not percent encoded. If a String + # is passed, the String must be formatted as a regular + # expression character class. (Do not include the surrounding square + # brackets.) For example, "b-zB-Z0-9" would cause + # everything but the letters 'b' through 'z' and the numbers '0' + # through '9' to be percent encoded. If a Regexp is passed, + # the value /[^b-zB-Z0-9]/ would have the same effect. A + # set of useful String values may be found in the + # Addressable::URI::CharacterClasses module. The default + # value is the reserved plus unreserved character classes specified in + # RFC 3986. + # @param leave_encoded [String] When character_class is a String then + # leave_encoded is a string of characters that should remain + # percent encoded while normalizing the component; if they appear percent + # encoded in the original component, then they will be upcased ("%2f" + # normalized to "%2F") but otherwise left alone. + # @return [String] The normalized component. + # + # source://addressable//lib/addressable/uri.rb#541 + def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Resolves paths to their simplest form. + # + # @param path [String] The path to normalize. + # @return [String] The normalized path. + # + # source://addressable//lib/addressable/uri.rb#2429 + def normalize_path(path); end + + # Normalizes the encoding of a URI. Characters within a hostname are + # not percent encoded to allow for internationalized domain names. + # + # @param uri [String, Addressable::URI, #to_str] The URI to encode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @return [String, Addressable::URI] The encoded URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#660 + def normalized_encode(uri, return_type = T.unsafe(nil)); end + + # Returns a URI object based on the parsed string. + # + # @param uri [String, Addressable::URI, #to_str] The URI string to parse. + # No parsing is performed if the object is already an + # Addressable::URI. + # @return [Addressable::URI] The parsed URI. + # + # source://addressable//lib/addressable/uri.rb#101 + def parse(uri); end + + # Returns a hash of common IP-based schemes and their default port + # numbers. Adding new schemes to this hash, as necessary, will allow + # for better URI normalization. + # + # source://addressable//lib/addressable/uri.rb#1365 + def port_mapping; end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#461 + def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#461 + def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#461 + def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + + # Unencodes any percent encoded characters within a URI component. + # This method may be used for unencoding either components or full URIs, + # however, it is recommended to use the unencode_component + # alias when unencoding components. + # + # @param uri [String, Addressable::URI, #to_str] The URI or component to unencode. + # @param return_type [Class] The type of object to return. + # This value may only be set to String or + # Addressable::URI. All other values are invalid. Defaults + # to String. + # @param leave_encoded [String] A string of characters to leave encoded. If a percent encoded character + # in this list is encountered then it will remain percent encoded. + # @return [String, Addressable::URI] The unencoded component or URI. + # The return type is determined by the return_type + # parameter. + # + # source://addressable//lib/addressable/uri.rb#461 + def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end + end +end + +# Container for the character classes specified in +# RFC 3986. +# +# Note: Concatenated and interpolated `String`s are not affected by the +# `frozen_string_literal` directive and must be frozen explicitly. +# +# Interpolated `String`s *were* frozen this way before Ruby 3.0: +# https://bugs.ruby-lang.org/issues/17104 +# +# source://addressable//lib/addressable/uri.rb#46 +module Addressable::URI::CharacterClasses; end + +# source://addressable//lib/addressable/uri.rb#47 +Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#56 +Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#48 +Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#59 +Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#49 +Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#55 +Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#57 +Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#53 +Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#58 +Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#51 +Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#54 +Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#50 +Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#52 +Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#72 +Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) + +# Raised if something other than a uri is supplied. +# +# source://addressable//lib/addressable/uri.rb#34 +class Addressable::URI::InvalidURIError < ::StandardError; end + +# source://addressable//lib/addressable/uri.rb#2587 +module Addressable::URI::NONE; end + +# source://addressable//lib/addressable/uri.rb#1519 +Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#62 +module Addressable::URI::NormalizeCharacterClasses; end + +# source://addressable//lib/addressable/uri.rb#67 +Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#63 +Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#65 +Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#68 +Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#66 +Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#64 +Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2416 +Addressable::URI::PARENT = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#76 +Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://addressable//lib/addressable/uri.rb#2418 +Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2419 +Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2420 +Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2421 +Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#2415 +Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String) + +# Tables used to optimize encoding operations in `self.encode_component` +# and `self.normalize_component` +# +# source://addressable//lib/addressable/uri.rb#347 +Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array) + +# source://addressable//lib/addressable/uri.rb#351 +Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array) + +# source://addressable//lib/addressable/uri.rb#71 +Addressable::URI::SLASH = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#74 +Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/version.rb#23 +module Addressable::VERSION; end + +# source://addressable//lib/addressable/version.rb#24 +Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/version.rb#25 +Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://addressable//lib/addressable/version.rb#28 +Addressable::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/version.rb#26 +Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi new file mode 100644 index 0000000000..3fc4495da7 --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.2.rbi @@ -0,0 +1,584 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ast` gem. +# Please instead update this file by running `bin/tapioca gem ast`. + +# {AST} is a library for manipulating abstract syntax trees. +# +# It embraces immutability; each AST node is inherently frozen at +# creation, and updating a child node requires recreating that node +# and its every parent, recursively. +# This is a design choice. It does create some pressure on +# garbage collector, but completely eliminates all concurrency +# and aliasing problems. +# +# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for +# additional recommendations and design patterns. +# +# source://ast//lib/ast.rb#13 +module AST; end + +# Node is an immutable class, instances of which represent abstract +# syntax tree nodes. It combines semantic information (i.e. anything +# that affects the algorithmic properties of a program) with +# meta-information (line numbers or compiler intermediates). +# +# Notes on inheritance +# ==================== +# +# The distinction between semantics and metadata is important. Complete +# semantic information should be contained within just the {#type} and +# {#children} of a Node instance; in other words, if an AST was to be +# stripped of all meta-information, it should remain a valid AST which +# could be successfully processed to yield a result with the same +# algorithmic properties. +# +# Thus, Node should never be inherited in order to define methods which +# affect or return semantic information, such as getters for `class_name`, +# `superclass` and `body` in the case of a hypothetical `ClassNode`. The +# correct solution is to use a generic Node with a {#type} of `:class` +# and three children. See also {Processor} for tips on working with such +# ASTs. +# +# On the other hand, Node can and should be inherited to define +# application-specific metadata (see also {#initialize}) or customize the +# printing format. It is expected that an application would have one or two +# such classes and use them across the entire codebase. +# +# The rationale for this pattern is extensibility and maintainability. +# Unlike static ones, dynamic languages do not require the presence of a +# predefined, rigid structure, nor does it improve dispatch efficiency, +# and while such a structure can certainly be defined, it does not add +# any value but incurs a maintaining cost. +# For example, extending the AST even with a transformation-local +# temporary node type requires making globally visible changes to +# the codebase. +# +# source://ast//lib/ast/node.rb#40 +class AST::Node + # Constructs a new instance of Node. + # + # The arguments `type` and `children` are converted with `to_sym` and + # `to_a` respectively. Additionally, the result of converting `children` + # is frozen. While mutating the arguments is generally considered harmful, + # the most common case is to pass an array literal to the constructor. If + # your code does not expect the argument to be frozen, use `#dup`. + # + # The `properties` hash is passed to {#assign_properties}. + # + # @return [Node] a new instance of Node + # + # source://ast//lib/ast/node.rb#72 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def +(array); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def <<(element); end + + # Compares `self` to `other`, possibly converting with `to_ast`. Only + # `type` and `children` are compared; metadata is deliberately ignored. + # + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#153 + def ==(other); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def append(element); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def children; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def clone; end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def concat(array); end + + # Enables matching for Node, where type is the first element + # and the children are remaining items. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#253 + def deconstruct; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def dup; end + + # Test if other object is equal to + # + # @param other [Object] + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#85 + def eql?(other); end + + # Returns the precomputed hash value for this node + # + # @return [Fixnum] + # + # source://ast//lib/ast/node.rb#61 + def hash; end + + # Converts `self` to a s-expression ruby string. + # The code return will recreate the node, using the sexp module s() + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#211 + def inspect(indent = T.unsafe(nil)); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def to_a; end + + # @return [AST::Node] self + # + # source://ast//lib/ast/node.rb#229 + def to_ast; end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_s(indent = T.unsafe(nil)); end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_sexp(indent = T.unsafe(nil)); end + + # Converts `self` to an Array where the first element is the type as a Symbol, + # and subsequent elements are the same representation of its children. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#237 + def to_sexp_array; end + + # Returns the type of this node. + # + # @return [Symbol] + # + # source://ast//lib/ast/node.rb#43 + def type; end + + # Returns a new instance of Node where non-nil arguments replace the + # corresponding fields of `self`. + # + # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield + # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would + # yield `(foo)`. + # + # If the resulting node would be identical to `self`, does nothing. + # + # @param type [Symbol, nil] + # @param children [Array, nil] + # @param properties [Hash, nil] + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#133 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + protected + + # By default, each entry in the `properties` hash is assigned to + # an instance variable in this instance of Node. A subclass should define + # attribute readers for such variables. The values passed in the hash + # are not frozen or whitelisted; such behavior can also be implemented + # by subclassing Node and overriding this method. + # + # @return [nil] + # + # source://ast//lib/ast/node.rb#98 + def assign_properties(properties); end + + # Returns `@type` with all underscores replaced by dashes. This allows + # to write symbol literals without quotes in Ruby sources and yet have + # nicely looking s-expressions. + # + # @return [String] + # + # source://ast//lib/ast/node.rb#264 + def fancy_type; end + + private + + def original_dup; end +end + +# This class includes {AST::Processor::Mixin}; however, it is +# deprecated, since the module defines all of the behaviors that +# the processor includes. Any new libraries should use +# {AST::Processor::Mixin} instead of subclassing this. +# +# @deprecated Use {AST::Processor::Mixin} instead. +# +# source://ast//lib/ast/processor.rb#8 +class AST::Processor + include ::AST::Processor::Mixin +end + +# The processor module is a module which helps transforming one +# AST into another. In a nutshell, the {#process} method accepts +# a {Node} and dispatches it to a handler corresponding to its +# type, and returns a (possibly) updated variant of the node. +# +# The processor module has a set of associated design patterns. +# They are best explained with a concrete example. Let's define a +# simple arithmetic language and an AST format for it: +# +# Terminals (AST nodes which do not have other AST nodes inside): +# +# * `(integer )`, +# +# Nonterminals (AST nodes with other nodes as children): +# +# * `(add )`, +# * `(multiply )`, +# * `(divide )`, +# * `(negate )`, +# * `(store )`: stores value of `` +# into a variable named ``, +# * `(load )`: loads value of a variable named +# ``, +# * `(each ...)`: computes each of the ``s and +# prints the result. +# +# All AST nodes have the same Ruby class, and therefore they don't +# know how to traverse themselves. (A solution which dynamically +# checks the type of children is possible, but is slow and +# error-prone.) So, a class including the module which knows how +# to traverse the entire tree should be defined. Such classes +# have a handler for each nonterminal node which recursively +# processes children nodes: +# +# require 'ast' +# +# class ArithmeticsProcessor +# include AST::Processor::Mixin +# # This method traverses any binary operators such as (add) +# # or (multiply). +# def process_binary_op(node) +# # Children aren't decomposed automatically; it is +# # suggested to use Ruby multiple assignment expansion, +# # as it is very convenient here. +# left_expr, right_expr = *node +# +# # AST::Node#updated won't change node type if nil is +# # passed as a first argument, which allows to reuse the +# # same handler for multiple node types using `alias' +# # (below). +# node.updated(nil, [ +# process(left_expr), +# process(right_expr) +# ]) +# end +# alias_method :on_add, :process_binary_op +# alias_method :on_multiply, :process_binary_op +# alias_method :on_divide, :process_binary_op +# +# def on_negate(node) +# # It is also possible to use #process_all for more +# # compact code if every child is a Node. +# node.updated(nil, process_all(node)) +# end +# +# def on_store(node) +# expr, variable_name = *node +# +# # Note that variable_name is not a Node and thus isn't +# # passed to #process. +# node.updated(nil, [ +# process(expr), +# variable_name +# ]) +# end +# +# # (load) is effectively a terminal node, and so it does +# # not need an explicit handler, as the following is the +# # default behavior. Essentially, for any nodes that don't +# # have a defined handler, the node remains unchanged. +# def on_load(node) +# nil +# end +# +# def on_each(node) +# node.updated(nil, process_all(node)) +# end +# end +# +# Let's test our ArithmeticsProcessor: +# +# include AST::Sexp +# expr = s(:add, s(:integer, 2), s(:integer, 2)) +# +# p ArithmeticsProcessor.new.process(expr) == expr # => true +# +# As expected, it does not change anything at all. This isn't +# actually very useful, so let's now define a Calculator, which +# will compute the expression values: +# +# # This Processor folds nonterminal nodes and returns an +# # (integer) terminal node. +# class ArithmeticsCalculator < ArithmeticsProcessor +# def compute_op(node) +# # First, node children are processed and then unpacked +# # to local variables. +# nodes = process_all(node) +# +# if nodes.all? { |node| node.type == :integer } +# # If each of those nodes represents a literal, we can +# # fold this node! +# values = nodes.map { |node| node.children.first } +# AST::Node.new(:integer, [ +# yield(values) +# ]) +# else +# # Otherwise, we can just leave the current node in the +# # tree and only update it with processed children +# # nodes, which can be partially folded. +# node.updated(nil, nodes) +# end +# end +# +# def on_add(node) +# compute_op(node) { |left, right| left + right } +# end +# +# def on_multiply(node) +# compute_op(node) { |left, right| left * right } +# end +# end +# +# Let's check: +# +# p ArithmeticsCalculator.new.process(expr) # => (integer 4) +# +# Excellent, the calculator works! Now, a careful reader could +# notice that the ArithmeticsCalculator does not know how to +# divide numbers. What if we pass an expression with division to +# it? +# +# expr_with_division = \ +# s(:add, +# s(:integer, 1), +# s(:divide, +# s(:add, s(:integer, 8), s(:integer, 4)), +# s(:integer, 3))) # 1 + (8 + 4) / 3 +# +# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) +# p folded_expr_with_division +# # => (add +# # (integer 1) +# # (divide +# # (integer 12) +# # (integer 3))) +# +# As you can see, the expression was folded _partially_: the inner +# `(add)` node which could be computed was folded to +# `(integer 12)`, the `(divide)` node is left as-is because there +# is no computing handler for it, and the root `(add)` node was +# also left as it is because some of its children were not +# literals. +# +# Note that this partial folding is only possible because the +# _data_ format, i.e. the format in which the computed values of +# the nodes are represented, is the same as the AST itself. +# +# Let's extend our ArithmeticsCalculator class further. +# +# class ArithmeticsCalculator +# def on_divide(node) +# compute_op(node) { |left, right| left / right } +# end +# +# def on_negate(node) +# # Note how #compute_op works regardless of the operator +# # arity. +# compute_op(node) { |value| -value } +# end +# end +# +# Now, let's apply our renewed ArithmeticsCalculator to a partial +# result of previous evaluation: +# +# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) +# +# Five! Excellent. This is also pretty much how CRuby 1.8 executed +# its programs. +# +# Now, let's do some automated bug searching. Division by zero is +# an error, right? So if we could detect that someone has divided +# by zero before the program is even run, that could save some +# debugging time. +# +# class DivisionByZeroVerifier < ArithmeticsProcessor +# class VerificationFailure < Exception; end +# +# def on_divide(node) +# # You need to process the children to handle nested divisions +# # such as: +# # (divide +# # (integer 1) +# # (divide (integer 1) (integer 0)) +# left, right = process_all(node) +# +# if right.type == :integer && +# right.children.first == 0 +# raise VerificationFailure, "Ouch! This code divides by zero." +# end +# end +# +# def divides_by_zero?(ast) +# process(ast) +# false +# rescue VerificationFailure +# true +# end +# end +# +# nice_expr = \ +# s(:divide, +# s(:add, s(:integer, 10), s(:integer, 2)), +# s(:integer, 4)) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) +# # => false. Good. +# +# bad_expr = \ +# s(:add, s(:integer, 10), +# s(:divide, s(:integer, 1), s(:integer, 0))) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) +# # => true. WHOOPS. DO NOT RUN THIS. +# +# Of course, this won't detect more complex cases... unless you +# use some partial evaluation before! The possibilites are +# endless. Have fun. +# +# source://ast//lib/ast/processor/mixin.rb#240 +module AST::Processor::Mixin + # Default handler. Does nothing. + # + # @param node [AST::Node] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#284 + def handler_missing(node); end + + # Dispatches `node`. If a node has type `:foo`, then a handler + # named `on_foo` is invoked with one argument, the `node`; if + # there isn't such a handler, {#handler_missing} is invoked + # with the same argument. + # + # If the handler returns `nil`, `node` is returned; otherwise, + # the return value of the handler is passed along. + # + # @param node [AST::Node, nil] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#251 + def process(node); end + + # {#process}es each node from `nodes` and returns an array of + # results. + # + # @param nodes [Array] + # @return [Array] + # + # source://ast//lib/ast/processor/mixin.rb#274 + def process_all(nodes); end +end + +# This simple module is very useful in the cases where one needs +# to define deeply nested ASTs from Ruby code, for example, in +# tests. It should be used like this: +# +# describe YourLanguage::AST do +# include Sexp +# +# it "should correctly parse expressions" do +# YourLanguage.parse("1 + 2 * 3").should == +# s(:add, +# s(:integer, 1), +# s(:multiply, +# s(:integer, 2), +# s(:integer, 3))) +# end +# end +# +# This way the amount of boilerplate code is greatly reduced. +# +# source://ast//lib/ast/sexp.rb#20 +module AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # Note that the resulting node is of the type AST::Node and not a + # subclass. + # This would not pose a problem with comparisons, as {Node#==} + # ignores metadata. + # + # source://ast//lib/ast/sexp.rb#26 + def s(type, *children); end +end diff --git a/sorbet/rbi/gems/aws-eventstream@1.2.0.rbi b/sorbet/rbi/gems/aws-eventstream@1.2.0.rbi new file mode 100644 index 0000000000..fc2a1c0dee --- /dev/null +++ b/sorbet/rbi/gems/aws-eventstream@1.2.0.rbi @@ -0,0 +1,379 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aws-eventstream` gem. +# Please instead update this file by running `bin/tapioca gem aws-eventstream`. + +# source://aws-eventstream//lib/aws-eventstream/decoder.rb#7 +module Aws + class << self + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#133 + def config; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#136 + def config=(config); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#195 + def eager_autoload!(*args); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#188 + def empty_connection_pools!; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#145 + def partition(partition_name); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#150 + def partitions; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#126 + def shared_config; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#165 + def use_bundled_cert!; end + end +end + +# source://aws-eventstream//lib/aws-eventstream/decoder.rb#8 +module Aws::EventStream; end + +# This class provides method for decoding binary inputs into +# single or multiple messages (Aws::EventStream::Message). +# +# * {#decode} - decodes messages from an IO like object responds +# to #read that containing binary data, returning decoded +# Aws::EventStream::Message along the way or wrapped in an enumerator +# +# ## Examples +# +# decoder = Aws::EventStream::Decoder.new +# +# # decoding from IO +# decoder.decode(io) do |message| +# message.headers +# # => { ... } +# message.payload +# # => StringIO / Tempfile +# end +# +# # alternatively +# message_pool = decoder.decode(io) +# message_pool.next +# # => Aws::EventStream::Message +# +# * {#decode_chunk} - decodes a single message from a chunk of data, +# returning message object followed by boolean(indicating eof status +# of data) in an array object +# +# ## Examples +# +# # chunk containing exactly one message data +# message, chunk_eof = decoder.decode_chunk(chunk_str) +# message +# # => Aws::EventStream::Message +# chunk_eof +# # => true +# +# # chunk containing a partial message +# message, chunk_eof = decoder.decode_chunk(chunk_str) +# message +# # => nil +# chunk_eof +# # => true +# # chunk data is saved at decoder's message_buffer +# +# # chunk containing more that one data message +# message, chunk_eof = decoder.decode_chunk(chunk_str) +# message +# # => Aws::EventStream::Message +# chunk_eof +# # => false +# # extra chunk data is saved at message_buffer of the decoder +# +# source://aws-eventstream//lib/aws-eventstream/decoder.rb#63 +class Aws::EventStream::Decoder + include ::Enumerable + + # @option options + # @param options [Hash] The initialization options. + # @return [Decoder] a new instance of Decoder + # + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#83 + def initialize(options = T.unsafe(nil)); end + + # Decodes messages from a binary stream + # + # @param io [IO#read] An IO-like object + # that responds to `#read` + # @return [Enumerable, nil] Returns a new Enumerable + # containing decoded messages if no block is given + # @yieldparam message [Message] + # + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#96 + def decode(io, &block); end + + # Decodes a single message from a chunk of string + # + # @param chunk [String] A chunk of string to be decoded, + # chunk can contain partial event message to multiple event messages + # When not provided, decode data from #message_buffer + # @return [Array] Returns single decoded message + # and boolean pair, the boolean flag indicates whether this chunk + # has been fully consumed, unused data is tracked at #message_buffer + # + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#114 + def decode_chunk(chunk = T.unsafe(nil)); end + + private + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#163 + def decode_context(content, header_length); end + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#130 + def decode_message(raw_message); end + + # @raise [Errors::PreludeChecksumError] + # + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#155 + def decode_prelude(prelude); end + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#171 + def extract_headers(buffer); end + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#201 + def extract_payload(encoded); end + + # exposed via object.send for testing + # + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#122 + def message_buffer; end + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#207 + def payload_stringio(encoded); end + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#211 + def payload_tempfile(encoded); end + + # source://aws-eventstream//lib/aws-eventstream/decoder.rb#124 + def wrap_as_enumerator(decoded_message); end +end + +# 4 bytes message crc checksum +# +# source://aws-eventstream//lib/aws-eventstream/decoder.rb#76 +Aws::EventStream::Decoder::CRC32_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://aws-eventstream//lib/aws-eventstream/decoder.rb#67 +Aws::EventStream::Decoder::ONE_MEGABYTE = T.let(T.unsafe(nil), Integer) + +# bytes of prelude part, including 4 bytes of +# total message length, headers length and crc checksum of prelude +# +# source://aws-eventstream//lib/aws-eventstream/decoder.rb#72 +Aws::EventStream::Decoder::PRELUDE_LENGTH = T.let(T.unsafe(nil), Integer) + +# This class provides #encode method for encoding +# Aws::EventStream::Message into binary. +# +# * {#encode} - encode Aws::EventStream::Message into binary +# when output IO-like object is provided, binary string +# would be written to IO. If not, the encoded binary string +# would be returned directly +# +# ## Examples +# +# message = Aws::EventStream::Message.new( +# headers: { +# "foo" => Aws::EventStream::HeaderValue.new( +# value: "bar", type: "string" +# ) +# }, +# payload: "payload" +# ) +# encoder = Aws::EventsStream::Encoder.new +# file = Tempfile.new +# +# # encode into IO ouput +# encoder.encode(message, file) +# +# # get encoded binary string +# encoded_message = encoder.encode(message) +# +# file.read == encoded_message +# # => true +# +# source://aws-eventstream//lib/aws-eventstream/encoder.rb#38 +class Aws::EventStream::Encoder + # Encodes Aws::EventStream::Message to output IO when + # provided, else return the encoded binary string + # + # @param message [Aws::EventStream::Message] + # @param io [IO#write, nil] An IO-like object that + # responds to `#write`, encoded message will be + # written to this IO when provided + # @return [nil, String] when output IO is provided, + # encoded message will be written to that IO, nil + # will be returned. Else, encoded binary string is + # returned. + # + # source://aws-eventstream//lib/aws-eventstream/encoder.rb#63 + def encode(message, io = T.unsafe(nil)); end + + # Encodes headers part of an Aws::EventStream::Message + # into String + # + # @param message [Aws::EventStream::Message] + # @return [String] + # + # source://aws-eventstream//lib/aws-eventstream/encoder.rb#110 + def encode_headers(message); end + + # Encodes an Aws::EventStream::Message + # into String + # + # @param message [Aws::EventStream::Message] + # @return [String] + # + # source://aws-eventstream//lib/aws-eventstream/encoder.rb#79 + def encode_message(message); end + + private + + # source://aws-eventstream//lib/aws-eventstream/encoder.rb#135 + def encode_prelude(total_length, headers_length); end +end + +# Maximum header length allowed (after encode) 128kb +# +# source://aws-eventstream//lib/aws-eventstream/encoder.rb#45 +Aws::EventStream::Encoder::MAX_HEADERS_LENGTH = T.let(T.unsafe(nil), Integer) + +# Maximum payload length allowed (after encode) 16mb +# +# source://aws-eventstream//lib/aws-eventstream/encoder.rb#48 +Aws::EventStream::Encoder::MAX_PAYLOAD_LENGTH = T.let(T.unsafe(nil), Integer) + +# bytes of total overhead in a message, including prelude +# and 4 bytes total message crc checksum +# +# source://aws-eventstream//lib/aws-eventstream/encoder.rb#42 +Aws::EventStream::Encoder::OVERHEAD_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://aws-eventstream//lib/aws-eventstream/errors.rb#5 +module Aws::EventStream::Errors; end + +# source://aws-eventstream//lib/aws-eventstream/errors.rb#41 +class Aws::EventStream::Errors::EventHeadersLengthExceedError < ::RuntimeError + # @return [EventHeadersLengthExceedError] a new instance of EventHeadersLengthExceedError + # + # source://aws-eventstream//lib/aws-eventstream/errors.rb#42 + def initialize(*args); end +end + +# source://aws-eventstream//lib/aws-eventstream/errors.rb#35 +class Aws::EventStream::Errors::EventPayloadLengthExceedError < ::RuntimeError + # @return [EventPayloadLengthExceedError] a new instance of EventPayloadLengthExceedError + # + # source://aws-eventstream//lib/aws-eventstream/errors.rb#36 + def initialize(*args); end +end + +# Raise when insufficient bytes of a message is received +# +# source://aws-eventstream//lib/aws-eventstream/errors.rb#17 +class Aws::EventStream::Errors::IncompleteMessageError < ::RuntimeError + # @return [IncompleteMessageError] a new instance of IncompleteMessageError + # + # source://aws-eventstream//lib/aws-eventstream/errors.rb#18 + def initialize(*args); end +end + +# source://aws-eventstream//lib/aws-eventstream/errors.rb#29 +class Aws::EventStream::Errors::MessageChecksumError < ::RuntimeError + # @return [MessageChecksumError] a new instance of MessageChecksumError + # + # source://aws-eventstream//lib/aws-eventstream/errors.rb#30 + def initialize(*args); end +end + +# source://aws-eventstream//lib/aws-eventstream/errors.rb#23 +class Aws::EventStream::Errors::PreludeChecksumError < ::RuntimeError + # @return [PreludeChecksumError] a new instance of PreludeChecksumError + # + # source://aws-eventstream//lib/aws-eventstream/errors.rb#24 + def initialize(*args); end +end + +# Raised when reading bytes exceed buffer total bytes +# +# source://aws-eventstream//lib/aws-eventstream/errors.rb#8 +class Aws::EventStream::Errors::ReadBytesExceedLengthError < ::RuntimeError + # @return [ReadBytesExceedLengthError] a new instance of ReadBytesExceedLengthError + # + # source://aws-eventstream//lib/aws-eventstream/errors.rb#9 + def initialize(target_byte, total_len); end +end + +# source://aws-eventstream//lib/aws-eventstream/header_value.rb#6 +class Aws::EventStream::HeaderValue + # @return [HeaderValue] a new instance of HeaderValue + # + # source://aws-eventstream//lib/aws-eventstream/header_value.rb#8 + def initialize(options); end + + # @return [String] type of the header value + # complete type list see Aws::EventStream::Types + # + # source://aws-eventstream//lib/aws-eventstream/header_value.rb#19 + def type; end + + # Returns the value of attribute value. + # + # source://aws-eventstream//lib/aws-eventstream/header_value.rb#15 + def value; end + + private + + # source://aws-eventstream//lib/aws-eventstream/header_value.rb#40 + def format_timestamp(value); end + + # source://aws-eventstream//lib/aws-eventstream/header_value.rb#32 + def format_uuid(value); end + + # source://aws-eventstream//lib/aws-eventstream/header_value.rb#23 + def format_value(value); end +end + +# source://aws-eventstream//lib/aws-eventstream/message.rb#5 +class Aws::EventStream::Message + # @return [Message] a new instance of Message + # + # source://aws-eventstream//lib/aws-eventstream/message.rb#7 + def initialize(options); end + + # @return [Hash] headers of a message + # + # source://aws-eventstream//lib/aws-eventstream/message.rb#13 + def headers; end + + # @return [IO] payload of a message, size not exceed 16MB. + # StringIO is returned for <= 1MB payload + # Tempfile is returned for > 1MB payload + # + # source://aws-eventstream//lib/aws-eventstream/message.rb#18 + def payload; end +end + +# Message Header Value Types +# +# source://aws-eventstream//lib/aws-eventstream/types.rb#7 +module Aws::EventStream::Types + class << self + # pack/unpack pattern, byte size, type idx + # + # source://aws-eventstream//lib/aws-eventstream/types.rb#25 + def pattern; end + + # source://aws-eventstream//lib/aws-eventstream/types.rb#9 + def types; end + end +end diff --git a/sorbet/rbi/gems/aws-partitions@1.820.0.rbi b/sorbet/rbi/gems/aws-partitions@1.820.0.rbi new file mode 100644 index 0000000000..cd42e640bd --- /dev/null +++ b/sorbet/rbi/gems/aws-partitions@1.820.0.rbi @@ -0,0 +1,693 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aws-partitions` gem. +# Please instead update this file by running `bin/tapioca gem aws-partitions`. + +# source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#3 +module Aws + class << self + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#133 + def config; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#136 + def config=(config); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#195 + def eager_autoload!(*args); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#188 + def empty_connection_pools!; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#145 + def partition(partition_name); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#150 + def partitions; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#126 + def shared_config; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#165 + def use_bundled_cert!; end + end +end + +# A {Partition} is a group of AWS {Region} and {Service} objects. You +# can use a partition to determine what services are available in a region, +# or what regions a service is available in. +# +# ## Partitions +# +# **AWS accounts are scoped to a single partition**. You can get a partition +# by name. Valid partition names include: +# +# * `"aws"` - Public AWS partition +# * `"aws-cn"` - AWS China +# * `"aws-us-gov"` - AWS GovCloud +# +# To get a partition by name: +# +# aws = Aws::Partitions.partition('aws') +# +# You can also enumerate all partitions: +# +# Aws::Partitions.each do |partition| +# puts partition.name +# end +# +# ## Regions +# +# A {Partition} is divided up into one or more regions. For example, the +# "aws" partition contains, "us-east-1", "us-west-1", etc. You can get +# a region by name. Calling {Partition#region} will return an instance +# of {Region}. +# +# region = Aws::Partitions.partition('aws').region('us-west-2') +# region.name +# #=> "us-west-2" +# +# You can also enumerate all regions within a partition: +# +# Aws::Partitions.partition('aws').regions.each do |region| +# puts region.name +# end +# +# Each {Region} object has a name, description and a list of services +# available to that region: +# +# us_west_2 = Aws::Partitions.partition('aws').region('us-west-2') +# +# us_west_2.name #=> "us-west-2" +# us_west_2.description #=> "US West (Oregon)" +# us_west_2.partition_name "aws" +# us_west_2.services #=> # true/false +# +# The service name should be the service's module name as used by +# the AWS SDK for Ruby. To find the complete list of supported +# service names, see {Partition#services}. +# +# Its also possible to enumerate every service for every region in +# every partition. +# +# Aws::Partitions.partitions.each do |partition| +# partition.regions.each do |region| +# region.services.each do |service_name| +# puts "#{partition.name} -> #{region.name} -> #{service_name}" +# end +# end +# end +# +# ## Services +# +# A {Partition} has a list of services available. You can get a +# single {Service} by name: +# +# Aws::Partitions.partition('aws').service('DynamoDB') +# +# You can also enumerate all services in a partition: +# +# Aws::Partitions.partition('aws').services.each do |service| +# puts service.name +# end +# +# Each {Service} object has a name, and information about regions +# that service is available in. +# +# service.name #=> "DynamoDB" +# service.partition_name #=> "aws" +# service.regions #=> # false +# service.partition_region #=> "aws-global" +# +# Its also possible to enumerate every region for every service in +# every partition. +# +# Aws::Partitions.partitions.each do |partition| +# partition.services.each do |service| +# service.regions.each do |region_name| +# puts "#{partition.name} -> #{region_name} -> #{service.name}" +# end +# end +# end +# +# ## Service Names +# +# {Service} names are those used by the the AWS SDK for Ruby. They +# correspond to the service's module. +# +# source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#4 +module Aws::Partitions + extend ::Enumerable + + class << self + # @api private For internal use only. + # @param new_partitions [Hash] + # + # source://aws-partitions//lib/aws-partitions.rb#191 + def add(new_partitions); end + + # @api private For internal use only. + # + # source://aws-partitions//lib/aws-partitions.rb#205 + def clear; end + + # @api private + # @return [Hash] + # + # source://aws-partitions//lib/aws-partitions.rb#232 + def default_metadata; end + + # @api private + # @return [PartitionList] + # + # source://aws-partitions//lib/aws-partitions.rb#212 + def default_partition_list; end + + # @api private + # @return [Hash] + # + # source://aws-partitions//lib/aws-partitions.rb#222 + def defaults; end + + # @return [Enumerable] + # + # source://aws-partitions//lib/aws-partitions.rb#136 + def each(&block); end + + # @api private For Internal use only + # @param partition_metadata [Hash] + # + # source://aws-partitions//lib/aws-partitions.rb#200 + def merge_metadata(partition_metadata); end + + # Return the partition with the given name. A partition describes + # the services and regions available in that partition. + # + # aws = Aws::Partitions.partition('aws') + # + # puts "Regions available in the aws partition:\n" + # aws.regions.each do |region| + # puts region.name + # end + # + # puts "Services available in the aws partition:\n" + # aws.services.each do |services| + # puts services.name + # end + # + # @param name [String] The name of the partition to return. + # Valid names include "aws", "aws-cn", and "aws-us-gov". + # @raise [ArgumentError] Raises an `ArgumentError` if a partition is + # not found with the given name. The error message contains a list + # of valid partition names. + # @return [Partition] + # + # source://aws-partitions//lib/aws-partitions.rb#163 + def partition(name); end + + # Returns an array with every partitions. A partition describes + # the services and regions available in that partition. + # + # Aws::Partitions.partitions.each do |partition| + # + # puts "Regions available in #{partition.name}:\n" + # partition.regions.each do |region| + # puts region.name + # end + # + # puts "Services available in #{partition.name}:\n" + # partition.services.each do |service| + # puts service.name + # end + # end + # + # @return [Enumerable] Returns an enumerable of all + # known partitions. + # + # source://aws-partitions//lib/aws-partitions.rb#185 + def partitions; end + + # @api private For internal use only. + # @return [Hash] Returns a map of service module names + # to their id as used in the endpoints.json document. + # + # source://aws-partitions//lib/aws-partitions.rb#243 + def service_ids; end + end +end + +# @api private +# +# source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#6 +class Aws::Partitions::EndpointProvider + # Intentionally marked private. The format of the endpoint rules + # is an implementation detail. + # + # @api private + # @return [EndpointProvider] a new instance of EndpointProvider + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#31 + def initialize(rules); end + + # @api private Use the static class methods instead. + # @option variants + # @option variants + # @param region [String] The region used to fetch the partition. + # @param service [String] Used only if dualstack is true. Used to find a + # DNS suffix for a specific service. + # @param variants [Hash] Endpoint variants such as 'fips' or 'dualstack' + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#73 + def dns_suffix_for(region, service, variants); end + + # @api private Use the static class methods instead. + # @option variants + # @option variants + # @param region [String] The region for the client. + # @param service [String] The endpoint prefix for the service, e.g. + # "monitoring" for cloudwatch. + # @param sts_regional_endpoints [String] [STS only] Whether to use + # `legacy` (global endpoint for legacy regions) or `regional` mode for + # using regional endpoint for supported regions except 'aws-global' + # @param variants [Hash] Endpoint variants such as 'fips' or 'dualstack' + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#46 + def resolve(region, service, sts_regional_endpoints, variants); end + + # @api private Use the static class methods instead. + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#51 + def signing_region(region, service, sts_regional_endpoints); end + + # @api private Use the static class methods instead. + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#57 + def signing_service(region, service); end + + private + + # returns a callable that takes a region + # and returns true if the service is global + # + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#178 + def build_is_global_fn(sts_regional_endpoints = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#83 + def configured_variants?(variants); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#192 + def credential_scope(region, service, is_global_fn); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#238 + def default_partition; end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#125 + def endpoint_for(region, service, is_global_fn, variants); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#141 + def endpoint_no_variants_for(region, service, is_global_fn); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#133 + def endpoint_with_variants_for(region, service, variants); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#87 + def fetch_variant(cfg, tags); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#212 + def get_partition(region_or_partition); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#219 + def partition_containing_region(region); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#234 + def partition_matching_name(partition_name); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#225 + def partition_matching_region(region); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#92 + def resolve_variant(region, service, config_variants); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#117 + def validate_variant!(config_variants, resolved_variant); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#171 + def warn_deprecation(service, region); end + + class << self + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#256 + def dns_suffix_for(region, service = T.unsafe(nil), variants = T.unsafe(nil)); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#244 + def resolve(region, service, sts_endpoint = T.unsafe(nil), variants = T.unsafe(nil)); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#248 + def signing_region(region, service, sts_regional_endpoints = T.unsafe(nil)); end + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#252 + def signing_service(region, service); end + + private + + # @api private + # + # source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#262 + def default_provider; end + end +end + +# When sts_regional_endpoint is set to `legacy`, the endpoint +# pattern stays global for the following regions: +# +# @api private +# +# source://aws-partitions//lib/aws-partitions/endpoint_provider.rb#9 +Aws::Partitions::EndpointProvider::STS_LEGACY_REGIONS = T.let(T.unsafe(nil), Array) + +# source://aws-partitions//lib/aws-partitions/partition.rb#5 +class Aws::Partitions::Partition + # @api private + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Partition] a new instance of Partition + # + # source://aws-partitions//lib/aws-partitions/partition.rb#10 + def initialize(options = T.unsafe(nil)); end + + # @return [Metadata] The metadata for the partition. + # + # source://aws-partitions//lib/aws-partitions/partition.rb#25 + def metadata; end + + # @return [String] The partition name, e.g. "aws", "aws-cn", "aws-us-gov". + # + # source://aws-partitions//lib/aws-partitions/partition.rb#19 + def name; end + + # @param region_name [String] The name of the region, e.g. "us-east-1". + # @raise [ArgumentError] Raises `ArgumentError` for unknown region name. + # @return [Region] + # + # source://aws-partitions//lib/aws-partitions/partition.rb#30 + def region(region_name); end + + # @param region_name [String] The name of the region, e.g. "us-east-1". + # @return [Boolean] true if the region is in the partition. + # + # source://aws-partitions//lib/aws-partitions/partition.rb#47 + def region?(region_name); end + + # @return [String] The regex representing the region format. + # + # source://aws-partitions//lib/aws-partitions/partition.rb#22 + def region_regex; end + + # @return [Array] + # + # source://aws-partitions//lib/aws-partitions/partition.rb#41 + def regions; end + + # @param service_name [String] The service module name. + # @raise [ArgumentError] Raises `ArgumentError` for unknown service name. + # @return [Service] + # + # source://aws-partitions//lib/aws-partitions/partition.rb#54 + def service(service_name); end + + # @param service_name [String] The service module name. + # @return [Boolean] true if the service is in the partition. + # + # source://aws-partitions//lib/aws-partitions/partition.rb#71 + def service?(service_name); end + + # @return [Array] + # + # source://aws-partitions//lib/aws-partitions/partition.rb#65 + def services; end + + class << self + # @api private + # + # source://aws-partitions//lib/aws-partitions/partition.rb#77 + def build(partition); end + + private + + # @param partition [Hash] + # @return [Hash] + # + # source://aws-partitions//lib/aws-partitions/partition.rb#90 + def build_regions(partition); end + + # @param partition [Hash] + # @return [Hash] + # + # source://aws-partitions//lib/aws-partitions/partition.rb#102 + def build_services(partition); end + end +end + +# source://aws-partitions//lib/aws-partitions/partition_list.rb#5 +class Aws::Partitions::PartitionList + include ::Enumerable + + # @return [PartitionList] a new instance of PartitionList + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#9 + def initialize; end + + # @api private + # @param partition [Partition] + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#37 + def add_partition(partition); end + + # Removed all partitions. + # + # @api private + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#80 + def clear; end + + # @return [Enumerator] + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#14 + def each(&block); end + + # @api private + # @param partitions_metadata [Partition] + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#47 + def merge_metadata(partitions_metadata); end + + # @param partition_name [String] + # @return [Partition] + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#20 + def partition(partition_name); end + + # @return [Array] + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#31 + def partitions; end + + private + + # source://aws-partitions//lib/aws-partitions/partition_list.rb#86 + def build_metadata_regions(partition_name, metadata_regions, existing = T.unsafe(nil)); end + + class << self + # @api private + # + # source://aws-partitions//lib/aws-partitions/partition_list.rb#104 + def build(partitions); end + end +end + +# source://aws-partitions//lib/aws-partitions/region.rb#7 +class Aws::Partitions::Region + # @api private + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Region] a new instance of Region + # + # source://aws-partitions//lib/aws-partitions/region.rb#14 + def initialize(options = T.unsafe(nil)); end + + # @return [String] A short description of this region. + # + # source://aws-partitions//lib/aws-partitions/region.rb#25 + def description; end + + # @return [String] The name of this region, e.g. "us-east-1". + # + # source://aws-partitions//lib/aws-partitions/region.rb#22 + def name; end + + # @return [String] The partition this region exists in, e.g. "aws", + # "aws-cn", "aws-us-gov". + # + # source://aws-partitions//lib/aws-partitions/region.rb#29 + def partition_name; end + + # @return [Set] The list of services available in this region. + # Service names are the module names as used by the AWS SDK + # for Ruby. + # + # source://aws-partitions//lib/aws-partitions/region.rb#34 + def services; end + + class << self + # @api private + # + # source://aws-partitions//lib/aws-partitions/region.rb#39 + def build(region_name, region, partition); end + + private + + # source://aws-partitions//lib/aws-partitions/region.rb#50 + def region_services(region_name, partition); end + + # @return [Boolean] + # + # source://aws-partitions//lib/aws-partitions/region.rb#61 + def service_in_region?(svc, region_name); end + end +end + +# source://aws-partitions//lib/aws-partitions/service.rb#7 +class Aws::Partitions::Service + # @api private + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Service] a new instance of Service + # + # source://aws-partitions//lib/aws-partitions/service.rb#15 + def initialize(options = T.unsafe(nil)); end + + # @return [Set] The Dualstack compatible regions this service is + # available in. Regions are scoped to the partition. + # + # source://aws-partitions//lib/aws-partitions/service.rb#42 + def dualstack_regions; end + + # @return [Set] The FIPS compatible regions this service is + # available in. Regions are scoped to the partition. + # + # source://aws-partitions//lib/aws-partitions/service.rb#38 + def fips_regions; end + + # @return [String] The name of this service. The name is the module + # name as used by the AWS SDK for Ruby. + # + # source://aws-partitions//lib/aws-partitions/service.rb#27 + def name; end + + # @return [String] The partition name, e.g "aws", "aws-cn", "aws-us-gov". + # + # source://aws-partitions//lib/aws-partitions/service.rb#30 + def partition_name; end + + # @return [String, nil] The global patition endpoint for this service. + # May be `nil`. + # + # source://aws-partitions//lib/aws-partitions/service.rb#46 + def partition_region; end + + # Returns `false` if the service operates with a single global + # endpoint for the current partition, returns `true` if the service + # is available in multiple regions. + # + # Some services have both a partition endpoint and regional endpoints. + # + # @return [Boolean] + # + # source://aws-partitions//lib/aws-partitions/service.rb#55 + def regionalized?; end + + # @return [Set] The regions this service is available in. + # Regions are scoped to the partition. + # + # source://aws-partitions//lib/aws-partitions/service.rb#34 + def regions; end + + class << self + # @api private + # + # source://aws-partitions//lib/aws-partitions/service.rb#62 + def build(service_name, service, partition); end + + private + + # source://aws-partitions//lib/aws-partitions/service.rb#97 + def partition_region(service); end + + # source://aws-partitions//lib/aws-partitions/service.rb#76 + def regions(service, partition); end + + # source://aws-partitions//lib/aws-partitions/service.rb#82 + def variant_regions(variant_name, service, partition); end + end +end diff --git a/sorbet/rbi/gems/aws-sdk-codecommit@1.59.0.rbi b/sorbet/rbi/gems/aws-sdk-codecommit@1.59.0.rbi new file mode 100644 index 0000000000..100a730062 --- /dev/null +++ b/sorbet/rbi/gems/aws-sdk-codecommit@1.59.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aws-sdk-codecommit` gem. +# Please instead update this file by running `bin/tapioca gem aws-sdk-codecommit`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/aws-sdk-core@3.181.0.rbi b/sorbet/rbi/gems/aws-sdk-core@3.181.0.rbi new file mode 100644 index 0000000000..1ec234a392 --- /dev/null +++ b/sorbet/rbi/gems/aws-sdk-core@3.181.0.rbi @@ -0,0 +1,16946 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aws-sdk-core` gem. +# Please instead update this file by running `bin/tapioca gem aws-sdk-core`. + +# source://aws-sdk-core//lib/aws-sdk-core/deprecations.rb#3 +module Aws + class << self + # @return [Hash] Returns a hash of default configuration options shared + # by all constructed clients. + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#133 + def config; end + + # @param config [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#136 + def config=(config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#195 + def eager_autoload!(*args); end + + # Close any long-lived connections maintained by the SDK's internal + # connection pool. + # + # Applications that rely heavily on the `fork()` system call on POSIX systems + # should call this method in the child process directly after fork to ensure + # there are no race conditions between the parent + # process and its children + # for the pooled TCP connections. + # + # Child processes that make multi-threaded calls to the SDK should block on + # this call before beginning work. + # + # @return [nil] + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#188 + def empty_connection_pools!; end + + # @see (Aws::Partitions.partition) + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#145 + def partition(partition_name); end + + # @see (Aws::Partitions.partitions) + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#150 + def partitions; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#126 + def shared_config; end + + # The SDK ships with a ca certificate bundle to use when verifying SSL + # peer certificates. By default, this cert bundle is *NOT* used. The + # SDK will rely on the default cert available to OpenSSL. This ensures + # the cert provided by your OS is used. + # + # For cases where the default cert is unavailable, e.g. Windows, you + # can call this method. + # + # Aws.use_bundled_cert! + # + # @return [String] Returns the path to the bundled cert. + # + # source://aws-sdk-core//lib/aws-sdk-core.rb#165 + def use_bundled_cert!; end + end +end + +# Create and provide access to components of Amazon Resource Names (ARN). +# +# You can create an ARN and access it's components like the following: +# +# arn = Aws::ARN.new( +# partition: 'aws', +# service: 's3', +# region: 'us-west-2', +# account_id: '12345678910', +# resource: 'foo/bar' +# ) +# # => # +# +# arn.to_s +# # => "arn:aws:s3:us-west-2:12345678910:foo/bar" +# +# arn.partition +# # => 'aws' +# arn.service +# # => 's3' +# arn.resource +# # => foo/bar +# +# # Note: parser available for parsing resource details +# @see Aws::ARNParser#parse_resource +# +# @see https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns +# +# source://aws-sdk-core//lib/aws-sdk-core/arn.rb#31 +class Aws::ARN + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [ARN] a new instance of ARN + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#39 + def initialize(options = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#57 + def account_id; end + + # Return the ARN as JSON + # + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#95 + def as_json(_options = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#48 + def partition; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#54 + def region; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#60 + def resource; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#51 + def service; end + + # Return the ARN as a hash + # + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#82 + def to_h; end + + # Return the ARN format in string + # + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#75 + def to_s; end + + # Validates ARN contains non-empty required components. + # Region and account_id can be optional. + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn.rb#66 + def valid?; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/arn_parser.rb#4 +module Aws::ARNParser + class << self + # Checks whether a String could be a ARN or not. An ARN starts with 'arn:' + # and has at least 6 segments separated by a colon (:). + # + # @param str [String] + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/arn_parser.rb#36 + def arn?(str); end + + # Parse a string with an ARN format into an {Aws::ARN} object. + # `InvalidARNError` would be raised when encountering a parsing error or the + # ARN object contains invalid components (nil/empty). + # + # @param arn_str [String] + # @raise [Aws::Errors::InvalidARNError] + # @return [Aws::ARN] + # @see https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns + # + # source://aws-sdk-core//lib/aws-sdk-core/arn_parser.rb#13 + def parse(arn_str); end + end +end + +# An auto-refreshing credential provider that assumes a role via +# {Aws::STS::Client#assume_role}. +# +# role_credentials = Aws::AssumeRoleCredentials.new( +# client: Aws::STS::Client.new(...), +# role_arn: "linked::account::arn", +# role_session_name: "session-name" +# ) +# ec2 = Aws::EC2::Client.new(credentials: role_credentials) +# +# If you omit `:client` option, a new {Aws::STS::Client} object will be +# constructed with additional options that were provided. +# +# @see Aws::STS::Client#assume_role +# +# source://aws-sdk-core//lib/aws-sdk-core/assume_role_credentials.rb#20 +class Aws::AssumeRoleCredentials + include ::Aws::CredentialProvider + include ::Aws::RefreshingCredentials + + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [AssumeRoleCredentials] a new instance of AssumeRoleCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_credentials.rb#41 + def initialize(options = T.unsafe(nil)); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_credentials.rb#60 + def assume_role_params; end + + # @return [STS::Client] + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_credentials.rb#57 + def client; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_credentials.rb#64 + def refresh; end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_credentials.rb#77 + def assume_role_options; end + end +end + +# An auto-refreshing credential provider that assumes a role via +# {Aws::STS::Client#assume_role_with_web_identity}. +# +# role_credentials = Aws::AssumeRoleWebIdentityCredentials.new( +# client: Aws::STS::Client.new(...), +# role_arn: "linked::account::arn", +# web_identity_token_file: "/path/to/token/file", +# role_session_name: "session-name" +# ... +# ) +# ec2 = Aws::EC2::Client.new(credentials: role_credentials) +# +# If you omit `:client` option, a new {Aws::STS::Client} object will be +# constructed with additional options that were provided. +# +# @see Aws::STS::Client#assume_role_with_web_identity +# +# source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#24 +class Aws::AssumeRoleWebIdentityCredentials + include ::Aws::CredentialProvider + include ::Aws::RefreshingCredentials + + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [AssumeRoleWebIdentityCredentials] a new instance of AssumeRoleWebIdentityCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#46 + def initialize(options = T.unsafe(nil)); end + + # @return [STS::Client] + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#68 + def client; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#93 + def _session_name; end + + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#86 + def _token_from_file(path); end + + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#72 + def refresh; end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/assume_role_web_identity_credentials.rb#100 + def assume_role_web_identity_options; end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#4 +module Aws::AsyncClientStubs + include ::Aws::ClientStubs + + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#43 + def send_events; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#9 + def setup_stubbing; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#53 +class Aws::AsyncClientStubs::StubStream + # @return [StubStream] a new instance of StubStream + # + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#55 + def initialize; end + + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#77 + def close; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#73 + def closed?; end + + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#63 + def data(bytes, options = T.unsafe(nil)); end + + # Returns the value of attribute send_events. + # + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#59 + def send_events; end + + # Sets the attribute send_events + # + # @param value the value to set the attribute send_events to. + # + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#59 + def send_events=(_arg0); end + + # Returns the value of attribute state. + # + # source://aws-sdk-core//lib/aws-sdk-core/async_client_stubs.rb#61 + def state; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/binary/decode_handler.rb#4 +module Aws::Binary; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/binary/decode_handler.rb#7 +class Aws::Binary::DecodeHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/decode_handler.rb#9 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/decode_handler.rb#24 + def attach_eventstream_listeners(context, rules); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/decode_handler.rb#18 + def eventstream?(ctx); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/binary/encode_handler.rb#7 +class Aws::Binary::EncodeHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/encode_handler.rb#9 + def call(context); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/encode_handler.rb#36 + def eventstream_input?(ctx); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/encode_handler.rb#25 + def signer_for(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#6 +class Aws::Binary::EventBuilder + include ::Seahorse::Model::Shapes + + # @api private + # @param serializer_class [Class] + # @param rules [Seahorse::Model::ShapeRef] (of eventstream member) + # @return [EventBuilder] a new instance of EventBuilder + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#12 + def initialize(serializer_class, rules); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#17 + def apply(event_type, params); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#118 + def _build_payload(streaming, ref, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#89 + def _content_type(shape); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#24 + def _event_stream_message(event_ref, params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_builder.rb#105 + def _header_value_type(shape, value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#6 +class Aws::Binary::EventParser + include ::Seahorse::Model::Shapes + + # @api private + # @param parser_class [Class] + # @param rules [Seahorse::Model::ShapeRef] (of eventstream member) + # @param error_refs [Array] array of errors ShapeRef + # @param output_ref [Seahorse::Model::ShapeRef] + # @return [EventParser] a new instance of EventParser + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#14 + def initialize(parser_class, rules, error_refs, output_ref); end + + # Parse raw event message into event struct + # based on its ShapeRef + # + # @api private + # @return [Struct] Event Struct + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#25 + def apply(raw_event); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#125 + def eventpayload_streaming?(ref); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#31 + def parse(raw_event); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#60 + def parse_error_event(raw_event); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#70 + def parse_event(raw_event); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#51 + def parse_exception(raw_event); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_parser.rb#129 + def parse_payload(body, rules); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#8 +class Aws::Binary::EventStreamDecoder + # that registered with callbacks for processing events when they arrive + # + # @api private + # @param protocol [String] + # @param rules [ShapeRef] ShapeRef of the eventstream member + # @param output_ref [ShapeRef] ShapeRef of output shape + # @param error_refs [Array] array of ShapeRefs for errors + # @param event_stream_handler [EventStream|nil] A Service EventStream object + # @return [EventStreamDecoder] a new instance of EventStreamDecoder + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#16 + def initialize(protocol, rules, output_ref, error_refs, io, event_stream_handler = T.unsafe(nil)); end + + # @api private + # @return [Array] events Array of arrived event objects + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#25 + def events; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#27 + def write(chunk); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#39 + def emit_event(raw_event); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#54 + def extract_stream_class(type_class); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_decoder.rb#45 + def parser_class(protocol); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#8 +class Aws::Binary::EventStreamEncoder + # @api private + # @param protocol [String] + # @param rules [ShapeRef] ShapeRef of the eventstream member + # @param input_ref [ShapeRef] ShapeRef of the input shape + # @param signer [Aws::Sigv4::Signer] + # @return [EventStreamEncoder] a new instance of EventStreamEncoder + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#14 + def initialize(protocol, rules, input_ref, signer); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#27 + def encode(event_type, params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#25 + def prior_signature; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#25 + def prior_signature=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#23 + def rules; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/binary/event_stream_encoder.rb#44 + def serializer_class(protocol); end +end + +# source://aws-sdk-core//lib/aws-sdk-core.rb#119 +Aws::CORE_GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#4 +module Aws::ClientSideMonitoring; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#9 +class Aws::ClientSideMonitoring::Publisher + # @api private + # @return [Publisher] a new instance of Publisher + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#13 + def initialize(opts = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#11 + def agent_host; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#25 + def agent_host=(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#10 + def agent_port; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#19 + def agent_port=(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#31 + def publish(request_metrics); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/publisher.rb#38 + def send_datagram(msg); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#6 +class Aws::ClientSideMonitoring::RequestMetrics + # @api private + # @return [RequestMetrics] a new instance of RequestMetrics + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#22 + def initialize(opts = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#54 + def add_call_attempt(attempt); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#7 + def api_call; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#7 + def api_call_attempts; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#33 + def build_call_attempt(opts = T.unsafe(nil)); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#58 +class Aws::ClientSideMonitoring::RequestMetrics::ApiCall + # @api private + # @return [ApiCall] a new instance of ApiCall + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#65 + def initialize(service, api, client_id, version, timestamp, region); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def api; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def attempt_count; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def client_id; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#74 + def complete(opts = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def final_aws_exception; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def final_aws_exception_message; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def final_http_status_code; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def final_sdk_exception; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def final_sdk_exception_message; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def latency; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def max_retries_exceeded; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def region; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def service; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def timestamp; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#91 + def to_json(*a); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def user_agent; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#59 + def version; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#115 + def _truncate(document); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#126 +class Aws::ClientSideMonitoring::RequestMetrics::ApiCallAttempt + # @api private + # @return [ApiCallAttempt] a new instance of ApiCallAttempt + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#133 + def initialize(service, api, client_id, version, timestamp, fqdn, region, user_agent, access_key, session_token); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def access_key; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def api; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def aws_exception; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def aws_exception=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def aws_exception_msg; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def aws_exception_msg=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def client_id; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def fqdn; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def fqdn=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def http_status_code; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def http_status_code=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def region; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def region=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def request_latency; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def request_latency=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def sdk_exception; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def sdk_exception=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def sdk_exception_msg; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def sdk_exception_msg=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def service; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def session_token; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def timestamp; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#157 + def to_json(*a); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def user_agent; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#127 + def version; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def x_amz_id_2; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def x_amz_id_2=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def x_amz_request_id; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def x_amz_request_id=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def x_amzn_request_id; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#129 + def x_amzn_request_id=(_arg0); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#186 + def _truncate(document); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/client_side_monitoring/request_metrics.rb#9 +Aws::ClientSideMonitoring::RequestMetrics::FIELD_MAX_LENGTH = T.let(T.unsafe(nil), Hash) + +# This module provides the ability to specify the data and/or errors to +# return when a client is using stubbed responses. Pass +# `:stub_responses => true` to a client constructor to enable this +# behavior. +# +# Also allows you to see the requests made by the client by reading the +# api_requests instance variable +# +# source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#14 +module Aws::ClientStubs + # Allows you to access all of the requests that the stubbed client has made. + # + # @option options + # @param options [Hash] The options for the api requests. + # @raise [NotImplementedError] Raises `NotImplementedError` when the client + # is not stubbed. + # @return [Array] Returns an array of the api requests made. Each request + # object contains the :operation_name, :params, and :context. + # + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#195 + def api_requests(options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#232 + def next_stub(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#17 + def setup_stubbing; end + + # Generates and returns stubbed response data from the named operation. + # + # s3 = Aws::S3::Client.new + # s3.stub_data(:list_buckets) + # #=> #> + # + # In addition to generating default stubs, you can provide data to + # apply to the response stub. + # + # s3.stub_data(:list_buckets, buckets:[{name:'aws-sdk'}]) + # #=> #], + # owner=#> + # + # @param operation_name [Symbol] + # @param data [Hash] + # @return [Structure] Returns a stubbed response data structure. The + # actual class returned will depend on the given `operation_name`. + # + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#227 + def stub_data(operation_name, data = T.unsafe(nil)); end + + # Configures what data / errors should be returned from the named operation + # when response stubbing is enabled. + # + # ## Basic usage + # + # When you enable response stubbing, the client will generate fake + # responses and will not make any HTTP requests. + # + # client = Aws::S3::Client.new(stub_responses: true) + # client.list_buckets + # #=> # + # + # You can provide stub data that will be returned by the client. + # + # # stub data in the constructor + # client = Aws::S3::Client.new(stub_responses: { + # list_buckets: { buckets: [{name: 'my-bucket' }] }, + # get_object: { body: 'data' }, + # }) + # + # client.list_buckets.buckets.map(&:name) #=> ['my-bucket'] + # client.get_object(bucket:'name', key:'key').body.read #=> 'data' + # + # You can also specify the stub data using {#stub_responses} + # + # client = Aws::S3::Client.new(stub_responses: true) + # client.stub_responses(:list_buckets, { + # buckets: [{ name: 'my-bucket' }] + # }) + # + # client.list_buckets.buckets.map(&:name) + # #=> ['my-bucket'] + # + # With a Resource class {#stub_responses} on the corresponding client: + # + # s3 = Aws::S3::Resource.new(stub_responses: true) + # s3.client.stub_responses(:list_buckets, { + # buckets: [{ name: 'my-bucket' }] + # }) + # + # s3.buckets.map(&:name) + # #=> ['my-bucket'] + # + # Lastly, default stubs can be configured via `Aws.config`: + # + # Aws.config[:s3] = { + # stub_responses: { + # list_buckets: { buckets: [{name: 'my-bucket' }] } + # } + # } + # + # Aws::S3::Client.new.list_buckets.buckets.map(&:name) + # #=> ['my-bucket'] + # + # Aws::S3::Resource.new.buckets.map(&:name) + # #=> ['my-bucket'] + # + # ## Dynamic Stubbing + # + # In addition to creating static stubs, it's also possible to generate + # stubs dynamically based on the parameters with which operations were + # called, by passing a `Proc` object: + # + # s3 = Aws::S3::Resource.new(stub_responses: true) + # s3.client.stub_responses(:put_object, -> (context) { + # s3.client.stub_responses(:get_object, content_type: context.params[:content_type]) + # }) + # + # The yielded object is an instance of {Seahorse::Client::RequestContext}. + # + # ## Stubbing Errors + # + # When stubbing is enabled, the SDK will default to generate + # fake responses with placeholder values. You can override the data + # returned. You can also specify errors it should raise. + # + # # simulate service errors, give the error code + # client.stub_responses(:get_object, 'NotFound') + # client.get_object(bucket:'aws-sdk', key:'foo') + # #=> raises Aws::S3::Errors::NotFound + # + # # to simulate other errors, give the error class, you must + # # be able to construct an instance with `.new` + # client.stub_responses(:get_object, Timeout::Error) + # client.get_object(bucket:'aws-sdk', key:'foo') + # #=> raises new Timeout::Error + # + # # or you can give an instance of an error class + # client.stub_responses(:get_object, RuntimeError.new('custom message')) + # client.get_object(bucket:'aws-sdk', key:'foo') + # #=> raises the given runtime error object + # + # ## Stubbing HTTP Responses + # + # As an alternative to providing the response data, you can provide + # an HTTP response. + # + # client.stub_responses(:get_object, { + # status_code: 200, + # headers: { 'header-name' => 'header-value' }, + # body: "...", + # }) + # + # To stub a HTTP response, pass a Hash with all three of the following + # keys set: + # + # * **`:status_code`** - - The HTTP status code + # * **`:headers`** - Hash - A hash of HTTP header keys and values + # * **`:body`** - - The HTTP response body. + # + # ## Stubbing Multiple Responses + # + # Calling an operation multiple times will return similar responses. + # You can configure multiple stubs and they will be returned in sequence. + # + # client.stub_responses(:head_object, [ + # 'NotFound', + # { content_length: 150 }, + # ]) + # + # client.head_object(bucket:'aws-sdk', key:'foo') + # #=> raises Aws::S3::Errors::NotFound + # + # resp = client.head_object(bucket:'aws-sdk', key:'foo') + # resp.content_length #=> 150 + # + # @param operation_name [Symbol] + # @param stubs [Mixed] One or more responses to return from the named + # operation. + # @raise [RuntimeError] Raises a runtime error when called + # on a client that has not enabled response stubbing via + # `:stub_responses => true`. + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#176 + def stub_responses(operation_name, *stubs); end + + private + + # This method converts the given stub data and converts it to a + # HTTP response (when possible). This enables the response stubbing + # plugin to provide a HTTP response that triggers all normal events + # during response handling. + # + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#256 + def apply_stubs(operation_name, stubs); end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#264 + def convert_stub(operation_name, stub); end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#298 + def data_to_http_resp(operation_name, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#247 + def default_stub(operation_name); end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#290 + def hash_to_http_resp(data); end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#282 + def http_response_stub(operation_name, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#305 + def protocol_helper; end + + # source://aws-sdk-core//lib/aws-sdk-core/client_stubs.rb#278 + def service_error_stub(error_code); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/credential_provider.rb#4 +module Aws::CredentialProvider + # @return [Credentials] + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider.rb#7 + def credentials; end + + # @return [Time] + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider.rb#10 + def expiration; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider.rb#13 + def set?; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#5 +class Aws::CredentialProviderChain + # @api private + # @return [CredentialProviderChain] a new instance of CredentialProviderChain + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#6 + def initialize(config = T.unsafe(nil)); end + + # @api private + # @return [CredentialProvider, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#11 + def resolve; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#137 + def assume_role_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#143 + def assume_role_web_identity_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#172 + def assume_role_with_profile(options, profile_name); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#107 + def determine_profile_name(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#93 + def env_credentials(_options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#100 + def envar(keys); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#162 + def instance_profile_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#118 + def process_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#21 + def providers; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#111 + def shared_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#128 + def sso_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#43 + def static_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#70 + def static_profile_assume_role_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#53 + def static_profile_assume_role_web_identity_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#76 + def static_profile_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#84 + def static_profile_process_credentials(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credential_provider_chain.rb#62 + def static_profile_sso_credentials(options); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#4 +class Aws::Credentials + # @param access_key_id [String] + # @param secret_access_key [String] + # @param session_token [String] (nil) + # @return [Credentials] a new instance of Credentials + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#9 + def initialize(access_key_id, secret_access_key, session_token = T.unsafe(nil)); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#16 + def access_key_id; end + + # @return [Credentials] + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#25 + def credentials; end + + # Removing the secret access key from the default inspect string. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#40 + def inspect; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#19 + def secret_access_key; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#22 + def session_token; end + + # @return [Boolean] Returns `true` if the access key id and secret + # access key are both set. + # + # source://aws-sdk-core//lib/aws-sdk-core/credentials.rb#31 + def set?; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#5 +class Aws::DefaultsModeConfigResolver + # @api private + # @return [DefaultsModeConfigResolver] a new instance of DefaultsModeConfigResolver + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#22 + def initialize(sdk_defaults, cfg); end + + # option_name should be the symbolized ruby name to resolve + # returns the ruby appropriate value or nil if none are resolved + # + # @api private + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#31 + def resolve(option_name); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#65 + def application_current_region; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#102 + def env_mobile?; end + + # @api private + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#52 + def resolve_auto_mode; end + + # @api private + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#88 + def resolve_for_mode(name, mode); end + + # @api private + # + # source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#44 + def resolved_mode; end +end + +# mappings from Ruby SDK configuration names to the +# sdk defaults option names and (optional) scale modifiers +# +# @api private +# +# source://aws-sdk-core//lib/aws-defaults/defaults_mode_config_resolver.rb#13 +Aws::DefaultsModeConfigResolver::CFG_OPTIONS = T.let(T.unsafe(nil), Hash) + +# A defaults mode determines how certain default configuration options are resolved in the SDK. +# +# *Note*: For any mode other than `'legacy'` the vended default values might change as best practices may +# evolve. As a result, it is encouraged to perform testing when upgrading the SDK if you are using a mode other than +# `'legacy'`. While the `'legacy'` defaults mode is specific to Ruby, +# other modes are standardized across all of the AWS SDKs. +# +# The defaults mode can be configured: +# +# * Directly on a client via `:defaults_mode` +# +# * On a configuration profile via the "defaults_mode" profile file property. +# +# * Globally via the "AWS_DEFAULTS_MODE" environment variable. +# +# +# #defaults START - documentation +# The following `:default_mode` values are supported: +# +# * `'standard'` - +# The STANDARD mode provides the latest recommended default values +# that should be safe to run in most scenarios +# +# Note that the default values vended from this mode might change as +# best practices may evolve. As a result, it is encouraged to perform +# tests when upgrading the SDK +# +# * `'in-region'` - +# The IN\_REGION mode builds on the standard mode and includes +# optimization tailored for applications which call AWS services from +# within the same AWS region +# +# Note that the default values vended from this mode might change as +# best practices may evolve. As a result, it is encouraged to perform +# tests when upgrading the SDK +# +# * `'cross-region'` - +# The CROSS\_REGION mode builds on the standard mode and includes +# optimization tailored for applications which call AWS services in a +# different region +# +# Note that the default values vended from this mode might change as +# best practices may evolve. As a result, it is encouraged to perform +# tests when upgrading the SDK +# +# * `'mobile'` - +# The MOBILE mode builds on the standard mode and includes +# optimization tailored for mobile applications +# +# Note that the default values vended from this mode might change as +# best practices may evolve. As a result, it is encouraged to perform +# tests when upgrading the SDK +# +# * `'auto'` - +# The AUTO mode is an experimental mode that builds on the standard +# mode. The SDK will attempt to discover the execution environment to +# determine the appropriate settings automatically. +# +# Note that the auto detection is heuristics-based and does not +# guarantee 100% accuracy. STANDARD mode will be used if the execution +# environment cannot be determined. The auto detection might query +# [EC2 Instance Metadata service][1], which might introduce latency. +# Therefore we recommend choosing an explicit defaults\_mode instead +# if startup latency is critical to your application +# +# * `'legacy'` - +# The LEGACY mode provides default settings that vary per SDK and were +# used prior to establishment of defaults\_mode +# +# Based on the provided mode, the SDK will vend sensible default values +# tailored to the mode for the following settings: +# +# * `:retry_mode` - +# A retry mode specifies how the SDK attempts retries. See [Retry +# Mode][2] +# +# * `:sts_regional_endpoints` - +# Specifies how the SDK determines the AWS service endpoint that it +# uses to talk to the AWS Security Token Service (AWS STS). See +# [Setting STS Regional endpoints][3] +# +# * `:s3_us_east_1_regional_endpoint` - +# Specifies how the SDK determines the AWS service endpoint that it +# uses to talk to the Amazon S3 for the us-east-1 region +# +# * `:http_open_timeout` - +# The amount of time after making an initial connection attempt on a +# socket, where if the client does not receive a completion of the +# connect handshake, the client gives up and fails the operation +# +# * `:ssl_timeout` - +# The maximum amount of time that a TLS handshake is allowed to take +# from the time the CLIENT HELLO message is sent to ethe time the +# client and server have fully negotiated ciphers and exchanged keys +# +# All options above can be configured by users, and the overridden value will take precedence. +# +# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html +# [2]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-retry_mode.html +# [3]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-sts_regional_endpoints.html +# +# #defaults END - documentation +# +# source://aws-sdk-core//lib/aws-defaults/default_configuration.rb#109 +module Aws::DefaultsModeConfiguration; end + +# #defaults START - configuration +# +# @api private +# +# source://aws-sdk-core//lib/aws-defaults/default_configuration.rb#112 +Aws::DefaultsModeConfiguration::SDK_DEFAULT_CONFIGURATION = T.let(T.unsafe(nil), Hash) + +# A utility module that provides a class method that wraps +# a method such that it generates a deprecation warning when called. +# Given the following class: +# +# class Example +# +# def do_something +# end +# +# end +# +# If you want to deprecate the `#do_something` method, you can extend +# this module and then call `deprecated` on the method (after it +# has been defined). +# +# class Example +# +# extend Aws::Deprecations +# +# def do_something +# end +# +# def do_something_else +# end +# +# deprecated :do_something +# +# end +# +# The `#do_something` method will continue to function, but will +# generate a deprecation warning when called. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/deprecations.rb#38 +module Aws::Deprecations + # @api private + # @option options + # @option options + # @option options + # @param method [Symbol] The name of the deprecated method. + # @param options [Hash] a customizable set of options + # + # source://aws-sdk-core//lib/aws-sdk-core/deprecations.rb#50 + def deprecated(method, options = T.unsafe(nil)); end +end + +# A client that can query version 2 of the EC2 Instance Metadata +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#8 +class Aws::EC2Metadata + # Creates a client that can query version 2 of the EC2 Instance Metadata + # service (IMDS). + # + # @note Customers using containers may need to increase their hop limit + # to access IMDSv2. + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [EC2Metadata] a new instance of EC2Metadata + # @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html#instance-metadata-transition-to-version-2 + # + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#57 + def initialize(options = T.unsafe(nil)); end + + # Fetches a given metadata category using a String path, and returns the + # result as a String. A path starts with the API version (usually + # "/latest/"). See the instance data categories for possible paths. + # + # @example Fetching the instance ID + # + # ec2_metadata = Aws::EC2Metadata.new + # ec2_metadata.get('/latest/meta-data/instance-id') + # => "i-023a25f10a73a0f79" + # @example Fetching and parsing JSON meta-data + # + # require 'json' + # data = ec2_metadata.get('/latest/dynamic/instance-identity/document') + # JSON.parse(data) + # => {"accountId"=>"012345678912", ... } + # @example Fetching and parsing directory listings + # + # listing = ec2_metadata.get('/latest/meta-data') + # listing.split(10.chr) + # => ["ami-id", "ami-launch-index", ...] + # @note This implementation always returns a String and will not parse any + # responses. Parsable responses may include JSON objects or directory + # listings, which are strings separated by line feeds (ASCII 10). + # @note Unlike other services, IMDS does not have a service API model. This + # means that we cannot confidently generate code with methods and + # response structures. This implementation ensures that new IMDS features + # are always supported by being deployed to the instance and does not + # require code changes. + # @param path [String] The full path to the metadata. + # @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html + # @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html + # + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#110 + def get(path); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#213 + def backoff(backoff); end + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#137 + def fetch_token; end + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#145 + def http_get(connection, path, token); end + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#163 + def http_put(connection, ttl); end + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#184 + def open_connection; end + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#124 + def resolve_endpoint(endpoint, endpoint_mode); end + + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#194 + def retry_errors(options = T.unsafe(nil), &_block); end +end + +# Path for PUT request for token +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#11 +Aws::EC2Metadata::METADATA_TOKEN_PATH = T.let(T.unsafe(nil), String) + +# The requested metadata path does not exist. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#24 +class Aws::EC2Metadata::MetadataNotFoundError < ::RuntimeError; end + +# The request is not allowed or IMDS is turned off. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#28 +class Aws::EC2Metadata::RequestForbiddenError < ::RuntimeError; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#222 +class Aws::EC2Metadata::Token + # @api private + # @return [Token] a new instance of Token + # + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#223 + def initialize(options = T.unsafe(nil)); end + + # [Boolean] Returns true if the token expired. + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#233 + def expired?; end + + # [String] Returns the token value. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#230 + def value; end +end + +# Token has expired, and the request can be retried with a new token. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#20 +class Aws::EC2Metadata::TokenExpiredError < ::RuntimeError; end + +# Raised when the PUT request is not valid. This would be thrown if +# `token_ttl` is not an Integer. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ec2_metadata.rb#16 +class Aws::EC2Metadata::TokenRetrievalError < ::RuntimeError; end + +# An auto-refreshing credential provider that loads credentials from +# instances running in ECS. +# +# ecs_credentials = Aws::ECSCredentials.new(retries: 3) +# ec2 = Aws::EC2::Client.new(credentials: ecs_credentials) +# +# source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#13 +class Aws::ECSCredentials + include ::Aws::CredentialProvider + include ::Aws::RefreshingCredentials + + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [ECSCredentials] a new instance of ECSCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#61 + def initialize(options = T.unsafe(nil)); end + + # @return [Integer] The number of times to retry failed attempts to + # fetch credentials from the instance metadata service. Defaults to 0. + # + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#80 + def retries; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#142 + def backoff(backoff); end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#168 + def get_credentials; end + + # @raise [Non200Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#191 + def http_get(connection, path); end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#104 + def initialize_full_uri(endpoint); end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#97 + def initialize_relative_uri(options, path); end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#84 + def initialize_uri(options, credential_path, endpoint); end + + # loopback? method is available in Ruby 2.5+ + # Replicate the logic here. + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#131 + def ip_loopback?(ip_address); end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#181 + def open_connection; end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#150 + def refresh; end + + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#200 + def retry_errors(error_classes, options = T.unsafe(nil)); end + + # Validate that the full URI is using a loopback address if scheme is http. + # + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#114 + def validate_full_uri!(full_uri); end +end + +# These are the errors we trap when attempting to talk to the +# instance metadata service. Any of these imply the service +# is not present, no responding or some other non-recoverable +# error. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#25 +Aws::ECSCredentials::NETWORK_ERRORS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ecs_credentials.rb#18 +class Aws::ECSCredentials::Non200Response < ::RuntimeError; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/eager_loader.rb#7 +class Aws::EagerLoader + # @api private + # @return [EagerLoader] a new instance of EagerLoader + # + # source://aws-sdk-core//lib/aws-sdk-core/eager_loader.rb#9 + def initialize; end + + # @api private + # @param klass_or_module [Module] + # @return [self] + # + # source://aws-sdk-core//lib/aws-sdk-core/eager_loader.rb#18 + def load(klass_or_module); end + + # @api private + # @return [Set] + # + # source://aws-sdk-core//lib/aws-sdk-core/eager_loader.rb#14 + def loaded; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/structure.rb#88 +class Aws::EmptyStructure < ::Struct + include ::Aws::Structure +end + +# a LRU cache caching endpoints data +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#6 +class Aws::EndpointCache + # @api private + # @return [EndpointCache] a new instance of EndpointCache + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#14 + def initialize(options = T.unsafe(nil)); end + + # @api private + # @param key [String] + # @return [Endpoint] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#34 + def [](key); end + + # @api private + # @param key [String] + # @param value [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#48 + def []=(key, value); end + + # remove entry only + # + # @api private + # @param key [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#82 + def delete(key); end + + # kill the old polling thread and remove it from pool + # + # @api private + # @param key [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#90 + def delete_polling_thread(key); end + + # extract the key to be used in the cache from request context + # + # @api private + # @param ctx [RequestContext] + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#109 + def extract_key(ctx); end + + # checking whether an unexpired endpoint key exists in cache + # + # @api private + # @param key [String] + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#64 + def key?(key); end + + # @api private + # @return [Integer] Max size limit of cache + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#24 + def max_entries; end + + # @api private + # @return [Integer] Max count of polling threads + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#27 + def max_threads; end + + # return [Hash] Polling threads pool + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#30 + def pool; end + + # kill all polling threads + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#135 + def stop_polling!; end + + # checking whether an polling thread exist for the key + # + # @api private + # @param key [String] + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#76 + def threads_key?(key); end + + # update cache with requests (using service endpoint operation) + # to fetch endpoint list (with identifiers when available) + # + # @api private + # @param key [String] + # @param ctx [RequestContext] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#99 + def update(key, ctx); end + + # update polling threads pool + # param [String] key + # param [Thread] thread + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#126 + def update_polling_pool(key, thread); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#164 + def _endpoint_operation_identifier(ctx); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#142 + def _request_endpoint(ctx); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#172 +class Aws::EndpointCache::Endpoint + # @api private + # @return [Endpoint] a new instance of Endpoint + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#177 + def initialize(options); end + + # [String] valid URI address (with path) + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#184 + def address; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#186 + def expired?; end +end + +# default endpoint cache time, 1 minute +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#175 +Aws::EndpointCache::Endpoint::CACHE_PERIOD = T.let(T.unsafe(nil), Integer) + +# default cache entries limit +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#9 +Aws::EndpointCache::MAX_ENTRIES = T.let(T.unsafe(nil), Integer) + +# default max threads pool size +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoint_cache.rb#12 +Aws::EndpointCache::MAX_THREADS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule.rb#4 +module Aws::Endpoints + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints.rb#21 + def resolve_auth_scheme(context, endpoint); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints.rb#67 + def default_api_authtype(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints.rb#36 + def default_auth_scheme(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints.rb#55 + def merge_signing_defaults(auth_scheme, config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints.rb#72 + def sigv4_name(config); end + end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#11 +class Aws::Endpoints::Condition + # @api private + # @return [Condition] a new instance of Condition + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#12 + def initialize(fn:, argv:, assign: T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#19 + def argv; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#20 + def assign; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#22 + def assigned; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#18 + def fn; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#24 + def match?(parameters, assigns); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/condition.rb#30 + def from_json(conditions_json); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint.rb#5 +class Aws::Endpoints::Endpoint + # @return [Endpoint] a new instance of Endpoint + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint.rb#6 + def initialize(url:, properties: T.unsafe(nil), headers: T.unsafe(nil)); end + + # Returns the value of attribute headers. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint.rb#14 + def headers; end + + # Returns the value of attribute properties. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint.rb#13 + def properties; end + + # Returns the value of attribute url. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint.rb#12 + def url; end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. # @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#10 +class Aws::Endpoints::EndpointRule < ::Aws::Endpoints::Rule + # @return [EndpointRule] a new instance of EndpointRule + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#11 + def initialize(conditions:, endpoint:, type: T.unsafe(nil), documentation: T.unsafe(nil)); end + + # Returns the value of attribute conditions. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#20 + def conditions; end + + # Returns the value of attribute documentation. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#22 + def documentation; end + + # Returns the value of attribute endpoint. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#21 + def endpoint; end + + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#24 + def match(parameters, assigned = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#34 + def resolved_endpoint(parameters, assigns); end + + # Returns the value of attribute type. + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#19 + def type; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#48 + def resolve_headers(parameters, assigns); end + + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/endpoint_rule.rb#57 + def resolve_properties(obj, parameters, assigns); end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#11 +class Aws::Endpoints::ErrorRule < ::Aws::Endpoints::Rule + # @api private + # @return [ErrorRule] a new instance of ErrorRule + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#12 + def initialize(conditions:, type: T.unsafe(nil), error: T.unsafe(nil), documentation: T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#20 + def conditions; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#22 + def documentation; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#21 + def error; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#24 + def match(parameters, assigned = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#19 + def type; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/error_rule.rb#36 + def resolved_error(parameters, assigns); end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/function.rb#11 +class Aws::Endpoints::Function + # @api private + # @return [Function] a new instance of Function + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/function.rb#12 + def initialize(fn:, argv:); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/function.rb#18 + def argv; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/function.rb#20 + def call(parameters, assigns); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/function.rb#17 + def fn; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/function.rb#67 + def build_argv(argv_json); end +end + +# generic matcher functions for service endpoints +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#9 +module Aws::Endpoints::Matchers + class << self + # getAttr(value: Object | Array, path: string) Document + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#26 + def attr(value, path); end + + # aws.parseArn(value: string) Option + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#104 + def aws_parse_arn(value); end + + # aws.partition(value: string) Option + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#92 + def aws_partition(value); end + + # aws.isVirtualHostableS3Bucket(value: string, allowSubDomains: bool) bool + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#116 + def aws_virtual_hostable_s3_bucket?(value, allow_sub_domains = T.unsafe(nil)); end + + # booleanEquals(value1: bool, value2: bool) bool + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#61 + def boolean_equals?(value1, value2); end + + # not(value: bool) bool + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#21 + def not(bool); end + + # parseUrl(value: string) Option + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#71 + def parse_url(value); end + + # isSet(value: Option) bool + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#16 + def set?(value); end + + # stringEquals(value1: string, value2: string) bool + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#56 + def string_equals?(value1, value2); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#43 + def substring(input, start, stop, reverse); end + + # uriEncode(value: string) string + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#66 + def uri_encode(value); end + + # isValidHostLabel(value: string, allowSubDomains: bool) bool + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#78 + def valid_host_label?(value, allow_sub_domains = T.unsafe(nil)); end + end +end + +# Regex that extracts anything in square brackets +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/matchers.rb#11 +Aws::Endpoints::Matchers::BRACKET_REGEX = T.let(T.unsafe(nil), Regexp) + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/reference.rb#11 +class Aws::Endpoints::Reference + # @api private + # @return [Reference] a new instance of Reference + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/reference.rb#12 + def initialize(ref:); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/reference.rb#16 + def ref; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/reference.rb#18 + def resolve(parameters, assigns); end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule.rb#11 +class Aws::Endpoints::Rule + # Resolves a value that is a function, reference, or template string. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule.rb#13 + def resolve_value(value, parameters, assigns); end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#11 +class Aws::Endpoints::RuleSet + # @api private + # @return [RuleSet] a new instance of RuleSet + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#12 + def initialize(version:, service_id:, parameters:, rules:); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#21 + def parameters; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#22 + def rules; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#20 + def service_id; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#19 + def version; end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rule_set.rb#24 + def rules_from_json(rules_json); end + end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/rules_provider.rb#9 +class Aws::Endpoints::RulesProvider + # @api private + # @return [RulesProvider] a new instance of RulesProvider + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rules_provider.rb#10 + def initialize(rule_set); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rules_provider.rb#14 + def resolve_endpoint(parameters); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/rules_provider.rb#28 + def resolve_rules(parameters); end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/templater.rb#13 +module Aws::Endpoints::Templater + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/templater.rb#15 + def resolve(string, parameters, assigns); end + + private + + # Checks both parameters and assigns hash for the referenced value + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/templater.rb#45 + def extract_value(key, parameters, assigns); end + + # Replaces the captured value with values from parameters or assign + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/templater.rb#27 + def replace(capture, parameters, assigns); end + end +end + +# This class is deprecated. It is used by the Runtime endpoint +# resolution approach. It has been replaced by a code generated +# approach in each service gem. It can be removed in a new +# major version. It has to exist because +# old service gems can use a new core version. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#11 +class Aws::Endpoints::TreeRule + # @api private + # @return [TreeRule] a new instance of TreeRule + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#12 + def initialize(conditions:, rules:, type: T.unsafe(nil), documentation: T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#20 + def conditions; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#22 + def documentation; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#21 + def error; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#24 + def match(parameters, assigned = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#19 + def type; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/tree_rule.rb#36 + def resolve_rules(parameters, assigns); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#9 +class Aws::Endpoints::URL + # @api private + # @raise [ArgumentError] + # @return [URL] a new instance of URL + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#10 + def initialize(url); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#31 + def as_json(_options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#26 + def authority; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#29 + def is_ip; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#28 + def normalized_path; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#27 + def path; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#25 + def scheme; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#43 + def _authority(url, uri); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/endpoints/url.rb#52 + def _is_ip(authority); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#4 +module Aws::Errors; end + +# Various plugins perform client-side checksums of responses. +# This error indicates a checksum failed. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#163 +class Aws::Errors::ChecksumError < ::RuntimeError; end + +# Raised when a client is constructed with Assume Role credentials, but +# the profile has both source_profile and credential_source. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#179 +class Aws::Errors::CredentialSourceConflictError < ::RuntimeError; end + +# This module is mixed into another module, providing dynamic +# error classes. Error classes all inherit from {ServiceError}. +# +# # creates and returns the class +# Aws::S3::Errors::MyNewErrorClass +# +# Since the complete list of possible AWS errors returned by services +# is not known, this allows us to create them as needed. This also +# allows users to rescue errors by class without them being concrete +# classes beforehand. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#337 +module Aws::Errors::DynamicErrors + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#344 + def const_missing(constant); end + + # Given the name of a service and an error code, this method + # returns an error class (that extends {ServiceError}. + # + # Aws::S3::Errors.error_class('NoSuchBucket').new + # #=> # + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#355 + def error_class(error_code); end + + private + + # Convert an error code to an error class name/constant. + # This requires filtering non-safe characters from the constant + # name and ensuring it begins with an uppercase letter. + # + # @api private + # @param error_code [String] + # @return [Symbol] Returns a symbolized constant name for the given + # `error_code`. + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#376 + def error_class_constant(error_code); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#398 + def error_const_set?(constant); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#385 + def set_error_constant(constant); end + + class << self + # @api private + # @private + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#339 + def extended(submodule); end + end +end + +# Rasied when endpoint discovery failed for operations +# that requires endpoints from endpoint discovery +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#73 +class Aws::Errors::EndpointDiscoveryError < ::RuntimeError + # @return [EndpointDiscoveryError] a new instance of EndpointDiscoveryError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#74 + def initialize(*args); end +end + +# Error event in an event stream which has event_type :error +# error code and error message can be retrieved when available. +# +# example usage: +# +# client.stream_foo(name: 'bar') do |event| +# stream.on_error_event do |event| +# puts "Error #{event.error_code}: #{event.error_message}" +# raise event +# end +# end +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#119 +class Aws::Errors::EventError < ::RuntimeError + # @return [EventError] a new instance of EventError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#121 + def initialize(event_type, code, message); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#131 + def error_code; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#134 + def error_message; end + + # @return [Symbol] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#128 + def event_type; end +end + +# Raise when EventStream Builder failed to build +# an event message with parameters provided +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#105 +class Aws::Errors::EventStreamBuilderError < ::RuntimeError; end + +# Raised when EventStream Parser failed to parse +# a raw event message +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#101 +class Aws::Errors::EventStreamParserError < ::RuntimeError; end + +# Raised when ARN string input doesn't follow the standard: +# https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#140 +class Aws::Errors::InvalidARNError < ::RuntimeError; end + +# Raised when the partition of the ARN region is different than the +# partition of the :region configured on the service client. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#153 +class Aws::Errors::InvalidARNPartitionError < ::RuntimeError + # @return [InvalidARNPartitionError] a new instance of InvalidARNPartitionError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#154 + def initialize(*args); end +end + +# Raised when the region from the ARN string is different from the :region +# configured on the service client. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#144 +class Aws::Errors::InvalidARNRegionError < ::RuntimeError + # @return [InvalidARNRegionError] a new instance of InvalidARNRegionError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#145 + def initialize(*args); end +end + +# Raised when a client is constructed with Assume Role credentials using +# a credential_source, and that source type is unsupported. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#175 +class Aws::Errors::InvalidCredentialSourceError < ::RuntimeError; end + +# Raised when a credentials provider process returns a JSON +# payload with either invalid version number or malformed contents +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#208 +class Aws::Errors::InvalidProcessCredentialsPayload < ::RuntimeError; end + +# Raised when a client is contsructed and the region is not valid. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#240 +class Aws::Errors::InvalidRegionError < ::ArgumentError + # @return [InvalidRegionError] a new instance of InvalidRegionError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#241 + def initialize(*args); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#258 + def possible_regions; end +end + +# Raised when SSO Credentials are invalid +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#211 +class Aws::Errors::InvalidSSOCredentials < ::RuntimeError; end + +# Raised when SSO Token is invalid +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#214 +class Aws::Errors::InvalidSSOToken < ::RuntimeError; end + +# Raised when InstanceProfileCredentialsProvider or +# EcsCredentialsProvider fails to parse the metadata response after retries +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#55 +class Aws::Errors::MetadataParserError < ::RuntimeError + # @return [MetadataParserError] a new instance of MetadataParserError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#56 + def initialize(*args); end +end + +# Raised when a client is unable to sign a request because +# the bearer token is not configured or available +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#218 +class Aws::Errors::MissingBearerTokenError < ::RuntimeError + # @return [MissingBearerTokenError] a new instance of MissingBearerTokenError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#219 + def initialize(*args); end +end + +# Raised when a `streaming` operation has `requiresLength` trait +# enabled but request payload size/length cannot be calculated +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#64 +class Aws::Errors::MissingContentLength < ::RuntimeError + # @return [MissingContentLength] a new instance of MissingContentLength + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#65 + def initialize(*args); end +end + +# Raised when a client is constructed and credentials are not +# set, or the set credentials are empty. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#187 +class Aws::Errors::MissingCredentialsError < ::RuntimeError + # @return [MissingCredentialsError] a new instance of MissingCredentialsError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#188 + def initialize(*args); end +end + +# raised when hostLabel member is not provided +# at operation input when endpoint trait is available +# with 'hostPrefix' requirement +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#84 +class Aws::Errors::MissingEndpointHostLabelValue < ::RuntimeError + # @return [MissingEndpointHostLabelValue] a new instance of MissingEndpointHostLabelValue + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#86 + def initialize(name); end +end + +# Raised when a client is constructed and region is not specified. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#231 +class Aws::Errors::MissingRegionError < ::ArgumentError + # @return [MissingRegionError] a new instance of MissingRegionError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#232 + def initialize(*args); end +end + +# Raised when :web_identity_token_file parameter is not +# provided or the file doesn't exist when initializing +# AssumeRoleWebIdentityCredentials credential provider +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#197 +class Aws::Errors::MissingWebIdentityTokenFile < ::RuntimeError + # @return [MissingWebIdentityTokenFile] a new instance of MissingWebIdentityTokenFile + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#198 + def initialize(*args); end +end + +# Raised when a client is constructed with Assume Role credentials using +# a credential_source, and that source doesn't provide credentials. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#183 +class Aws::Errors::NoSourceCredentialsError < ::RuntimeError; end + +# Raised when a client is constructed, where Assume Role credentials are +# expected, and there is no source profile specified. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#171 +class Aws::Errors::NoSourceProfileError < ::RuntimeError; end + +# Raised when attempting to connect to an endpoint and a `SocketError` +# is received from the HTTP client. This error is typically the result +# of configuring an invalid `:region`. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#270 +class Aws::Errors::NoSuchEndpointError < ::RuntimeError + # @return [NoSuchEndpointError] a new instance of NoSuchEndpointError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#272 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute context. + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#299 + def context; end + + # Returns the value of attribute endpoint. + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#301 + def endpoint; end + + # Returns the value of attribute original_error. + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#303 + def original_error; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#307 + def possible_regions; end +end + +# Raised when a client is constructed and the specified shared +# credentials profile does not exist. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#167 +class Aws::Errors::NoSuchProfileError < ::RuntimeError; end + +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#6 +class Aws::Errors::NonSupportedRubyVersionError < ::RuntimeError; end + +# Raised when attempting to retry a request +# and no capacity is available to retry (See adaptive retry_mode) +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#318 +class Aws::Errors::RetryCapacityNotAvailableError < ::RuntimeError + # @return [RetryCapacityNotAvailableError] a new instance of RetryCapacityNotAvailableError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#319 + def initialize(*args); end +end + +# The base class for all errors returned by an Amazon Web Service. +# All ~400 level client errors and ~500 level server errors are raised +# as service errors. This indicates it was an error returned from the +# service and not one generated by the client. +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#12 +class Aws::Errors::ServiceError < ::RuntimeError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::Structure] + # @return [ServiceError] a new instance of ServiceError + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#17 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#26 + def code; end + + # @return [Seahorse::Client::RequestContext] The context of the request + # that triggered the remote service to return this error. + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#30 + def context; end + + # @return [Aws::Structure] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#33 + def data; end + + # @api private undocumented + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#43 + def retryable?; end + + # @api private undocumented + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#48 + def throttling?; end + + class << self + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#38 + def code; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/errors.rb#38 + def code=(_arg0); end + end +end + +# Raised when attempting to #signal an event before +# making an async request +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#97 +class Aws::Errors::SignalEventError < ::RuntimeError; end + +# Raised when there is a circular reference in chained +# source_profiles +# +# source://aws-sdk-core//lib/aws-sdk-core/errors.rb#228 +class Aws::Errors::SourceProfileCircularReferenceError < ::RuntimeError; end + +# source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#4 +class Aws::EventEmitter + # @return [EventEmitter] a new instance of EventEmitter + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#6 + def initialize; end + + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#32 + def emit(type, params); end + + # Returns the value of attribute encoder. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#15 + def encoder; end + + # Sets the attribute encoder + # + # @param value the value to set the attribute encoder to. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#15 + def encoder=(_arg0); end + + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#21 + def on(type, callback); end + + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#25 + def signal(type, event); end + + # Returns the value of attribute signal_queue. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#19 + def signal_queue; end + + # Sets the attribute signal_queue + # + # @param value the value to set the attribute signal_queue to. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#19 + def signal_queue=(_arg0); end + + # Returns the value of attribute stream. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#13 + def stream; end + + # Sets the attribute stream + # + # @param value the value to set the attribute stream to. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#13 + def stream=(_arg0); end + + # Returns the value of attribute validate_event. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#17 + def validate_event; end + + # Sets the attribute validate_event + # + # @param value the value to set the attribute validate_event to. + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#17 + def validate_event=(_arg0); end + + private + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/event_emitter.rb#52 + def _ready_for_events?; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/ini_parser.rb#5 +class Aws::IniParser + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/ini_parser.rb#8 + def ini_parse(raw); end + end +end + +# An auto-refreshing credential provider that loads credentials from +# EC2 instances. +# +# instance_credentials = Aws::InstanceProfileCredentials.new +# ec2 = Aws::EC2::Client.new(credentials: instance_credentials) +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#12 +class Aws::InstanceProfileCredentials + include ::Aws::CredentialProvider + include ::Aws::RefreshingCredentials + + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [InstanceProfileCredentials] a new instance of InstanceProfileCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#75 + def initialize(options = T.unsafe(nil)); end + + # @return [Integer] Number of times to retry when retrieving credentials + # from the instance metadata service. Defaults to 0 when resolving from + # the default credential chain ({Aws::CredentialProviderChain}). + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#94 + def retries; end + + private + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#234 + def _metadata_disabled?; end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#126 + def backoff(backoff); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#306 + def empty_credentials?(creds); end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#183 + def get_credentials; end + + # GET request fetch profile and credentials + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#249 + def http_get(connection, path, token = T.unsafe(nil)); end + + # PUT request fetch token with ttl + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#265 + def http_put(connection, path, ttl); end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#238 + def open_connection; end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#134 + def refresh; end + + # Compute an offset for refresh with jitter + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#311 + def refresh_offset; end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#107 + def resolve_endpoint(options, endpoint_mode); end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#98 + def resolve_endpoint_mode(options); end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#286 + def retry_errors(error_classes, options = T.unsafe(nil), &_block); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#230 + def token_set?; end + + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#300 + def warn_expired_credentials; end +end + +# Path base for GET request for profile and credentials +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#42 +Aws::InstanceProfileCredentials::METADATA_PATH_BASE = T.let(T.unsafe(nil), String) + +# Path for PUT request for token +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#46 +Aws::InstanceProfileCredentials::METADATA_TOKEN_PATH = T.let(T.unsafe(nil), String) + +# These are the errors we trap when attempting to talk to the +# instance metadata service. Any of these imply the service +# is not present, no responding or some other non-recoverable +# error. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#30 +Aws::InstanceProfileCredentials::NETWORK_ERRORS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#17 +class Aws::InstanceProfileCredentials::Non200Response < ::RuntimeError; end + +# Token used to fetch IMDS profile and credentials +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#317 +class Aws::InstanceProfileCredentials::Token + # @api private + # @return [Token] a new instance of Token + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#318 + def initialize(value, ttl, created_time = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#327 + def expired?; end + + # [String] token value + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#325 + def value; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#23 +class Aws::InstanceProfileCredentials::TokenExpiredError < ::RuntimeError; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/instance_profile_credentials.rb#20 +class Aws::InstanceProfileCredentials::TokenRetrivalError < ::RuntimeError; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#6 +module Aws::Json + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/json.rb#32 + def dump(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/json.rb#24 + def load(json); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/json.rb#28 + def load_file(path); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/json.rb#38 + def select_engine; end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#7 +class Aws::Json::Builder + include ::Seahorse::Model::Shapes + + # @return [Builder] a new instance of Builder + # + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#11 + def initialize(rules); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#15 + def serialize(params); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#15 + def to_json(params); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#56 + def encode(blob); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#45 + def format(ref, value); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#33 + def list(ref, values); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#38 + def map(ref, values); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#22 + def structure(ref, values); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/builder.rb#60 + def timestamp(ref, value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/json.rb#47 +Aws::Json::ENGINE = Aws::Json::JSONEngine + +# source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#5 +class Aws::Json::ErrorHandler < ::Aws::Xml::ErrorHandler + # @param context [Seahorse::Client::RequestContext] + # @return [Seahorse::Client::Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#9 + def call(context); end + + private + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#45 + def aws_query_error?(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#28 + def error_code(json, context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#58 + def error_message(code, json); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#18 + def extract_error(body, context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#66 + def parse_error_data(context, code); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/error_handler.rb#50 + def remove_prefix(error_code, context); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#5 +class Aws::Json::Handler < ::Seahorse::Client::Handler + # @param context [Seahorse::Client::RequestContext] + # @return [Seahorse::Client::Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#11 + def call(context); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#78 + def apply_request_id(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#28 + def build_body(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#21 + def build_request(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#69 + def content_type(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#40 + def parse_body(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#36 + def parse_response(response); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#82 + def simple_json?(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#73 + def target(context); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/json/handler.rb#7 +Aws::Json::Handler::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-core/json/json_engine.rb#5 +module Aws::Json::JSONEngine + class << self + # source://aws-sdk-core//lib/aws-sdk-core/json/json_engine.rb#13 + def dump(value); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/json_engine.rb#7 + def load(json); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#5 +module Aws::Json::OjEngine + class << self + # source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#19 + def dump(value); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#13 + def load(json); end + + private + + # Oj before 1.4.0 does not define Oj::ParseError and instead raises + # SyntaxError on failure + # + # source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#27 + def detect_oj_parse_errors; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#10 +Aws::Json::OjEngine::DUMP_OPTIONS = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#7 +Aws::Json::OjEngine::LOAD_OPTIONS = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/json/oj_engine.rb#41 +Aws::Json::OjEngine::PARSE_ERRORS = T.let(T.unsafe(nil), T.untyped) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/json.rb#14 +class Aws::Json::ParseError < ::StandardError + # @api private + # @return [ParseError] a new instance of ParseError + # + # source://aws-sdk-core//lib/aws-sdk-core/json.rb#15 + def initialize(error); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/json.rb#20 + def error; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#8 +class Aws::Json::Parser + include ::Seahorse::Model::Shapes + + # @param rules [Seahorse::Model::ShapeRef] + # @return [Parser] a new instance of Parser + # + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#13 + def initialize(rules); end + + # @param json [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#18 + def parse(json, target = T.unsafe(nil)); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#44 + def list(ref, values, target = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#52 + def map(ref, values, target = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#60 + def parse_ref(ref, value, target = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#24 + def structure(ref, values, target = T.unsafe(nil)); end + + # @param value [String, Integer] + # @return [Time] + # + # source://aws-sdk-core//lib/aws-sdk-core/json/parser.rb#78 + def time(value); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#6 +module Aws::Log; end + +# A log formatter generates a string for logging from a response. This +# accomplished with a log pattern string: +# +# pattern = ':operation :http_response_status_code :time' +# formatter = Aws::Log::Formatter.new(pattern) +# formatter.format(response) +# #=> 'get_bucket 200 0.0352' +# +# # Canned Formatters +# +# Instead of providing your own pattern, you can choose a canned log +# formatter. +# +# * {Formatter.default} +# * {Formatter.colored} +# * {Formatter.short} +# +# # Pattern Substitutions +# +# You can put any of these placeholders into you pattern. +# +# * `:region` - The region configured for the client. +# +# * `:client_class` - The name of the client class. +# +# * `:operation` - The name of the client request method. +# +# * `:request_params` - The user provided request parameters. Long +# strings are truncated/summarized if they exceed the +# `:max_string_size`. Other objects are inspected. +# +# * `:time` - The total time in seconds spent on the +# request. This includes client side time spent building +# the request and parsing the response. +# +# * `:retries` - The number of times a client request was retried. +# +# * `:http_request_method` - The http request verb, e.g., `POST`, +# `PUT`, `GET`, etc. +# +# * `:http_request_endpoint` - The request endpoint. This includes +# the scheme, host and port, but not the path. +# +# * `:http_request_scheme` - This is replaced by `http` or `https`. +# +# * `:http_request_host` - The host name of the http request +# endpoint (e.g. 's3.amazon.com'). +# +# * `:http_request_port` - The port number (e.g. '443' or '80'). +# +# * `:http_request_headers` - The http request headers, inspected. +# +# * `:http_request_body` - The http request payload. +# +# * `:http_response_status_code` - The http response status +# code, e.g., `200`, `404`, `500`, etc. +# +# * `:http_response_headers` - The http response headers, inspected. +# +# * `:http_response_body` - The http response body contents. +# +# * `:error_class` +# +# * `:error_message` +# +# source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#73 +class Aws::Log::Formatter + # @option options + # @option options + # @option options + # @param pattern [String] The log format pattern should be a string + # and may contain substitutions. + # @param options [Hash] a customizable set of options + # @return [Formatter] a new instance of Formatter + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#93 + def initialize(pattern, options = T.unsafe(nil)); end + + # Given a response, this will format a log message and return it as a + # string according to {#pattern}. + # + # @param response [Seahorse::Client::Response] + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#106 + def format(response); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#111 + def method_missing(method_name, *args); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#100 + def pattern; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#125 + def _client_class(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#195 + def _error_class(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#199 + def _error_message(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#173 + def _http_request_body(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#149 + def _http_request_endpoint(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#169 + def _http_request_headers(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#157 + def _http_request_host(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#165 + def _http_request_method(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#161 + def _http_request_port(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#153 + def _http_request_scheme(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#185 + def _http_response_body(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#181 + def _http_response_headers(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#177 + def _http_response_status_code(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#129 + def _operation(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#121 + def _region(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#133 + def _request_params(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#145 + def _retries(response); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#139 + def _time(response); end + + class << self + # The default log format with ANSI colors. + # + # @example A sample of the colored format (sans the ansi colors). + # + # [ClientClass 200 0.580066 0 retries] list_objects(:bucket_name => 'bucket') + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Formatter] + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#249 + def colored(options = T.unsafe(nil)); end + + # The default log format. + # + # @example A sample of the default format. + # + # [ClientClass 200 0.580066 0 retries] list_objects(:bucket_name => 'bucket') + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Formatter] + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#212 + def default(options = T.unsafe(nil)); end + + # The short log format. Similar to default, but it does not + # inspect the request params or report on retries. + # + # @example A sample of the short format + # + # [ClientClass 200 0.494532] list_buckets + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Formatter] + # + # source://aws-sdk-core//lib/aws-sdk-core/log/formatter.rb#232 + def short(options = T.unsafe(nil)); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#8 +class Aws::Log::ParamFilter + # end + # + # @return [ParamFilter] a new instance of ParamFilter + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#22 + def initialize(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#27 + def filter(values, type); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#64 + def filter_array(values, type); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#45 + def filter_hash(values, type); end + + # source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#38 + def filter_struct(values, type); end +end + +# DEPRECATED - This must exist for backwards compatibility. Sensitive +# members are now computed for each request/response type. This can be +# removed in a new major version. This list is no longer updated. +# +# A managed list of sensitive parameters that should be filtered from +# logs. This is updated automatically as part of each release. See the +# `tasks/update-sensitive-params.rake` for more information. +# +# begin +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/log/param_filter.rb#19 +Aws::Log::ParamFilter::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#8 +class Aws::Log::ParamFormatter + # @api private + # @return [ParamFormatter] a new instance of ParamFormatter + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#13 + def initialize(options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#17 + def summarize(value); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#64 + def summarize_array(array); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#60 + def summarize_file(path); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#23 + def summarize_hash(hash); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#41 + def summarize_string(str); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#35 + def summarize_string_hash(hash); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#29 + def summarize_symbol_hash(hash); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#49 + def summarize_value(value); end +end + +# String longer than the max string size are truncated +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/log/param_formatter.rb#11 +Aws::Log::ParamFormatter::MAX_STRING_SIZE = T.let(T.unsafe(nil), Integer) + +# Decorates a {Seahorse::Client::Response} with paging convenience methods. +# Some AWS calls provide paged responses to limit the amount of data returned +# with each response. To optimize for latency, some APIs may return an +# inconsistent number of responses per page. You should rely on the values of +# the `next_page?` method or using enumerable methods such as `each` rather +# than the number of items returned to iterate through results. See below for +# examples. +# +# # Paged Responses Are Enumerable +# The simplest way to handle paged response data is to use the built-in +# enumerator in the response object, as shown in the following example. +# +# s3 = Aws::S3::Client.new +# +# s3.list_objects(bucket:'aws-sdk').each do |response| +# puts response.contents.map(&:key) +# end +# +# This yields one response object per API call made, and enumerates objects +# in the named bucket. The SDK retrieves additional pages of data to +# complete the request. +# +# # Handling Paged Responses Manually +# To handle paging yourself, use the response’s `next_page?` method to verify +# there are more pages to retrieve, or use the last_page? method to verify +# there are no more pages to retrieve. +# +# If there are more pages, use the `next_page` method to retrieve the +# next page of results, as shown in the following example. +# +# s3 = Aws::S3::Client.new +# +# # Get the first page of data +# response = s3.list_objects(bucket:'aws-sdk') +# +# # Get additional pages +# while response.next_page? do +# response = response.next_page +# # Use the response data here... +# puts response.contents.map(&:key) +# end +# +# @note Methods such as `to_json` will enumerate all of the responses before +# returning the full response as JSON. +# +# source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#49 +module Aws::PageableResponse + # Yields the current and each following response to the given block. + # + # @return [Enumerable, nil] Returns a new Enumerable if no block is given. + # @yieldparam response [Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#83 + def each(&block); end + + # Yields the current and each following response to the given block. + # Actual implementation is in PageableResponse::Extension + # + # @return [Enumerable, nil] Returns a new Enumerable if no block is given. + # @yieldparam response [Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#83 + def each_page(&block); end + + # Returns `true` if there are no more results. Calling {#next_page} + # when this method returns `false` will raise an error. + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#64 + def last_page?; end + + # @return [Seahorse::Client::Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#76 + def next_page(params = T.unsafe(nil)); end + + # Returns `true` if there are more results. Calling {#next_page} will + # return the next response. + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#71 + def next_page?; end + + # @return [Paging::Pager] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#59 + def pager; end + + # @return [Paging::Pager] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#59 + def pager=(_arg0); end + + private + + # @param params [Hash] A hash of additional request params to + # merge into the next page request. + # @return [Hash] Returns the hash of request parameters for the + # next page, merging any given params. + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#102 + def next_page_params(params); end + + # @param params [Hash] A hash of additional request params to + # merge into the next page request. + # @return [Seahorse::Client::Response] Returns the next page of + # results. + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#94 + def next_response(params); end + + class << self + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#51 + def apply(base); end + end +end + +# The actual decorator module implementation. It is in a distinct module +# so that it can be used to extend objects without busting Ruby's constant cache. +# object.extend(mod) bust the constant cache only if `mod` contains constants of its own. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#162 +module Aws::PageableResponse::Extension + include ::Enumerable + include ::Aws::PageableResponse::UnsafeEnumerableMethods + + # @api private + # @yield [response] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#188 + def each(&block); end + + # @api private + # @yield [response] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#188 + def each_page(&block); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#169 + def last_page?; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#180 + def next_page(params = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#176 + def next_page?; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#167 + def pager; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#167 + def pager=(_arg0); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#209 + def next_page_params(params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#201 + def next_response(params); end +end + +# Raised when calling {PageableResponse#next_page} on a pager that +# is on the last page of results. You can call {PageableResponse#last_page?} +# or {PageableResponse#next_page?} to know if there are more pages. +# +# source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#109 +class Aws::PageableResponse::LastPageError < ::RuntimeError + # @param response [Seahorse::Client::Response] + # @return [LastPageError] a new instance of LastPageError + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#112 + def initialize(response); end + + # @return [Seahorse::Client::Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#118 + def response; end +end + +# A handful of Enumerable methods, such as #count are not safe +# to call on a pageable response, as this would trigger n api calls +# simply to count the number of response pages, when likely what is +# wanted is to access count on the data. Same for #to_h. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#127 +module Aws::PageableResponse::UnsafeEnumerableMethods + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#149 + def as_json(_options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#129 + def count; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#137 + def respond_to?(method_name, *args); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#145 + def to_h; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pageable_response.rb#153 + def to_json(options = T.unsafe(nil)); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/pager.rb#7 +class Aws::Pager + # @api private + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Pager] a new instance of Pager + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#12 + def initialize(options); end + + # @api private + # @return [Symbol, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#19 + def limit_key; end + + # @api private + # @param response [Seahorse::Client::Response] + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#26 + def next_tokens(response); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#34 + def prev_tokens(response); end + + # @api private + # @return [Hash, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#22 + def tokens; end + + # @api private + # @param response [Seahorse::Client::Response] + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#43 + def truncated?(response); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#55 + def empty_value?(value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/pager.rb#59 +class Aws::Pager::NullPager + # @api private + # @return [nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#62 + def limit_key; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#64 + def next_tokens; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#68 + def prev_tokens; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/pager.rb#72 + def truncated?(response); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#11 +class Aws::ParamConverter + include ::Seahorse::Model::Shapes + + # @api private + # @return [ParamConverter] a new instance of ParamConverter + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#18 + def initialize(rules); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#36 + def close_opened_files; end + + # @api private + # @param params [Hash] + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#28 + def convert(params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#24 + def opened_files; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#86 + def c(ref, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#57 + def list(ref, values); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#66 + def map(ref, values); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#77 + def member(ref, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#43 + def structure(ref, values); end + + class << self + # Registers a new value converter. Converters run in the context + # of a shape and value class. + # + # # add a converter that stringifies integers + # shape_class = Seahorse::Model::Shapes::StringShape + # ParamConverter.add(shape_class, Integer) { |i| i.to_s } + # + # @api private + # @param shape_class [Class] + # @param value_class [Class] + # @param converter [#call] (nil) An object that responds to `#call` + # accepting a single argument. This function should perform + # the value conversion if possible, returning the result. + # If the conversion is not possible, the original value should + # be returned. + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#111 + def add(shape_class, value_class, converter = T.unsafe(nil), &block); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#126 + def c(shape, value, instance = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#92 + def convert(shape, params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#115 + def ensure_open(file, converter); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#136 + def converter_for(shape_class, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#161 + def each_base_class(shape_class, &block); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_converter.rb#147 + def find(shape_class, value); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#5 +class Aws::ParamValidator + include ::Seahorse::Model::Shapes + + # @api private + # @option options + # @param rules [Seahorse::Model::Shapes::ShapeRef] + # @param options [Hash] a customizable set of options + # @return [ParamValidator] a new instance of ParamValidator + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#20 + def initialize(rules, options = T.unsafe(nil)); end + + # @api private + # @param params [Hash] + # @raise [ArgumentError] + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#32 + def validate!(params); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#197 + def correct_type?(ref, value, errors, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#128 + def document(ref, value, errors, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#222 + def error_messages(errors); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#232 + def expected_got(context, expected, got); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#213 + def io_like?(value, require_size = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#99 + def list(ref, values, errors, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#113 + def map(ref, values, errors, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#148 + def shape(ref, value, errors, context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#218 + def streaming_input?(ref); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#40 + def structure(ref, values, errors, context); end + + class << self + # @api private + # @param rules [Seahorse::Model::Shapes::ShapeRef] + # @param params [Hash] + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#14 + def validate!(rules, params); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/param_validator.rb#9 +Aws::ParamValidator::EXPECTED_GOT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/bearer_authorization.rb#5 +module Aws::Plugins; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/bearer_authorization.rb#7 +class Aws::Plugins::BearerAuthorization < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/bearer_authorization.rb#34 + def add_handlers(handlers, cfg); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/bearer_authorization.rb#50 +class Aws::Plugins::BearerAuthorization::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/bearer_authorization.rb#51 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#6 +class Aws::Plugins::ChecksumAlgorithm < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#56 + def add_handlers(handlers, _config); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#248 + def calculate_checksum(algorithm, body); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#258 + def digest_for_algorithm(algorithm); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#79 + def operation_response_algorithms(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#65 + def request_algorithm_selection(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#72 + def request_validation_mode(context); end + + # The trailer size (in bytes) is the overhead + the trailer name + + # the length of the base64 encoded checksum + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#274 + def trailer_length(algorithm, location_name); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#278 + def update_in_chunks(digest, io); end + end +end + +# Wrapper for request body that implements application-layer +# chunking with Digest computed on chunks + added as a trailer +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#289 +class Aws::Plugins::ChecksumAlgorithm::AwsChunkedTrailerDigestIO + # @api private + # @return [AwsChunkedTrailerDigestIO] a new instance of AwsChunkedTrailerDigestIO + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#292 + def initialize(io, algorithm, location_name); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#317 + def read(length, buf = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#313 + def rewind; end + + # the size of the application layer aws-chunked + trailer body + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#301 + def size; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#290 +Aws::Plugins::ChecksumAlgorithm::AwsChunkedTrailerDigestIO::CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# priority order of checksum algorithms to validate responses against +# Remove any algorithms not supported by client (ie, depending on CRT availability) +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#23 +Aws::Plugins::ChecksumAlgorithm::CHECKSUM_ALGORITHM_PRIORITIES = T.let(T.unsafe(nil), Array) + +# byte size of checksums, used in computing the trailer length +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#26 +Aws::Plugins::ChecksumAlgorithm::CHECKSUM_SIZE = T.let(T.unsafe(nil), Hash) + +# one MB +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#7 +Aws::Plugins::ChecksumAlgorithm::CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# determine the set of supported client side checksum algorithms +# CRC32c requires aws-crt (optional sdk dependency) for support +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#11 +Aws::Plugins::ChecksumAlgorithm::CLIENT_ALGORITHMS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#116 +class Aws::Plugins::ChecksumAlgorithm::ChecksumHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#118 + def call(context); end + + private + + # Add events to the http_response to verify the checksum as its read + # This prevents the body from being read multiple times + # verification is done only once a successful response has completed + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#192 + def add_verify_response_checksum_handlers(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#164 + def apply_request_trailer_checksum(context, checksum_properties); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#150 + def calculate_request_checksum(context, checksum_properties); end + + # determine where (header vs trailer) a request checksum should be added + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#238 + def checksum_request_in(context); end + + # returns nil if no headers to verify + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#229 + def response_header_to_verify(headers, validation_list); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#141 + def should_calculate_request_checksum?(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#146 + def should_verify_response_checksum?(context); end +end + +# Interface for computing digests on request/response bodies +# which may be files, strings or IO like objects +# Applies only to digest functions that produce 32 bit integer checksums +# (eg CRC32) +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#37 +class Aws::Plugins::ChecksumAlgorithm::Digest32 + # @api private + # @param digest_fn [Object] + # @return [Digest32] a new instance of Digest32 + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#42 + def initialize(digest_fn); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#51 + def base64digest; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#47 + def update(chunk); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#39 + def value; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#87 +class Aws::Plugins::ChecksumAlgorithm::OptionHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/checksum_algorithm.rb#88 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#8 +class Aws::Plugins::ClientMetricsPlugin < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#60 + def add_handlers(handlers, config); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#114 + def resolve_client_id(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#100 + def resolve_client_side_monitoring(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#87 + def resolve_client_side_monitoring_host(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#74 + def resolve_client_side_monitoring_port(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#70 + def resolve_publisher(cfg); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#122 +class Aws::Plugins::ClientMetricsPlugin::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#123 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#202 + def _calculate_service_id(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_plugin.rb#208 + def _fallback_service_id(id); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#7 +class Aws::Plugins::ClientMetricsSendPlugin < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#9 + def add_handlers(handlers, config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#30 +class Aws::Plugins::ClientMetricsSendPlugin::AttemptHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#31 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#76 + def _extract_error_name(error); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#19 +class Aws::Plugins::ClientMetricsSendPlugin::LatencyHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb#20 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/credentials_configuration.rb#7 +class Aws::Plugins::CredentialsConfiguration < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/defaults_mode.rb#7 +class Aws::Plugins::DefaultsMode < ::Seahorse::Client::Plugin + class << self + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/defaults_mode.rb#29 + def resolve_defaults_mode(cfg); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#6 +class Aws::Plugins::EndpointDiscovery < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#60 + def add_handlers(handlers, config); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#162 + def resolve_endpoint_discovery(cfg); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#64 +class Aws::Plugins::EndpointDiscovery::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#66 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#98 + def _apply_endpoint_discovery_user_agent(ctx); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#106 + def _discover_endpoint(ctx, required); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_discovery.rb#89 + def _valid_uri(address); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_pattern.rb#6 +class Aws::Plugins::EndpointPattern < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_pattern.rb#17 + def add_handlers(handlers, config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_pattern.rb#21 +class Aws::Plugins::EndpointPattern::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_pattern.rb#23 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_pattern.rb#35 + def _apply_endpoint_trait(context, trait); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/endpoint_pattern.rb#48 + def _replace_label_value(ori, label, input_ref, params); end +end + +# This plugin provides the ability to provide global configuration for +# all AWS classes or specific ones. +# +# ## Global AWS configuration +# +# You can specify global configuration defaults via `Aws.config` +# +# Aws.config[:region] = 'us-west-2' +# +# Options applied to `Aws.config` are merged with constructed +# service interfaces. +# +# # uses the global configuration +# Aws::EC2.new.config.region #=> 'us-west-2' +# +# # constructor args have priority over global configuration +# Aws::EC2.new(region: 'us-east-1').config.region #=> 'us-east-1' +# +# ## Service Specific Global Configuration +# +# Some services have very specific configuration options that are not +# shared by other services. +# +# # oops, this option is only recognized by Aws::S3 +# Aws.config[:force_path_style] = true +# Aws::EC2.new +# #=> raises ArgumentError: invalid configuration option `:force_path_style' +# +# To avoid this issue, you can nest service specific options +# +# Aws.config[:s3] = { force_path_style: true } +# +# Aws::EC2.new # no error this time +# Aws::S3.new.config.force_path_style #=> true +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/global_configuration.rb#44 +class Aws::Plugins::GlobalConfiguration < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/global_configuration.rb#49 + def before_initialize(client_class, options); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/global_configuration.rb#65 + def apply_aws_defaults(client_class, options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/global_configuration.rb#57 + def apply_service_defaults(client_class, options); end + + class << self + # Registers an additional service identifier. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/global_configuration.rb#77 + def add_identifier(identifier); end + + # @api private + # @return [Set] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/global_configuration.rb#83 + def identifiers; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/helpful_socket_errors.rb#6 +class Aws::Plugins::HelpfulSocketErrors < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/helpful_socket_errors.rb#8 +class Aws::Plugins::HelpfulSocketErrors::Handler < ::Seahorse::Client::Handler + # Wrap `SocketError` errors with `Aws::Errors::NoSuchEndpointError` + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/helpful_socket_errors.rb#11 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/helpful_socket_errors.rb#30 + def no_such_endpoint_error(context, error); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/helpful_socket_errors.rb#23 + def socket_endpoint_error?(error); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#9 +class Aws::Plugins::HttpChecksum < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#56 + def add_handlers(handlers, _config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#10 +class Aws::Plugins::HttpChecksum::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#13 + def call(context); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#24 + def checksum_required?(context); end + + # @api private + # @param value [File, Tempfile, IO#read, String] + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#32 + def md5(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#45 + def update_in_chunks(digest, io); end +end + +# one MB +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/http_checksum.rb#11 +Aws::Plugins::HttpChecksum::Handler::CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# Provides support for auto filling operation parameters +# that enabled with `idempotencyToken` trait with random UUID v4 +# when no value is provided +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/idempotency_token.rb#12 +class Aws::Plugins::IdempotencyToken < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/idempotency_token.rb#15 +class Aws::Plugins::IdempotencyToken::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/idempotency_token.rb#17 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/idempotency_token.rb#24 + def auto_fill(params, ref); end +end + +# Converts input value to JSON Syntax for members with jsonvalue trait +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/jsonvalue_converter.rb#7 +class Aws::Plugins::JsonvalueConverter < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/jsonvalue_converter.rb#10 +class Aws::Plugins::JsonvalueConverter::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/jsonvalue_converter.rb#12 + def call(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/jsonvalue_converter.rb#19 + def convert_jsonvalue(m, ref, params, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/jsonvalue_converter.rb#46 + def serialize_jsonvalue(v, context); end +end + +# @api private +# @see Log::Formatter +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/logging.rb#7 +class Aws::Plugins::Logging < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/logging.rb#31 + def add_handlers(handlers, config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/logging.rb#35 +class Aws::Plugins::Logging::Handler < ::Seahorse::Client::Handler + # @api private + # @param context [RequestContext] + # @return [Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/logging.rb#39 + def call(context); end + + private + + # @api private + # @param config [Configuration] + # @param response [Response] + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/logging.rb#59 + def format(config, response); end + + # @api private + # @param config [Configuration] + # @param response [Response] + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/logging.rb#52 + def log(config, response); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/param_converter.rb#6 +class Aws::Plugins::ParamConverter < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/param_converter.rb#17 + def add_handlers(handlers, config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/param_converter.rb#21 +class Aws::Plugins::ParamConverter::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/param_converter.rb#23 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/param_validator.rb#6 +class Aws::Plugins::ParamValidator < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/param_validator.rb#16 + def add_handlers(handlers, config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/param_validator.rb#22 +class Aws::Plugins::ParamValidator::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/param_validator.rb#24 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/protocols/query.rb#7 +module Aws::Plugins::Protocols; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/protocols/json_rpc.rb#6 +class Aws::Plugins::Protocols::JsonRpc < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/protocols/query.rb#8 +class Aws::Plugins::Protocols::Query < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/protocols/rest_json.rb#6 +class Aws::Plugins::Protocols::RestJson < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/protocols/rest_json.rb#8 +class Aws::Plugins::Protocols::RestJson::ContentTypeHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/protocols/rest_json.rb#9 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/recursion_detection.rb#6 +class Aws::Plugins::RecursionDetection < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/recursion_detection.rb#9 +class Aws::Plugins::RecursionDetection::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/recursion_detection.rb#10 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/recursion_detection.rb#22 + def validate_header(header_value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#6 +class Aws::Plugins::RegionalEndpoint < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#67 + def after_initialize(client); end + + class << self + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#145 + def env_global_endpoint(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#135 + def env_service_endpoint(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#169 + def handle_legacy_pseudo_regions(cfg); end + + # get a custom configured endpoint from ENV or configuration + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#128 + def resolve_custom_config_endpoint(cfg); end + + # NOTE: with Endpoints 2.0, some of this logic is deprecated + # but because new old service gems may depend on new core versions + # we must preserve that behavior. + # Additional behavior controls the setting of the custom SDK::Endpoint + # parameter. + # When the `regional_endpoint` config is set to true - this indicates to + # Endpoints2.0 that a custom endpoint has NOT been configured by the user. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#111 + def resolve_endpoint(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#98 + def resolve_ignore_configured_endpoint_urls(cfg); end + + # set a default endpoint in config using legacy (endpoints.json) resolver + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#180 + def resolve_legacy_endpoint(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#76 + def resolve_region(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#84 + def resolve_use_dualstack_endpoint(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#92 + def resolve_use_fips_endpoint(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#153 + def shared_config_endpoint(cfg); end + + # check region is a valid RFC host label + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/regional_endpoint.rb#163 + def validate_region!(region); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#6 +class Aws::Plugins::RequestCompression < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#58 + def add_handlers(handlers, _config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#35 + def after_initialize(client); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#40 + def validate_disable_request_compression_input(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#48 + def validate_request_min_compression_size_bytes_input(cfg); end + + class << self + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#66 + def resolve_disable_request_compression(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#73 + def resolve_request_min_compression_size_bytes(cfg); end + end +end + +# one MB +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#10 +Aws::Plugins::RequestCompression::CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#82 +class Aws::Plugins::RequestCompression::CompressionHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#83 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#136 + def gzip_compress(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#126 + def process_compression(encoding, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#159 + def process_streaming_compression(encoding, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#99 + def request_encoding_selection(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#113 + def should_compress?(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#118 + def streaming?(input); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#104 + def update_content_encoding(encoding, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#150 + def update_in_chunks(compressor, io); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#202 +class Aws::Plugins::RequestCompression::CompressionHandler::ChunkBuffer + # @api private + # @return [ChunkBuffer] a new instance of ChunkBuffer + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#203 + def initialize; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#207 + def last_chunk; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#209 + def write(data); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#170 +class Aws::Plugins::RequestCompression::CompressionHandler::GzipIO + # @api private + # @return [GzipIO] a new instance of GzipIO + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#171 + def initialize(body); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#177 + def read(length, buff = T.unsafe(nil)); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#7 +Aws::Plugins::RequestCompression::DEFAULT_MIN_COMPRESSION_SIZE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#8 +Aws::Plugins::RequestCompression::MIN_COMPRESSION_SIZE_LIMIT = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/request_compression.rb#9 +Aws::Plugins::RequestCompression::SUPPORTED_ENCODINGS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/response_paging.rb#6 +class Aws::Plugins::ResponsePaging < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/response_paging.rb#8 +class Aws::Plugins::ResponsePaging::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/response_paging.rb#10 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#5 +module Aws::Plugins::Retries; end + +# Used only in 'adaptive' retry mode +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#8 +class Aws::Plugins::Retries::ClientRateLimiter + # @api private + # @return [ClientRateLimiter] a new instance of ClientRateLimiter + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#17 + def initialize; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#32 + def token_bucket_acquire(amount, wait_to_fill = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#50 + def update_sending_rate(is_throttling_error); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#122 + def calculate_time_window; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#128 + def cubic_success(timestamp); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#133 + def cubic_throttle(rate_to_use); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#105 + def enable_token_bucket; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#79 + def token_bucket_refill; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#94 + def token_bucket_update_rate(new_rps); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#109 + def update_measured_rate; end +end + +# How much to scale back after a throttling response +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#13 +Aws::Plugins::Retries::ClientRateLimiter::BETA = T.let(T.unsafe(nil), Float) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#9 +Aws::Plugins::Retries::ClientRateLimiter::MIN_CAPACITY = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#10 +Aws::Plugins::Retries::ClientRateLimiter::MIN_FILL_RATE = T.let(T.unsafe(nil), Float) + +# Controls how aggressively we scale up after being throttled +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#15 +Aws::Plugins::Retries::ClientRateLimiter::SCALE_CONSTANT = T.let(T.unsafe(nil), Float) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb#11 +Aws::Plugins::Retries::ClientRateLimiter::SMOOTH = T.let(T.unsafe(nil), Float) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#8 +class Aws::Plugins::Retries::ClockSkew + # @api private + # @return [ClockSkew] a new instance of ClockSkew + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#12 + def initialize; end + + # Gets the clock_correction in seconds to apply to a given endpoint + # + # @api private + # @param endpoint [URI / String] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#26 + def clock_correction(endpoint); end + + # Determines whether a request has clock skew by comparing + # the current time against the server's time in the response + # + # @api private + # @param context [Seahorse::Client::RequestContext] + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#44 + def clock_skewed?(context); end + + # The estimated skew factors in any clock skew from + # the service along with any network latency. + # This provides a more accurate value for the ttl, + # which should represent when the client will stop + # waiting for a request. + # Estimated Skew should not be used to correct clock skew errors + # it should only be used to estimate TTL for a request + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#37 + def estimated_skew(endpoint); end + + # Called only on clock skew related errors + # Update the stored clock skew correction value for an endpoint + # from the server's time in the response + # + # @api private + # @param context [Seahorse::Client::RequestContext] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#54 + def update_clock_correction(context); end + + # Called for every request + # Update our estimated clock skew for the endpoint + # from the servers time in the response + # + # @api private + # @param context [Seahorse::Client::RequestContext] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#67 + def update_estimated_skew(context); end + + private + + # @api private + # @param response [Seahorse::Client::Http::Response:] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#80 + def server_time(response); end + + # Sets the clock correction for an endpoint + # + # @api private + # @param endpoint [URI / String] + # @param correction [Number] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#91 + def set_clock_correction(endpoint, correction); end +end + +# five minutes +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/clock_skew.rb#10 +Aws::Plugins::Retries::ClockSkew::CLOCK_SKEW_THRESHOLD = T.let(T.unsafe(nil), Integer) + +# This class will be obsolete when APIs contain modeled exceptions +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#8 +class Aws::Plugins::Retries::ErrorInspector + # @api private + # @return [ErrorInspector] a new instance of ErrorInspector + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#68 + def initialize(error, http_status_code); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#85 + def checksum?; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#115 + def clock_skew?(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#99 + def endpoint_discovery?(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#74 + def expired_credentials?; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#107 + def modeled_retryable?; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#111 + def modeled_throttling?; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#89 + def networking?; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#120 + def retryable?(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#95 + def server?; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#78 + def throttling_error?; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#137 + def extract_name(error); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#133 + def refreshable_credentials?(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#40 +Aws::Plugins::Retries::ErrorInspector::CHECKSUM_ERRORS = T.let(T.unsafe(nil), Set) + +# See: https://github.com/aws/aws-sdk-net/blob/5810dfe401e0eac2e59d02276d4b479224b4538e/sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/RetryPolicy.cs#L78 +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#57 +Aws::Plugins::Retries::ErrorInspector::CLOCK_SKEW_ERRORS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#9 +Aws::Plugins::Retries::ErrorInspector::EXPIRED_CREDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#47 +Aws::Plugins::Retries::ErrorInspector::NETWORKING_ERRORS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/error_inspector.rb#21 +Aws::Plugins::Retries::ErrorInspector::THROTTLING_ERRORS = T.let(T.unsafe(nil), Set) + +# Used in 'standard' and 'adaptive' retry modes. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#9 +class Aws::Plugins::Retries::RetryQuota + # @api private + # @return [RetryQuota] a new instance of RetryQuota + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#15 + def initialize(opts = T.unsafe(nil)); end + + # check if there is sufficient capacity to retry + # and return it. If there is insufficient capacity + # return 0 + # + # @api private + # @return [Integer] The amount of capacity checked out + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#25 + def checkout_capacity(error_inspector); end + + # capacity_amount refers to the amount of capacity requested from + # the last retry. It can either be RETRY_COST, TIMEOUT_RETRY_COST, + # or unset. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#44 + def release(capacity_amount); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#10 +Aws::Plugins::Retries::RetryQuota::INITIAL_RETRY_TOKENS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#12 +Aws::Plugins::Retries::RetryQuota::NO_RETRY_INCREMENT = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#11 +Aws::Plugins::Retries::RetryQuota::RETRY_COST = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retries/retry_quota.rb#13 +Aws::Plugins::Retries::RetryQuota::TIMEOUT_RETRY_COST = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#13 +class Aws::Plugins::RetryErrors < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#421 + def add_handlers(handlers, config); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#198 + def resolve_adaptive_retry_wait_to_fill(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#212 + def resolve_correct_clock_skew(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#184 + def resolve_max_attempts(cfg); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#165 + def resolve_retry_mode(cfg); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#29 +Aws::Plugins::RetryErrors::DEFAULT_BACKOFF = T.let(T.unsafe(nil), Proc) + +# BEGIN LEGACY OPTIONS +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#14 +Aws::Plugins::RetryErrors::EQUAL_JITTER = T.let(T.unsafe(nil), Proc) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#15 +Aws::Plugins::RetryErrors::FULL_JITTER = T.let(T.unsafe(nil), Proc) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#227 +class Aws::Plugins::RetryErrors::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#230 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#327 + def add_retry_headers(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#341 + def compute_request_ttl(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#309 + def exponential_backoff(retries); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#273 + def get_send_token(config); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#322 + def refresh_credentials?(context, error); end + + # maxsendrate is updated if on adaptive mode and based on response + # retry quota is updated if the request is successful (both modes) + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#288 + def request_bookkeeping(context, response, error_inspector); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#314 + def retry_request(context, error); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#302 + def retryable?(context, response, error_inspector); end +end + +# Max backoff (in seconds) +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#228 +Aws::Plugins::RetryErrors::Handler::MAX_BACKOFF = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#18 +Aws::Plugins::RetryErrors::JITTERS = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#357 +class Aws::Plugins::RetryErrors::LegacyHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#359 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#397 + def delay_retry(context); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#407 + def refresh_credentials?(context, error); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#416 + def response_truncatable?(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#379 + def retry_if_possible(response, error_inspector); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#412 + def retry_limit(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#388 + def retry_request(context, error); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#401 + def should_retry?(context, error); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/retry_errors.rb#16 +Aws::Plugins::RetryErrors::NO_JITTER = T.let(T.unsafe(nil), Proc) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#10 +class Aws::Plugins::Sign < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#20 + def add_handlers(handlers, cfg); end + + class << self + # Return a signer with the `sign(context)` method + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#27 + def signer_for(auth_scheme, config, region_override = T.unsafe(nil)); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#62 +class Aws::Plugins::Sign::Bearer + # @api private + # @return [Bearer] a new instance of Bearer + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#63 + def initialize; end + + # @api private + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#80 + def presign_url(*args); end + + # @api private + # @raise [Errors::MissingBearerTokenError] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#66 + def sign(context); end + + # @api private + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#84 + def sign_event(*args); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#38 +class Aws::Plugins::Sign::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#39 + def call(context); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#54 + def v2_signing?(config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#188 +class Aws::Plugins::Sign::NullSigner + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#193 + def presign_url(*args); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#190 + def sign(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#196 + def sign_event(*args); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#18 +Aws::Plugins::Sign::SUPPORTED_AUTH_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#90 +class Aws::Plugins::Sign::SignatureV4 + # @api private + # @return [SignatureV4] a new instance of SignatureV4 + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#91 + def initialize(auth_scheme, config, region_override = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#146 + def presign_url(*args); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#119 + def sign(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#150 + def sign_event(*args); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#156 + def apply_authtype(context, req); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#171 + def apply_clock_skew(context, req); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/sign.rb#163 + def reset_signature(req); end +end + +# Necessary to exist after endpoints 2.0 +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#9 +class Aws::Plugins::SignatureV4 < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#52 + def add_handlers(handlers, cfg); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#141 + def apply_authtype(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#98 + def apply_signature(options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#77 + def build_signer(cfg); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#61 +class Aws::Plugins::SignatureV4::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#62 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#68 +class Aws::Plugins::SignatureV4::MissingCredentialsSigner + # @api private + # @raise [Errors::MissingCredentialsError] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#69 + def sign_request(*args); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/signature_v4.rb#11 +Aws::Plugins::SignatureV4::V4_AUTH = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#6 +class Aws::Plugins::StubResponses < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#31 + def add_handlers(handlers, config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#35 + def after_initialize(client); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#48 +class Aws::Plugins::StubResponses::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#64 + def apply_stub(stub, response, async_mode = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#50 + def call(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#73 + def signal_error(error, http_resp); end + + # @api private + # @param stub [Seahorse::Client::Http::Response] + # @param http_resp [Seahorse::Client::Http::Response | Seahorse::Client::Http::AsyncResponse] + # @param async_mode [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/stub_responses.rb#84 + def signal_http(stub, http_resp, async_mode = T.unsafe(nil)); end +end + +# For Streaming Input Operations, when `requiresLength` is enabled +# checking whether `Content-Length` header can be set, +# for `v4-unsigned-body` operations, set `Transfer-Encoding` header +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/transfer_encoding.rb#9 +class Aws::Plugins::TransferEncoding < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/transfer_encoding.rb#12 +class Aws::Plugins::TransferEncoding::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/transfer_encoding.rb#13 + def call(context); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/transfer_encoding.rb#40 + def requires_length?(ref); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/transfer_encoding.rb#31 + def streaming?(ref); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#7 +class Aws::Plugins::UserAgent < ::Seahorse::Client::Plugin + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#25 + def feature(feature, &block); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#34 +class Aws::Plugins::UserAgent::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#35 + def call(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#40 + def set_user_agent(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#44 +class Aws::Plugins::UserAgent::Handler::UserAgent + # @api private + # @return [UserAgent] a new instance of UserAgent + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#45 + def initialize(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#49 + def to_s; end + + private + + # Used to be gem_name/gem_version + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#69 + def api_metadata; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#113 + def app_id; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#109 + def config_metadata; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#103 + def env_metadata; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#121 + def feature_metadata; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#127 + def framework_metadata; end + + # Used to be RUBY_ENGINE/RUBY_VERSION + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#99 + def language_metadata; end + + # Used to be RUBY_PLATFORM + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/plugins/user_agent.rb#79 + def os_metadata; end +end + +# A credential provider that executes a given process and attempts +# to read its stdout to recieve a JSON payload containing the credentials. +# +# credentials = Aws::ProcessCredentials.new('/usr/bin/credential_proc') +# ec2 = Aws::EC2::Client.new(credentials: credentials) +# +# Automatically handles refreshing credentials if an Expiration time is +# provided in the credentials payload. +# +# @see https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes +# +# source://aws-sdk-core//lib/aws-sdk-core/process_credentials.rb#14 +class Aws::ProcessCredentials + include ::Aws::CredentialProvider + include ::Aws::RefreshingCredentials + + # Creates a new ProcessCredentials object, which allows an + # external process to be used as a credential provider. + # + # credentials provider. + # + # @param process [String] Invocation string for process + # @return [ProcessCredentials] a new instance of ProcessCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/process_credentials.rb#24 + def initialize(process); end + + private + + # @raise [Errors::InvalidProcessCredentialsPayload] + # + # source://aws-sdk-core//lib/aws-sdk-core/process_credentials.rb#58 + def _parse_payload_format_v1(creds_json); end + + # source://aws-sdk-core//lib/aws-sdk-core/process_credentials.rb#33 + def credentials_from_process(proc_invocation); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/process_credentials.rb#74 + def near_expiration?(expiration_length); end + + # source://aws-sdk-core//lib/aws-sdk-core/process_credentials.rb#70 + def refresh; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#6 +module Aws::Query; end + +# source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#7 +class Aws::Query::EC2ParamBuilder + include ::Seahorse::Model::Shapes + + # @return [EC2ParamBuilder] a new instance of EC2ParamBuilder + # + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#11 + def initialize(param_list); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#17 + def apply(ref, params); end + + # Returns the value of attribute params. + # + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#15 + def params; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#68 + def blob(value); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#44 + def format(ref, value, prefix); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#33 + def list(ref, values, prefix); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#56 + def query_name(ref); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#60 + def set(name, value); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#23 + def structure(ref, values, prefix); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#73 + def timestamp(ref, value); end + + # source://aws-sdk-core//lib/aws-sdk-core/query/ec2_param_builder.rb#64 + def ucfirst(str); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#6 +class Aws::Query::Handler < ::Seahorse::Client::Handler + include ::Seahorse::Model::Shapes + + # @api private + # @param context [Seahorse::Client::RequestContext] + # @return [Seahorse::Client::Response] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#28 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#55 + def apply_params(param_list, params, rules); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#43 + def build_request(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#59 + def parse_xml(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#81 + def remove_wrapper(data, context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#68 + def rules(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#64 + def xml(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#10 +Aws::Query::Handler::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#16 +Aws::Query::Handler::METADATA_REF = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ShapeRef) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#14 +class Aws::Query::Handler::METADATA_STRUCT < ::Struct + # Returns the value of attribute request_id + # + # @return [Object] the current value of request_id + def request_id; end + + # Sets the attribute request_id + # + # @param value [Object] the value to set the attribute request_id to. + # @return [Object] the newly set value + def request_id=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/handler.rb#12 +class Aws::Query::Handler::WRAPPER_STRUCT < ::Struct + # Returns the value of attribute response_metadata + # + # @return [Object] the current value of response_metadata + def response_metadata; end + + # Sets the attribute response_metadata + # + # @param value [Object] the value to set the attribute response_metadata to. + # @return [Object] the newly set value + def response_metadata=(_); end + + # Returns the value of attribute result + # + # @return [Object] the current value of result + def result; end + + # Sets the attribute result + # + # @param value [Object] the value to set the attribute result to. + # @return [Object] the newly set value + def result=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#5 +class Aws::Query::Param + # @api private + # @param name [String] + # @param value [String, nil] (nil) + # @return [Param] a new instance of Param + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#9 + def initialize(name, value = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#33 + def <=>(other); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#26 + def ==(other); end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#15 + def name; end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#21 + def to_s; end + + # @api private + # @return [String, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#18 + def value; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param.rb#39 + def escape(str); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#7 +class Aws::Query::ParamBuilder + include ::Seahorse::Model::Shapes + + # @api private + # @return [ParamBuilder] a new instance of ParamBuilder + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#11 + def initialize(param_list); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#17 + def apply(ref, params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#15 + def params; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#98 + def blob(value); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#84 + def flat?(ref); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#65 + def format(ref, value, prefix); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#32 + def list(ref, values, prefix); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#53 + def map(ref, values, prefix); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#76 + def query_name(ref, default = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#80 + def set(name, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#23 + def structure(ref, values, prefix); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_builder.rb#88 + def timestamp(ref, value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#7 +class Aws::Query::ParamList + include ::Enumerable + + # @api private + # @return [ParamList] a new instance of ParamList + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#12 + def initialize; end + + # @api private + # @return [Param, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#27 + def [](param_name); end + + # @api private + # @param param_name [String] + # @param param_value [String, nil] + # @return [Param] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#19 + def []=(param_name, param_value = T.unsafe(nil)); end + + # @api private + # @param param_name [String] + # @return [Param, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#33 + def delete(param_name); end + + # @api private + # @return [Enumerable] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#38 + def each(&block); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#43 + def empty?; end + + # @api private + # @param param_name [String] + # @param param_value [String, nil] + # @return [Param] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#19 + def set(param_name, param_value = T.unsafe(nil)); end + + # @api private + # @return [Array] Returns an array of sorted {Param} objects. + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#48 + def to_a; end + + # @api private + # @return [#read, #rewind, #size] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#58 + def to_io; end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#53 + def to_s; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#63 +class Aws::Query::ParamList::IoWrapper + # @api private + # @param param_list [ParamList] + # @return [IoWrapper] a new instance of IoWrapper + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#66 + def initialize(param_list); end + + # @api private + # @return [ParamList] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#72 + def param_list; end + + # @api private + # @return [String, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#85 + def read(bytes = T.unsafe(nil), output_buffer = T.unsafe(nil)); end + + # @api private + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#80 + def rewind; end + + # @api private + # @return [Integer] + # + # source://aws-sdk-core//lib/aws-sdk-core/query/param_list.rb#75 + def size; end +end + +# Base class used credential classes that can be refreshed. This +# provides basic refresh logic in a thread-safe manner. Classes mixing in +# this module are expected to implement a #refresh method that populates +# the following instance variables: +# +# * `@access_key_id` +# * `@secret_access_key` +# * `@session_token` +# * `@expiration` +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#18 +module Aws::RefreshingCredentials + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#25 + def initialize(options = T.unsafe(nil)); end + + # @api private + # @return [Credentials] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#34 + def credentials; end + + # Refresh credentials. + # + # @api private + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#41 + def refresh!; end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#80 + def near_expiration?(expiration_length); end + + # Refreshes credentials asynchronously and synchronously. + # If we are near to expiration, block while getting new credentials. + # Otherwise, if we're approaching expiration, use the existing credentials + # but attempt a refresh in the background. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#55 + def refresh_if_near_expiration!; end +end + +# 10 minutes +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#21 +Aws::RefreshingCredentials::ASYNC_EXPIRATION_LENGTH = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#23 +Aws::RefreshingCredentials::CLIENT_EXCLUDE_OPTIONS = T.let(T.unsafe(nil), Set) + +# 5 minutes +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/refreshing_credentials.rb#20 +Aws::RefreshingCredentials::SYNC_EXPIRATION_LENGTH = T.let(T.unsafe(nil), Integer) + +# Module/mixin used by token provider classes that can be refreshed. This +# provides basic refresh logic in a thread-safe manner. Classes mixing in +# this module are expected to implement a #refresh method that populates +# the following instance variable: +# +# * `@token` [Token] - {Aws::Token} object with the `expiration` and `token` +# fields set. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#16 +module Aws::RefreshingToken + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#18 + def initialize(options = T.unsafe(nil)); end + + # @api private + # @return [Time, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#33 + def expiration; end + + # Refresh token. + # + # @api private + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#40 + def refresh!; end + + # @api private + # @return [Token] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#27 + def token; end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#62 + def near_expiration?; end + + # Refreshes token if it is within + # 5 minutes of expiration. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/refreshing_token.rb#51 + def refresh_if_near_expiration; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#4 +module Aws::Resources; end + +# source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#5 +class Aws::Resources::Collection + include ::Enumerable + extend ::Aws::Deprecations + + # @api private + # @option options + # @option options + # @param batches [Enumerator] + # @param options [Hash] a customizable set of options + # @return [Collection] a new instance of Collection + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#14 + def initialize(batches, options = T.unsafe(nil)); end + + # @api private + # @deprecated + # + # source://aws-sdk-core//lib/aws-sdk-core/deprecations.rb#65 + def [](*args, &block); end + + # @api private + # @deprecated + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#30 + def batches; end + + # @return [Enumerator] + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#50 + def each(&block); end + + # @param count [Integer] + # @return [Resource, Collection] + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#64 + def first(count = T.unsafe(nil)); end + + # @return [Integer, nil] Returns the size of this collection if known, returns `nil` when + # an API call is necessary to enumerate items in this collection. + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#23 + def length; end + + # Returns a new collection that will enumerate a limited number of items. + # + # collection.limit(10).each do |band| + # # yields at most 10 times + # end + # + # @param limit [Integer] + # @return [Collection] + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#85 + def limit(limit); end + + # @return [Integer, nil] Returns the size of this collection if known, returns `nil` when + # an API call is necessary to enumerate items in this collection. + # + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#23 + def size; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#91 + def batch_enum; end + + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#107 + def limited_batches; end + + # source://aws-sdk-core//lib/aws-sdk-core/resources/collection.rb#99 + def non_empty_batches; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/handler.rb#5 +module Aws::Rest; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/handler.rb#6 +class Aws::Rest::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/handler.rb#8 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/handler.rb#18 + def apply_request_id(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#5 +module Aws::Rest::Request; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#6 +class Aws::Rest::Request::Body + include ::Seahorse::Model::Shapes + + # @api private + # @param serializer_class [Class] + # @param rules [Seahorse::Model::ShapeRef] + # @return [Body] a new instance of Body + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#12 + def initialize(serializer_class, rules); end + + # @api private + # @param http_req [Seahorse::Client::Http::Request] + # @param params [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#19 + def apply(http_req, params); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#66 + def body_params(params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#43 + def build_body(params); end + + # operation is modeled for body when it is modeled for a payload + # either with payload trait or normal members. + # + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#34 + def modeled_body?; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#62 + def serialize(rules, params); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/body.rb#55 + def streaming?; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#6 +class Aws::Rest::Request::Builder + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#8 + def apply(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#33 + def populate_body(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#21 + def populate_endpoint(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#28 + def populate_headers(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#17 + def populate_http_method(context); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/builder.rb#40 + def serializer_class(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#8 +class Aws::Rest::Request::Endpoint + # @api private + # @param rules [Seahorse::Model::Shapes::ShapeRef] + # @param request_uri_pattern [String] + # @return [Endpoint] a new instance of Endpoint + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#12 + def initialize(rules, request_uri_pattern); end + + # @api private + # @param base_uri [URI::HTTPS, URI::HTTP] + # @param params [Hash, Struct] + # @return [URI::HTTPS, URI::HTTP] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#23 + def uri(base_uri, params); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#32 + def apply_path_params(uri, params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#57 + def apply_querystring_params(uri, params); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#71 + def escape(string); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#51 + def param_name(placeholder); end + + # @api private + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/endpoint.rb#39 + def param_value_for_placeholder(placeholder, params); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#9 +class Aws::Rest::Request::Headers + include ::Seahorse::Model::Shapes + + # @api private + # @param rules [Seahorse::Model::ShapeRef] + # @return [Headers] a new instance of Headers + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#14 + def initialize(rules); end + + # @api private + # @param http_req [Seahorse::Client::Http::Request] + # @param params [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#20 + def apply(http_req, params); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#60 + def apply_header_map(headers, ref, values); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#33 + def apply_header_value(headers, ref, value); end + + # With complex headers value in json syntax, + # base64 encodes value to avoid weird characters + # causing potential issues in headers + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#70 + def apply_json_trait(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#52 + def list(headers, ref, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/headers.rb#42 + def timestamp(ref, value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#6 +class Aws::Rest::Request::QuerystringBuilder + include ::Seahorse::Model::Shapes + + # Provide shape references and param values: + # + # [ + # [shape_ref1, 123], + # [shape_ref2, "text"] + # ] + # + # Returns a querystring: + # + # "Count=123&Words=text" + # + # @api private + # @param params [Array>] An array of + # model shape references and request parameter value pairs. + # @return [String] Returns a built querystring + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#25 + def build(params); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#33 + def build_part(shape_ref, param_value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#98 + def escape(string); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#92 + def list_of_strings(name, values); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#74 + def query_map_of_string(hash); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#82 + def query_map_of_string_list(hash); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/request/querystring_builder.rb#64 + def timestamp(ref, value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#5 +module Aws::Rest::Response; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#6 +class Aws::Rest::Response::Body + include ::Seahorse::Model::Shapes + + # @api private + # @param parser_class [Class] + # @param rules [Seahorse::Model::ShapeRef] + # @return [Body] a new instance of Body + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#12 + def initialize(parser_class, rules); end + + # @api private + # @param body [IO] + # @param data [Hash, Struct] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#19 + def apply(body, data); end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#33 + def event_stream?; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#44 + def parse(body, rules, target = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#48 + def parse_eventstream(body); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/body.rb#37 + def streaming?; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#9 +class Aws::Rest::Response::Headers + include ::Seahorse::Model::Shapes + + # @api private + # @param rules [Seahorse::Model::ShapeRef] + # @return [Headers] a new instance of Headers + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#14 + def initialize(rules); end + + # @api private + # @param http_resp [Seahorse::Client::Http::Response] + # @param target [Hash, Struct] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#20 + def apply(http_resp, target); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#36 + def cast_value(ref, value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#61 + def extract_header_map(headers, name, ref, data); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#30 + def extract_header_value(headers, name, ref, data); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/headers.rb#71 + def extract_json_trait(value); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/response/parser.rb#6 +class Aws::Rest::Response::Parser + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/parser.rb#8 + def apply(response); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/parser.rb#32 + def extract_body(rules, response); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/parser.rb#27 + def extract_headers(rules, response); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/parser.rb#22 + def extract_status_code(rules, response); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/parser.rb#40 + def parser_class(response); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/rest/response/status_code.rb#6 +class Aws::Rest::Response::StatusCode + # @api private + # @param rules [Seahorse::Model::Shapes::ShapeRef] + # @return [StatusCode] a new instance of StatusCode + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/status_code.rb#9 + def initialize(rules); end + + # @api private + # @param http_resp [Seahorse::Client::Http::Response] + # @param data [Hash, Struct] + # + # source://aws-sdk-core//lib/aws-sdk-core/rest/response/status_code.rb#15 + def apply(http_resp, data); end +end + +# This module provides support for AWS Single Sign-On. This module is available in the +# `aws-sdk-core` gem. +# +# # Client +# +# The {Client} class provides one method for each API operation. Operation +# methods each accept a hash of request parameters and return a response +# structure. +# +# sso = Aws::SSO::Client.new +# resp = sso.get_role_credentials(params) +# +# See {Client} for more information. +# +# # Errors +# +# Errors returned from AWS Single Sign-On are defined in the +# {Errors} module and all extend {Errors::ServiceError}. +# +# begin +# # do stuff +# rescue Aws::SSO::Errors::ServiceError +# # rescues all AWS Single Sign-On API errors +# end +# +# See {Errors} for more information. +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#10 +module Aws::SSO; end + +# An API client for SSO. To construct a client, you need to configure a `:region` and `:credentials`. +# +# client = Aws::SSO::Client.new( +# region: region_name, +# credentials: credentials, +# # ... +# ) +# +# For details on configuring region and credentials see +# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html). +# +# See {#initialize} for a full list of supported configuration options. +# +# source://aws-sdk-core//lib/aws-sdk-sso/client.rb#52 +class Aws::SSO::Client < ::Seahorse::Client::Base + include ::Aws::ClientStubs + + # @overload initialize + # @return [Client] a new instance of Client + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#385 + def initialize(*args); end + + # @api private + # @param params [{}] + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#599 + def build_request(operation_name, params = T.unsafe(nil)); end + + # Returns the STS short-term credentials for a given role name that is + # assigned to the user. + # + # @example Request syntax with placeholder values + # + # resp = client.get_role_credentials({ + # role_name: "RoleNameType", # required + # account_id: "AccountIdType", # required + # access_token: "AccessTokenType", # required + # }) + # @example Response structure + # + # resp.role_credentials.access_key_id #=> String + # resp.role_credentials.secret_access_key #=> String + # resp.role_credentials.session_token #=> String + # resp.role_credentials.expiration #=> Integer + # @option params + # @option params + # @option params + # @overload get_role_credentials + # @param params [Hash] ({}) + # @return [Types::GetRoleCredentialsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetRoleCredentialsResponse#role_credentials #role_credentials} => Types::RoleCredentials + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#432 + def get_role_credentials(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Lists all roles that are assigned to the user for a given AWS account. + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # @example Request syntax with placeholder values + # + # resp = client.list_account_roles({ + # next_token: "NextTokenType", + # max_results: 1, + # access_token: "AccessTokenType", # required + # account_id: "AccountIdType", # required + # }) + # @example Response structure + # + # resp.next_token #=> String + # resp.role_list #=> Array + # resp.role_list[0].role_name #=> String + # resp.role_list[0].account_id #=> String + # @option params + # @option params + # @option params + # @option params + # @overload list_account_roles + # @param params [Hash] ({}) + # @return [Types::ListAccountRolesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::ListAccountRolesResponse#next_token #next_token} => String + # * {Types::ListAccountRolesResponse#role_list #role_list} => Array<Types::RoleInfo> + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#485 + def list_account_roles(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Lists all AWS accounts assigned to the user. These AWS accounts are + # assigned by the administrator of the account. For more information, + # see [Assign User Access][1] in the *IAM Identity Center User Guide*. + # This operation returns a paginated response. + # + # + # + # [1]: https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # @example Request syntax with placeholder values + # + # resp = client.list_accounts({ + # next_token: "NextTokenType", + # max_results: 1, + # access_token: "AccessTokenType", # required + # }) + # @example Response structure + # + # resp.next_token #=> String + # resp.account_list #=> Array + # resp.account_list[0].account_id #=> String + # resp.account_list[0].account_name #=> String + # resp.account_list[0].email_address #=> String + # @option params + # @option params + # @option params + # @overload list_accounts + # @param params [Hash] ({}) + # @return [Types::ListAccountsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::ListAccountsResponse#next_token #next_token} => String + # * {Types::ListAccountsResponse#account_list #account_list} => Array<Types::AccountInfo> + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#542 + def list_accounts(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Removes the locally stored SSO tokens from the client-side cache and + # sends an API call to the IAM Identity Center service to invalidate the + # corresponding server-side IAM Identity Center sign in session. + # + # If a user uses IAM Identity Center to access the AWS CLI, the user’s + # IAM Identity Center sign in session is used to obtain an IAM session, + # as specified in the corresponding IAM Identity Center permission set. + # More specifically, IAM Identity Center assumes an IAM role in the + # target account on behalf of the user, and the corresponding temporary + # AWS credentials are returned to the client. + # + # After user logout, any existing IAM role sessions that were created by + # using IAM Identity Center permission sets continue based on the + # duration configured in the permission set. For more information, see + # [User authentications][1] in the *IAM Identity Center User Guide*. + # + # + # + # + # + # [1]: https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html + # + # @example Request syntax with placeholder values + # + # resp = client.logout({ + # access_token: "AccessTokenType", # required + # }) + # @option params + # @overload logout + # @param params [Hash] ({}) + # @return [Struct] Returns an empty {Seahorse::Client::Response response}. + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#590 + def logout(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # @api private + # @deprecated + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#614 + def waiter_names; end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#624 + def errors_module; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/client.rb#621 + def identifier; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#12 +module Aws::SSO::ClientApi + include ::Seahorse::Model +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#108 +Aws::SSO::ClientApi::API = T.let(T.unsafe(nil), Seahorse::Model::Api) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#16 +Aws::SSO::ClientApi::AccessKeyType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#17 +Aws::SSO::ClientApi::AccessTokenType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#18 +Aws::SSO::ClientApi::AccountIdType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#19 +Aws::SSO::ClientApi::AccountInfo = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#20 +Aws::SSO::ClientApi::AccountListType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#21 +Aws::SSO::ClientApi::AccountNameType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#22 +Aws::SSO::ClientApi::EmailAddressType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#23 +Aws::SSO::ClientApi::ErrorDescription = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#24 +Aws::SSO::ClientApi::ExpirationTimestampType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#25 +Aws::SSO::ClientApi::GetRoleCredentialsRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#26 +Aws::SSO::ClientApi::GetRoleCredentialsResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#27 +Aws::SSO::ClientApi::InvalidRequestException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#28 +Aws::SSO::ClientApi::ListAccountRolesRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#29 +Aws::SSO::ClientApi::ListAccountRolesResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#30 +Aws::SSO::ClientApi::ListAccountsRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#31 +Aws::SSO::ClientApi::ListAccountsResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#32 +Aws::SSO::ClientApi::LogoutRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#33 +Aws::SSO::ClientApi::MaxResultType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#34 +Aws::SSO::ClientApi::NextTokenType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#35 +Aws::SSO::ClientApi::ResourceNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#36 +Aws::SSO::ClientApi::RoleCredentials = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#37 +Aws::SSO::ClientApi::RoleInfo = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#38 +Aws::SSO::ClientApi::RoleListType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#39 +Aws::SSO::ClientApi::RoleNameType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#40 +Aws::SSO::ClientApi::SecretAccessKeyType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#41 +Aws::SSO::ClientApi::SessionTokenType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#42 +Aws::SSO::ClientApi::TooManyRequestsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/client_api.rb#43 +Aws::SSO::ClientApi::UnauthorizedException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# Endpoint parameters used to influence endpoints per request. +# +# source://aws-sdk-core//lib/aws-sdk-sso/endpoint_parameters.rb#33 +class Aws::SSO::EndpointParameters < ::Struct + include ::Aws::Structure + + # @return [EndpointParameters] a new instance of EndpointParameters + # + # source://aws-sdk-core//lib/aws-sdk-sso/endpoint_parameters.rb#51 + def initialize(options = T.unsafe(nil)); end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint; end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint=(_); end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region; end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region=(_); end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack; end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack=(_); end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips; end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-sso/endpoint_provider.rb#11 +class Aws::SSO::EndpointProvider + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-sso/endpoint_provider.rb#12 + def resolve_endpoint(parameters); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#13 +module Aws::SSO::Endpoints; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#15 +class Aws::SSO::Endpoints::GetRoleCredentials + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#16 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#29 +class Aws::SSO::Endpoints::ListAccountRoles + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#30 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#43 +class Aws::SSO::Endpoints::ListAccounts + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#44 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#57 +class Aws::SSO::Endpoints::Logout + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/endpoints.rb#58 + def build(context); end + end +end + +# When SSO returns an error response, the Ruby SDK constructs and raises an error. +# These errors all extend Aws::SSO::Errors::ServiceError < {Aws::Errors::ServiceError} +# +# You can rescue all SSO errors using ServiceError: +# +# begin +# # do stuff +# rescue Aws::SSO::Errors::ServiceError +# # rescues all SSO API errors +# end +# +# +# ## Request Context +# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns +# information about the request that generated the error. +# See {Seahorse::Client::RequestContext} for more information. +# +# ## Error Classes +# * {InvalidRequestException} +# * {ResourceNotFoundException} +# * {TooManyRequestsException} +# * {UnauthorizedException} +# +# Additionally, error classes are dynamically generated for service errors based on the error code +# if they are not defined above. +# +# source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#37 +module Aws::SSO::Errors + extend ::Aws::Errors::DynamicErrors +end + +# source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#41 +class Aws::SSO::Errors::InvalidRequestException < ::Aws::SSO::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSO::Types::InvalidRequestException] + # @return [InvalidRequestException] a new instance of InvalidRequestException + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#46 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#51 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#56 +class Aws::SSO::Errors::ResourceNotFoundException < ::Aws::SSO::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSO::Types::ResourceNotFoundException] + # @return [ResourceNotFoundException] a new instance of ResourceNotFoundException + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#61 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#66 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#0 +class Aws::SSO::Errors::ServiceError < ::Aws::Errors::ServiceError; end + +# source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#71 +class Aws::SSO::Errors::TooManyRequestsException < ::Aws::SSO::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSO::Types::TooManyRequestsException] + # @return [TooManyRequestsException] a new instance of TooManyRequestsException + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#76 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#81 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#86 +class Aws::SSO::Errors::UnauthorizedException < ::Aws::SSO::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSO::Types::UnauthorizedException] + # @return [UnauthorizedException] a new instance of UnauthorizedException + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#91 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sso/errors.rb#96 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sso.rb#57 +Aws::SSO::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#12 +module Aws::SSO::Plugins; end + +# source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#13 +class Aws::SSO::Plugins::Endpoints < ::Seahorse::Client::Plugin + # source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#71 + def add_handlers(handlers, _config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#26 +class Aws::SSO::Plugins::Endpoints::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#27 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#46 + def apply_endpoint_headers(context, headers); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sso/plugins/endpoints.rb#57 + def parameters_for_operation(context); end +end + +# source://aws-sdk-core//lib/aws-sdk-sso/resource.rb#12 +class Aws::SSO::Resource + # @option options + # @param options [{}] + # @return [Resource] a new instance of Resource + # + # source://aws-sdk-core//lib/aws-sdk-sso/resource.rb#16 + def initialize(options = T.unsafe(nil)); end + + # @return [Client] + # + # source://aws-sdk-core//lib/aws-sdk-sso/resource.rb#21 + def client; end +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#11 +module Aws::SSO::Types; end + +# Provides information about your AWS account. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/AccountInfo AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#32 +class Aws::SSO::Types::AccountInfo < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#33 +Aws::SSO::Types::AccountInfo::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentialsRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#60 +class Aws::SSO::Types::GetRoleCredentialsRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#61 +Aws::SSO::Types::GetRoleCredentialsRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentialsResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#72 +class Aws::SSO::Types::GetRoleCredentialsResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#73 +Aws::SSO::Types::GetRoleCredentialsResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that a problem occurred with the input to the request. For +# example, a required parameter might be missing or out of range. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/InvalidRequestException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#86 +class Aws::SSO::Types::InvalidRequestException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#87 +Aws::SSO::Types::InvalidRequestException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRolesRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#120 +class Aws::SSO::Types::ListAccountRolesRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#121 +Aws::SSO::Types::ListAccountRolesRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRolesResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#138 +class Aws::SSO::Types::ListAccountRolesResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#139 +Aws::SSO::Types::ListAccountRolesResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountsRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#167 +class Aws::SSO::Types::ListAccountsRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#168 +Aws::SSO::Types::ListAccountsRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountsResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#185 +class Aws::SSO::Types::ListAccountsResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#186 +Aws::SSO::Types::ListAccountsResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/LogoutRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#203 +class Aws::SSO::Types::LogoutRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#204 +Aws::SSO::Types::LogoutRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified resource doesn't exist. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ResourceNotFoundException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#216 +class Aws::SSO::Types::ResourceNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#217 +Aws::SSO::Types::ResourceNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Provides information about the role credentials that are assigned to +# the user. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleCredentials AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#264 +class Aws::SSO::Types::RoleCredentials < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#265 +Aws::SSO::Types::RoleCredentials::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Provides information about the role that is assigned to the user. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleInfo AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#283 +class Aws::SSO::Types::RoleInfo < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#284 +Aws::SSO::Types::RoleInfo::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the request is being made too frequently and is more +# than what the server can handle. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/TooManyRequestsException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#297 +class Aws::SSO::Types::TooManyRequestsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#298 +Aws::SSO::Types::TooManyRequestsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the request is not authorized. This can happen due to +# an invalid access token in the request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/UnauthorizedException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#311 +class Aws::SSO::Types::UnauthorizedException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sso/types.rb#312 +Aws::SSO::Types::UnauthorizedException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An auto-refreshing credential provider that assumes a role via +# {Aws::SSO::Client#get_role_credentials} using a cached access +# token. When `sso_session` is specified, token refresh logic from +# {Aws::SSOTokenProvider} will be used to refresh the token if possible. +# This class does NOT implement the SSO login token flow - tokens +# must generated separately by running `aws login` from the +# AWS CLI with the correct profile. The `SSOCredentials` will +# auto-refresh the AWS credentials from SSO. +# +# # You must first run aws sso login --profile your-sso-profile +# sso_credentials = Aws::SSOCredentials.new( +# sso_account_id: '123456789', +# sso_role_name: "role_name", +# sso_region: "us-east-1", +# sso_session: 'my_sso_session' +# ) +# ec2 = Aws::EC2::Client.new(credentials: sso_credentials) +# +# If you omit `:client` option, a new {Aws::SSO::Client} object will be +# constructed with additional options that were provided. +# +# @see Aws::SSO::Client#get_role_credentials +# @see https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html +# +# source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#27 +class Aws::SSOCredentials + include ::Aws::CredentialProvider + include ::Aws::RefreshingCredentials + + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [SSOCredentials] a new instance of SSOCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#69 + def initialize(options = T.unsafe(nil)); end + + # @return [SSO::Client] + # + # source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#121 + def client; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#125 + def read_cached_token; end + + # source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#140 + def refresh; end + + # source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#164 + def sso_cache_file; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#33 +Aws::SSOCredentials::LEGACY_REQUIRED_OPTS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#37 +Aws::SSOCredentials::SSO_LOGIN_GUIDANCE = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-core/sso_credentials.rb#34 +Aws::SSOCredentials::TOKEN_PROVIDER_REQUIRED_OPTS = T.let(T.unsafe(nil), Array) + +# This module provides support for AWS SSO OIDC. This module is available in the +# `aws-sdk-core` gem. +# +# # Client +# +# The {Client} class provides one method for each API operation. Operation +# methods each accept a hash of request parameters and return a response +# structure. +# +# ssooidc = Aws::SSOOIDC::Client.new +# resp = ssooidc.create_token(params) +# +# See {Client} for more information. +# +# # Errors +# +# Errors returned from AWS SSO OIDC are defined in the +# {Errors} module and all extend {Errors::ServiceError}. +# +# begin +# # do stuff +# rescue Aws::SSOOIDC::Errors::ServiceError +# # rescues all AWS SSO OIDC API errors +# end +# +# See {Errors} for more information. +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#10 +module Aws::SSOOIDC; end + +# An API client for SSOOIDC. To construct a client, you need to configure a `:region` and `:credentials`. +# +# client = Aws::SSOOIDC::Client.new( +# region: region_name, +# credentials: credentials, +# # ... +# ) +# +# For details on configuring region and credentials see +# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html). +# +# See {#initialize} for a full list of supported configuration options. +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#52 +class Aws::SSOOIDC::Client < ::Seahorse::Client::Base + include ::Aws::ClientStubs + + # @overload initialize + # @return [Client] a new instance of Client + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#385 + def initialize(*args); end + + # @api private + # @param params [{}] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#595 + def build_request(operation_name, params = T.unsafe(nil)); end + + # Creates and returns an access token for the authorized client. The + # access token issued will be used to fetch short-term credentials for + # the assigned roles in the AWS account. + # + # @example Request syntax with placeholder values + # + # resp = client.create_token({ + # client_id: "ClientId", # required + # client_secret: "ClientSecret", # required + # grant_type: "GrantType", # required + # device_code: "DeviceCode", + # code: "AuthCode", + # refresh_token: "RefreshToken", + # scope: ["Scope"], + # redirect_uri: "URI", + # }) + # @example Response structure + # + # resp.access_token #=> String + # resp.token_type #=> String + # resp.expires_in #=> Integer + # resp.refresh_token #=> String + # resp.id_token #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload create_token + # @param params [Hash] ({}) + # @return [Types::CreateTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::CreateTokenResponse#access_token #access_token} => String + # * {Types::CreateTokenResponse#token_type #token_type} => String + # * {Types::CreateTokenResponse#expires_in #expires_in} => Integer + # * {Types::CreateTokenResponse#refresh_token #refresh_token} => String + # * {Types::CreateTokenResponse#id_token #id_token} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateToken AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#480 + def create_token(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Registers a client with IAM Identity Center. This allows clients to + # initiate device authorization. The output should be persisted for + # reuse through many authentication requests. + # + # @example Request syntax with placeholder values + # + # resp = client.register_client({ + # client_name: "ClientName", # required + # client_type: "ClientType", # required + # scopes: ["Scope"], + # }) + # @example Response structure + # + # resp.client_id #=> String + # resp.client_secret #=> String + # resp.client_id_issued_at #=> Integer + # resp.client_secret_expires_at #=> Integer + # resp.authorization_endpoint #=> String + # resp.token_endpoint #=> String + # @option params + # @option params + # @option params + # @overload register_client + # @param params [Hash] ({}) + # @return [Types::RegisterClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::RegisterClientResponse#client_id #client_id} => String + # * {Types::RegisterClientResponse#client_secret #client_secret} => String + # * {Types::RegisterClientResponse#client_id_issued_at #client_id_issued_at} => Integer + # * {Types::RegisterClientResponse#client_secret_expires_at #client_secret_expires_at} => Integer + # * {Types::RegisterClientResponse#authorization_endpoint #authorization_endpoint} => String + # * {Types::RegisterClientResponse#token_endpoint #token_endpoint} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#531 + def register_client(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Initiates device authorization by requesting a pair of verification + # codes from the authorization service. + # + # @example Request syntax with placeholder values + # + # resp = client.start_device_authorization({ + # client_id: "ClientId", # required + # client_secret: "ClientSecret", # required + # start_url: "URI", # required + # }) + # @example Response structure + # + # resp.device_code #=> String + # resp.user_code #=> String + # resp.verification_uri #=> String + # resp.verification_uri_complete #=> String + # resp.expires_in #=> Integer + # resp.interval #=> Integer + # @option params + # @option params + # @option params + # @overload start_device_authorization + # @param params [Hash] ({}) + # @return [Types::StartDeviceAuthorizationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::StartDeviceAuthorizationResponse#device_code #device_code} => String + # * {Types::StartDeviceAuthorizationResponse#user_code #user_code} => String + # * {Types::StartDeviceAuthorizationResponse#verification_uri #verification_uri} => String + # * {Types::StartDeviceAuthorizationResponse#verification_uri_complete #verification_uri_complete} => String + # * {Types::StartDeviceAuthorizationResponse#expires_in #expires_in} => Integer + # * {Types::StartDeviceAuthorizationResponse#interval #interval} => Integer + # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorization AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#586 + def start_device_authorization(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # @api private + # @deprecated + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#610 + def waiter_names; end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#620 + def errors_module; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/client.rb#617 + def identifier; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#12 +module Aws::SSOOIDC::ClientApi + include ::Seahorse::Model +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#150 +Aws::SSOOIDC::ClientApi::API = T.let(T.unsafe(nil), Seahorse::Model::Api) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#16 +Aws::SSOOIDC::ClientApi::AccessDeniedException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#17 +Aws::SSOOIDC::ClientApi::AccessToken = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#18 +Aws::SSOOIDC::ClientApi::AuthCode = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#19 +Aws::SSOOIDC::ClientApi::AuthorizationPendingException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#20 +Aws::SSOOIDC::ClientApi::ClientId = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#21 +Aws::SSOOIDC::ClientApi::ClientName = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#22 +Aws::SSOOIDC::ClientApi::ClientSecret = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#23 +Aws::SSOOIDC::ClientApi::ClientType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#24 +Aws::SSOOIDC::ClientApi::CreateTokenRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#25 +Aws::SSOOIDC::ClientApi::CreateTokenResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#26 +Aws::SSOOIDC::ClientApi::DeviceCode = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#27 +Aws::SSOOIDC::ClientApi::Error = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#28 +Aws::SSOOIDC::ClientApi::ErrorDescription = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#29 +Aws::SSOOIDC::ClientApi::ExpirationInSeconds = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#30 +Aws::SSOOIDC::ClientApi::ExpiredTokenException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#31 +Aws::SSOOIDC::ClientApi::GrantType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#32 +Aws::SSOOIDC::ClientApi::IdToken = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#33 +Aws::SSOOIDC::ClientApi::InternalServerException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#34 +Aws::SSOOIDC::ClientApi::IntervalInSeconds = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#35 +Aws::SSOOIDC::ClientApi::InvalidClientException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#36 +Aws::SSOOIDC::ClientApi::InvalidClientMetadataException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#37 +Aws::SSOOIDC::ClientApi::InvalidGrantException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#38 +Aws::SSOOIDC::ClientApi::InvalidRequestException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#39 +Aws::SSOOIDC::ClientApi::InvalidScopeException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#40 +Aws::SSOOIDC::ClientApi::LongTimeStampType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#41 +Aws::SSOOIDC::ClientApi::RefreshToken = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#42 +Aws::SSOOIDC::ClientApi::RegisterClientRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#43 +Aws::SSOOIDC::ClientApi::RegisterClientResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#44 +Aws::SSOOIDC::ClientApi::Scope = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#45 +Aws::SSOOIDC::ClientApi::Scopes = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#46 +Aws::SSOOIDC::ClientApi::SlowDownException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#47 +Aws::SSOOIDC::ClientApi::StartDeviceAuthorizationRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#48 +Aws::SSOOIDC::ClientApi::StartDeviceAuthorizationResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#49 +Aws::SSOOIDC::ClientApi::TokenType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#50 +Aws::SSOOIDC::ClientApi::URI = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#51 +Aws::SSOOIDC::ClientApi::UnauthorizedClientException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#52 +Aws::SSOOIDC::ClientApi::UnsupportedGrantTypeException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/client_api.rb#53 +Aws::SSOOIDC::ClientApi::UserCode = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# Endpoint parameters used to influence endpoints per request. +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoint_parameters.rb#33 +class Aws::SSOOIDC::EndpointParameters < ::Struct + include ::Aws::Structure + + # @return [EndpointParameters] a new instance of EndpointParameters + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoint_parameters.rb#51 + def initialize(options = T.unsafe(nil)); end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint; end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint=(_); end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region; end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region=(_); end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack; end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack=(_); end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips; end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoint_provider.rb#11 +class Aws::SSOOIDC::EndpointProvider + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoint_provider.rb#12 + def resolve_endpoint(parameters); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#13 +module Aws::SSOOIDC::Endpoints; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#15 +class Aws::SSOOIDC::Endpoints::CreateToken + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#16 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#29 +class Aws::SSOOIDC::Endpoints::RegisterClient + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#30 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#43 +class Aws::SSOOIDC::Endpoints::StartDeviceAuthorization + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/endpoints.rb#44 + def build(context); end + end +end + +# When SSOOIDC returns an error response, the Ruby SDK constructs and raises an error. +# These errors all extend Aws::SSOOIDC::Errors::ServiceError < {Aws::Errors::ServiceError} +# +# You can rescue all SSOOIDC errors using ServiceError: +# +# begin +# # do stuff +# rescue Aws::SSOOIDC::Errors::ServiceError +# # rescues all SSOOIDC API errors +# end +# +# +# ## Request Context +# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns +# information about the request that generated the error. +# See {Seahorse::Client::RequestContext} for more information. +# +# ## Error Classes +# * {AccessDeniedException} +# * {AuthorizationPendingException} +# * {ExpiredTokenException} +# * {InternalServerException} +# * {InvalidClientException} +# * {InvalidClientMetadataException} +# * {InvalidGrantException} +# * {InvalidRequestException} +# * {InvalidScopeException} +# * {SlowDownException} +# * {UnauthorizedClientException} +# * {UnsupportedGrantTypeException} +# +# Additionally, error classes are dynamically generated for service errors based on the error code +# if they are not defined above. +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#45 +module Aws::SSOOIDC::Errors + extend ::Aws::Errors::DynamicErrors +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#49 +class Aws::SSOOIDC::Errors::AccessDeniedException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::AccessDeniedException] + # @return [AccessDeniedException] a new instance of AccessDeniedException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#54 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#59 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#64 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#69 +class Aws::SSOOIDC::Errors::AuthorizationPendingException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::AuthorizationPendingException] + # @return [AuthorizationPendingException] a new instance of AuthorizationPendingException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#74 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#79 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#84 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#89 +class Aws::SSOOIDC::Errors::ExpiredTokenException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::ExpiredTokenException] + # @return [ExpiredTokenException] a new instance of ExpiredTokenException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#94 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#99 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#104 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#109 +class Aws::SSOOIDC::Errors::InternalServerException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::InternalServerException] + # @return [InternalServerException] a new instance of InternalServerException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#114 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#119 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#124 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#129 +class Aws::SSOOIDC::Errors::InvalidClientException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::InvalidClientException] + # @return [InvalidClientException] a new instance of InvalidClientException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#134 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#139 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#144 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#149 +class Aws::SSOOIDC::Errors::InvalidClientMetadataException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::InvalidClientMetadataException] + # @return [InvalidClientMetadataException] a new instance of InvalidClientMetadataException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#154 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#159 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#164 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#169 +class Aws::SSOOIDC::Errors::InvalidGrantException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::InvalidGrantException] + # @return [InvalidGrantException] a new instance of InvalidGrantException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#174 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#179 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#184 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#189 +class Aws::SSOOIDC::Errors::InvalidRequestException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::InvalidRequestException] + # @return [InvalidRequestException] a new instance of InvalidRequestException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#194 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#199 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#204 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#209 +class Aws::SSOOIDC::Errors::InvalidScopeException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::InvalidScopeException] + # @return [InvalidScopeException] a new instance of InvalidScopeException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#214 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#219 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#224 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#0 +class Aws::SSOOIDC::Errors::ServiceError < ::Aws::Errors::ServiceError; end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#229 +class Aws::SSOOIDC::Errors::SlowDownException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::SlowDownException] + # @return [SlowDownException] a new instance of SlowDownException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#234 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#239 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#244 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#249 +class Aws::SSOOIDC::Errors::UnauthorizedClientException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::UnauthorizedClientException] + # @return [UnauthorizedClientException] a new instance of UnauthorizedClientException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#254 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#259 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#264 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#269 +class Aws::SSOOIDC::Errors::UnsupportedGrantTypeException < ::Aws::SSOOIDC::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::SSOOIDC::Types::UnsupportedGrantTypeException] + # @return [UnsupportedGrantTypeException] a new instance of UnsupportedGrantTypeException + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#274 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#279 + def error; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/errors.rb#284 + def error_description; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc.rb#57 +Aws::SSOOIDC::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#12 +module Aws::SSOOIDC::Plugins; end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#13 +class Aws::SSOOIDC::Plugins::Endpoints < ::Seahorse::Client::Plugin + # source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#69 + def add_handlers(handlers, _config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#26 +class Aws::SSOOIDC::Plugins::Endpoints::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#27 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#46 + def apply_endpoint_headers(context, headers); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/plugins/endpoints.rb#57 + def parameters_for_operation(context); end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/resource.rb#12 +class Aws::SSOOIDC::Resource + # @option options + # @param options [{}] + # @return [Resource] a new instance of Resource + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/resource.rb#16 + def initialize(options = T.unsafe(nil)); end + + # @return [Client] + # + # source://aws-sdk-core//lib/aws-sdk-ssooidc/resource.rb#21 + def client; end +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#11 +module Aws::SSOOIDC::Types; end + +# You do not have sufficient access to perform this action. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/AccessDeniedException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#25 +class Aws::SSOOIDC::Types::AccessDeniedException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#26 +Aws::SSOOIDC::Types::AccessDeniedException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that a request to authorize a client with an access user +# session token is pending. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/AuthorizationPendingException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#43 +class Aws::SSOOIDC::Types::AuthorizationPendingException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#44 +Aws::SSOOIDC::Types::AuthorizationPendingException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#119 +class Aws::SSOOIDC::Types::CreateTokenRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#120 +Aws::SSOOIDC::Types::CreateTokenRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#175 +class Aws::SSOOIDC::Types::CreateTokenResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#176 +Aws::SSOOIDC::Types::CreateTokenResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the token issued by the service is expired and is no +# longer valid. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/ExpiredTokenException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#193 +class Aws::SSOOIDC::Types::ExpiredTokenException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#194 +Aws::SSOOIDC::Types::ExpiredTokenException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that an error from the service occurred while trying to +# process a request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InternalServerException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#211 +class Aws::SSOOIDC::Types::InternalServerException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#212 +Aws::SSOOIDC::Types::InternalServerException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the `clientId` or `clientSecret` in the request is +# invalid. For example, this can occur when a client sends an incorrect +# `clientId` or an expired `clientSecret`. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidClientException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#230 +class Aws::SSOOIDC::Types::InvalidClientException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#231 +Aws::SSOOIDC::Types::InvalidClientException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the client information sent in the request during +# registration is invalid. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidClientMetadataException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#248 +class Aws::SSOOIDC::Types::InvalidClientMetadataException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#249 +Aws::SSOOIDC::Types::InvalidClientMetadataException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that a request contains an invalid grant. This can occur if +# a client makes a CreateToken request with an invalid grant type. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidGrantException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#266 +class Aws::SSOOIDC::Types::InvalidGrantException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#267 +Aws::SSOOIDC::Types::InvalidGrantException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that something is wrong with the input to the request. For +# example, a required parameter might be missing or out of range. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidRequestException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#284 +class Aws::SSOOIDC::Types::InvalidRequestException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#285 +Aws::SSOOIDC::Types::InvalidRequestException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the scope provided in the request is invalid. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/InvalidScopeException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#301 +class Aws::SSOOIDC::Types::InvalidScopeException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#302 +Aws::SSOOIDC::Types::InvalidScopeException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClientRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#326 +class Aws::SSOOIDC::Types::RegisterClientRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#327 +Aws::SSOOIDC::Types::RegisterClientRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClientResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#367 +class Aws::SSOOIDC::Types::RegisterClientResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#368 +Aws::SSOOIDC::Types::RegisterClientResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the client is making the request too frequently and is +# more than the service can handle. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/SlowDownException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#385 +class Aws::SSOOIDC::Types::SlowDownException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#386 +Aws::SSOOIDC::Types::SlowDownException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorizationRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#415 +class Aws::SSOOIDC::Types::StartDeviceAuthorizationRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#416 +Aws::SSOOIDC::Types::StartDeviceAuthorizationRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/StartDeviceAuthorizationResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#459 +class Aws::SSOOIDC::Types::StartDeviceAuthorizationResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#460 +Aws::SSOOIDC::Types::StartDeviceAuthorizationResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the client is not currently authorized to make the +# request. This can happen when a `clientId` is not issued for a public +# client. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/UnauthorizedClientException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#478 +class Aws::SSOOIDC::Types::UnauthorizedClientException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#479 +Aws::SSOOIDC::Types::UnauthorizedClientException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Indicates that the grant type in the request is not supported by the +# service. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/UnsupportedGrantTypeException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#496 +class Aws::SSOOIDC::Types::UnsupportedGrantTypeException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-ssooidc/types.rb#497 +Aws::SSOOIDC::Types::UnsupportedGrantTypeException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#4 +class Aws::SSOTokenProvider + include ::Aws::TokenProvider + include ::Aws::RefreshingToken + + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [SSOTokenProvider] a new instance of SSOTokenProvider + # + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#30 + def initialize(options = T.unsafe(nil)); end + + # @return [SSOOIDC::Client] + # + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#49 + def client; end + + private + + # return true if all required fields are present + # return false if registrationExpiresAt exists and is later than now + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#123 + def can_refresh_token?(token_json); end + + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#95 + def read_cached_token; end + + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#53 + def refresh; end + + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#113 + def sso_cache_file; end + + # source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#107 + def update_token_cache(token_json); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#13 +Aws::SSOTokenProvider::SSO_LOGIN_GUIDANCE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/sso_token_provider.rb#10 +Aws::SSOTokenProvider::SSO_REQUIRED_OPTS = T.let(T.unsafe(nil), Array) + +# This module provides support for AWS Security Token Service. This module is available in the +# `aws-sdk-core` gem. +# +# # Client +# +# The {Client} class provides one method for each API operation. Operation +# methods each accept a hash of request parameters and return a response +# structure. +# +# sts = Aws::STS::Client.new +# resp = sts.assume_role(params) +# +# See {Client} for more information. +# +# # Errors +# +# Errors returned from AWS Security Token Service are defined in the +# {Errors} module and all extend {Errors::ServiceError}. +# +# begin +# # do stuff +# rescue Aws::STS::Errors::ServiceError +# # rescues all AWS Security Token Service API errors +# end +# +# See {Errors} for more information. +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#10 +module Aws::STS; end + +# An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`. +# +# client = Aws::STS::Client.new( +# region: region_name, +# credentials: credentials, +# # ... +# ) +# +# For details on configuring region and credentials see +# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html). +# +# See {#initialize} for a full list of supported configuration options. +# +# source://aws-sdk-core//lib/aws-sdk-sts/client.rb#53 +class Aws::STS::Client < ::Seahorse::Client::Base + include ::Aws::ClientStubs + + # @overload initialize + # @return [Client] a new instance of Client + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#392 + def initialize(*args); end + + # Returns a set of temporary security credentials that you can use to + # access Amazon Web Services resources. These temporary credentials + # consist of an access key ID, a secret access key, and a security + # token. Typically, you use `AssumeRole` within your account or for + # cross-account access. For a comparison of `AssumeRole` with other API + # operations that produce temporary credentials, see [Requesting + # Temporary Security Credentials][1] and [Comparing the Amazon Web + # Services STS API operations][2] in the *IAM User Guide*. + # + # **Permissions** + # + # The temporary security credentials created by `AssumeRole` can be used + # to make API calls to any Amazon Web Services service with the + # following exception: You cannot call the Amazon Web Services STS + # `GetFederationToken` or `GetSessionToken` API operations. + # + # (Optional) You can pass inline or managed [session policies][3] to + # this operation. You can pass a single JSON policy document to use as + # an inline session policy. You can also specify up to 10 managed policy + # Amazon Resource Names (ARNs) to use as managed session policies. The + # plaintext that you use for both inline and managed session policies + # can't exceed 2,048 characters. Passing policies to this operation + # returns new temporary credentials. The resulting session's + # permissions are the intersection of the role's identity-based policy + # and the session policies. You can use the role's temporary + # credentials in subsequent Amazon Web Services API calls to access + # resources in the account that owns the role. You cannot use session + # policies to grant more permissions than those allowed by the + # identity-based policy of the role that is being assumed. For more + # information, see [Session Policies][3] in the *IAM User Guide*. + # + # When you create a role, you create two policies: a role trust policy + # that specifies *who* can assume the role, and a permissions policy + # that specifies *what* can be done with the role. You specify the + # trusted principal that is allowed to assume the role in the role trust + # policy. + # + # To assume a role from a different account, your Amazon Web Services + # account must be trusted by the role. The trust relationship is defined + # in the role's trust policy when the role is created. That trust + # policy states which accounts are allowed to delegate that access to + # users in the account. + # + # A user who wants to access a role in a different account must also + # have permissions that are delegated from the account administrator. + # The administrator must attach a policy that allows the user to call + # `AssumeRole` for the ARN of the role in the other account. + # + # To allow a user to assume a role in the same account, you can do + # either of the following: + # + # * Attach a policy to the user that allows the user to call + # `AssumeRole` (as long as the role's trust policy trusts the + # account). + # + # * Add the user as a principal directly in the role's trust policy. + # + # You can do either because the role’s trust policy acts as an IAM + # resource-based policy. When a resource-based policy grants access to a + # principal in the same account, no additional identity-based policy is + # required. For more information about trust policies and resource-based + # policies, see [IAM Policies][4] in the *IAM User Guide*. + # + # **Tags** + # + # (Optional) You can pass tag key-value pairs to your session. These + # tags are called session tags. For more information about session tags, + # see [Passing Session Tags in STS][5] in the *IAM User Guide*. + # + # An administrator must grant you the permissions necessary to pass + # session tags. The administrator can also create granular permissions + # to allow you to pass only specific session tags. For more information, + # see [Tutorial: Using Tags for Attribute-Based Access Control][6] in + # the *IAM User Guide*. + # + # You can set the session tags as transitive. Transitive tags persist + # during role chaining. For more information, see [Chaining Roles with + # Session Tags][7] in the *IAM User Guide*. + # + # **Using MFA with AssumeRole** + # + # (Optional) You can include multi-factor authentication (MFA) + # information when you call `AssumeRole`. This is useful for + # cross-account scenarios to ensure that the user that assumes the role + # has been authenticated with an Amazon Web Services MFA device. In that + # scenario, the trust policy of the role being assumed includes a + # condition that tests for MFA authentication. If the caller does not + # include valid MFA information, the request to assume the role is + # denied. The condition in a trust policy that tests for MFA + # authentication might look like the following example. + # + # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}` + # + # For more information, see [Configuring MFA-Protected API Access][8] in + # the *IAM User Guide* guide. + # + # To use MFA with `AssumeRole`, you pass values for the `SerialNumber` + # and `TokenCode` parameters. The `SerialNumber` value identifies the + # user's hardware or virtual MFA device. The `TokenCode` is the + # time-based one-time password (TOTP) that the MFA device produces. + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html + # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison + # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html + # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html + # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html + # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining + # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html + # + # @example Example: To assume a role + # + # resp = client.assume_role({ + # external_id: "123ABC", + # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + # role_arn: "arn:aws:iam::123456789012:role/demo", + # role_session_name: "testAssumeRoleSession", + # tags: [ + # { + # key: "Project", + # value: "Unicorn", + # }, + # { + # key: "Team", + # value: "Automation", + # }, + # { + # key: "Cost-Center", + # value: "12345", + # }, + # ], + # transitive_tag_keys: [ + # "Project", + # "Cost-Center", + # ], + # }) + # + # resp.to_h outputs the following: + # { + # assumed_role_user: { + # arn: "arn:aws:sts::123456789012:assumed-role/demo/Bob", + # assumed_role_id: "ARO123EXAMPLE123:Bob", + # }, + # credentials: { + # access_key_id: "AKIAIOSFODNN7EXAMPLE", + # expiration: Time.parse("2011-07-15T23:28:33.359Z"), + # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + # session_token: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + # }, + # packed_policy_size: 8, + # } + # @example Request syntax with placeholder values + # + # resp = client.assume_role({ + # role_arn: "arnType", # required + # role_session_name: "roleSessionNameType", # required + # policy_arns: [ + # { + # arn: "arnType", + # }, + # ], + # policy: "sessionPolicyDocumentType", + # duration_seconds: 1, + # tags: [ + # { + # key: "tagKeyType", # required + # value: "tagValueType", # required + # }, + # ], + # transitive_tag_keys: ["tagKeyType"], + # external_id: "externalIdType", + # serial_number: "serialNumberType", + # token_code: "tokenCodeType", + # source_identity: "sourceIdentityType", + # provided_contexts: [ + # { + # provider_arn: "arnType", + # context_assertion: "contextAssertionType", + # }, + # ], + # }) + # @example Response structure + # + # resp.credentials.access_key_id #=> String + # resp.credentials.secret_access_key #=> String + # resp.credentials.session_token #=> String + # resp.credentials.expiration #=> Time + # resp.assumed_role_user.assumed_role_id #=> String + # resp.assumed_role_user.arn #=> String + # resp.packed_policy_size #=> Integer + # resp.source_identity #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload assume_role + # @param params [Hash] ({}) + # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials + # * {Types::AssumeRoleResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser + # * {Types::AssumeRoleResponse#packed_policy_size #packed_policy_size} => Integer + # * {Types::AssumeRoleResponse#source_identity #source_identity} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#868 + def assume_role(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a set of temporary security credentials for users who have + # been authenticated via a SAML authentication response. This operation + # provides a mechanism for tying an enterprise identity store or + # directory to role-based Amazon Web Services access without + # user-specific credentials or configuration. For a comparison of + # `AssumeRoleWithSAML` with the other API operations that produce + # temporary credentials, see [Requesting Temporary Security + # Credentials][1] and [Comparing the Amazon Web Services STS API + # operations][2] in the *IAM User Guide*. + # + # The temporary security credentials returned by this operation consist + # of an access key ID, a secret access key, and a security token. + # Applications can use these temporary security credentials to sign + # calls to Amazon Web Services services. + # + # **Session Duration** + # + # By default, the temporary security credentials created by + # `AssumeRoleWithSAML` last for one hour. However, you can use the + # optional `DurationSeconds` parameter to specify the duration of your + # session. Your role session lasts for the duration that you specify, or + # until the time specified in the SAML authentication response's + # `SessionNotOnOrAfter` value, whichever is shorter. You can provide a + # `DurationSeconds` value from 900 seconds (15 minutes) up to the + # maximum session duration setting for the role. This setting can have a + # value from 1 hour to 12 hours. To learn how to view the maximum value + # for your role, see [View the Maximum Session Duration Setting for a + # Role][3] in the *IAM User Guide*. The maximum session duration limit + # applies when you use the `AssumeRole*` API operations or the + # `assume-role*` CLI commands. However the limit does not apply when you + # use those operations to create a console URL. For more information, + # see [Using IAM Roles][4] in the *IAM User Guide*. + # + # [Role chaining][5] limits your CLI or Amazon Web Services API role + # session to a maximum of one hour. When you use the `AssumeRole` API + # operation to assume a role, you can specify the duration of your role + # session with the `DurationSeconds` parameter. You can specify a + # parameter value of up to 43200 seconds (12 hours), depending on the + # maximum session duration setting for your role. However, if you assume + # a role using role chaining and provide a `DurationSeconds` parameter + # value greater than one hour, the operation fails. + # + # + # + # **Permissions** + # + # The temporary security credentials created by `AssumeRoleWithSAML` can + # be used to make API calls to any Amazon Web Services service with the + # following exception: you cannot call the STS `GetFederationToken` or + # `GetSessionToken` API operations. + # + # (Optional) You can pass inline or managed [session policies][6] to + # this operation. You can pass a single JSON policy document to use as + # an inline session policy. You can also specify up to 10 managed policy + # Amazon Resource Names (ARNs) to use as managed session policies. The + # plaintext that you use for both inline and managed session policies + # can't exceed 2,048 characters. Passing policies to this operation + # returns new temporary credentials. The resulting session's + # permissions are the intersection of the role's identity-based policy + # and the session policies. You can use the role's temporary + # credentials in subsequent Amazon Web Services API calls to access + # resources in the account that owns the role. You cannot use session + # policies to grant more permissions than those allowed by the + # identity-based policy of the role that is being assumed. For more + # information, see [Session Policies][6] in the *IAM User Guide*. + # + # Calling `AssumeRoleWithSAML` does not require the use of Amazon Web + # Services security credentials. The identity of the caller is validated + # by using keys in the metadata document that is uploaded for the SAML + # provider entity for your identity provider. + # + # Calling `AssumeRoleWithSAML` can result in an entry in your CloudTrail + # logs. The entry includes the value in the `NameID` element of the SAML + # assertion. We recommend that you use a `NameIDType` that is not + # associated with any personally identifiable information (PII). For + # example, you could instead use the persistent identifier + # (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`). + # + # **Tags** + # + # (Optional) You can configure your IdP to pass attributes into your + # SAML assertion as session tags. Each session tag consists of a key + # name and an associated value. For more information about session tags, + # see [Passing Session Tags in STS][7] in the *IAM User Guide*. + # + # You can pass up to 50 session tags. The plaintext session tag keys + # can’t exceed 128 characters and the values can’t exceed 256 + # characters. For these and additional limits, see [IAM and STS + # Character Limits][8] in the *IAM User Guide*. + # + # An Amazon Web Services conversion compresses the passed inline session + # policy, managed policy ARNs, and session tags into a packed binary + # format that has a separate limit. Your request can fail for this limit + # even if your plaintext meets the other requirements. The + # `PackedPolicySize` response element indicates by percentage how close + # the policies and tags for your request are to the upper size limit. + # + # + # + # You can pass a session tag with the same key as a tag that is attached + # to the role. When you do, session tags override the role's tags with + # the same key. + # + # An administrator must grant you the permissions necessary to pass + # session tags. The administrator can also create granular permissions + # to allow you to pass only specific session tags. For more information, + # see [Tutorial: Using Tags for Attribute-Based Access Control][9] in + # the *IAM User Guide*. + # + # You can set the session tags as transitive. Transitive tags persist + # during role chaining. For more information, see [Chaining Roles with + # Session Tags][10] in the *IAM User Guide*. + # + # **SAML Configuration** + # + # Before your application can call `AssumeRoleWithSAML`, you must + # configure your SAML identity provider (IdP) to issue the claims + # required by Amazon Web Services. Additionally, you must use Identity + # and Access Management (IAM) to create a SAML provider entity in your + # Amazon Web Services account that represents your identity provider. + # You must also create an IAM role that specifies this SAML provider in + # its trust policy. + # + # For more information, see the following resources: + # + # * [About SAML 2.0-based Federation][11] in the *IAM User Guide*. + # + # * [Creating SAML Identity Providers][12] in the *IAM User Guide*. + # + # * [Configuring a Relying Party and Claims][13] in the *IAM User + # Guide*. + # + # * [Creating a Role for SAML 2.0 Federation][14] in the *IAM User + # Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html + # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison + # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html + # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining + # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html + # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length + # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html + # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining + # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html + # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html + # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html + # [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html + # + # @example Example: To assume a role using a SAML assertion + # + # resp = client.assume_role_with_saml({ + # duration_seconds: 3600, + # principal_arn: "arn:aws:iam::123456789012:saml-provider/SAML-test", + # role_arn: "arn:aws:iam::123456789012:role/TestSaml", + # saml_assertion: "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4=", + # }) + # + # resp.to_h outputs the following: + # { + # assumed_role_user: { + # arn: "arn:aws:sts::123456789012:assumed-role/TestSaml", + # assumed_role_id: "ARO456EXAMPLE789:TestSaml", + # }, + # audience: "https://signin.aws.amazon.com/saml", + # credentials: { + # access_key_id: "ASIAV3ZUEFP6EXAMPLE", + # expiration: Time.parse("2019-11-01T20:26:47Z"), + # secret_access_key: "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY", + # session_token: "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + # }, + # issuer: "https://integ.example.com/idp/shibboleth", + # name_qualifier: "SbdGOnUkh1i4+EXAMPLExL/jEvs=", + # packed_policy_size: 6, + # subject: "SamlExample", + # subject_type: "transient", + # } + # @example Request syntax with placeholder values + # + # resp = client.assume_role_with_saml({ + # role_arn: "arnType", # required + # principal_arn: "arnType", # required + # saml_assertion: "SAMLAssertionType", # required + # policy_arns: [ + # { + # arn: "arnType", + # }, + # ], + # policy: "sessionPolicyDocumentType", + # duration_seconds: 1, + # }) + # @example Response structure + # + # resp.credentials.access_key_id #=> String + # resp.credentials.secret_access_key #=> String + # resp.credentials.session_token #=> String + # resp.credentials.expiration #=> Time + # resp.assumed_role_user.assumed_role_id #=> String + # resp.assumed_role_user.arn #=> String + # resp.packed_policy_size #=> Integer + # resp.subject #=> String + # resp.subject_type #=> String + # resp.issuer #=> String + # resp.audience #=> String + # resp.name_qualifier #=> String + # resp.source_identity #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload assume_role_with_saml + # @param params [Hash] ({}) + # @return [Types::AssumeRoleWithSAMLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::AssumeRoleWithSAMLResponse#credentials #credentials} => Types::Credentials + # * {Types::AssumeRoleWithSAMLResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser + # * {Types::AssumeRoleWithSAMLResponse#packed_policy_size #packed_policy_size} => Integer + # * {Types::AssumeRoleWithSAMLResponse#subject #subject} => String + # * {Types::AssumeRoleWithSAMLResponse#subject_type #subject_type} => String + # * {Types::AssumeRoleWithSAMLResponse#issuer #issuer} => String + # * {Types::AssumeRoleWithSAMLResponse#audience #audience} => String + # * {Types::AssumeRoleWithSAMLResponse#name_qualifier #name_qualifier} => String + # * {Types::AssumeRoleWithSAMLResponse#source_identity #source_identity} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#1220 + def assume_role_with_saml(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a set of temporary security credentials for users who have + # been authenticated in a mobile or web application with a web identity + # provider. Example providers include the OAuth 2.0 providers Login with + # Amazon and Facebook, or any OpenID Connect-compatible identity + # provider such as Google or [Amazon Cognito federated identities][1]. + # + # For mobile applications, we recommend that you use Amazon Cognito. You + # can use Amazon Cognito with the [Amazon Web Services SDK for iOS + # Developer Guide][2] and the [Amazon Web Services SDK for Android + # Developer Guide][3] to uniquely identify a user. You can also supply + # the user with a consistent identity throughout the lifetime of an + # application. + # + # To learn more about Amazon Cognito, see [Amazon Cognito identity + # pools][1] in *Amazon Cognito Developer Guide*. + # + # + # + # Calling `AssumeRoleWithWebIdentity` does not require the use of Amazon + # Web Services security credentials. Therefore, you can distribute an + # application (for example, on mobile devices) that requests temporary + # security credentials without including long-term Amazon Web Services + # credentials in the application. You also don't need to deploy + # server-based proxy services that use long-term Amazon Web Services + # credentials. Instead, the identity of the caller is validated by using + # a token from the web identity provider. For a comparison of + # `AssumeRoleWithWebIdentity` with the other API operations that produce + # temporary credentials, see [Requesting Temporary Security + # Credentials][4] and [Comparing the Amazon Web Services STS API + # operations][5] in the *IAM User Guide*. + # + # The temporary security credentials returned by this API consist of an + # access key ID, a secret access key, and a security token. Applications + # can use these temporary security credentials to sign calls to Amazon + # Web Services service API operations. + # + # **Session Duration** + # + # By default, the temporary security credentials created by + # `AssumeRoleWithWebIdentity` last for one hour. However, you can use + # the optional `DurationSeconds` parameter to specify the duration of + # your session. You can provide a value from 900 seconds (15 minutes) up + # to the maximum session duration setting for the role. This setting can + # have a value from 1 hour to 12 hours. To learn how to view the maximum + # value for your role, see [View the Maximum Session Duration Setting + # for a Role][6] in the *IAM User Guide*. The maximum session duration + # limit applies when you use the `AssumeRole*` API operations or the + # `assume-role*` CLI commands. However the limit does not apply when you + # use those operations to create a console URL. For more information, + # see [Using IAM Roles][7] in the *IAM User Guide*. + # + # **Permissions** + # + # The temporary security credentials created by + # `AssumeRoleWithWebIdentity` can be used to make API calls to any + # Amazon Web Services service with the following exception: you cannot + # call the STS `GetFederationToken` or `GetSessionToken` API operations. + # + # (Optional) You can pass inline or managed [session policies][8] to + # this operation. You can pass a single JSON policy document to use as + # an inline session policy. You can also specify up to 10 managed policy + # Amazon Resource Names (ARNs) to use as managed session policies. The + # plaintext that you use for both inline and managed session policies + # can't exceed 2,048 characters. Passing policies to this operation + # returns new temporary credentials. The resulting session's + # permissions are the intersection of the role's identity-based policy + # and the session policies. You can use the role's temporary + # credentials in subsequent Amazon Web Services API calls to access + # resources in the account that owns the role. You cannot use session + # policies to grant more permissions than those allowed by the + # identity-based policy of the role that is being assumed. For more + # information, see [Session Policies][8] in the *IAM User Guide*. + # + # **Tags** + # + # (Optional) You can configure your IdP to pass attributes into your web + # identity token as session tags. Each session tag consists of a key + # name and an associated value. For more information about session tags, + # see [Passing Session Tags in STS][9] in the *IAM User Guide*. + # + # You can pass up to 50 session tags. The plaintext session tag keys + # can’t exceed 128 characters and the values can’t exceed 256 + # characters. For these and additional limits, see [IAM and STS + # Character Limits][10] in the *IAM User Guide*. + # + # An Amazon Web Services conversion compresses the passed inline session + # policy, managed policy ARNs, and session tags into a packed binary + # format that has a separate limit. Your request can fail for this limit + # even if your plaintext meets the other requirements. The + # `PackedPolicySize` response element indicates by percentage how close + # the policies and tags for your request are to the upper size limit. + # + # + # + # You can pass a session tag with the same key as a tag that is attached + # to the role. When you do, the session tag overrides the role tag with + # the same key. + # + # An administrator must grant you the permissions necessary to pass + # session tags. The administrator can also create granular permissions + # to allow you to pass only specific session tags. For more information, + # see [Tutorial: Using Tags for Attribute-Based Access Control][11] in + # the *IAM User Guide*. + # + # You can set the session tags as transitive. Transitive tags persist + # during role chaining. For more information, see [Chaining Roles with + # Session Tags][12] in the *IAM User Guide*. + # + # **Identities** + # + # Before your application can call `AssumeRoleWithWebIdentity`, you must + # have an identity token from a supported identity provider and create a + # role that the application can assume. The role that your application + # assumes must trust the identity provider that is associated with the + # identity token. In other words, the identity provider must be + # specified in the role's trust policy. + # + # Calling `AssumeRoleWithWebIdentity` can result in an entry in your + # CloudTrail logs. The entry includes the [Subject][13] of the provided + # web identity token. We recommend that you avoid using any personally + # identifiable information (PII) in this field. For example, you could + # instead use a GUID or a pairwise identifier, as [suggested in the OIDC + # specification][14]. + # + # For more information about how to use web identity federation and the + # `AssumeRoleWithWebIdentity` API, see the following resources: + # + # * [Using Web Identity Federation API Operations for Mobile Apps][15] + # and [Federation Through a Web-based Identity Provider][16]. + # + # * [ Web Identity Federation Playground][17]. Walk through the process + # of authenticating through Login with Amazon, Facebook, or Google, + # getting temporary security credentials, and then using those + # credentials to make a request to Amazon Web Services. + # + # * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web + # Services SDK for Android Developer Guide][3]. These toolkits contain + # sample apps that show how to invoke the identity providers. The + # toolkits then show how to use the information from these providers + # to get and use temporary security credentials. + # + # * [Web Identity Federation with Mobile Applications][18]. This article + # discusses web identity federation and shows an example of how to use + # web identity federation to get access to content in Amazon S3. + # + # + # + # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html + # [2]: http://aws.amazon.com/sdkforios/ + # [3]: http://aws.amazon.com/sdkforandroid/ + # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html + # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison + # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session + # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html + # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html + # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length + # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html + # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining + # [13]: http://openid.net/specs/openid-connect-core-1_0.html#Claims + # [14]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes + # [15]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html + # [16]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity + # [17]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/ + # [18]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications + # + # @example Example: To assume a role as an OpenID Connect-federated user + # + # resp = client.assume_role_with_web_identity({ + # duration_seconds: 3600, + # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + # provider_id: "www.amazon.com", + # role_arn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole", + # role_session_name: "app1", + # web_identity_token: "Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ", + # }) + # + # resp.to_h outputs the following: + # { + # assumed_role_user: { + # arn: "arn:aws:sts::123456789012:assumed-role/FederatedWebIdentityRole/app1", + # assumed_role_id: "AROACLKWSDQRAOEXAMPLE:app1", + # }, + # audience: "client.5498841531868486423.1548@apps.example.com", + # credentials: { + # access_key_id: "AKIAIOSFODNN7EXAMPLE", + # expiration: Time.parse("2014-10-24T23:00:23Z"), + # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + # session_token: "AQoDYXdzEE0a8ANXXXXXXXXNO1ewxE5TijQyp+IEXAMPLE", + # }, + # packed_policy_size: 123, + # provider: "www.amazon.com", + # subject_from_web_identity_token: "amzn1.account.AF6RHO7KZU5XRVQJGXK6HEXAMPLE", + # } + # @example Request syntax with placeholder values + # + # resp = client.assume_role_with_web_identity({ + # role_arn: "arnType", # required + # role_session_name: "roleSessionNameType", # required + # web_identity_token: "clientTokenType", # required + # provider_id: "urlType", + # policy_arns: [ + # { + # arn: "arnType", + # }, + # ], + # policy: "sessionPolicyDocumentType", + # duration_seconds: 1, + # }) + # @example Response structure + # + # resp.credentials.access_key_id #=> String + # resp.credentials.secret_access_key #=> String + # resp.credentials.session_token #=> String + # resp.credentials.expiration #=> Time + # resp.subject_from_web_identity_token #=> String + # resp.assumed_role_user.assumed_role_id #=> String + # resp.assumed_role_user.arn #=> String + # resp.packed_policy_size #=> Integer + # resp.provider #=> String + # resp.audience #=> String + # resp.source_identity #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload assume_role_with_web_identity + # @param params [Hash] ({}) + # @return [Types::AssumeRoleWithWebIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::AssumeRoleWithWebIdentityResponse#credentials #credentials} => Types::Credentials + # * {Types::AssumeRoleWithWebIdentityResponse#subject_from_web_identity_token #subject_from_web_identity_token} => String + # * {Types::AssumeRoleWithWebIdentityResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser + # * {Types::AssumeRoleWithWebIdentityResponse#packed_policy_size #packed_policy_size} => Integer + # * {Types::AssumeRoleWithWebIdentityResponse#provider #provider} => String + # * {Types::AssumeRoleWithWebIdentityResponse#audience #audience} => String + # * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#1598 + def assume_role_with_web_identity(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # @api private + # @param params [{}] + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#2338 + def build_request(operation_name, params = T.unsafe(nil)); end + + # Decodes additional information about the authorization status of a + # request from an encoded message returned in response to an Amazon Web + # Services request. + # + # For example, if a user is not authorized to perform an operation that + # he or she has requested, the request returns a + # `Client.UnauthorizedOperation` response (an HTTP 403 response). Some + # Amazon Web Services operations additionally return an encoded message + # that can provide details about this authorization failure. + # + # Only certain Amazon Web Services operations return an encoded + # authorization message. The documentation for an individual operation + # indicates whether that operation returns an encoded message in + # addition to returning an HTTP code. + # + # + # + # The message is encoded because the details of the authorization status + # can contain privileged information that the user who requested the + # operation should not see. To decode an authorization status message, a + # user must be granted permissions through an IAM [policy][1] to request + # the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`) + # action. + # + # The decoded message includes the following type of information: + # + # * Whether the request was denied due to an explicit deny or due to the + # absence of an explicit allow. For more information, see [Determining + # Whether a Request is Allowed or Denied][2] in the *IAM User Guide*. + # + # * The principal who made the request. + # + # * The requested action. + # + # * The requested resource. + # + # * The values of condition keys in the context of the user's request. + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html + # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow + # + # @example Example: To decode information about an authorization status of a request + # + # resp = client.decode_authorization_message({ + # encoded_message: "", + # }) + # + # resp.to_h outputs the following: + # { + # decoded_message: "{\"allowed\": \"false\",\"explicitDeny\": \"false\",\"matchedStatements\": \"\",\"failures\": \"\",\"context\": {\"principal\": {\"id\": \"AIDACKCEVSQ6C2EXAMPLE\",\"name\": \"Bob\",\"arn\": \"arn:aws:iam::123456789012:user/Bob\"},\"action\": \"ec2:StopInstances\",\"resource\": \"arn:aws:ec2:us-east-1:123456789012:instance/i-dd01c9bd\",\"conditions\": [{\"item\": {\"key\": \"ec2:Tenancy\",\"values\": [\"default\"]},{\"item\": {\"key\": \"ec2:ResourceTag/elasticbeanstalk:environment-name\",\"values\": [\"Default-Environment\"]}},(Additional items ...)]}}", + # } + # @example Request syntax with placeholder values + # + # resp = client.decode_authorization_message({ + # encoded_message: "encodedMessageType", # required + # }) + # @example Response structure + # + # resp.decoded_message #=> String + # @option params + # @overload decode_authorization_message + # @param params [Hash] ({}) + # @return [Types::DecodeAuthorizationMessageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DecodeAuthorizationMessageResponse#decoded_message #decoded_message} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#1679 + def decode_authorization_message(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the account identifier for the specified access key ID. + # + # Access keys consist of two parts: an access key ID (for example, + # `AKIAIOSFODNN7EXAMPLE`) and a secret access key (for example, + # `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`). For more information + # about access keys, see [Managing Access Keys for IAM Users][1] in the + # *IAM User Guide*. + # + # When you pass an access key ID to this operation, it returns the ID of + # the Amazon Web Services account to which the keys belong. Access key + # IDs beginning with `AKIA` are long-term credentials for an IAM user or + # the Amazon Web Services account root user. Access key IDs beginning + # with `ASIA` are temporary credentials that are created using STS + # operations. If the account in the response belongs to you, you can + # sign in as the root user and review your root user access keys. Then, + # you can pull a [credentials report][2] to learn which IAM user owns + # the keys. To learn who requested the temporary credentials for an + # `ASIA` access key, view the STS events in your [CloudTrail logs][3] in + # the *IAM User Guide*. + # + # This operation does not indicate the state of the access key. The key + # might be active, inactive, or deleted. Active keys might not have + # permissions to perform an operation. Providing a deleted access key + # might return an error that the key doesn't exist. + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html + # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html + # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html + # + # @example Request syntax with placeholder values + # + # resp = client.get_access_key_info({ + # access_key_id: "accessKeyIdType", # required + # }) + # @example Response structure + # + # resp.account #=> String + # @option params + # @overload get_access_key_info + # @param params [Hash] ({}) + # @return [Types::GetAccessKeyInfoResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetAccessKeyInfoResponse#account #account} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#1740 + def get_access_key_info(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns details about the IAM user or role whose credentials are used + # to call the operation. + # + # No permissions are required to perform this operation. If an + # administrator attaches a policy to your identity that explicitly + # denies access to the `sts:GetCallerIdentity` action, you can still + # perform this operation. Permissions are not required because the same + # information is returned when access is denied. To view an example + # response, see [I Am Not Authorized to Perform: + # iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*. + # + # + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa + # + # @example Example: To get details about a calling IAM user + # + # # This example shows a request and response made with the credentials for a user named Alice in the AWS account + # # 123456789012. + # + # resp = client.get_caller_identity({ + # }) + # + # resp.to_h outputs the following: + # { + # account: "123456789012", + # arn: "arn:aws:iam::123456789012:user/Alice", + # user_id: "AKIAI44QH8DHBEXAMPLE", + # } + # @example Example: To get details about a calling user federated with AssumeRole + # + # # This example shows a request and response made with temporary credentials created by AssumeRole. The name of the assumed + # # role is my-role-name, and the RoleSessionName is set to my-role-session-name. + # + # resp = client.get_caller_identity({ + # }) + # + # resp.to_h outputs the following: + # { + # account: "123456789012", + # arn: "arn:aws:sts::123456789012:assumed-role/my-role-name/my-role-session-name", + # user_id: "AKIAI44QH8DHBEXAMPLE:my-role-session-name", + # } + # @example Example: To get details about a calling user federated with GetFederationToken + # + # # This example shows a request and response made with temporary credentials created by using GetFederationToken. The Name + # # parameter is set to my-federated-user-name. + # + # resp = client.get_caller_identity({ + # }) + # + # resp.to_h outputs the following: + # { + # account: "123456789012", + # arn: "arn:aws:sts::123456789012:federated-user/my-federated-user-name", + # user_id: "123456789012:my-federated-user-name", + # } + # @example Response structure + # + # resp.user_id #=> String + # resp.account #=> String + # resp.arn #=> String + # @overload get_caller_identity + # @param params [Hash] ({}) + # @return [Types::GetCallerIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetCallerIdentityResponse#user_id #user_id} => String + # * {Types::GetCallerIdentityResponse#account #account} => String + # * {Types::GetCallerIdentityResponse#arn #arn} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#1824 + def get_caller_identity(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a set of temporary security credentials (consisting of an + # access key ID, a secret access key, and a security token) for a user. + # A typical use is in a proxy application that gets temporary security + # credentials on behalf of distributed applications inside a corporate + # network. + # + # You must call the `GetFederationToken` operation using the long-term + # security credentials of an IAM user. As a result, this call is + # appropriate in contexts where those credentials can be safeguarded, + # usually in a server-based application. For a comparison of + # `GetFederationToken` with the other API operations that produce + # temporary credentials, see [Requesting Temporary Security + # Credentials][1] and [Comparing the Amazon Web Services STS API + # operations][2] in the *IAM User Guide*. + # + # Although it is possible to call `GetFederationToken` using the + # security credentials of an Amazon Web Services account root user + # rather than an IAM user that you create for the purpose of a proxy + # application, we do not recommend it. For more information, see + # [Safeguard your root user credentials and don't use them for everyday + # tasks][3] in the *IAM User Guide*. + # + # You can create a mobile-based or browser-based app that can + # authenticate users using a web identity provider like Login with + # Amazon, Facebook, Google, or an OpenID Connect-compatible identity + # provider. In this case, we recommend that you use [Amazon Cognito][4] + # or `AssumeRoleWithWebIdentity`. For more information, see [Federation + # Through a Web-based Identity Provider][5] in the *IAM User Guide*. + # + # + # + # **Session duration** + # + # The temporary credentials are valid for the specified duration, from + # 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 + # hours). The default session duration is 43,200 seconds (12 hours). + # Temporary credentials obtained by using the root user credentials have + # a maximum duration of 3,600 seconds (1 hour). + # + # **Permissions** + # + # You can use the temporary credentials created by `GetFederationToken` + # in any Amazon Web Services service with the following exceptions: + # + # * You cannot call any IAM operations using the CLI or the Amazon Web + # Services API. This limitation does not apply to console sessions. + # + # * You cannot call any STS operations except `GetCallerIdentity`. + # + # You can use temporary credentials for single sign-on (SSO) to the + # console. + # + # You must pass an inline or managed [session policy][6] to this + # operation. You can pass a single JSON policy document to use as an + # inline session policy. You can also specify up to 10 managed policy + # Amazon Resource Names (ARNs) to use as managed session policies. The + # plaintext that you use for both inline and managed session policies + # can't exceed 2,048 characters. + # + # Though the session policy parameters are optional, if you do not pass + # a policy, then the resulting federated user session has no + # permissions. When you pass session policies, the session permissions + # are the intersection of the IAM user policies and the session policies + # that you pass. This gives you a way to further restrict the + # permissions for a federated user. You cannot use session policies to + # grant more permissions than those that are defined in the permissions + # policy of the IAM user. For more information, see [Session + # Policies][6] in the *IAM User Guide*. For information about using + # `GetFederationToken` to create temporary security credentials, see + # [GetFederationToken—Federation Through a Custom Identity Broker][7]. + # + # You can use the credentials to access a resource that has a + # resource-based policy. If that policy specifically references the + # federated user session in the `Principal` element of the policy, the + # session has the permissions allowed by the policy. These permissions + # are granted in addition to the permissions granted by the session + # policies. + # + # **Tags** + # + # (Optional) You can pass tag key-value pairs to your session. These are + # called session tags. For more information about session tags, see + # [Passing Session Tags in STS][8] in the *IAM User Guide*. + # + # You can create a mobile-based or browser-based app that can + # authenticate users using a web identity provider like Login with + # Amazon, Facebook, Google, or an OpenID Connect-compatible identity + # provider. In this case, we recommend that you use [Amazon Cognito][4] + # or `AssumeRoleWithWebIdentity`. For more information, see [Federation + # Through a Web-based Identity Provider][5] in the *IAM User Guide*. + # + # + # + # An administrator must grant you the permissions necessary to pass + # session tags. The administrator can also create granular permissions + # to allow you to pass only specific session tags. For more information, + # see [Tutorial: Using Tags for Attribute-Based Access Control][9] in + # the *IAM User Guide*. + # + # Tag key–value pairs are not case sensitive, but case is preserved. + # This means that you cannot have separate `Department` and `department` + # tag keys. Assume that the user that you are federating has the + # `Department`=`Marketing` tag and you pass the + # `department`=`engineering` session tag. `Department` and `department` + # are not saved as separate tags, and the session tag passed in the + # request takes precedence over the user tag. + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html + # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison + # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials + # [4]: http://aws.amazon.com/cognito/ + # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity + # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session + # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken + # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html + # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html + # + # @example Example: To get temporary credentials for a role by using GetFederationToken + # + # resp = client.get_federation_token({ + # duration_seconds: 3600, + # name: "testFedUserSession", + # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + # tags: [ + # { + # key: "Project", + # value: "Pegasus", + # }, + # { + # key: "Cost-Center", + # value: "98765", + # }, + # ], + # }) + # + # resp.to_h outputs the following: + # { + # credentials: { + # access_key_id: "AKIAIOSFODNN7EXAMPLE", + # expiration: Time.parse("2011-07-15T23:28:33.359Z"), + # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + # session_token: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + # }, + # federated_user: { + # arn: "arn:aws:sts::123456789012:federated-user/Bob", + # federated_user_id: "123456789012:Bob", + # }, + # packed_policy_size: 8, + # } + # @example Request syntax with placeholder values + # + # resp = client.get_federation_token({ + # name: "userNameType", # required + # policy: "sessionPolicyDocumentType", + # policy_arns: [ + # { + # arn: "arnType", + # }, + # ], + # duration_seconds: 1, + # tags: [ + # { + # key: "tagKeyType", # required + # value: "tagValueType", # required + # }, + # ], + # }) + # @example Response structure + # + # resp.credentials.access_key_id #=> String + # resp.credentials.secret_access_key #=> String + # resp.credentials.session_token #=> String + # resp.credentials.expiration #=> Time + # resp.federated_user.federated_user_id #=> String + # resp.federated_user.arn #=> String + # resp.packed_policy_size #=> Integer + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload get_federation_token + # @param params [Hash] ({}) + # @return [Types::GetFederationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetFederationTokenResponse#credentials #credentials} => Types::Credentials + # * {Types::GetFederationTokenResponse#federated_user #federated_user} => Types::FederatedUser + # * {Types::GetFederationTokenResponse#packed_policy_size #packed_policy_size} => Integer + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#2172 + def get_federation_token(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns a set of temporary credentials for an Amazon Web Services + # account or IAM user. The credentials consist of an access key ID, a + # secret access key, and a security token. Typically, you use + # `GetSessionToken` if you want to use MFA to protect programmatic calls + # to specific Amazon Web Services API operations like Amazon EC2 + # `StopInstances`. + # + # MFA-enabled IAM users must call `GetSessionToken` and submit an MFA + # code that is associated with their MFA device. Using the temporary + # security credentials that the call returns, IAM users can then make + # programmatic calls to API operations that require MFA authentication. + # An incorrect MFA code causes the API to return an access denied error. + # For a comparison of `GetSessionToken` with the other API operations + # that produce temporary credentials, see [Requesting Temporary Security + # Credentials][1] and [Comparing the Amazon Web Services STS API + # operations][2] in the *IAM User Guide*. + # + # No permissions are required for users to perform this operation. The + # purpose of the `sts:GetSessionToken` operation is to authenticate the + # user using MFA. You cannot use policies to control authentication + # operations. For more information, see [Permissions for + # GetSessionToken][3] in the *IAM User Guide*. + # + # + # + # **Session Duration** + # + # The `GetSessionToken` operation must be called by using the long-term + # Amazon Web Services security credentials of an IAM user. Credentials + # that are created by IAM users are valid for the duration that you + # specify. This duration can range from 900 seconds (15 minutes) up to a + # maximum of 129,600 seconds (36 hours), with a default of 43,200 + # seconds (12 hours). Credentials based on account credentials can range + # from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a + # default of 1 hour. + # + # **Permissions** + # + # The temporary security credentials created by `GetSessionToken` can be + # used to make API calls to any Amazon Web Services service with the + # following exceptions: + # + # * You cannot call any IAM API operations unless MFA authentication + # information is included in the request. + # + # * You cannot call any STS API *except* `AssumeRole` or + # `GetCallerIdentity`. + # + # The credentials that `GetSessionToken` returns are based on + # permissions associated with the IAM user whose credentials were used + # to call the operation. The temporary credentials have the same + # permissions as the IAM user. + # + # Although it is possible to call `GetSessionToken` using the security + # credentials of an Amazon Web Services account root user rather than an + # IAM user, we do not recommend it. If `GetSessionToken` is called using + # root user credentials, the temporary credentials have root user + # permissions. For more information, see [Safeguard your root user + # credentials and don't use them for everyday tasks][4] in the *IAM + # User Guide* + # + # + # + # For more information about using `GetSessionToken` to create temporary + # credentials, see [Temporary Credentials for Users in Untrusted + # Environments][5] in the *IAM User Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html + # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison + # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html + # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials + # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken + # + # @example Example: To get temporary credentials for an IAM user or an AWS account + # + # resp = client.get_session_token({ + # duration_seconds: 3600, + # serial_number: "YourMFASerialNumber", + # token_code: "123456", + # }) + # + # resp.to_h outputs the following: + # { + # credentials: { + # access_key_id: "AKIAIOSFODNN7EXAMPLE", + # expiration: Time.parse("2011-07-11T19:55:29.611Z"), + # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + # session_token: "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE", + # }, + # } + # @example Request syntax with placeholder values + # + # resp = client.get_session_token({ + # duration_seconds: 1, + # serial_number: "serialNumberType", + # token_code: "tokenCodeType", + # }) + # @example Response structure + # + # resp.credentials.access_key_id #=> String + # resp.credentials.secret_access_key #=> String + # resp.credentials.session_token #=> String + # resp.credentials.expiration #=> Time + # @option params + # @option params + # @option params + # @overload get_session_token + # @param params [Hash] ({}) + # @return [Types::GetSessionTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetSessionTokenResponse#credentials #credentials} => Types::Credentials + # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken AWS API Documentation + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#2329 + def get_session_token(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # @api private + # @deprecated + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#2353 + def waiter_names; end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#2363 + def errors_module; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/client.rb#2360 + def identifier; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#12 +module Aws::STS::ClientApi + include ::Seahorse::Model +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#247 +Aws::STS::ClientApi::API = T.let(T.unsafe(nil), Seahorse::Model::Api) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#16 +Aws::STS::ClientApi::AssumeRoleRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#17 +Aws::STS::ClientApi::AssumeRoleResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#18 +Aws::STS::ClientApi::AssumeRoleWithSAMLRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#19 +Aws::STS::ClientApi::AssumeRoleWithSAMLResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#20 +Aws::STS::ClientApi::AssumeRoleWithWebIdentityRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#21 +Aws::STS::ClientApi::AssumeRoleWithWebIdentityResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#22 +Aws::STS::ClientApi::AssumedRoleUser = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#23 +Aws::STS::ClientApi::Audience = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#24 +Aws::STS::ClientApi::Credentials = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#25 +Aws::STS::ClientApi::DecodeAuthorizationMessageRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#26 +Aws::STS::ClientApi::DecodeAuthorizationMessageResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#27 +Aws::STS::ClientApi::ExpiredTokenException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#28 +Aws::STS::ClientApi::FederatedUser = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#29 +Aws::STS::ClientApi::GetAccessKeyInfoRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#30 +Aws::STS::ClientApi::GetAccessKeyInfoResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#31 +Aws::STS::ClientApi::GetCallerIdentityRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#32 +Aws::STS::ClientApi::GetCallerIdentityResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#33 +Aws::STS::ClientApi::GetFederationTokenRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#34 +Aws::STS::ClientApi::GetFederationTokenResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#35 +Aws::STS::ClientApi::GetSessionTokenRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#36 +Aws::STS::ClientApi::GetSessionTokenResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#37 +Aws::STS::ClientApi::IDPCommunicationErrorException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#38 +Aws::STS::ClientApi::IDPRejectedClaimException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#39 +Aws::STS::ClientApi::InvalidAuthorizationMessageException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#40 +Aws::STS::ClientApi::InvalidIdentityTokenException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#41 +Aws::STS::ClientApi::Issuer = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#42 +Aws::STS::ClientApi::MalformedPolicyDocumentException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#43 +Aws::STS::ClientApi::NameQualifier = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#44 +Aws::STS::ClientApi::PackedPolicyTooLargeException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#45 +Aws::STS::ClientApi::PolicyDescriptorType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#46 +Aws::STS::ClientApi::ProvidedContext = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#47 +Aws::STS::ClientApi::ProvidedContextsListType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#48 +Aws::STS::ClientApi::RegionDisabledException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#49 +Aws::STS::ClientApi::SAMLAssertionType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#50 +Aws::STS::ClientApi::Subject = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#51 +Aws::STS::ClientApi::SubjectType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/client_api.rb#52 +Aws::STS::ClientApi::Tag = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# Endpoint parameters used to influence endpoints per request. +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoint_parameters.rb#38 +class Aws::STS::EndpointParameters < ::Struct + include ::Aws::Structure + + # @return [EndpointParameters] a new instance of EndpointParameters + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoint_parameters.rb#58 + def initialize(options = T.unsafe(nil)); end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint; end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint=(_); end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region; end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region=(_); end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack; end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack=(_); end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips; end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips=(_); end + + # Whether the global endpoint should be used, rather then the regional endpoint for us-east-1. + # + # @return [Boolean] + def use_global_endpoint; end + + # Whether the global endpoint should be used, rather then the regional endpoint for us-east-1. + # + # @return [Boolean] + def use_global_endpoint=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/endpoint_provider.rb#11 +class Aws::STS::EndpointProvider + # @raise [ArgumentError] + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoint_provider.rb#12 + def resolve_endpoint(parameters); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#13 +module Aws::STS::Endpoints; end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#15 +class Aws::STS::Endpoints::AssumeRole + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#16 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#30 +class Aws::STS::Endpoints::AssumeRoleWithSAML + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#31 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#45 +class Aws::STS::Endpoints::AssumeRoleWithWebIdentity + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#46 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#60 +class Aws::STS::Endpoints::DecodeAuthorizationMessage + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#61 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#75 +class Aws::STS::Endpoints::GetAccessKeyInfo + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#76 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#90 +class Aws::STS::Endpoints::GetCallerIdentity + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#91 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#105 +class Aws::STS::Endpoints::GetFederationToken + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#106 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#120 +class Aws::STS::Endpoints::GetSessionToken + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/endpoints.rb#121 + def build(context); end + end +end + +# When STS returns an error response, the Ruby SDK constructs and raises an error. +# These errors all extend Aws::STS::Errors::ServiceError < {Aws::Errors::ServiceError} +# +# You can rescue all STS errors using ServiceError: +# +# begin +# # do stuff +# rescue Aws::STS::Errors::ServiceError +# # rescues all STS API errors +# end +# +# +# ## Request Context +# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns +# information about the request that generated the error. +# See {Seahorse::Client::RequestContext} for more information. +# +# ## Error Classes +# * {ExpiredTokenException} +# * {IDPCommunicationErrorException} +# * {IDPRejectedClaimException} +# * {InvalidAuthorizationMessageException} +# * {InvalidIdentityTokenException} +# * {MalformedPolicyDocumentException} +# * {PackedPolicyTooLargeException} +# * {RegionDisabledException} +# +# Additionally, error classes are dynamically generated for service errors based on the error code +# if they are not defined above. +# +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#41 +module Aws::STS::Errors + extend ::Aws::Errors::DynamicErrors +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#45 +class Aws::STS::Errors::ExpiredTokenException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::ExpiredTokenException] + # @return [ExpiredTokenException] a new instance of ExpiredTokenException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#50 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#55 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#60 +class Aws::STS::Errors::IDPCommunicationErrorException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::IDPCommunicationErrorException] + # @return [IDPCommunicationErrorException] a new instance of IDPCommunicationErrorException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#65 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#70 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#75 +class Aws::STS::Errors::IDPRejectedClaimException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::IDPRejectedClaimException] + # @return [IDPRejectedClaimException] a new instance of IDPRejectedClaimException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#80 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#85 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#90 +class Aws::STS::Errors::InvalidAuthorizationMessageException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::InvalidAuthorizationMessageException] + # @return [InvalidAuthorizationMessageException] a new instance of InvalidAuthorizationMessageException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#95 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#100 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#105 +class Aws::STS::Errors::InvalidIdentityTokenException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::InvalidIdentityTokenException] + # @return [InvalidIdentityTokenException] a new instance of InvalidIdentityTokenException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#110 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#115 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#120 +class Aws::STS::Errors::MalformedPolicyDocumentException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::MalformedPolicyDocumentException] + # @return [MalformedPolicyDocumentException] a new instance of MalformedPolicyDocumentException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#125 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#130 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#135 +class Aws::STS::Errors::PackedPolicyTooLargeException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::PackedPolicyTooLargeException] + # @return [PackedPolicyTooLargeException] a new instance of PackedPolicyTooLargeException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#140 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#145 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#150 +class Aws::STS::Errors::RegionDisabledException < ::Aws::STS::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::STS::Types::RegionDisabledException] + # @return [RegionDisabledException] a new instance of RegionDisabledException + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#155 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#160 + def message; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/errors.rb#0 +class Aws::STS::Errors::ServiceError < ::Aws::Errors::ServiceError; end + +# source://aws-sdk-core//lib/aws-sdk-sts.rb#57 +Aws::STS::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#12 +module Aws::STS::Plugins; end + +# source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#13 +class Aws::STS::Plugins::Endpoints < ::Seahorse::Client::Plugin + # source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#79 + def add_handlers(handlers, _config); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#26 +class Aws::STS::Plugins::Endpoints::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#27 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#46 + def apply_endpoint_headers(context, headers); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-sts/plugins/endpoints.rb#57 + def parameters_for_operation(context); end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb#7 +class Aws::STS::Plugins::STSRegionalEndpoints < ::Seahorse::Client::Plugin + class << self + # source://aws-sdk-core//lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb#22 + def resolve_sts_regional_endpoints(cfg); end + end +end + +# Allows you to create presigned URLs for STS operations. +# +# @example +# +# signer = Aws::STS::Presigner.new +# url = signer.get_caller_identity_presigned_url( +# headers: {"X-K8s-Aws-Id" => 'my-eks-cluster'} +# ) +# +# source://aws-sdk-core//lib/aws-sdk-sts/presigner.rb#15 +class Aws::STS::Presigner + # @option options + # @param options [Hash] a customizable set of options + # @return [Presigner] a new instance of Presigner + # + # source://aws-sdk-core//lib/aws-sdk-sts/presigner.rb#18 + def initialize(options = T.unsafe(nil)); end + + # Returns a presigned url for get_caller_identity. + # + # This can be easily converted to a token used by the EKS service: + # {https://ruby-doc.org/stdlib-2.3.1/libdoc/base64/rdoc/Base64.html#method-i-encode64} + # "k8s-aws-v1." + Base64.urlsafe_encode64(url).chomp("==") + # + # @example + # + # url = signer.get_caller_identity_presigned_url( + # headers: {"X-K8s-Aws-Id" => 'my-eks-cluster'}, + # ) + # @option options + # @param options [Hash] a customizable set of options + # @return [String] A presigned url string. + # + # source://aws-sdk-core//lib/aws-sdk-sts/presigner.rb#40 + def get_caller_identity_presigned_url(options = T.unsafe(nil)); end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/resource.rb#12 +class Aws::STS::Resource + # @option options + # @param options [{}] + # @return [Resource] a new instance of Resource + # + # source://aws-sdk-core//lib/aws-sdk-sts/resource.rb#16 + def initialize(options = T.unsafe(nil)); end + + # @return [Client] + # + # source://aws-sdk-core//lib/aws-sdk-sts/resource.rb#21 + def client; end +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#11 +module Aws::STS::Types; end + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#308 +class Aws::STS::Types::AssumeRoleRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#309 +Aws::STS::Types::AssumeRoleRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains the response to a successful AssumeRole request, including +# temporary Amazon Web Services credentials that can be used to make +# Amazon Web Services requests. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#374 +class Aws::STS::Types::AssumeRoleResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#375 +Aws::STS::Types::AssumeRoleResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#515 +class Aws::STS::Types::AssumeRoleWithSAMLRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#516 +Aws::STS::Types::AssumeRoleWithSAMLRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains the response to a successful AssumeRoleWithSAML request, +# including temporary Amazon Web Services credentials that can be used +# to make Amazon Web Services requests. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#631 +class Aws::STS::Types::AssumeRoleWithSAMLResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#632 +Aws::STS::Types::AssumeRoleWithSAMLResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#788 +class Aws::STS::Types::AssumeRoleWithWebIdentityRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#789 +Aws::STS::Types::AssumeRoleWithWebIdentityRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains the response to a successful AssumeRoleWithWebIdentity +# request, including temporary Amazon Web Services credentials that can +# be used to make Amazon Web Services requests. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#889 +class Aws::STS::Types::AssumeRoleWithWebIdentityResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#890 +Aws::STS::Types::AssumeRoleWithWebIdentityResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The identifiers for the temporary security credentials that the +# operation returns. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumedRoleUser AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#918 +class Aws::STS::Types::AssumedRoleUser < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#919 +Aws::STS::Types::AssumedRoleUser::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Amazon Web Services credentials for API authentication. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/Credentials AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#949 +class Aws::STS::Types::Credentials < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#950 +Aws::STS::Types::Credentials::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#961 +class Aws::STS::Types::DecodeAuthorizationMessageRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#962 +Aws::STS::Types::DecodeAuthorizationMessageRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# A document that contains additional information about the +# authorization status of a request from an encoded message that is +# returned in response to an Amazon Web Services request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#977 +class Aws::STS::Types::DecodeAuthorizationMessageResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#978 +Aws::STS::Types::DecodeAuthorizationMessageResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The web identity token that was passed is expired or is not valid. Get +# a new identity token from the identity provider and then retry the +# request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/ExpiredTokenException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#992 +class Aws::STS::Types::ExpiredTokenException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#993 +Aws::STS::Types::ExpiredTokenException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Identifiers for the federated user that is associated with the +# credentials. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/FederatedUser AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1019 +class Aws::STS::Types::FederatedUser < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1020 +Aws::STS::Types::FederatedUser::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfoRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1035 +class Aws::STS::Types::GetAccessKeyInfoRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1036 +Aws::STS::Types::GetAccessKeyInfoRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfoResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1047 +class Aws::STS::Types::GetAccessKeyInfoResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1048 +Aws::STS::Types::GetAccessKeyInfoResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1056 +class Aws::STS::Types::GetCallerIdentityRequest < ::Aws::EmptyStructure; end + +# Contains the response to a successful GetCallerIdentity request, +# including information about the entity making the request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1087 +class Aws::STS::Types::GetCallerIdentityResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1088 +Aws::STS::Types::GetCallerIdentityResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1260 +class Aws::STS::Types::GetFederationTokenRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1261 +Aws::STS::Types::GetFederationTokenRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains the response to a successful GetFederationToken request, +# including temporary Amazon Web Services credentials that can be used +# to make Amazon Web Services requests. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1299 +class Aws::STS::Types::GetFederationTokenResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1300 +Aws::STS::Types::GetFederationTokenResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenRequest AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1347 +class Aws::STS::Types::GetSessionTokenRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1348 +Aws::STS::Types::GetSessionTokenRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains the response to a successful GetSessionToken request, +# including temporary Amazon Web Services credentials that can be used +# to make Amazon Web Services requests. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenResponse AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1370 +class Aws::STS::Types::GetSessionTokenResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1371 +Aws::STS::Types::GetSessionTokenResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The request could not be fulfilled because the identity provider (IDP) +# that was asked to verify the incoming identity token could not be +# reached. This is often a transient error caused by network conditions. +# Retry the request a limited number of times so that you don't exceed +# the request rate. If the error persists, the identity provider might +# be down or not responding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/IDPCommunicationErrorException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1388 +class Aws::STS::Types::IDPCommunicationErrorException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1389 +Aws::STS::Types::IDPCommunicationErrorException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The identity provider (IdP) reported that authentication failed. This +# might be because the claim is invalid. +# +# If this error is returned for the `AssumeRoleWithWebIdentity` +# operation, it can also mean that the claim has expired or has been +# explicitly revoked. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/IDPRejectedClaimException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1406 +class Aws::STS::Types::IDPRejectedClaimException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1407 +Aws::STS::Types::IDPRejectedClaimException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The error returned if the message passed to +# `DecodeAuthorizationMessage` was invalid. This can happen if the token +# contains invalid characters, such as linebreaks. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/InvalidAuthorizationMessageException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1421 +class Aws::STS::Types::InvalidAuthorizationMessageException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1422 +Aws::STS::Types::InvalidAuthorizationMessageException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The web identity token that was passed could not be validated by +# Amazon Web Services. Get a new identity token from the identity +# provider and then retry the request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/InvalidIdentityTokenException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1436 +class Aws::STS::Types::InvalidIdentityTokenException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1437 +Aws::STS::Types::InvalidIdentityTokenException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The request was rejected because the policy document was malformed. +# The error message describes the specific error. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/MalformedPolicyDocumentException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1450 +class Aws::STS::Types::MalformedPolicyDocumentException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1451 +Aws::STS::Types::MalformedPolicyDocumentException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The request was rejected because the total packed size of the session +# policies and session tags combined was too large. An Amazon Web +# Services conversion compresses the session policy document, session +# policy ARNs, and session tags into a packed binary format that has a +# separate limit. The error message indicates by percentage how close +# the policies and tags are to the upper size limit. For more +# information, see [Passing Session Tags in STS][1] in the *IAM User +# Guide*. +# +# You could receive this error even though you meet other defined +# session policy and session tag limits. For more information, see [IAM +# and STS Entity Character Limits][2] in the *IAM User Guide*. +# +# +# +# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/PackedPolicyTooLargeException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1479 +class Aws::STS::Types::PackedPolicyTooLargeException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1480 +Aws::STS::Types::PackedPolicyTooLargeException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# A reference to the IAM managed policy that is passed as a session +# policy for a role session or a federated user session. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/PolicyDescriptorType AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1501 +class Aws::STS::Types::PolicyDescriptorType < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1502 +Aws::STS::Types::PolicyDescriptorType::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Reserved for future use. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/ProvidedContext AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1520 +class Aws::STS::Types::ProvidedContext < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1521 +Aws::STS::Types::ProvidedContext::SENSITIVE = T.let(T.unsafe(nil), Array) + +# STS is not activated in the requested region for the account that is +# being asked to generate credentials. The account administrator must +# use the IAM console to activate STS in that region. For more +# information, see [Activating and Deactivating Amazon Web Services STS +# in an Amazon Web Services Region][1] in the *IAM User Guide*. +# +# +# +# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/RegionDisabledException AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1541 +class Aws::STS::Types::RegionDisabledException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1542 +Aws::STS::Types::RegionDisabledException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# You can pass custom key-value pair attributes when you assume a role +# or federate a user. These are called session tags. You can then use +# the session tags to control access to resources. For more information, +# see [Tagging Amazon Web Services STS Sessions][1] in the *IAM User +# Guide*. +# +# +# +# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html +# +# @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/Tag AWS API Documentation +# +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1584 +class Aws::STS::Types::Tag < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-core//lib/aws-sdk-sts/types.rb#1585 +Aws::STS::Types::Tag::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#5 +class Aws::SharedConfig + # Constructs a new SharedConfig provider object. This will load the shared + # credentials file, and optionally the shared configuration file, as ini + # files which support profiles. + # + # By default, the shared credential file (the default path for which is + # `~/.aws/credentials`) and the shared config file (the default path for + # which is `~/.aws/config`) are loaded. However, if you set the + # `ENV['AWS_SDK_CONFIG_OPT_OUT']` environment variable, only the shared + # credential file will be loaded. You can specify the shared credential + # file path with the `ENV['AWS_SHARED_CREDENTIALS_FILE']` environment + # variable or with the `:credentials_path` option. Similarly, you can + # specify the shared config file path with the `ENV['AWS_CONFIG_FILE']` + # environment variable or with the `:config_path` option. + # + # The default profile name is 'default'. You can specify the profile name + # with the `ENV['AWS_PROFILE']` environment variable or with the + # `:profile_name` option. + # + # @api private + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [SharedConfig] a new instance of SharedConfig + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#52 + def initialize(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def adaptive_retry_wait_to_fill(opts = T.unsafe(nil)); end + + # Attempts to assume a role from shared config or shared credentials file. + # Will always attempt first to assume a role from the shared credentials + # file, if present. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#120 + def assume_role_credentials_from_config(opts = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#130 + def assume_role_web_identity_credentials_from_config(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def ca_bundle(opts = T.unsafe(nil)); end + + # @api private + # @return [Boolean] returns `true` if use of the shared config file is + # enabled. + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#96 + def config_enabled?; end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#16 + def config_path; end + + # Source a custom configured endpoint from the shared configuration file + # + # @api private + # @option opts + # @option opts + # @param opts [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#175 + def configured_endpoint(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def correct_clock_skew(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def credential_process(opts = T.unsafe(nil)); end + + # Sources static credentials from shared credential/config files. + # + # @api private + # @option options + # @param opts [Hash] + # @param options [Hash] a customizable set of options + # @return [Aws::Credentials] credentials sourced from configuration values, + # or `nil` if no valid credentials were found. + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#107 + def credentials(opts = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#13 + def credentials_path; end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def csm_client_id(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def csm_enabled(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def csm_host(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def csm_port(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def defaults_mode(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def disable_request_compression(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def ec2_metadata_service_endpoint(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def ec2_metadata_service_endpoint_mode(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def endpoint_discovery_enabled(opts = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#69 + def fresh(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def ignore_configured_endpoint_urls(opts = T.unsafe(nil)); end + + # @api private + # @note This method does not indicate if the file found at {#path} + # will be parsable, only if it can be read. + # @return [Boolean] Returns `true` if a credential file + # exists and has appropriate read permissions at {#path}. + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#90 + def loadable?(path); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def max_attempts(opts = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#19 + def profile_name; end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def region(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def request_min_compression_size_bytes(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def retry_mode(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def s3_disable_multiregion_access_points(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def s3_us_east_1_regional_endpoint(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def s3_use_arn_region(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def sdk_ua_app_id(opts = T.unsafe(nil)); end + + # Attempts to load from shared config or shared credentials file. + # Will always attempt first to load from the shared credentials + # file, if present. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#149 + def sso_credentials_from_config(opts = T.unsafe(nil)); end + + # Attempts to load from shared config or shared credentials file. + # Will always attempt first to load from the shared credentials + # file, if present. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#161 + def sso_token_from_config(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def sts_regional_endpoints(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def use_dualstack_endpoint(opts = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#195 + def use_fips_endpoint(opts = T.unsafe(nil)); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#240 + def assume_role_from_profile(cfg, profile, opts, chain_config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#333 + def assume_role_process_credentials_from_config(profile); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#348 + def credentials_from_config(profile, _opts); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#410 + def credentials_from_profile(prof_config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#342 + def credentials_from_shared(profile, _opts); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#318 + def credentials_from_source(credential_source, config); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#437 + def default_shared_config_path(file); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#433 + def determine_config_path; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#429 + def determine_credentials_path; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#453 + def determine_profile(options); end + + # Get a config value from from shared credential/config files. + # Only loads a value when config_enabled is true + # Return a value from credentials preferentially over config + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#232 + def get_config_value(key, opts); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#425 + def load_config_file; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#419 + def load_credentials_file; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#293 + def resolve_source_profile(profile, opts = T.unsafe(nil)); end + + # If any of the sso_ profile values are present, attempt to construct + # SSOCredentials + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#356 + def sso_credentials_from_profile(cfg, profile); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#460 + def sso_session(cfg, profile, sso_session_name); end + + # If the required sso_ profile values are present, attempt to construct + # SSOTokenProvider + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#395 + def sso_token_from_profile(cfg, profile); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#444 + def validate_profile_exists(profile); end + + class << self + # Add an accessor method (similar to attr_reader) to return a configuration value + # Uses the get_config_value below to control where + # values are loaded from + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#193 + def config_reader(*attrs); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#6 +Aws::SharedConfig::SSO_CREDENTIAL_PROFILE_KEYS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#7 +Aws::SharedConfig::SSO_PROFILE_KEYS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#9 +Aws::SharedConfig::SSO_SESSION_KEYS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/shared_config.rb#8 +Aws::SharedConfig::SSO_TOKEN_PROFILE_KEYS = T.let(T.unsafe(nil), Array) + +# source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#6 +class Aws::SharedCredentials + include ::Aws::CredentialProvider + + # Constructs a new SharedCredentials object. This will load static + # (access_key_id, secret_access_key and session_token) AWS access + # credentials from an ini file, which supports profiles. The default + # profile name is 'default'. You can specify the profile name with the + # `ENV['AWS_PROFILE']` or with the `:profile_name` option. + # + # To use credentials from the default credential resolution chain + # create a client without the credential option specified. + # You may access the resolved credentials through + # `client.config.credentials`. + # + # @option [String] + # @option [String] + # @param [String] [Hash] a customizable set of options + # @return [SharedCredentials] a new instance of SharedCredentials + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#34 + def initialize(options = T.unsafe(nil)); end + + # @return [Credentials] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#59 + def credentials; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#62 + def inspect; end + + # @deprecated This method is no longer used. + # @note This method does not indicate if the file found at {#path} + # will be parsable, only if it can be read. + # @return [Boolean] Returns `true` if a credential file + # exists and has appropriate read permissions at {#path}. + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#76 + def loadable?; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#53 + def path; end + + # @return [String] + # + # source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#56 + def profile_name; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/shared_credentials.rb#11 +Aws::SharedCredentials::KEY_MAP = T.let(T.unsafe(nil), Hash) + +# source://aws-sdk-core//lib/aws-sdk-core/static_token_provider.rb#4 +class Aws::StaticTokenProvider + include ::Aws::TokenProvider + + # @param token [String] + # @param expiration [Time] + # @return [StaticTokenProvider] a new instance of StaticTokenProvider + # + # source://aws-sdk-core//lib/aws-sdk-core/static_token_provider.rb#10 + def initialize(token, expiration = T.unsafe(nil)); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/structure.rb#5 +module Aws::Structure + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#7 + def initialize(values = T.unsafe(nil)); end + + # @api private + # @return [Boolean] Returns `true` if all of the member values are `nil`. + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#20 + def empty?; end + + # @api private + # @return [Boolean] Returns `true` if this structure has a value + # set for the given member. + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#15 + def key?(member_name); end + + # Deeply converts the Structure into a hash. Structure members that + # are `nil` are omitted from the resultant hash. + # + # You can call #orig_to_h to get vanilla #to_h behavior as defined + # in stdlib Struct. + # + # @api private + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#31 + def to_h(obj = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deeply converts the Structure into a hash. Structure members that + # are `nil` are omitted from the resultant hash. + # + # You can call #orig_to_h to get vanilla #to_h behavior as defined + # in stdlib Struct. + # + # @api private + # @return [Hash] + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#31 + def to_hash(obj = T.unsafe(nil), options = T.unsafe(nil)); end + + # Wraps the default #to_s logic with filtering of sensitive parameters. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#52 + def to_s(obj = T.unsafe(nil)); end + + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#59 + def new(*args); end + end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/structure.rb#76 +module Aws::Structure::Union + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#77 + def member; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/structure.rb#81 + def value; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#4 +module Aws::Stubbing; end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/data_applicator.rb#5 +class Aws::Stubbing::DataApplicator + include ::Seahorse::Model::Shapes + + # @param rules [Seahorse::Models::Shapes::ShapeRef] + # @return [DataApplicator] a new instance of DataApplicator + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/data_applicator.rb#10 + def initialize(rules); end + + # @param data [Hash] + # @param stub [Structure] + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/data_applicator.rb#16 + def apply_data(data, stub); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/data_applicator.rb#22 + def apply_data_to_struct(ref, data, struct); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/data_applicator.rb#29 + def member_value(ref, value); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#5 +class Aws::Stubbing::EmptyStub + include ::Seahorse::Model::Shapes + + # @param rules [Seahorse::Models::Shapes::ShapeRef] + # @return [EmptyStub] a new instance of EmptyStub + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#10 + def initialize(rules); end + + # @return [Structure] + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#15 + def stub; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#25 + def stub_ref(ref, visited = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#49 + def stub_scalar(ref); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/empty_stub.rb#39 + def stub_structure(ref, visited); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/ec2.rb#5 +module Aws::Stubbing::Protocols; end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/api_gateway.rb#6 +class Aws::Stubbing::Protocols::ApiGateway < ::Aws::Stubbing::Protocols::RestJson; end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/ec2.rb#6 +class Aws::Stubbing::Protocols::EC2 + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/ec2.rb#8 + def stub_data(api, operation, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/ec2.rb#18 + def stub_error(error_code); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/ec2.rb#34 + def build_body(api, operation, data); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/json.rb#6 +class Aws::Stubbing::Protocols::Json + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/json.rb#8 + def stub_data(api, operation, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/json.rb#17 + def stub_error(error_code); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/json.rb#35 + def build_body(operation, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/json.rb#31 + def content_type(api); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/query.rb#6 +class Aws::Stubbing::Protocols::Query + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/query.rb#8 + def stub_data(api, operation, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/query.rb#15 + def stub_error(error_code); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/query.rb#24 + def build_body(api, operation, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/query.rb#39 + def xmlns(api); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#8 +class Aws::Stubbing::Protocols::Rest + include ::Seahorse::Model::Shapes + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#12 + def stub_data(api, operation, data); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#41 + def apply_body(api, operation, resp, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#37 + def apply_headers(operation, resp, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#29 + def apply_status_code(operation, resp, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#45 + def build_body(api, operation, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#105 + def encode_error(opts, event_data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#185 + def encode_event(opts, rules, event_data, builder); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#85 + def encode_eventstream_response(rules, data, builder); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#135 + def encode_modeled_event(opts, rules, event_type, event_data, builder); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#121 + def encode_unknown_event(opts, event_type, event_data); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#81 + def eventstream?(rules); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#77 + def head_operation(operation); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#22 + def new_http_response; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest.rb#65 + def streaming?(ref); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_json.rb#6 +class Aws::Stubbing::Protocols::RestJson < ::Aws::Stubbing::Protocols::Rest + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_json.rb#8 + def body_for(_a, _b, rules, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_json.rb#16 + def stub_error(error_code); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_xml.rb#6 +class Aws::Stubbing::Protocols::RestXml < ::Aws::Stubbing::Protocols::Rest + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_xml.rb#8 + def body_for(api, operation, rules, data); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_xml.rb#20 + def stub_error(error_code); end + + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/protocols/rest_xml.rb#27 + def xmlns(api); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/stub_data.rb#6 +class Aws::Stubbing::StubData + # @api private + # @return [StubData] a new instance of StubData + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/stub_data.rb#8 + def initialize(operation); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/stub_data.rb#13 + def stub(data = T.unsafe(nil)); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/stub_data.rb#54 + def apply_data(data, stub); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/stub_data.rb#23 + def remove_checksums(stub); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/stub_data.rb#33 + def remove_paging_tokens(stub); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/stubbing/xml_error.rb#5 +class Aws::Stubbing::XmlError + # @api private + # @return [XmlError] a new instance of XmlError + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/xml_error.rb#7 + def initialize(error_code); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/stubbing/xml_error.rb#11 + def to_xml; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/token.rb#4 +class Aws::Token + # @param token [String] + # @param expiration [Time] + # @return [Token] a new instance of Token + # + # source://aws-sdk-core//lib/aws-sdk-core/token.rb#8 + def initialize(token, expiration = T.unsafe(nil)); end + + # @return [Time, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/token.rb#17 + def expiration; end + + # Removing the token from the default inspect string. + # + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/token.rb#26 + def inspect; end + + # @return [Boolean] Returns `true` if token is set + # + # source://aws-sdk-core//lib/aws-sdk-core/token.rb#20 + def set?; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/token.rb#14 + def token; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/token_provider.rb#4 +module Aws::TokenProvider + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider.rb#10 + def set?; end + + # @return [Token] + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider.rb#7 + def token; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#5 +class Aws::TokenProviderChain + # @api private + # @return [TokenProviderChain] a new instance of TokenProviderChain + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#6 + def initialize(config = T.unsafe(nil)); end + + # @api private + # @return [TokenProvider, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#11 + def resolve; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#46 + def determine_profile_name(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#21 + def providers; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#37 + def sso_token(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/token_provider_chain.rb#28 + def static_profile_sso_token(options); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/type_builder.rb#5 +class Aws::TypeBuilder + # @api private + # @return [TypeBuilder] a new instance of TypeBuilder + # + # source://aws-sdk-core//lib/aws-sdk-core/type_builder.rb#7 + def initialize(svc_module); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/type_builder.rb#11 + def build_type(shape, shapes); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/util.rb#7 +module Aws::Util + class << self + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/util.rb#18 + def copy_hash(hash); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/util.rb#26 + def deep_copy(obj); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/util.rb#10 + def deep_merge(left, right); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/util.rb#49 + def monotonic_milliseconds; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/util.rb#57 + def monotonic_seconds; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/util.rb#61 + def str_2_bool(str); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#4 +module Aws::Waiters; end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#5 +module Aws::Waiters::Errors; end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#11 +class Aws::Waiters::Errors::FailureStateError < ::Aws::Waiters::Errors::WaiterFailed + # @return [FailureStateError] a new instance of FailureStateError + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#15 + def initialize(response); end + + # @return [Seahorse::Client::Response] The response that matched + # the failure state. + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#22 + def response; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#13 +Aws::Waiters::Errors::FailureStateError::MSG = T.let(T.unsafe(nil), String) + +# Raised when attempting to get a waiter by name and the waiter has not +# been defined. +# +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#56 +class Aws::Waiters::Errors::NoSuchWaiterError < ::ArgumentError + # @return [NoSuchWaiterError] a new instance of NoSuchWaiterError + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#60 + def initialize(waiter_name, waiter_names); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#58 +Aws::Waiters::Errors::NoSuchWaiterError::MSG = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#26 +class Aws::Waiters::Errors::TooManyAttemptsError < ::Aws::Waiters::Errors::WaiterFailed + # @return [TooManyAttemptsError] a new instance of TooManyAttemptsError + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#30 + def initialize(attempts); end + + # @return [Integer] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#36 + def attempts; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#28 +Aws::Waiters::Errors::TooManyAttemptsError::MSG = T.let(T.unsafe(nil), String) + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#40 +class Aws::Waiters::Errors::UnexpectedError < ::Aws::Waiters::Errors::WaiterFailed + # @return [UnexpectedError] a new instance of UnexpectedError + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#44 + def initialize(error); end + + # @return [Exception] The unexpected error. + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#50 + def error; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#42 +Aws::Waiters::Errors::UnexpectedError::MSG = T.let(T.unsafe(nil), String) + +# Raised when a waiter detects a condition where the waiter can never +# succeed. +# +# source://aws-sdk-core//lib/aws-sdk-core/waiters/errors.rb#9 +class Aws::Waiters::Errors::WaiterFailed < ::StandardError; end + +# Polls a single API operation inspecting the response data and/or error +# for states matching one of its acceptors. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#9 +class Aws::Waiters::Poller + # @api private + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Poller] a new instance of Poller + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#17 + def initialize(options = T.unsafe(nil)); end + + # Makes an API call, returning the resultant state and the response. + # + # * `:success` - A success state has been matched. + # * `:failure` - A terminate failure state has been matched. + # * `:retry` - The waiter may be retried. + # * `:error` - The waiter encountered an un-expected error. + # + # @api private + # @example A trival (bad) example of a waiter that polls indefinetly. + # + # loop do + # + # state, resp = poller.call(client:client, params:{}) + # + # case state + # when :success then return true + # when :failure then return false + # when :retry then next + # when :error then raise 'oops' + # end + # + # end + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#50 + def call(options = T.unsafe(nil)); end + + # @api private + # @return [Symbol] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#23 + def operation_name; end + + private + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#70 + def acceptor_matches?(acceptor, response); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#98 + def matches_error?(acceptor, response); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#74 + def matches_path?(acceptor, response); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#82 + def matches_pathAll?(acceptor, response); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#88 + def matches_pathAny?(acceptor, response); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#94 + def matches_status?(acceptor, response); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#107 + def non_empty_array(acceptor, response, &block); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#103 + def path(acceptor); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#62 + def send_request(options); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/waiters/poller.rb#12 +Aws::Waiters::Poller::RAISE_HANDLER = Seahorse::Client::Plugins::RaiseResponseErrors::Handler + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#6 +class Aws::Waiters::Waiter + # @api private + # @return [Waiter] a new instance of Waiter + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#12 + def initialize(options = T.unsafe(nil)); end + + # Register a callback that is invoked before every polling attempt. + # Yields the number of attempts made so far. + # + # waiter.before_attempt do |attempts| + # puts "#{attempts} made, about to make attempt #{attempts + 1}" + # end + # + # Throwing `:success` or `:failure` from the given block will stop + # the waiter and return or raise. You can pass a custom message to the + # throw: + # + # # raises Aws::Waiters::Errors::WaiterFailed + # waiter.before_attempt do |attempts| + # throw :failure, 'custom-error-message' + # end + # + # # cause the waiter to stop polling and return + # waiter.before_attempt do |attempts| + # throw :success + # end + # + # @api private + # @yieldparam attempts [Integer] The number of attempts made. + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#54 + def before_attempt(&block); end + + # Register a callback that is invoked after an attempt but before + # sleeping. Yields the number of attempts made and the previous response. + # + # waiter.before_wait do |attempts, response| + # puts "#{attempts} made" + # puts response.error.inspect + # puts response.data.inspect + # end + # + # Throwing `:success` or `:failure` from the given block will stop + # the waiter and return or raise. You can pass a custom message to the + # throw: + # + # # raises Aws::Waiters::Errors::WaiterFailed + # waiter.before_attempt do |attempts| + # throw :failure, 'custom-error-message' + # end + # + # # cause the waiter to stop polling and return + # waiter.before_attempt do |attempts| + # throw :success + # end + # + # @api private + # @yieldparam attempts [Integer] The number of attempts already made. + # @yieldparam response [Seahorse::Client::Response] The response from + # the previous polling attempts. + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#85 + def before_wait(&block); end + + # @api private + # @return [Float] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#27 + def delay; end + + # @api private + # @return [Float] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#27 + def delay=(_arg0); end + + # @api private + # @return [Float] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#27 + def interval; end + + # @api private + # @return [Float] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#27 + def interval=(_arg0); end + + # @api private + # @return [Integer] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#24 + def max_attempts; end + + # @api private + # @return [Integer] + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#24 + def max_attempts=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#21 + def poller; end + + # @api private + # @option options + # @option options + # @param options [Hash] a customizable set of options + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#91 + def wait(options); end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#102 + def poll(options); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#124 + def trigger_before_attempt(attempts); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#128 + def trigger_before_wait(attempts, response); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/waiters/waiter.rb#9 +Aws::Waiters::Waiter::RAISE_HANDLER = Seahorse::Client::Plugins::RaiseResponseErrors::Handler + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#6 +module Aws::Xml; end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#7 +class Aws::Xml::Builder + include ::Seahorse::Model::Shapes + + # @return [Builder] a new instance of Builder + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#11 + def initialize(rules, options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#19 + def serialize(params); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#19 + def to_xml(params); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#99 + def blob(value); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#50 + def list(name, ref, values); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#65 + def map(name, ref, hash); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#87 + def member(name, ref, value); end + + # The `args` list may contain: + # + # * [] - empty, no value or attributes + # * [value] - inline element, no attributes + # * [value, attributes_hash] - inline element with attributes + # * [attributes_hash] - self closing element with attributes + # + # Pass a block if you want to nest XML nodes inside. When doing this, + # you may *not* pass a value to the `args` list. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#124 + def node(name, ref, *args, &block); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#131 + def shape_attrs(ref); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#27 + def structure(name, ref, values); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#41 + def structure_attrs(ref, values); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#104 + def timestamp(ref, value); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/builder.rb#143 + def xml_attribute?(ref); end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/xml/default_list.rb#6 +class Aws::Xml::DefaultList < ::Array + # @api private + def nil?; end +end + +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/xml/default_map.rb#6 +class Aws::Xml::DefaultMap < ::Hash + # @api private + def nil?; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#5 +class Aws::Xml::DocBuilder + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [DocBuilder] a new instance of DocBuilder + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#10 + def initialize(options = T.unsafe(nil)); end + + # @overload node + # @overload node + # @overload node + # @return [void] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#36 + def node(name, *args, &block); end + + # Returns the value of attribute target. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#21 + def target; end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#78 + def attributes(attr); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#65 + def close_el(name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#53 + def empty_element(name, attrs); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#69 + def escape(string, text_or_attr); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#88 + def increase_pad(&block); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#57 + def inline_element(name, value, attrs); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/doc_builder.rb#61 + def open_el(name, attrs); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#7 +class Aws::Xml::ErrorHandler < ::Seahorse::Client::Handler + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#9 + def call(context); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#18 + def error(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#61 + def error_code(body, context); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#42 + def error_data(context, code); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#90 + def error_message(body); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#33 + def extract_error(body, context); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#69 + def http_status_error_code(context); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#82 + def remove_prefix(error_code, context); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#98 + def request_id(body); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/error_handler.rb#104 + def unescape(str); end +end + +# A SAX-style XML parser that uses a shape context to handle types. +# +# @api private +# +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#7 +class Aws::Xml::Parser + include ::Seahorse::Model::Shapes + + # @api private + # @param rules [Seahorse::Model::ShapeRef] + # @return [Parser] a new instance of Parser + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#10 + def initialize(rules, options = T.unsafe(nil)); end + + # Parses the XML document, returning a parsed structure. + # + # If you pass a block, this will yield for XML + # elements that are not modeled in the rules given + # to the constructor. + # + # parser.parse(xml) do |path, value| + # puts "uhandled: #{path.join('/')} - #{value}" + # end + # + # The purpose of the unhandled callback block is to + # allow callers to access values such as the EC2 + # request ID that are part of the XML body but not + # part of the operation result. + # + # @api private + # @param xml [String] An XML document string to parse. + # @param target [Structure] (nil) + # @return [Structure] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#33 + def parse(xml, target = T.unsafe(nil), &unhandled_callback); end + + class << self + # @api private + # @return [Class] Returns the default parsing engine. + # One of: + # + # * {OxEngine} + # * {OgaEngine} + # * {LibxmlEngine} + # * {NokogiriEngine} + # * {RexmlEngine} + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#64 + def engine; end + + # @api private + # @param engine [Symbol, Class] Must be one of the following values: + # + # * :ox + # * :oga + # * :libxml + # * :nokogiri + # * :rexml + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#51 + def engine=(engine); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#69 + def set_default_engine; end + + private + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#82 + def load_engine(name); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser.rb#88 + def try_load_engine(name); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#267 +class Aws::Xml::Parser::BlobFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#268 + def result; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#273 +class Aws::Xml::Parser::BooleanFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#274 + def result; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#317 +Aws::Xml::Parser::FRAME_CLASSES = T.let(T.unsafe(nil), Hash) + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#176 +class Aws::Xml::Parser::FlatListFrame < ::Aws::Xml::Parser::Frame + # @return [FlatListFrame] a new instance of FlatListFrame + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#178 + def initialize(xml_name, *args); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#191 + def child_frame(xml_name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#195 + def consume_child_frame(child); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#183 + def result; end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#187 + def set_text(value); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#279 +class Aws::Xml::Parser::FloatFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#280 + def result; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#9 +class Aws::Xml::Parser::Frame + include ::Seahorse::Model::Shapes + + # @return [Frame] a new instance of Frame + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#40 + def initialize(path, parent, ref, result); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#58 + def child_frame(xml_name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#62 + def consume_child_frame(child); end + + # Returns the value of attribute parent. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#48 + def parent; end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#65 + def path; end + + # Returns the value of attribute ref. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#50 + def ref; end + + # Returns the value of attribute result. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#52 + def result; end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#54 + def set_text(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#74 + def yield_unhandled_value(path, value); end + + class << self + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#15 + def new(path, parent, ref, result = T.unsafe(nil)); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#27 + def frame_class(ref); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#285 +class Aws::Xml::Parser::IntegerFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#286 + def result; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#154 +class Aws::Xml::Parser::ListFrame < ::Aws::Xml::Parser::Frame + # @return [ListFrame] a new instance of ListFrame + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#156 + def initialize(*args); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#162 + def child_frame(xml_name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#170 + def consume_child_frame(child); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#222 +class Aws::Xml::Parser::MapEntryFrame < ::Aws::Xml::Parser::Frame + # @return [MapEntryFrame] a new instance of MapEntryFrame + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#224 + def initialize(xml_name, *args); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#238 + def child_frame(xml_name); end + + # @return [StringFrame] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#233 + def key; end + + # @return [Frame] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#236 + def value; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#201 +class Aws::Xml::Parser::MapFrame < ::Aws::Xml::Parser::Frame + # @return [MapFrame] a new instance of MapFrame + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#203 + def initialize(*args); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#208 + def child_frame(xml_name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#216 + def consume_child_frame(child); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#8 +class Aws::Xml::Parser::NokogiriEngine + # @return [NokogiriEngine] a new instance of NokogiriEngine + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#10 + def initialize(stack); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#32 + def characters(chars); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#21 + def comment(*args); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#20 + def end_document; end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#36 + def end_element_namespace(*ignored); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#40 + def error(msg); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#14 + def parse(xml); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#19 + def start_document; end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#23 + def start_element_namespace(element_name, attributes = T.unsafe(nil), *ignored); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/engines/nokogiri.rb#18 + def xmldecl(*args); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#250 +class Aws::Xml::Parser::NullFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#255 + def set_text(value); end + + class << self + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#251 + def new(xml_name, parent); end + end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/parsing_error.rb#6 +class Aws::Xml::Parser::ParsingError < ::RuntimeError + # @return [ParsingError] a new instance of ParsingError + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/parsing_error.rb#8 + def initialize(msg, line, column); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/parsing_error.rb#16 + def column; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/parsing_error.rb#13 + def line; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#6 +class Aws::Xml::Parser::Stack + # @return [Stack] a new instance of Stack + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#8 + def initialize(ref, result = T.unsafe(nil), &unhandled_callback); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#23 + def attr(name, value); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#50 + def child_frame(name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#54 + def consume_child_frame(frame); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#37 + def end_element(*args); end + + # @raise [ParsingError] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#46 + def error(msg, line = T.unsafe(nil), column = T.unsafe(nil)); end + + # Returns the value of attribute frame. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#15 + def frame; end + + # Returns the value of attribute result. + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#17 + def result; end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#19 + def start_element(name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#33 + def text(value); end + + # @api private + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/stack.rb#59 + def yield_unhandled_value(path, value); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#291 +class Aws::Xml::Parser::StringFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#292 + def result; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#80 +class Aws::Xml::Parser::StructureFrame < ::Aws::Xml::Parser::Frame + # @return [StructureFrame] a new instance of StructureFrame + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#82 + def initialize(xml_name, parent, ref, result = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#95 + def child_frame(xml_name); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#105 + def consume_child_frame(child); end + + private + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#133 + def apply_default_value(name, ref); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#148 + def flattened_list?(ref); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#140 + def xml_name(ref); end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#297 +class Aws::Xml::Parser::TimestampFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#301 + def parse(value); end + + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#298 + def result; end +end + +# source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#261 +class Aws::Xml::Parser::UnknownMemberFrame < ::Aws::Xml::Parser::Frame + # source://aws-sdk-core//lib/aws-sdk-core/xml/parser/frame.rb#262 + def result; end +end + +class Net::HTTPGenericRequest + include ::Seahorse::Client::NetHttp::Patches::PatchDefaultContentType +end + +# source://aws-sdk-core//lib/seahorse/util.rb#5 +module Seahorse; end + +# source://aws-sdk-core//lib/seahorse/client/block_io.rb#4 +module Seahorse::Client; end + +# source://aws-sdk-core//lib/seahorse/client/async_base.rb#5 +class Seahorse::Client::AsyncBase < ::Seahorse::Client::Base + # @return [AsyncBase] a new instance of AsyncBase + # + # source://aws-sdk-core//lib/seahorse/client/async_base.rb#14 + def initialize(plugins, options); end + + # Closes the underlying HTTP2 Connection for the client + # + # @return [Symbol] Returns the status of the connection (:closed) + # + # source://aws-sdk-core//lib/seahorse/client/async_base.rb#31 + def close_connection; end + + # @return [H2::Connection] + # + # source://aws-sdk-core//lib/seahorse/client/async_base.rb#21 + def connection; end + + # source://aws-sdk-core//lib/seahorse/client/async_base.rb#45 + def connection_errors; end + + # Creates a new HTTP2 Connection for the client + # + # @return [Seahorse::Client::H2::Connection] + # + # source://aws-sdk-core//lib/seahorse/client/async_base.rb#37 + def new_connection; end + + # @return [Array] Returns a list of valid async request + # operation names. + # + # source://aws-sdk-core//lib/seahorse/client/async_base.rb#25 + def operation_names; end +end + +# source://aws-sdk-core//lib/seahorse/client/async_response.rb#5 +class Seahorse::Client::AsyncResponse + # @return [AsyncResponse] a new instance of AsyncResponse + # + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#7 + def initialize(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#15 + def context; end + + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#19 + def error; end + + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#50 + def join!; end + + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#23 + def on(range, &block); end + + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#28 + def on_complete(&block); end + + # source://aws-sdk-core//lib/seahorse/client/async_response.rb#33 + def wait; end +end + +# source://aws-sdk-core//lib/seahorse/client/base.rb#7 +class Seahorse::Client::Base + include ::Seahorse::Client::HandlerBuilder + + # @api private + # @return [Base] a new instance of Base + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#21 + def initialize(plugins, options); end + + # Builds and returns a {Request} for the named operation. The request + # will not have been sent. + # + # @param operation_name [Symbol, String] + # @return [Request] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#37 + def build_request(operation_name, params = T.unsafe(nil)); end + + # @return [Configuration] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#28 + def config; end + + # @return [HandlerList] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#31 + def handlers; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#44 + def inspect; end + + # @return [Array] Returns a list of valid request operation + # names. These are valid arguments to {#build_request} and are also + # valid methods. + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#51 + def operation_names; end + + private + + # Gives each plugin the opportunity to modify this client. + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#79 + def after_initialize(plugins); end + + # Constructs a {Configuration} object and gives each plugin the + # opportunity to register options with default values. + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#59 + def build_config(plugins, options); end + + # Gives each plugin the opportunity to register handlers for this client. + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#69 + def build_handler_list(plugins); end + + # @return [RequestContext] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#86 + def context_for(operation_name, params); end + + class << self + # Registers a plugin with this client. + # + # @example Register a plugin + # + # ClientClass.add_plugin(PluginClass) + # @example Register a plugin by name + # + # ClientClass.add_plugin('gem-name.PluginClass') + # @example Register a plugin with an object + # + # plugin = MyPluginClass.new(options) + # ClientClass.add_plugin(plugin) + # @param plugin [Class, Symbol, String, Object] + # @return [void] + # @see .clear_plugins + # @see .set_plugins + # @see .remove_plugin + # @see .plugins + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#127 + def add_plugin(plugin); end + + # @return [Model::Api] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#171 + def api; end + + # @return [void] + # @see .set_plugins + # @see .add_plugin + # @see .remove_plugin + # @see .plugins + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#145 + def clear_plugins; end + + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Class] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#187 + def define(options = T.unsafe(nil)); end + + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Class] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#187 + def extend(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/seahorse/client/base.rb#97 + def new(options = T.unsafe(nil)); end + + # Returns the list of registered plugins for this Client. Plugins are + # inherited from the client super class when the client is defined. + # + # @return [Array] + # @see .clear_plugins + # @see .set_plugins + # @see .add_plugin + # @see .remove_plugin + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#166 + def plugins; end + + # @return [void] + # @see .clear_plugins + # @see .set_plugins + # @see .add_plugin + # @see .plugins + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#136 + def remove_plugin(plugin); end + + # @param api [Model::Api] + # @return [Model::Api] + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#177 + def set_api(api); end + + # @param plugins [Array] + # @return [void] + # @see .clear_plugins + # @see .add_plugin + # @see .remove_plugin + # @see .plugins + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#155 + def set_plugins(plugins); end + + private + + # source://aws-sdk-core//lib/seahorse/client/base.rb#215 + def before_initialize(plugins, options); end + + # source://aws-sdk-core//lib/seahorse/client/base.rb#211 + def build_plugins; end + + # source://aws-sdk-core//lib/seahorse/client/base.rb#199 + def define_operation_methods; end + + # @private + # + # source://aws-sdk-core//lib/seahorse/client/base.rb#221 + def inherited(subclass); end + end +end + +# source://aws-sdk-core//lib/seahorse/client/block_io.rb#5 +class Seahorse::Client::BlockIO + # @return [BlockIO] a new instance of BlockIO + # + # source://aws-sdk-core//lib/seahorse/client/block_io.rb#7 + def initialize(headers = T.unsafe(nil), &block); end + + # @param bytes [Integer] (nil) + # @param output_buffer [String] (nil) + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/client/block_io.rb#24 + def read(bytes = T.unsafe(nil), output_buffer = T.unsafe(nil)); end + + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/block_io.rb#30 + def size; end + + # @param chunk [String] + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/block_io.rb#15 + def write(chunk); end +end + +# Configuration is used to define possible configuration options and +# then build read-only structures with user-supplied data. +# +# ## Adding Configuration Options +# +# Add configuration options with optional default values. These are used +# when building configuration objects. +# +# configuration = Configuration.new +# +# configuration.add_option(:max_retries, 3) +# configuration.add_option(:use_ssl, true) +# +# cfg = configuration.build! +# #=> # +# +# ## Building Configuration Objects +# +# Calling {#build!} on a {Configuration} object causes it to return +# a read-only (frozen) struct. Options passed to {#build!} are merged +# on top of any default options. +# +# configuration = Configuration.new +# configuration.add_option(:color, 'red') +# +# # default +# cfg1 = configuration.build! +# cfg1.color #=> 'red' +# +# # supplied color +# cfg2 = configuration.build!(color: 'blue') +# cfg2.color #=> 'blue' +# +# ## Accepted Options +# +# If you try to {#build!} a {Configuration} object with an unknown +# option, an `ArgumentError` is raised. +# +# configuration = Configuration.new +# configuration.add_option(:color) +# configuration.add_option(:size) +# configuration.add_option(:category) +# +# configuration.build!(price: 100) +# #=> raises an ArgumentError, :price was not added as an option +# +# source://aws-sdk-core//lib/seahorse/client/configuration.rb#54 +class Seahorse::Client::Configuration + # @api private + # @return [Configuration] a new instance of Configuration + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#77 + def initialize; end + + # Adds a getter method that returns the named option or a default + # value. Default values can be passed as a static positional argument + # or via a block. + # + # # defaults to nil + # configuration.add_option(:name) + # + # # with a string default + # configuration.add_option(:name, 'John Doe') + # + # # with a dynamic default value, evaluated once when calling #build! + # configuration.add_option(:name, 'John Doe') + # configuration.add_option(:username) do |config| + # config.name.gsub(/\W+/, '').downcase + # end + # cfg = configuration.build! + # cfg.name #=> 'John Doe' + # cfg.username #=> 'johndoe' + # + # @param name [Symbol] The name of the configuration option. This will + # be used to define a getter by the same name. + # @param default The default value for this option. You can specify + # a default by passing a value, a `Proc` object or a block argument. + # Procs and blocks are evaluated when {#build!} is called. + # @return [self] + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#108 + def add_option(name, default = T.unsafe(nil), &block); end + + # Constructs and returns a configuration structure. + # Values not present in `options` will default to those supplied via + # add option. + # + # configuration = Configuration.new + # configuration.add_option(:enabled, true) + # + # cfg1 = configuration.build! + # cfg1.enabled #=> true + # + # cfg2 = configuration.build!(enabled: false) + # cfg2.enabled #=> false + # + # If you pass in options to `#build!` that have not been defined, + # then an `ArgumentError` will be raised. + # + # configuration = Configuration.new + # configuration.add_option(:enabled, true) + # + # # oops, spelling error for :enabled + # cfg = configuration.build!(enabld: true) + # #=> raises ArgumentError + # + # The object returned is a frozen `Struct`. + # + # configuration = Configuration.new + # configuration.add_option(:enabled, true) + # + # cfg = configuration.build! + # cfg.enabled #=> true + # cfg[:enabled] #=> true + # cfg['enabled'] #=> true + # + # @param options [Hash] ({}) A hash of configuration options. + # @return [Struct] Returns a frozen configuration `Struct`. + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#149 + def build!(options = T.unsafe(nil)); end + + private + + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#173 + def apply_defaults(struct, options); end + + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#162 + def apply_options(struct, options); end + + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#158 + def empty_struct; end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/configuration.rb#183 +class Seahorse::Client::Configuration::DefaultResolver + # @api private + # @return [DefaultResolver] a new instance of DefaultResolver + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#185 + def initialize(struct); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#198 + def override_config(k, v); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#190 + def resolve; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#194 + def respond_to?(method_name, *args); end + + private + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#222 + def method_missing(method_name, *args); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#213 + def resolve_defaults(opt_name, defaults); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#204 + def value_at(opt_name); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/configuration.rb#57 +class Seahorse::Client::Configuration::Defaults < ::Array + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#58 + def each(&block); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/configuration.rb#64 +class Seahorse::Client::Configuration::DynamicDefault + # @api private + # @return [DynamicDefault] a new instance of DynamicDefault + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#67 + def initialize(block = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#65 + def block; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#65 + def block=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/configuration.rb#71 + def call(*args); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#12 +module Seahorse::Client::H2; end + +# H2 Connection build on top of `http/2` gem +# (requires Ruby >= 2.1) +# with TLS layer plus ALPN, requires: +# Ruby >= 2.3 and OpenSSL >= 1.0.2 +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#18 +class Seahorse::Client::H2::Connection + # @api private + # @return [Connection] a new instance of Connection + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#38 + def initialize(options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#141 + def close!; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#152 + def closed?; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#75 + def connect(endpoint); end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def connection_read_timeout; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def connection_timeout; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#156 + def debug_output(msg, type = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def enable_alpn; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#63 + def errors; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def http_wire_trace; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#65 + def input_signal_thread; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#65 + def input_signal_thread=(_arg0); end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def logger; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def max_concurrent_streams; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#67 + def new_stream; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def ssl_ca_bundle; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def ssl_ca_directory; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def ssl_ca_store; end + + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def ssl_verify_peer; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#58 + def ssl_verify_peer?; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#105 + def start(stream); end + + private + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#169 + def _debug_entry(str); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#238 + def _default_ca_bundle; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#243 + def _default_ca_directory; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#205 + def _nonblocking_connect(tcp, addr); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#174 + def _register_h2_callbacks; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#195 + def _tcp_socket(endpoint); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#221 + def _tls_context; end +end + +# chunk read size at socket +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#34 +Seahorse::Client::H2::Connection::CHUNKSIZE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#20 +Seahorse::Client::H2::Connection::OPTIONS = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/connection.rb#36 +Seahorse::Client::H2::Connection::SOCKET_FAMILY = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#22 +Seahorse::Client::H2::DNS_ERROR_MESSAGES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#27 +class Seahorse::Client::H2::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#29 + def call(context); end + + private + + # H2 pseudo headers + # https://http2.github.io/http2-spec/#rfc.section.8.1.2.3 + # + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#127 + def _h2_headers(req); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#85 + def _register_callbacks(resp, stream, stream_mutex, close_condition, sync_queue); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#115 + def _send_initial_data(req, stream); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#106 + def _send_initial_headers(req, stream); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#139 + def error_message(req, error); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/h2/handler.rb#14 +Seahorse::Client::H2::NETWORK_ERRORS = T.let(T.unsafe(nil), Array) + +# source://aws-sdk-core//lib/seahorse/client/handler.rb#5 +class Seahorse::Client::Handler + # @param handler [Handler] (nil) The next handler in the stack that + # should be called from within the {#call} method. This value + # must only be nil for send handlers. + # @return [Handler] a new instance of Handler + # + # source://aws-sdk-core//lib/seahorse/client/handler.rb#10 + def initialize(handler = T.unsafe(nil)); end + + # @param context [RequestContext] + # @return [Response] + # + # source://aws-sdk-core//lib/seahorse/client/handler.rb#19 + def call(context); end + + # @return [Handler, nil] + # + # source://aws-sdk-core//lib/seahorse/client/handler.rb#15 + def handler; end + + # @return [Handler, nil] + # + # source://aws-sdk-core//lib/seahorse/client/handler.rb#15 + def handler=(_arg0); end + + # source://aws-sdk-core//lib/seahorse/client/handler.rb#23 + def inspect; end +end + +# This module provides the ability to add handlers to a class or +# module. The including class or extending module must respond to +# `#handlers`, returning a {HandlerList}. +# +# source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#9 +module Seahorse::Client::HandlerBuilder + # source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#26 + def handle(*args, &block); end + + # source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#11 + def handle_request(*args, &block); end + + # source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#18 + def handle_response(*args, &block); end + + # source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#26 + def handler(*args, &block); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#34 + def handler_for(name = T.unsafe(nil), &block); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/handler_builder.rb#43 + def new_handler(block); end +end + +# source://aws-sdk-core//lib/seahorse/client/handler_list.rb#8 +class Seahorse::Client::HandlerList + include ::Enumerable + + # @api private + # @return [HandlerList] a new instance of HandlerList + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#13 + def initialize(options = T.unsafe(nil)); end + + # Registers a handler. Handlers are used to build a handler stack. + # Handlers default to the `:build` step with default priority of 50. + # The step and priority determine where in the stack a handler + # will be. + # + # ## Handler Stack Ordering + # + # A handler stack is built from the inside-out. The stack is + # seeded with the send handler. Handlers are constructed recursively + # in reverse step and priority order so that the highest priority + # handler is on the outside. + # + # By constructing the stack from the inside-out, this ensures + # that the validate handlers will be called first and the sign handlers + # will be called just before the final and only send handler is called. + # + # ## Steps + # + # Handlers are ordered first by step. These steps represent the + # life-cycle of a request. Valid steps are: + # + # * `:initialize` + # * `:validate` + # * `:build` + # * `:sign` + # * `:send` + # + # Many handlers can be added to the same step, except for `:send`. + # There can be only one `:send` handler. Adding an additional + # `:send` handler replaces the previous one. + # + # ## Priorities + # + # Handlers within a single step are executed in priority order. The + # higher the priority, the earlier in the stack the handler will + # be called. + # + # * Handler priority is an integer between 0 and 99, inclusively. + # * Handler priority defaults to 50. + # * When multiple handlers are added to the same step with the same + # priority, the last one added will have the highest priority and + # the first one added will have the lowest priority. + # + # @note There can be only one `:send` handler. Adding an additional + # send handler replaces the previous. + # @option options + # @option options + # @option options + # @param handler_class [Class] This should be a subclass + # of {Handler}. + # @param options [Hash] a customizable set of options + # @raise [InvalidStepError] + # @raise [InvalidPriorityError] + # @return [Class] Returns the handler class that was added. + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#105 + def add(handler_class, options = T.unsafe(nil)); end + + # Copies handlers from the `source_list` onto the current handler list. + # If a block is given, only the entries that return a `true` value + # from the block will be copied. + # + # @param source_list [HandlerList] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#129 + def copy_from(source_list, &block); end + + # Yields the handlers in stack order, which is reverse priority. + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#151 + def each(&block); end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#22 + def entries; end + + # Returns a handler list for the given operation. The returned + # will have the operation specific handlers merged with the common + # handlers. + # + # @param operation [String] The name of an operation. + # @return [HandlerList] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#146 + def for(operation); end + + # @param handler_class [Class] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#118 + def remove(handler_class); end + + # Constructs the handlers recursively, building a handler stack. + # The `:send` handler will be at the top of the stack and the + # `:validate` handlers will be at the bottom. + # + # @return [Handler] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#161 + def to_stack; end + + private + + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#167 + def add_entries(entries); end + + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#173 + def add_entry(entry); end + + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#178 + def filter(operation); end + + # source://aws-sdk-core//lib/seahorse/client/handler_list.rb#189 + def next_index; end +end + +# A container for an un-constructed handler. A handler entry has the +# handler class, and information about handler priority/order. +# +# This class is an implementation detail of the {HandlerList} class. +# Do not rely on public interfaces of this class. +# +# source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#11 +class Seahorse::Client::HandlerListEntry + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [HandlerListEntry] a new instance of HandlerListEntry + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#28 + def initialize(options); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#62 + def <=>(other); end + + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [HandlerListEntry] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#72 + def copy(options = T.unsafe(nil)); end + + # @return [Handler, Class] Returns the handler. This may + # be a constructed handler object or a handler class. + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#41 + def handler_class; end + + # @return [Integer] The insertion order/position. This is used to + # determine sort order when two entries have the same priority. + # Entries inserted later (with a higher inserted value) have a + # lower priority. + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#47 + def inserted; end + + # @return [Set] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#56 + def operations; end + + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#53 + def priority; end + + # @return [Symbol] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#50 + def step; end + + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#59 + def weight; end + + private + + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#106 + def compute_weight; end + + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#78 + def option(name, options); end + + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#97 + def set_priority(priority); end + + # source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#87 + def set_step(step); end +end + +# source://aws-sdk-core//lib/seahorse/client/handler_list_entry.rb#13 +Seahorse::Client::HandlerListEntry::STEPS = T.let(T.unsafe(nil), Hash) + +# source://aws-sdk-core//lib/seahorse/client/http/headers.rb#5 +module Seahorse::Client::Http; end + +# Rasied when trying to use an closed connection +# +# source://aws-sdk-core//lib/seahorse/client/networking_error.rb#43 +class Seahorse::Client::Http2ConnectionClosedError < ::StandardError; end + +# Raised when sending initial headers and data failed +# for event stream requests over Http2 +# +# source://aws-sdk-core//lib/seahorse/client/networking_error.rb#19 +class Seahorse::Client::Http2InitialRequestError < ::StandardError + # @return [Http2InitialRequestError] a new instance of Http2InitialRequestError + # + # source://aws-sdk-core//lib/seahorse/client/networking_error.rb#21 + def initialize(error); end + + # @return [HTTP2::Error] + # + # source://aws-sdk-core//lib/seahorse/client/networking_error.rb#26 + def original_error; end +end + +# Raised when connection failed to initialize a new stream +# +# source://aws-sdk-core//lib/seahorse/client/networking_error.rb#31 +class Seahorse::Client::Http2StreamInitializeError < ::StandardError + # @return [Http2StreamInitializeError] a new instance of Http2StreamInitializeError + # + # source://aws-sdk-core//lib/seahorse/client/networking_error.rb#33 + def initialize(error); end + + # @return [HTTP2::Error] + # + # source://aws-sdk-core//lib/seahorse/client/networking_error.rb#38 + def original_error; end +end + +# source://aws-sdk-core//lib/seahorse/client/http/async_response.rb#6 +class Seahorse::Client::Http::AsyncResponse < ::Seahorse::Client::Http::Response + # @return [AsyncResponse] a new instance of AsyncResponse + # + # source://aws-sdk-core//lib/seahorse/client/http/async_response.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/seahorse/client/http/async_response.rb#24 + def signal_done(options = T.unsafe(nil)); end + + # source://aws-sdk-core//lib/seahorse/client/http/async_response.rb#12 + def signal_headers(headers); end +end + +# Provides a Hash-like interface for HTTP headers. Header names +# are treated indifferently as lower-cased strings. Header values +# are cast to strings. +# +# headers = Http::Headers.new +# headers['Content-Length'] = 100 +# headers[:Authorization] = 'Abc' +# +# headers.keys +# #=> ['content-length', 'authorization'] +# +# headers.values +# #=> ['100', 'Abc'] +# +# You can get the header values as a vanilla hash by calling {#to_h}: +# +# headers.to_h +# #=> { 'content-length' => '100', 'authorization' => 'Abc' } +# +# source://aws-sdk-core//lib/seahorse/client/http/headers.rb#26 +class Seahorse::Client::Http::Headers + include ::Enumerable + + # @api private + # @return [Headers] a new instance of Headers + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#31 + def initialize(headers = T.unsafe(nil)); end + + # @param key [String] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#40 + def [](key); end + + # @param key [String] + # @param value [String] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#46 + def []=(key, value); end + + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#64 + def clear; end + + # @param key [String] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#60 + def delete(key); end + + # @return [nil] + # @yield [key, value] + # @yieldparam key [String] + # @yieldparam value [String] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#87 + def each(&block); end + + # @return [nil] + # @yield [key, value] + # @yieldparam key [String] + # @yieldparam value [String] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#87 + def each_pair(&block); end + + # @return [Boolean] Returns `true` if the header is set. + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#100 + def has_key?(key); end + + # @return [Boolean] Returns `true` if the header is set. + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#100 + def include?(key); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#113 + def inspect; end + + # @return [Boolean] Returns `true` if the header is set. + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#100 + def key?(key); end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#69 + def keys; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#107 + def to_h; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#107 + def to_hash; end + + # @param headers [Hash] + # @return [Headers] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#52 + def update(headers); end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#74 + def values; end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/client/http/headers.rb#79 + def values_at(*keys); end +end + +# source://aws-sdk-core//lib/seahorse/client/http/request.rb#9 +class Seahorse::Client::Http::Request + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Request] a new instance of Request + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#15 + def initialize(options = T.unsafe(nil)); end + + # @return [IO] + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#46 + def body; end + + # @param io [#read, #size, #rewind] + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#59 + def body=(io); end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#51 + def body_contents; end + + # @return [URI::HTTP, URI::HTTPS, nil] + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#29 + def endpoint; end + + # @param endpoint [String, URI::HTTP, URI::HTTPS, nil] + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#34 + def endpoint=(endpoint); end + + # @return [Headers] The hash of request headers. + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#26 + def headers; end + + # @return [Headers] The hash of request headers. + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#26 + def headers=(_arg0); end + + # @return [String] The HTTP request method, e.g. `GET`, `PUT`, etc. + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#23 + def http_method; end + + # @return [String] The HTTP request method, e.g. `GET`, `PUT`, etc. + # + # source://aws-sdk-core//lib/seahorse/client/http/request.rb#23 + def http_method=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/client/http/response.rb#6 +class Seahorse::Client::Http::Response + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Response] a new instance of Response + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#11 + def initialize(options = T.unsafe(nil)); end + + # @return [IO] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#32 + def body; end + + # @param io [#read, #size, #rewind] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#37 + def body=(io); end + + # @return [String|Array] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#46 + def body_contents; end + + # @return [StandardError, nil] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#29 + def error; end + + # @return [Headers] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#26 + def headers; end + + # @return [Headers] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#26 + def headers=(_arg0); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#130 + def on_data(&callback); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#134 + def on_done(status_code_range = T.unsafe(nil), &callback); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#151 + def on_error(&callback); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#126 + def on_headers(status_code_range = T.unsafe(nil), &block); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#143 + def on_success(status_code_range = T.unsafe(nil), &callback); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#159 + def reset; end + + # @param chunk [string] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#67 + def signal_data(chunk); end + + # Completes the http response. + # + # @example Completing the response in a single call + # + # http_response.signal_done( + # status_code: 200, + # headers: {}, + # body: '' + # ) + # @example Complete the response in parts + # + # # signal headers straight-way + # http_response.signal_headers(200, {}) + # + # # signal data as it is received from the socket + # http_response.signal_data("...") + # http_response.signal_data("...") + # http_response.signal_data("...") + # + # # signal done once the body data is all written + # http_response.signal_done + # @overload signal_done + # @overload signal_done + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#104 + def signal_done(options = T.unsafe(nil)); end + + # @param networking_error [StandardError] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#121 + def signal_error(networking_error); end + + # @param status_code [Integer] + # @param headers [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#60 + def signal_headers(status_code, headers); end + + # @return [Integer] Returns `0` if the request failed to generate + # any response. + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#23 + def status_code; end + + # @return [Integer] Returns `0` if the request failed to generate + # any response. + # + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#23 + def status_code=(_arg0); end + + private + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#181 + def emit(event_name, *args); end + + # source://aws-sdk-core//lib/seahorse/client/http/response.rb#168 + def listener(range, callback); end +end + +# @api private +# @deprecated Use Aws::Logging instead. +# +# source://aws-sdk-core//lib/seahorse/client/logging/handler.rb#7 +module Seahorse::Client::Logging; end + +# A log formatter receives a {Response} object and return +# a log message as a string. When you construct a {Formatter}, you provide +# a pattern string with substitutions. +# +# pattern = ':operation :http_response_status_code :time' +# formatter = Seahorse::Client::Logging::Formatter.new(pattern) +# formatter.format(response) +# #=> 'get_bucket 200 0.0352' +# +# # Canned Formatters +# +# Instead of providing your own pattern, you can choose a canned log +# formatter. +# +# * {Formatter.default} +# * {Formatter.colored} +# * {Formatter.short} +# +# # Pattern Substitutions +# +# You can put any of these placeholders into you pattern. +# +# * `:client_class` - The name of the client class. +# +# * `:operation` - The name of the client request method. +# +# * `:request_params` - The user provided request parameters. Long +# strings are truncated/summarized if they exceed the +# {#max_string_size}. Other objects are inspected. +# +# * `:time` - The total time in seconds spent on the +# request. This includes client side time spent building +# the request and parsing the response. +# +# * `:retries` - The number of times a client request was retried. +# +# * `:http_request_method` - The http request verb, e.g., `POST`, +# `PUT`, `GET`, etc. +# +# * `:http_request_endpoint` - The request endpoint. This includes +# the scheme, host and port, but not the path. +# +# * `:http_request_scheme` - This is replaced by `http` or `https`. +# +# * `:http_request_host` - The host name of the http request +# endpoint (e.g. 's3.amazon.com'). +# +# * `:http_request_port` - The port number (e.g. '443' or '80'). +# +# * `:http_request_headers` - The http request headers, inspected. +# +# * `:http_request_body` - The http request payload. +# +# * `:http_response_status_code` - The http response status +# code, e.g., `200`, `404`, `500`, etc. +# +# * `:http_response_headers` - The http response headers, inspected. +# +# * `:http_response_body` - The http response body contents. +# +# * `:error_class` +# +# * `:error_message` +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#75 +class Seahorse::Client::Logging::Formatter + # @api private + # @option options + # @param pattern [String] The log format pattern should be a string + # and may contain substitutions. + # @param options [Hash] a customizable set of options + # @return [Formatter] a new instance of Formatter + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#84 + def initialize(pattern, options = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#104 + def ==(other); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#104 + def eql?(other); end + + # Given a {Response}, this will format a log message and return it + # as a string. + # + # @api private + # @param response [Response] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#99 + def format(response); end + + # @api private + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#93 + def max_string_size; end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#90 + def pattern; end + + private + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#119 + def _client_class(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#185 + def _error_class(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#189 + def _error_message(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#165 + def _http_request_body(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#141 + def _http_request_endpoint(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#161 + def _http_request_headers(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#149 + def _http_request_host(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#157 + def _http_request_method(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#153 + def _http_request_port(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#145 + def _http_request_scheme(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#177 + def _http_response_body(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#173 + def _http_response_headers(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#169 + def _http_response_status_code(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#123 + def _operation(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#127 + def _request_params(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#137 + def _retries(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#131 + def _time(response); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#111 + def method_missing(method_name, *args); end + + # @api private + # @param array [Array] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#247 + def summarize_array(array); end + + # Given the path to a file on disk, this method returns a summarized + # inspecton string that includes the file size. + # + # @api private + # @param path [String] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#241 + def summarize_file(path); end + + # @api private + # @param hash [Hash] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#195 + def summarize_hash(hash); end + + # @api private + # @param str [String] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#228 + def summarize_string(str); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#207 + def summarize_string_hash(hash); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#201 + def summarize_symbol_hash(hash); end + + # @api private + # @param value [Object] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#215 + def summarize_value(value); end + + class << self + # The default log format with ANSI colors. + # + # @api private + # @example A sample of the colored format (sans the ansi colors). + # + # [ClientClass 200 0.580066 0 retries] list_objects(:bucket_name => 'bucket') + # @return [Formatter] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#300 + def colored; end + + # The default log format. + # + # @api private + # @example A sample of the default format. + # + # [ClientClass 200 0.580066 0 retries] list_objects(:bucket_name => 'bucket') + # @return [Formatter] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#261 + def default; end + + # The short log format. Similar to default, but it does not + # inspect the request params or report on retries. + # + # @api private + # @example A sample of the short format + # + # [ClientClass 200 0.494532] list_buckets + # @return [Formatter] + # + # source://aws-sdk-core//lib/seahorse/client/logging/formatter.rb#282 + def short; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/logging/handler.rb#8 +class Seahorse::Client::Logging::Handler < ::Seahorse::Client::Handler + # @api private + # @param context [RequestContext] + # @return [Response] + # + # source://aws-sdk-core//lib/seahorse/client/logging/handler.rb#12 + def call(context); end + + private + + # @api private + # @param config [Configuration] + # @param response [Response] + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/logging/handler.rb#32 + def format(config, response); end + + # @api private + # @param config [Configuration] + # @param response [Response] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/logging/handler.rb#25 + def log(config, response); end +end + +# This utility class is used to track files opened by Seahorse. +# This allows Seahorse to know what files it needs to close. +# +# source://aws-sdk-core//lib/seahorse/client/managed_file.rb#7 +class Seahorse::Client::ManagedFile < ::File + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/managed_file.rb#10 + def open?; end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/patches.rb#8 +module Seahorse::Client::NetHttp; end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#19 +class Seahorse::Client::NetHttp::ConnectionPool + # @api private + # @return [ConnectionPool] a new instance of ConnectionPool + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#41 + def initialize(options = T.unsafe(nil)); end + + # Removes stale http sessions from the pool (that have exceeded + # the idle timeout). + # + # @api private + # @return [nil] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#133 + def clean!; end + + # Closes and removes all sessions from the pool. + # If empty! is called while there are outstanding requests they may + # get checked back into the pool, leaving the pool in a non-empty + # state. + # + # @api private + # @return [nil] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#143 + def empty!; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_continue_timeout; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_idle_timeout; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_open_timeout; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_proxy; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_read_timeout; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_wire_trace; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def http_wire_trace?; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def logger; end + + # Makes an HTTP request, yielding a Net::HTTPResponse object. + # + # pool.request(URI.parse('http://domain'), Net::HTTP::Get.new('/')) do |resp| + # puts resp.code # status code + # puts resp.to_h.inspect # dump the headers + # puts resp.body + # end + # + # @api private + # @param endpoint [URI::HTTP, URI::HTTPS] The HTTP(S) endpoint + # to connect to (e.g. 'https://domain.com'). + # @param request [Net::HTTPRequest] The request to make. This can be + # any request object from Net::HTTP (e.g. Net::HTTP::Get, + # Net::HTTP::POST, etc). + # @return [nil] + # @yieldparam net_http_response [Net::HTTPResponse] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#75 + def request(endpoint, request, &block); end + + # @api private + # @param endpoint [URI::HTTP, URI::HTTPS] The HTTP(S) endpoint + # to connect to (e.g. 'https://domain.com'). + # @return [nil] + # @yieldparam session [Net::HTTPSession] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#87 + def session_for(endpoint, &block); end + + # @api private + # @return [Integer] Returns the count of sessions currently in the + # pool, not counting those currently in use. + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#120 + def size; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def ssl_ca_bundle; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def ssl_ca_directory; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def ssl_ca_store; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def ssl_timeout; end + + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def ssl_verify_peer; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#51 + def ssl_verify_peer?; end + + private + + # Removes stale sessions from the pool. This method *must* be called + # + # @api private + # @note **Must** be called behind a `@pool_mutex` synchronize block. + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#313 + def _clean; end + + # Extract the parts of the http_proxy URI + # + # @api private + # @return [Array(String)] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#265 + def http_proxy_parts; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#155 + def remove_path_and_query(endpoint); end + + # Starts and returns a new HTTP(S) session. + # + # @api private + # @param endpoint [String] + # @return [Net::HTTPSession] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#277 + def start_session(endpoint); end + + class << self + # Returns a connection pool constructed from the given options. + # Calling this method twice with the same options will return + # the same pool. + # + # @api private + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [ConnectionPool] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#219 + def for(options = T.unsafe(nil)); end + + # @api private + # @return [Array] Returns a list of the + # constructed connection pools. + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#228 + def pools; end + + private + + # Filters an option hash, merging in default values. + # + # @api private + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#238 + def pool_options(options); end + end +end + +# Helper methods extended onto Net::HTTPSession objects opened by the +# connection pool. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#328 +class Seahorse::Client::NetHttp::ConnectionPool::ExtendedSession + # @api private + # @return [ExtendedSession] a new instance of ExtendedSession + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#330 + def initialize(http); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#338 + def __getobj__; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#342 + def __setobj__(obj); end + + # Attempts to close/finish the session without raising an error. + # + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#353 + def finish; end + + # @api private + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#336 + def last_used; end + + # Sends the request and tracks that this session has been used. + # + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#347 + def request(*args, &block); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/connection_pool.rb#25 +Seahorse::Client::NetHttp::ConnectionPool::OPTIONS = T.let(T.unsafe(nil), Hash) + +# The default HTTP handler for Seahorse::Client. This is based on +# the Ruby's `Net::HTTP`. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#13 +class Seahorse::Client::NetHttp::Handler < ::Seahorse::Client::Handler + # @api private + # @param context [RequestContext] + # @return [Response] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#49 + def call(context); end + + # @api private + # @param config [Configuration] + # @return [ConnectionPool] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#56 + def pool_for(config); end + + private + + # Constructs and returns a Net::HTTP::Request object from + # a {Http::Request}. + # + # @api private + # @param request [Http::Request] + # @return [Net::HTTP::Request] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#151 + def build_net_request(request); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#105 + def complete_response(req, resp, bytes_received); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#62 + def error_message(req, error); end + + # @api private + # @param response [Net::HTTP::Response] + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#193 + def extract_headers(response); end + + # @api private + # @param request [Http::Request] + # @return [Hash] Returns a vanilla hash of headers to send with the + # HTTP request. + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#177 + def headers(request); end + + # @api private + # @param request [Http::Request] + # @raise [InvalidHttpVerbError] + # @return Returns a base `Net::HTTP::Request` class, e.g., + # `Net::HTTP::Get`, `Net::HTTP::Post`, etc. + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#167 + def net_http_request_class(request); end + + # Extracts the {ConnectionPool} configuration options. + # + # @api private + # @param config [Configuration] + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#140 + def pool_options(config); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#127 + def session(config, req, &block); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#113 + def should_verify_bytes?(req, resp); end + + # @api private + # @param config [Configuration] + # @param req [Http::Request] + # @param resp [Http::Response] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#75 + def transmit(config, req, resp); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#117 + def verify_bytes_received(resp, bytes_received); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#38 +Seahorse::Client::NetHttp::Handler::DNS_ERROR_MESSAGES = T.let(T.unsafe(nil), Array) + +# Raised when a {Handler} cannot construct a `Net::HTTP::Request` +# from the given http verb. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#45 +class Seahorse::Client::NetHttp::Handler::InvalidHttpVerbError < ::StandardError; end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#24 +Seahorse::Client::NetHttp::Handler::NETWORK_ERRORS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#16 +class Seahorse::Client::NetHttp::Handler::TruncatedBodyError < ::IOError + # @api private + # @return [TruncatedBodyError] a new instance of TruncatedBodyError + # + # source://aws-sdk-core//lib/seahorse/client/net_http/handler.rb#17 + def initialize(bytes_expected, bytes_received); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/patches.rb#11 +module Seahorse::Client::NetHttp::Patches + class << self + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/patches.rb#13 + def apply!; end + end +end + +# For requests with bodys, Net::HTTP sets a default content type of: +# 'application/x-www-form-urlencoded' +# There are cases where we should not send content type at all. +# Even when no body is supplied, Net::HTTP uses a default empty body +# and sets it anyway. This patch disables the behavior when a Thread +# local variable is set. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/net_http/patches.rb#26 +module Seahorse::Client::NetHttp::Patches::PatchDefaultContentType + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/net_http/patches.rb#27 + def supply_default_content_type; end +end + +# source://aws-sdk-core//lib/seahorse/client/networking_error.rb#5 +class Seahorse::Client::NetworkingError < ::StandardError + # @return [NetworkingError] a new instance of NetworkingError + # + # source://aws-sdk-core//lib/seahorse/client/networking_error.rb#7 + def initialize(error, msg = T.unsafe(nil)); end + + # Returns the value of attribute original_error. + # + # source://aws-sdk-core//lib/seahorse/client/networking_error.rb#13 + def original_error; end +end + +# source://aws-sdk-core//lib/seahorse/client/plugin.rb#5 +class Seahorse::Client::Plugin + extend ::Seahorse::Client::HandlerBuilder + + # @param handlers [HandlerList] + # @param config [Configuration] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#24 + def add_handlers(handlers, config); end + + # @param config [Configuration] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#11 + def add_options(config); end + + # @param client [Client::Base] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#39 + def after_initialize(client); end + + # @param client_class [Class] + # @param options [Hash] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#31 + def before_initialize(client_class, options); end + + class << self + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#71 + def after_initialize(&block); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#91 + def after_initialize_hooks; end + + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#67 + def before_initialize(&block); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#86 + def before_initialize_hooks; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#81 + def handlers; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#96 + def literal(string); end + + # @option options + # @option options + # @option options + # @option options + # @option options + # @overload option + # @param options [Hash] a customizable set of options + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#54 + def option(name, default = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#76 + def options; end + end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugin.rb#110 +class Seahorse::Client::Plugin::PluginOption + # @api private + # @return [PluginOption] a new instance of PluginOption + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#112 + def initialize(name, options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#121 + def default; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#121 + def default=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#122 + def default_block; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#122 + def default_block=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#128 + def doc_default(options); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#125 + def doc_default=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#124 + def doc_type; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#124 + def doc_type=(_arg0); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#126 + def docstring; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#126 + def docstring=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#136 + def documented?; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#120 + def name; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#123 + def required; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin.rb#123 + def required=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#8 +class Seahorse::Client::PluginList + include ::Enumerable + + # @option options + # @param plugins [Array, Set] + # @param options [Hash] a customizable set of options + # @return [PluginList] a new instance of PluginList + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#14 + def initialize(plugins = T.unsafe(nil), options = T.unsafe(nil)); end + + # Adds and returns the `plugin`. + # + # @param plugin [Plugin] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#27 + def add(plugin); end + + # Enumerates the plugins. + # + # @return [Enumerator] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#59 + def each(&block); end + + # Removes and returns the `plugin`. + # + # @param plugin [Plugin] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#37 + def remove(plugin); end + + # Replaces the existing list of plugins. + # + # @param plugins [Array] + # @return [void] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#47 + def set(plugins); end + + private + + # Not safe to call outside the mutex. + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#68 + def _add(plugin); end + + # Yield each PluginDetail behind the mutex + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#73 + def each_plugin(&block); end +end + +# A utility class that computes the canonical name for a plugin +# and defers requiring the plugin until the plugin class is +# required. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#83 +class Seahorse::Client::PluginList::PluginWrapper + # @api private + # @param plugin [String, Symbol, Module, Class] + # @return [PluginWrapper] a new instance of PluginWrapper + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#86 + def initialize(plugin); end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#103 + def canonical_name; end + + # @api private + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#121 + def eql?(other); end + + # @api private + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#127 + def hash; end + + # @api private + # @return [Class] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#106 + def plugin; end + + private + + # @api private + # @return [Class] + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#134 + def require_plugin; end + + class << self + # Returns the given plugin if it is already a PluginWrapper. + # + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugin_list.rb#111 + def new(plugin); end + end +end + +# source://aws-sdk-core//lib/seahorse/client/plugins/content_length.rb#5 +module Seahorse::Client::Plugins; end + +# source://aws-sdk-core//lib/seahorse/client/plugins/content_length.rb#6 +class Seahorse::Client::Plugins::ContentLength < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/content_length.rb#12 +class Seahorse::Client::Plugins::ContentLength::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/content_length.rb#17 + def call(context); end +end + +# https://github.com/ruby/net-http/blob/master/lib/net/http/requests.rb +# Methods without body are forwards compatible, because content-length +# may be set for requests without body but is technically incorrect. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/content_length.rb#13 +Seahorse::Client::Plugins::ContentLength::Handler::METHODS_WITHOUT_BODY = T.let(T.unsafe(nil), Set) + +# source://aws-sdk-core//lib/seahorse/client/plugins/endpoint.rb#6 +class Seahorse::Client::Plugins::Endpoint < ::Seahorse::Client::Plugin + # source://aws-sdk-core//lib/seahorse/client/plugins/endpoint.rb#23 + def add_handlers(handlers, config); end + + # source://aws-sdk-core//lib/seahorse/client/plugins/endpoint.rb#27 + def after_initialize(client); end +end + +# source://aws-sdk-core//lib/seahorse/client/plugins/endpoint.rb#43 +class Seahorse::Client::Plugins::Endpoint::Handler < ::Seahorse::Client::Handler + # source://aws-sdk-core//lib/seahorse/client/plugins/endpoint.rb#45 + def call(context); end +end + +# source://aws-sdk-core//lib/seahorse/client/plugins/h2.rb#8 +class Seahorse::Client::Plugins::H2 < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/logging.rb#7 +class Seahorse::Client::Plugins::Logging < ::Seahorse::Client::Plugin + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/logging.rb#28 + def add_handlers(handlers, config); end +end + +# source://aws-sdk-core//lib/seahorse/client/plugins/net_http.rb#8 +class Seahorse::Client::Plugins::NetHttp < ::Seahorse::Client::Plugin + class << self + # source://aws-sdk-core//lib/seahorse/client/plugins/net_http.rb#45 + def resolve_http_open_timeout(cfg); end + + # source://aws-sdk-core//lib/seahorse/client/plugins/net_http.rb#53 + def resolve_http_read_timeout(cfg); end + + # source://aws-sdk-core//lib/seahorse/client/plugins/net_http.rb#61 + def resolve_ssl_timeout(cfg); end + end +end + +# source://aws-sdk-core//lib/seahorse/client/plugins/raise_response_errors.rb#6 +class Seahorse::Client::Plugins::RaiseResponseErrors < ::Seahorse::Client::Plugin + # source://aws-sdk-core//lib/seahorse/client/plugins/raise_response_errors.rb#22 + def add_handlers(handlers, config); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/raise_response_errors.rb#14 +class Seahorse::Client::Plugins::RaiseResponseErrors::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/raise_response_errors.rb#15 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#11 +class Seahorse::Client::Plugins::ReadCallbackIO + extend ::Forwardable + + # @api private + # @return [ReadCallbackIO] a new instance of ReadCallbackIO + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#15 + def initialize(io, on_read = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#32 + def io; end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#34 + def read(*args); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def size(*args, **_arg1, &block); end + + private + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#42 + def handle_chunk(chunk); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#50 +class Seahorse::Client::Plugins::RequestCallback < ::Seahorse::Client::Plugin; end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#74 +class Seahorse::Client::Plugins::RequestCallback::OptionHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#92 + def add_response_events(on_chunk_received, context); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#75 + def call(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#107 +class Seahorse::Client::Plugins::RequestCallback::ReadCallbackHandler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#108 + def call(context); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/request_callback.rb#122 + def unwrap_callback_body(context); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/response_target.rb#9 +class Seahorse::Client::Plugins::ResponseTarget < ::Seahorse::Client::Plugin; end + +# This handler is responsible for replacing the HTTP response body IO +# object with custom targets, such as a block, or a file. It is important +# to not write data to the custom target in the case of a non-success +# response. We do not want to write an XML error message to someone's +# file. +# +# @api private +# +# source://aws-sdk-core//lib/seahorse/client/plugins/response_target.rb#16 +class Seahorse::Client::Plugins::ResponseTarget::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/response_target.rb#18 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/response_target.rb#29 + def add_event_listeners(context, target); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/plugins/response_target.rb#64 + def io(target, headers); end +end + +# source://aws-sdk-core//lib/seahorse/client/request.rb#5 +class Seahorse::Client::Request + include ::Seahorse::Client::HandlerBuilder + + # @param handlers [HandlerList] + # @param context [RequestContext] + # @return [Request] a new instance of Request + # + # source://aws-sdk-core//lib/seahorse/client/request.rb#11 + def initialize(handlers, context); end + + # @return [RequestContext] + # + # source://aws-sdk-core//lib/seahorse/client/request.rb#20 + def context; end + + # @return [HandlerList] + # + # source://aws-sdk-core//lib/seahorse/client/request.rb#17 + def handlers; end + + # Sends the request, returning a {Response} object. + # + # response = request.send_request + # + # # Streaming Responses + # + # By default, HTTP responses are buffered into memory. This can be + # bad if you are downloading large responses, e.g. large files. + # You can avoid this by streaming the response to a block or some other + # target. + # + # ## Streaming to a File + # + # You can stream the raw HTTP response body to a File, or any IO-like + # object, by passing the `:target` option. + # + # # create a new file at the given path + # request.send_request(target: '/path/to/target/file') + # + # # or provide an IO object to write to + # File.open('photo.jpg', 'wb') do |file| + # request.send_request(target: file) + # end + # + # **Please Note**: The target IO object may receive `#truncate(0)` + # if the request generates a networking error and bytes have already + # been written to the target. + # + # ## Block Streaming + # + # Pass a block to `#send_request` and the response will be yielded in + # chunks to the given block. + # + # # stream the response data + # request.send_request do |chunk| + # file.write(chunk) + # end + # + # **Please Note**: When streaming to a block, it is not possible to + # retry failed requests. + # + # @option options + # @param options [Hash] a customizable set of options + # @return [Response] + # + # source://aws-sdk-core//lib/seahorse/client/request.rb#70 + def send_request(options = T.unsafe(nil), &block); end +end + +# source://aws-sdk-core//lib/seahorse/client/request_context.rb#7 +class Seahorse::Client::RequestContext + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [RequestContext] a new instance of RequestContext + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#17 + def initialize(options = T.unsafe(nil)); end + + # Returns the metadata for the given `key`. + # + # @param key [Symbol] + # @return [Object] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#63 + def [](key); end + + # Sets the request context metadata for the given `key`. Request metadata + # useful for handlers that need to keep state on the request, without + # sending that data with the request over HTTP. + # + # @param key [Symbol] + # @param value [Object] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#72 + def []=(key, value); end + + # @return [Model::Authorizer] APIG SDKs only + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#37 + def authorizer; end + + # @return [Model::Authorizer] APIG SDKs only + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#37 + def authorizer=(_arg0); end + + # @return [Seahorse::Client::Base] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#40 + def client; end + + # @return [Seahorse::Client::Base] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#40 + def client=(_arg0); end + + # @return [Configuration] The client configuration. + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#46 + def config; end + + # @return [Configuration] The client configuration. + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#46 + def config=(_arg0); end + + # @return [Http::Request] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#49 + def http_request; end + + # @return [Http::Request] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#49 + def http_request=(_arg0); end + + # @return [Http::Response] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#52 + def http_response; end + + # @return [Http::Response] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#52 + def http_response=(_arg0); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#58 + def metadata; end + + # @return [Model::Operation] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#34 + def operation; end + + # @return [Model::Operation] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#34 + def operation=(_arg0); end + + # @return [Symbol] Name of the API operation called. + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#31 + def operation_name; end + + # @return [Symbol] Name of the API operation called. + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#31 + def operation_name=(_arg0); end + + # @return [Hash] The hash of request parameters. + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#43 + def params; end + + # @return [Hash] The hash of request parameters. + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#43 + def params=(_arg0); end + + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#55 + def retries; end + + # @return [Integer] + # + # source://aws-sdk-core//lib/seahorse/client/request_context.rb#55 + def retries=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/client/response.rb#11 +class Seahorse::Client::Response + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Response] a new instance of Response + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#12 + def initialize(options = T.unsafe(nil)); end + + # Necessary to define as a subclass of Delegator + # + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#77 + def __getobj__; end + + # Necessary to define as a subclass of Delegator + # + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#83 + def __setobj__(obj); end + + # @return [String, nil] returns the algorithm used to validate + # the response checksum. Returns nil if no verification was done. + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#35 + def checksum_validated; end + + # @return [RequestContext] + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#24 + def context; end + + # @return The response data. This may be `nil` if the response contains + # an {#error}. + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#28 + def data; end + + # @return The response data. This may be `nil` if the response contains + # an {#error}. + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#28 + def data=(_arg0); end + + # @return [StandardError, nil] + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#31 + def error; end + + # @return [StandardError, nil] + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#31 + def error=(_arg0); end + + # @overload on + # @overload on + # @return [self] + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#49 + def on(range, &_block); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#70 + def on_complete(&block); end + + # Yields to the block if the response has a 200 level status code. + # + # @return [self] + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#59 + def on_success(&block); end + + # @return [Boolean] Returns `true` if the response is complete with + # a ~ 200 level http status code. + # + # source://aws-sdk-core//lib/seahorse/client/response.rb#65 + def successful?; end +end + +# source://aws-sdk-core//lib/seahorse/model/api.rb#4 +module Seahorse::Model; end + +# source://aws-sdk-core//lib/seahorse/model/api.rb#5 +class Seahorse::Model::Api + # @return [Api] a new instance of Api + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#7 + def initialize; end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#75 + def add_authorizer(name, authorizer); end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#51 + def add_operation(name, operation); end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#47 + def async_operation_names; end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#63 + def authorizer(name); end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#71 + def authorizer_names; end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#55 + def authorizers(&block); end + + # @return [Symbol|nil] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#22 + def endpoint_operation; end + + # @return [Symbol|nil] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#22 + def endpoint_operation=(_arg0); end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#79 + def inspect(*args); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#19 + def metadata; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#19 + def metadata=(_arg0); end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#35 + def operation(name); end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#43 + def operation_names; end + + # source://aws-sdk-core//lib/seahorse/model/api.rb#27 + def operations(&block); end + + # @return [Boolean|nil] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#25 + def require_endpoint_discovery; end + + # @return [Boolean|nil] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#25 + def require_endpoint_discovery=(_arg0); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#16 + def version; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/api.rb#16 + def version=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/authorizer.rb#5 +class Seahorse::Model::Authorizer + # @return [Authorizer] a new instance of Authorizer + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#7 + def initialize; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#13 + def name; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#13 + def name=(_arg0); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#19 + def placement; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#19 + def placement=(_arg0); end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#16 + def type; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/authorizer.rb#16 + def type=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/operation.rb#5 +class Seahorse::Model::Operation + # @return [Operation] a new instance of Operation + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#7 + def initialize; end + + # source://aws-sdk-core//lib/seahorse/model/operation.rb#68 + def [](key); end + + # source://aws-sdk-core//lib/seahorse/model/operation.rb#72 + def []=(key, value); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#66 + def async; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#66 + def async=(_arg0); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#50 + def authorizer; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#50 + def authorizer=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#35 + def deprecated; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#35 + def deprecated=(_arg0); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#44 + def documentation; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#44 + def documentation=(_arg0); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#41 + def endpoint_discovery; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#41 + def endpoint_discovery=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#38 + def endpoint_operation; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#38 + def endpoint_operation=(_arg0); end + + # @return [Hash, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#47 + def endpoint_pattern; end + + # @return [Hash, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#47 + def endpoint_pattern=(_arg0); end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#59 + def errors; end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#59 + def errors=(_arg0); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#29 + def http_checksum; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#29 + def http_checksum=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#26 + def http_checksum_required; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#26 + def http_checksum_required=(_arg0); end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#20 + def http_method; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#20 + def http_method=(_arg0); end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#23 + def http_request_uri; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#23 + def http_request_uri=(_arg0); end + + # @return [ShapeRef, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#53 + def input; end + + # @return [ShapeRef, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#53 + def input=(_arg0); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#17 + def name; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#17 + def name=(_arg0); end + + # @return [ShapeRef, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#56 + def output; end + + # @return [ShapeRef, nil] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#56 + def output=(_arg0); end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#32 + def request_compression; end + + # @return [Hash] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#32 + def request_compression=(_arg0); end + + # APIG only + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#63 + def require_apikey; end + + # APIG only + # + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/operation.rb#63 + def require_apikey=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#7 +module Seahorse::Model::Shapes; end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#135 +class Seahorse::Model::Shapes::BlobShape < ::Seahorse::Model::Shapes::Shape + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#141 + def max; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#141 + def max=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#138 + def min; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#138 + def min=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#145 +class Seahorse::Model::Shapes::BooleanShape < ::Seahorse::Model::Shapes::Shape; end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#292 +class Seahorse::Model::Shapes::DocumentShape < ::Seahorse::Model::Shapes::Shape; end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#147 +class Seahorse::Model::Shapes::FloatShape < ::Seahorse::Model::Shapes::Shape + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#153 + def max; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#153 + def max=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#150 + def min; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#150 + def min=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#157 +class Seahorse::Model::Shapes::IntegerShape < ::Seahorse::Model::Shapes::Shape + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#163 + def max; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#163 + def max=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#160 + def min; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#160 + def min=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#167 +class Seahorse::Model::Shapes::ListShape < ::Seahorse::Model::Shapes::Shape + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#179 + def flattened; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#179 + def flattened=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#176 + def max; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#176 + def max=(_arg0); end + + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#170 + def member; end + + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#170 + def member=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#173 + def min; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#173 + def min=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#183 +class Seahorse::Model::Shapes::MapShape < ::Seahorse::Model::Shapes::Shape + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#198 + def flattened; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#198 + def flattened=(_arg0); end + + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#186 + def key; end + + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#186 + def key=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#195 + def max; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#195 + def max=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#192 + def min; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#192 + def min=(_arg0); end + + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#189 + def value; end + + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#189 + def value=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#101 +class Seahorse::Model::Shapes::Shape + # @return [Shape] a new instance of Shape + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#103 + def initialize(options = T.unsafe(nil)); end + + # Gets metadata for the given `key`. + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#124 + def [](key); end + + # Sets metadata for the given `key`. + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#129 + def []=(key, value); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#118 + def documentation; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#118 + def documentation=(_arg0); end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#115 + def name; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#115 + def name=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#121 + def union; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#121 + def union=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#9 +class Seahorse::Model::Shapes::ShapeRef + # @return [ShapeRef] a new instance of ShapeRef + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#11 + def initialize(options = T.unsafe(nil)); end + + # Gets metadata for the given `key`. + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#86 + def [](key); end + + # Sets metadata for the given `key`. + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#95 + def []=(key, value); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#44 + def deprecated; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#44 + def deprecated=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#65 + def document; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#65 + def document=(_arg0); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#41 + def documentation; end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#41 + def documentation=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#47 + def event; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#47 + def event=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#56 + def eventheader; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#56 + def eventheader=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#62 + def eventheader_type; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#62 + def eventheader_type=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#53 + def eventpayload; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#53 + def eventpayload=(_arg0); end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#59 + def eventpayload_type; end + + # @return [String] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#59 + def eventpayload_type=(_arg0); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#50 + def eventstream; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#50 + def eventstream=(_arg0); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#68 + def location; end + + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#72 + def location=(location); end + + # @return [String, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#77 + def location_name; end + + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#81 + def location_name=(location_name); end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#38 + def required; end + + # @return [Boolean] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#38 + def required=(_arg0); end + + # @return [Shape] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#35 + def shape; end + + # @return [Shape] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#35 + def shape=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#202 +class Seahorse::Model::Shapes::StringShape < ::Seahorse::Model::Shapes::Shape + # @return [Set, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#205 + def enum; end + + # @return [Set, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#205 + def enum=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#211 + def max; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#211 + def max=(_arg0); end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#208 + def min; end + + # @return [Integer, nil] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#208 + def min=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#215 +class Seahorse::Model::Shapes::StructureShape < ::Seahorse::Model::Shapes::Shape + # @return [StructureShape] a new instance of StructureShape + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#217 + def initialize(options = T.unsafe(nil)); end + + # @param name [Symbol] + # @param shape_ref [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#232 + def add_member(name, shape_ref); end + + # @param name [Symbol] + # @return [ShapeRef] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#258 + def member(name); end + + # @param member_name [Symbol] + # @return [Boolean] Returns `true` if there exists a member with + # the given name. + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#247 + def member?(member_name); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#267 + def member_by_location_name(location_name); end + + # @return [Array] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#240 + def member_names; end + + # @return [Enumerator<[Symbol,ShapeRef]>] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#252 + def members; end + + # @return [Set] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#225 + def required; end + + # @return [Set] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#225 + def required=(_arg0); end + + # @return [Class] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#228 + def struct_class; end + + # @return [Class] + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#228 + def struct_class=(_arg0); end +end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#290 +class Seahorse::Model::Shapes::TimestampShape < ::Seahorse::Model::Shapes::Shape; end + +# source://aws-sdk-core//lib/seahorse/model/shapes.rb#273 +class Seahorse::Model::Shapes::UnionShape < ::Seahorse::Model::Shapes::StructureShape + # @return [UnionShape] a new instance of UnionShape + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#274 + def initialize(options = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#285 + def add_member_subclass(member, subclass); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/model/shapes.rb#280 + def member_subclass(member); end +end + +# @api private +# +# source://aws-sdk-core//lib/seahorse/util.rb#7 +module Seahorse::Util + class << self + # @api private + # + # source://aws-sdk-core//lib/seahorse/util.rb#17 + def escape_header_list_string(s); end + + # Checks for a valid host label + # + # @api private + # @return [Boolean] + # @see https://tools.ietf.org/html/rfc3986#section-3.2.2 + # @see https://tools.ietf.org/html/rfc1123#page-13 + # + # source://aws-sdk-core//lib/seahorse/util.rb#24 + def host_label?(str); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/util.rb#9 + def uri_escape(string); end + + # @api private + # + # source://aws-sdk-core//lib/seahorse/util.rb#13 + def uri_path_escape(path); end + end +end diff --git a/sorbet/rbi/gems/aws-sdk-ecr@1.64.0.rbi b/sorbet/rbi/gems/aws-sdk-ecr@1.64.0.rbi new file mode 100644 index 0000000000..0903a7394f --- /dev/null +++ b/sorbet/rbi/gems/aws-sdk-ecr@1.64.0.rbi @@ -0,0 +1,6613 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aws-sdk-ecr` gem. +# Please instead update this file by running `bin/tapioca gem aws-sdk-ecr`. + +# This module provides support for Amazon EC2 Container Registry. This module is available in the +# `aws-sdk-ecr` gem. +# +# # Client +# +# The {Client} class provides one method for each API operation. Operation +# methods each accept a hash of request parameters and return a response +# structure. +# +# ecr = Aws::ECR::Client.new +# resp = ecr.batch_check_layer_availability(params) +# +# See {Client} for more information. +# +# # Errors +# +# Errors returned from Amazon EC2 Container Registry are defined in the +# {Errors} module and all extend {Errors::ServiceError}. +# +# begin +# # do stuff +# rescue Aws::ECR::Errors::ServiceError +# # rescues all Amazon EC2 Container Registry API errors +# end +# +# See {Errors} for more information. +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#10 +module Aws::ECR; end + +# An API client for ECR. To construct a client, you need to configure a `:region` and `:credentials`. +# +# client = Aws::ECR::Client.new( +# region: region_name, +# credentials: credentials, +# # ... +# ) +# +# For details on configuring region and credentials see +# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html). +# +# See {#initialize} for a full list of supported configuration options. +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#52 +class Aws::ECR::Client < ::Seahorse::Client::Base + include ::Aws::ClientStubs + + # @overload initialize + # @return [Client] a new instance of Client + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#395 + def initialize(*args); end + + # Checks the availability of one or more image layers in a repository. + # + # When an image is pushed to a repository, each image layer is checked + # to verify if it has been uploaded before. If it has been uploaded, + # then the image layer is skipped. + # + # This operation is used by the Amazon ECR proxy and is not generally + # used by customers for pulling and pushing images. In most cases, you + # should use the `docker` CLI to pull, tag, and push images. + # + # + # + # @example Request syntax with placeholder values + # + # resp = client.batch_check_layer_availability({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # layer_digests: ["BatchedOperationLayerDigest"], # required + # }) + # @example Response structure + # + # resp.layers #=> Array + # resp.layers[0].layer_digest #=> String + # resp.layers[0].layer_availability #=> String, one of "AVAILABLE", "UNAVAILABLE" + # resp.layers[0].layer_size #=> Integer + # resp.layers[0].media_type #=> String + # resp.failures #=> Array + # resp.failures[0].layer_digest #=> String + # resp.failures[0].failure_code #=> String, one of "InvalidLayerDigest", "MissingLayerDigest" + # resp.failures[0].failure_reason #=> String + # @option params + # @option params + # @option params + # @overload batch_check_layer_availability + # @param params [Hash] ({}) + # @return [Types::BatchCheckLayerAvailabilityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::BatchCheckLayerAvailabilityResponse#layers #layers} => Array<Types::Layer> + # * {Types::BatchCheckLayerAvailabilityResponse#failures #failures} => Array<Types::LayerFailure> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#454 + def batch_check_layer_availability(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes a list of specified images within a repository. Images are + # specified with either an `imageTag` or `imageDigest`. + # + # You can remove a tag from an image by specifying the image's tag in + # your request. When you remove the last tag from an image, the image is + # deleted from your repository. + # + # You can completely delete an image (and all of its tags) by specifying + # the image's digest in your request. + # + # @example Example: To delete multiple images + # + # # This example deletes images with the tags precise and trusty in a repository called ubuntu in the default registry for + # # an account. + # + # resp = client.batch_delete_image({ + # image_ids: [ + # { + # image_tag: "precise", + # }, + # ], + # repository_name: "ubuntu", + # }) + # + # resp.to_h outputs the following: + # { + # failures: [ + # ], + # image_ids: [ + # { + # image_digest: "sha256:examplee6d1e504117a17000003d3753086354a38375961f2e665416ef4b1b2f", + # image_tag: "precise", + # }, + # ], + # } + # @example Request syntax with placeholder values + # + # resp = client.batch_delete_image({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_ids: [ # required + # { + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # ], + # }) + # @example Response structure + # + # resp.image_ids #=> Array + # resp.image_ids[0].image_digest #=> String + # resp.image_ids[0].image_tag #=> String + # resp.failures #=> Array + # resp.failures[0].image_id.image_digest #=> String + # resp.failures[0].image_id.image_tag #=> String + # resp.failures[0].failure_code #=> String, one of "InvalidImageDigest", "InvalidImageTag", "ImageTagDoesNotMatchDigest", "ImageNotFound", "MissingDigestAndTag", "ImageReferencedByManifestList", "KmsError" + # resp.failures[0].failure_reason #=> String + # @option params + # @option params + # @option params + # @overload batch_delete_image + # @param params [Hash] ({}) + # @return [Types::BatchDeleteImageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::BatchDeleteImageResponse#image_ids #image_ids} => Array<Types::ImageIdentifier> + # * {Types::BatchDeleteImageResponse#failures #failures} => Array<Types::ImageFailure> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#542 + def batch_delete_image(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Gets detailed information for an image. Images are specified with + # either an `imageTag` or `imageDigest`. + # + # When an image is pulled, the BatchGetImage API is called once to + # retrieve the image manifest. + # + # @example Example: To obtain multiple images in a single request + # + # # This example obtains information for an image with a specified image digest ID from the repository named ubuntu in the + # # current account. + # + # resp = client.batch_get_image({ + # image_ids: [ + # { + # image_tag: "precise", + # }, + # ], + # repository_name: "ubuntu", + # }) + # + # resp.to_h outputs the following: + # { + # failures: [ + # ], + # images: [ + # { + # image_id: { + # image_digest: "sha256:example76bdff6d83a09ba2a818f0d00000063724a9ac3ba5019c56f74ebf42a", + # image_tag: "precise", + # }, + # image_manifest: "{\n \"schemaVersion\": 1,\n \"name\": \"ubuntu\",\n \"tag\": \"precise\",\n...", + # registry_id: "244698725403", + # repository_name: "ubuntu", + # }, + # ], + # } + # @example Request syntax with placeholder values + # + # resp = client.batch_get_image({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_ids: [ # required + # { + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # ], + # accepted_media_types: ["MediaType"], + # }) + # @example Response structure + # + # resp.images #=> Array + # resp.images[0].registry_id #=> String + # resp.images[0].repository_name #=> String + # resp.images[0].image_id.image_digest #=> String + # resp.images[0].image_id.image_tag #=> String + # resp.images[0].image_manifest #=> String + # resp.images[0].image_manifest_media_type #=> String + # resp.failures #=> Array + # resp.failures[0].image_id.image_digest #=> String + # resp.failures[0].image_id.image_tag #=> String + # resp.failures[0].failure_code #=> String, one of "InvalidImageDigest", "InvalidImageTag", "ImageTagDoesNotMatchDigest", "ImageNotFound", "MissingDigestAndTag", "ImageReferencedByManifestList", "KmsError" + # resp.failures[0].failure_reason #=> String + # @option params + # @option params + # @option params + # @option params + # @overload batch_get_image + # @param params [Hash] ({}) + # @return [Types::BatchGetImageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::BatchGetImageResponse#images #images} => Array<Types::Image> + # * {Types::BatchGetImageResponse#failures #failures} => Array<Types::ImageFailure> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#643 + def batch_get_image(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Gets the scanning configuration for one or more repositories. + # + # @example Request syntax with placeholder values + # + # resp = client.batch_get_repository_scanning_configuration({ + # repository_names: ["RepositoryName"], # required + # }) + # @example Response structure + # + # resp.scanning_configurations #=> Array + # resp.scanning_configurations[0].repository_arn #=> String + # resp.scanning_configurations[0].repository_name #=> String + # resp.scanning_configurations[0].scan_on_push #=> Boolean + # resp.scanning_configurations[0].scan_frequency #=> String, one of "SCAN_ON_PUSH", "CONTINUOUS_SCAN", "MANUAL" + # resp.scanning_configurations[0].applied_scan_filters #=> Array + # resp.scanning_configurations[0].applied_scan_filters[0].filter #=> String + # resp.scanning_configurations[0].applied_scan_filters[0].filter_type #=> String, one of "WILDCARD" + # resp.failures #=> Array + # resp.failures[0].repository_name #=> String + # resp.failures[0].failure_code #=> String, one of "REPOSITORY_NOT_FOUND" + # resp.failures[0].failure_reason #=> String + # @option params + # @overload batch_get_repository_scanning_configuration + # @param params [Hash] ({}) + # @return [Types::BatchGetRepositoryScanningConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::BatchGetRepositoryScanningConfigurationResponse#scanning_configurations #scanning_configurations} => Array<Types::RepositoryScanningConfiguration> + # * {Types::BatchGetRepositoryScanningConfigurationResponse#failures #failures} => Array<Types::RepositoryScanningConfigurationFailure> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetRepositoryScanningConfiguration AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#683 + def batch_get_repository_scanning_configuration(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # @api private + # @param params [{}] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2869 + def build_request(operation_name, params = T.unsafe(nil)); end + + # Informs Amazon ECR that the image layer upload has completed for a + # specified registry, repository name, and upload ID. You can optionally + # provide a `sha256` digest of the image layer for data validation + # purposes. + # + # When an image is pushed, the CompleteLayerUpload API is called once + # per each new image layer to verify that the upload has completed. + # + # This operation is used by the Amazon ECR proxy and is not generally + # used by customers for pulling and pushing images. In most cases, you + # should use the `docker` CLI to pull, tag, and push images. + # + # + # + # @example Request syntax with placeholder values + # + # resp = client.complete_layer_upload({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # upload_id: "UploadId", # required + # layer_digests: ["LayerDigest"], # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.upload_id #=> String + # resp.layer_digest #=> String + # @option params + # @option params + # @option params + # @option params + # @overload complete_layer_upload + # @param params [Hash] ({}) + # @return [Types::CompleteLayerUploadResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::CompleteLayerUploadResponse#registry_id #registry_id} => String + # * {Types::CompleteLayerUploadResponse#repository_name #repository_name} => String + # * {Types::CompleteLayerUploadResponse#upload_id #upload_id} => String + # * {Types::CompleteLayerUploadResponse#layer_digest #layer_digest} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#744 + def complete_layer_upload(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a pull through cache rule. A pull through cache rule provides + # a way to cache images from an external public registry in your Amazon + # ECR private registry. + # + # @example Request syntax with placeholder values + # + # resp = client.create_pull_through_cache_rule({ + # ecr_repository_prefix: "PullThroughCacheRuleRepositoryPrefix", # required + # upstream_registry_url: "Url", # required + # registry_id: "RegistryId", + # }) + # @example Response structure + # + # resp.ecr_repository_prefix #=> String + # resp.upstream_registry_url #=> String + # resp.created_at #=> Time + # resp.registry_id #=> String + # @option params + # @option params + # @option params + # @overload create_pull_through_cache_rule + # @param params [Hash] ({}) + # @return [Types::CreatePullThroughCacheRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::CreatePullThroughCacheRuleResponse#ecr_repository_prefix #ecr_repository_prefix} => String + # * {Types::CreatePullThroughCacheRuleResponse#upstream_registry_url #upstream_registry_url} => String + # * {Types::CreatePullThroughCacheRuleResponse#created_at #created_at} => Time + # * {Types::CreatePullThroughCacheRuleResponse#registry_id #registry_id} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreatePullThroughCacheRule AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#792 + def create_pull_through_cache_rule(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a repository. For more information, see [Amazon ECR + # repositories][1] in the *Amazon Elastic Container Registry User + # Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html + # + # @example Example: To create a new repository + # + # # This example creates a repository called nginx-web-app inside the project-a namespace in the default registry for an + # # account. + # + # resp = client.create_repository({ + # repository_name: "project-a/nginx-web-app", + # }) + # + # resp.to_h outputs the following: + # { + # repository: { + # registry_id: "012345678901", + # repository_arn: "arn:aws:ecr:us-west-2:012345678901:repository/project-a/nginx-web-app", + # repository_name: "project-a/nginx-web-app", + # }, + # } + # @example Request syntax with placeholder values + # + # resp = client.create_repository({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # tags: [ + # { + # key: "TagKey", # required + # value: "TagValue", # required + # }, + # ], + # image_tag_mutability: "MUTABLE", # accepts MUTABLE, IMMUTABLE + # image_scanning_configuration: { + # scan_on_push: false, + # }, + # encryption_configuration: { + # encryption_type: "AES256", # required, accepts AES256, KMS + # kms_key: "KmsKey", + # }, + # }) + # @example Response structure + # + # resp.repository.repository_arn #=> String + # resp.repository.registry_id #=> String + # resp.repository.repository_name #=> String + # resp.repository.repository_uri #=> String + # resp.repository.created_at #=> Time + # resp.repository.image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE" + # resp.repository.image_scanning_configuration.scan_on_push #=> Boolean + # resp.repository.encryption_configuration.encryption_type #=> String, one of "AES256", "KMS" + # resp.repository.encryption_configuration.kms_key #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload create_repository + # @param params [Hash] ({}) + # @return [Types::CreateRepositoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::CreateRepositoryResponse#repository #repository} => Types::Repository + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#902 + def create_repository(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes the lifecycle policy associated with the specified repository. + # + # @example Request syntax with placeholder values + # + # resp = client.delete_lifecycle_policy({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.lifecycle_policy_text #=> String + # resp.last_evaluated_at #=> Time + # @option params + # @option params + # @overload delete_lifecycle_policy + # @param params [Hash] ({}) + # @return [Types::DeleteLifecyclePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DeleteLifecyclePolicyResponse#registry_id #registry_id} => String + # * {Types::DeleteLifecyclePolicyResponse#repository_name #repository_name} => String + # * {Types::DeleteLifecyclePolicyResponse#lifecycle_policy_text #lifecycle_policy_text} => String + # * {Types::DeleteLifecyclePolicyResponse#last_evaluated_at #last_evaluated_at} => Time + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#942 + def delete_lifecycle_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes a pull through cache rule. + # + # @example Request syntax with placeholder values + # + # resp = client.delete_pull_through_cache_rule({ + # ecr_repository_prefix: "PullThroughCacheRuleRepositoryPrefix", # required + # registry_id: "RegistryId", + # }) + # @example Response structure + # + # resp.ecr_repository_prefix #=> String + # resp.upstream_registry_url #=> String + # resp.created_at #=> Time + # resp.registry_id #=> String + # @option params + # @option params + # @overload delete_pull_through_cache_rule + # @param params [Hash] ({}) + # @return [Types::DeletePullThroughCacheRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DeletePullThroughCacheRuleResponse#ecr_repository_prefix #ecr_repository_prefix} => String + # * {Types::DeletePullThroughCacheRuleResponse#upstream_registry_url #upstream_registry_url} => String + # * {Types::DeletePullThroughCacheRuleResponse#created_at #created_at} => Time + # * {Types::DeletePullThroughCacheRuleResponse#registry_id #registry_id} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeletePullThroughCacheRule AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#983 + def delete_pull_through_cache_rule(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes the registry permissions policy. + # + # @example Response structure + # + # resp.registry_id #=> String + # resp.policy_text #=> String + # @overload delete_registry_policy + # @param params [Hash] ({}) + # @return [Types::DeleteRegistryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DeleteRegistryPolicyResponse#registry_id #registry_id} => String + # * {Types::DeleteRegistryPolicyResponse#policy_text #policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRegistryPolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1004 + def delete_registry_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes a repository. If the repository contains images, you must + # either delete all images in the repository or use the `force` option + # to delete the repository. + # + # @example Example: To force delete a repository + # + # # This example force deletes a repository named ubuntu in the default registry for an account. The force parameter is + # # required if the repository contains images. + # + # resp = client.delete_repository({ + # force: true, + # repository_name: "ubuntu", + # }) + # + # resp.to_h outputs the following: + # { + # repository: { + # registry_id: "012345678901", + # repository_arn: "arn:aws:ecr:us-west-2:012345678901:repository/ubuntu", + # repository_name: "ubuntu", + # }, + # } + # @example Request syntax with placeholder values + # + # resp = client.delete_repository({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # force: false, + # }) + # @example Response structure + # + # resp.repository.repository_arn #=> String + # resp.repository.registry_id #=> String + # resp.repository.repository_name #=> String + # resp.repository.repository_uri #=> String + # resp.repository.created_at #=> Time + # resp.repository.image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE" + # resp.repository.image_scanning_configuration.scan_on_push #=> Boolean + # resp.repository.encryption_configuration.encryption_type #=> String, one of "AES256", "KMS" + # resp.repository.encryption_configuration.kms_key #=> String + # @option params + # @option params + # @option params + # @overload delete_repository + # @param params [Hash] ({}) + # @return [Types::DeleteRepositoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DeleteRepositoryResponse#repository #repository} => Types::Repository + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1072 + def delete_repository(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes the repository policy associated with the specified + # repository. + # + # @example Example: To delete the policy associated with a repository + # + # # This example deletes the policy associated with the repository named ubuntu in the current account. + # + # resp = client.delete_repository_policy({ + # repository_name: "ubuntu", + # }) + # + # resp.to_h outputs the following: + # { + # policy_text: "{ ... }", + # registry_id: "012345678901", + # repository_name: "ubuntu", + # } + # @example Request syntax with placeholder values + # + # resp = client.delete_repository_policy({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.policy_text #=> String + # @option params + # @option params + # @overload delete_repository_policy + # @param params [Hash] ({}) + # @return [Types::DeleteRepositoryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DeleteRepositoryPolicyResponse#registry_id #registry_id} => String + # * {Types::DeleteRepositoryPolicyResponse#repository_name #repository_name} => String + # * {Types::DeleteRepositoryPolicyResponse#policy_text #policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1128 + def delete_repository_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the replication status for a specified image. + # + # @example Request syntax with placeholder values + # + # resp = client.describe_image_replication_status({ + # repository_name: "RepositoryName", # required + # image_id: { # required + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # registry_id: "RegistryId", + # }) + # @example Response structure + # + # resp.repository_name #=> String + # resp.image_id.image_digest #=> String + # resp.image_id.image_tag #=> String + # resp.replication_statuses #=> Array + # resp.replication_statuses[0].region #=> String + # resp.replication_statuses[0].registry_id #=> String + # resp.replication_statuses[0].status #=> String, one of "IN_PROGRESS", "COMPLETE", "FAILED" + # resp.replication_statuses[0].failure_code #=> String + # @option params + # @option params + # @option params + # @overload describe_image_replication_status + # @param params [Hash] ({}) + # @return [Types::DescribeImageReplicationStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribeImageReplicationStatusResponse#repository_name #repository_name} => String + # * {Types::DescribeImageReplicationStatusResponse#image_id #image_id} => Types::ImageIdentifier + # * {Types::DescribeImageReplicationStatusResponse#replication_statuses #replication_statuses} => Array<Types::ImageReplicationStatus> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageReplicationStatus AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1178 + def describe_image_replication_status(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the scan findings for the specified image. + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage): + # + # * image_scan_complete + # + # @example Request syntax with placeholder values + # + # resp = client.describe_image_scan_findings({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_id: { # required + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # next_token: "NextToken", + # max_results: 1, + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.image_id.image_digest #=> String + # resp.image_id.image_tag #=> String + # resp.image_scan_status.status #=> String, one of "IN_PROGRESS", "COMPLETE", "FAILED", "UNSUPPORTED_IMAGE", "ACTIVE", "PENDING", "SCAN_ELIGIBILITY_EXPIRED", "FINDINGS_UNAVAILABLE" + # resp.image_scan_status.description #=> String + # resp.image_scan_findings.image_scan_completed_at #=> Time + # resp.image_scan_findings.vulnerability_source_updated_at #=> Time + # resp.image_scan_findings.finding_severity_counts #=> Hash + # resp.image_scan_findings.finding_severity_counts["FindingSeverity"] #=> Integer + # resp.image_scan_findings.findings #=> Array + # resp.image_scan_findings.findings[0].name #=> String + # resp.image_scan_findings.findings[0].description #=> String + # resp.image_scan_findings.findings[0].uri #=> String + # resp.image_scan_findings.findings[0].severity #=> String, one of "INFORMATIONAL", "LOW", "MEDIUM", "HIGH", "CRITICAL", "UNDEFINED" + # resp.image_scan_findings.findings[0].attributes #=> Array + # resp.image_scan_findings.findings[0].attributes[0].key #=> String + # resp.image_scan_findings.findings[0].attributes[0].value #=> + # resp.image_scan_findings.enhanced_findings #=> Array + # resp.image_scan_findings.enhanced_findings[0].aws_account_id #=> String + # resp.image_scan_findings.enhanced_findings[0].description #=> String + # resp.image_scan_findings.enhanced_findings[0].finding_arn #=> String + # resp.image_scan_findings.enhanced_findings[0].first_observed_at #=> Time + # resp.image_scan_findings.enhanced_findings[0].last_observed_at #=> Time + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.cvss #=> Array + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.cvss[0].base_score #=> Float + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.cvss[0].scoring_vector #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.cvss[0].source #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.cvss[0].version #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.reference_urls #=> Array + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.reference_urls[0] #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.related_vulnerabilities #=> Array + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.related_vulnerabilities[0] #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.source #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.source_url #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vendor_created_at #=> Time + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vendor_severity #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vendor_updated_at #=> Time + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerability_id #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages #=> Array + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].arch #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].epoch #=> Integer + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].file_path #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].name #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].package_manager #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].release #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].source_layer_hash #=> String + # resp.image_scan_findings.enhanced_findings[0].package_vulnerability_details.vulnerable_packages[0].version #=> String + # resp.image_scan_findings.enhanced_findings[0].remediation.recommendation.url #=> String + # resp.image_scan_findings.enhanced_findings[0].remediation.recommendation.text #=> String + # resp.image_scan_findings.enhanced_findings[0].resources #=> Array + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.architecture #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.author #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.image_hash #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.image_tags #=> Array + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.image_tags[0] #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.platform #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.pushed_at #=> Time + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.registry #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].details.aws_ecr_container_image.repository_name #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].id #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].tags #=> Hash + # resp.image_scan_findings.enhanced_findings[0].resources[0].tags["TagKey"] #=> String + # resp.image_scan_findings.enhanced_findings[0].resources[0].type #=> String + # resp.image_scan_findings.enhanced_findings[0].score #=> Float + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.adjustments #=> Array + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.adjustments[0].metric #=> String + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.adjustments[0].reason #=> String + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.score #=> Float + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.score_source #=> String + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.scoring_vector #=> String + # resp.image_scan_findings.enhanced_findings[0].score_details.cvss.version #=> String + # resp.image_scan_findings.enhanced_findings[0].severity #=> String + # resp.image_scan_findings.enhanced_findings[0].status #=> String + # resp.image_scan_findings.enhanced_findings[0].title #=> String + # resp.image_scan_findings.enhanced_findings[0].type #=> String + # resp.image_scan_findings.enhanced_findings[0].updated_at #=> Time + # resp.next_token #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload describe_image_scan_findings + # @param params [Hash] ({}) + # @return [Types::DescribeImageScanFindingsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribeImageScanFindingsResponse#registry_id #registry_id} => String + # * {Types::DescribeImageScanFindingsResponse#repository_name #repository_name} => String + # * {Types::DescribeImageScanFindingsResponse#image_id #image_id} => Types::ImageIdentifier + # * {Types::DescribeImageScanFindingsResponse#image_scan_status #image_scan_status} => Types::ImageScanStatus + # * {Types::DescribeImageScanFindingsResponse#image_scan_findings #image_scan_findings} => Types::ImageScanFindings + # * {Types::DescribeImageScanFindingsResponse#next_token #next_token} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindings AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1330 + def describe_image_scan_findings(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns metadata about the images in a repository. + # + # Beginning with Docker version 1.9, the Docker client compresses image + # layers before pushing them to a V2 Docker registry. The output of the + # `docker images` command shows the uncompressed image size, so it may + # return a larger image size than the image sizes returned by + # DescribeImages. + # + # + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # @example Request syntax with placeholder values + # + # resp = client.describe_images({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_ids: [ + # { + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # ], + # next_token: "NextToken", + # max_results: 1, + # filter: { + # tag_status: "TAGGED", # accepts TAGGED, UNTAGGED, ANY + # }, + # }) + # @example Response structure + # + # resp.image_details #=> Array + # resp.image_details[0].registry_id #=> String + # resp.image_details[0].repository_name #=> String + # resp.image_details[0].image_digest #=> String + # resp.image_details[0].image_tags #=> Array + # resp.image_details[0].image_tags[0] #=> String + # resp.image_details[0].image_size_in_bytes #=> Integer + # resp.image_details[0].image_pushed_at #=> Time + # resp.image_details[0].image_scan_status.status #=> String, one of "IN_PROGRESS", "COMPLETE", "FAILED", "UNSUPPORTED_IMAGE", "ACTIVE", "PENDING", "SCAN_ELIGIBILITY_EXPIRED", "FINDINGS_UNAVAILABLE" + # resp.image_details[0].image_scan_status.description #=> String + # resp.image_details[0].image_scan_findings_summary.image_scan_completed_at #=> Time + # resp.image_details[0].image_scan_findings_summary.vulnerability_source_updated_at #=> Time + # resp.image_details[0].image_scan_findings_summary.finding_severity_counts #=> Hash + # resp.image_details[0].image_scan_findings_summary.finding_severity_counts["FindingSeverity"] #=> Integer + # resp.image_details[0].image_manifest_media_type #=> String + # resp.image_details[0].artifact_media_type #=> String + # resp.image_details[0].last_recorded_pull_time #=> Time + # resp.next_token #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload describe_images + # @param params [Hash] ({}) + # @return [Types::DescribeImagesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribeImagesResponse#image_details #image_details} => Array<Types::ImageDetail> + # * {Types::DescribeImagesResponse#next_token #next_token} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1429 + def describe_images(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the pull through cache rules for a registry. + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # @example Request syntax with placeholder values + # + # resp = client.describe_pull_through_cache_rules({ + # registry_id: "RegistryId", + # ecr_repository_prefixes: ["PullThroughCacheRuleRepositoryPrefix"], + # next_token: "NextToken", + # max_results: 1, + # }) + # @example Response structure + # + # resp.pull_through_cache_rules #=> Array + # resp.pull_through_cache_rules[0].ecr_repository_prefix #=> String + # resp.pull_through_cache_rules[0].upstream_registry_url #=> String + # resp.pull_through_cache_rules[0].created_at #=> Time + # resp.pull_through_cache_rules[0].registry_id #=> String + # resp.next_token #=> String + # @option params + # @option params + # @option params + # @option params + # @overload describe_pull_through_cache_rules + # @param params [Hash] ({}) + # @return [Types::DescribePullThroughCacheRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribePullThroughCacheRulesResponse#pull_through_cache_rules #pull_through_cache_rules} => Array<Types::PullThroughCacheRule> + # * {Types::DescribePullThroughCacheRulesResponse#next_token #next_token} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribePullThroughCacheRules AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1495 + def describe_pull_through_cache_rules(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Describes the settings for a registry. The replication configuration + # for a repository can be created or updated with the + # PutReplicationConfiguration API action. + # + # @example Response structure + # + # resp.registry_id #=> String + # resp.replication_configuration.rules #=> Array + # resp.replication_configuration.rules[0].destinations #=> Array + # resp.replication_configuration.rules[0].destinations[0].region #=> String + # resp.replication_configuration.rules[0].destinations[0].registry_id #=> String + # resp.replication_configuration.rules[0].repository_filters #=> Array + # resp.replication_configuration.rules[0].repository_filters[0].filter #=> String + # resp.replication_configuration.rules[0].repository_filters[0].filter_type #=> String, one of "PREFIX_MATCH" + # @overload describe_registry + # @param params [Hash] ({}) + # @return [Types::DescribeRegistryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribeRegistryResponse#registry_id #registry_id} => String + # * {Types::DescribeRegistryResponse#replication_configuration #replication_configuration} => Types::ReplicationConfiguration + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRegistry AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1524 + def describe_registry(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Describes image repositories in a registry. + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # @example Example: To describe all repositories in the current account + # + # # The following example obtains a list and description of all repositories in the default registry to which the current + # # user has access. + # + # resp = client.describe_repositories({ + # }) + # + # resp.to_h outputs the following: + # { + # repositories: [ + # { + # registry_id: "012345678910", + # repository_arn: "arn:aws:ecr:us-west-2:012345678910:repository/ubuntu", + # repository_name: "ubuntu", + # }, + # { + # registry_id: "012345678910", + # repository_arn: "arn:aws:ecr:us-west-2:012345678910:repository/test", + # repository_name: "test", + # }, + # ], + # } + # @example Request syntax with placeholder values + # + # resp = client.describe_repositories({ + # registry_id: "RegistryId", + # repository_names: ["RepositoryName"], + # next_token: "NextToken", + # max_results: 1, + # }) + # @example Response structure + # + # resp.repositories #=> Array + # resp.repositories[0].repository_arn #=> String + # resp.repositories[0].registry_id #=> String + # resp.repositories[0].repository_name #=> String + # resp.repositories[0].repository_uri #=> String + # resp.repositories[0].created_at #=> Time + # resp.repositories[0].image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE" + # resp.repositories[0].image_scanning_configuration.scan_on_push #=> Boolean + # resp.repositories[0].encryption_configuration.encryption_type #=> String, one of "AES256", "KMS" + # resp.repositories[0].encryption_configuration.kms_key #=> String + # resp.next_token #=> String + # @option params + # @option params + # @option params + # @option params + # @overload describe_repositories + # @param params [Hash] ({}) + # @return [Types::DescribeRepositoriesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribeRepositoriesResponse#repositories #repositories} => Array<Types::Repository> + # * {Types::DescribeRepositoriesResponse#next_token #next_token} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1626 + def describe_repositories(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves an authorization token. An authorization token represents + # your IAM authentication credentials and can be used to access any + # Amazon ECR registry that your IAM principal has access to. The + # authorization token is valid for 12 hours. + # + # The `authorizationToken` returned is a base64 encoded string that can + # be decoded and used in a `docker login` command to authenticate to a + # registry. The CLI offers an `get-login-password` command that + # simplifies the login process. For more information, see [Registry + # authentication][1] in the *Amazon Elastic Container Registry User + # Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth + # + # @example Example: To obtain an authorization token + # + # # This example gets an authorization token for your default registry. + # + # resp = client.get_authorization_token({ + # }) + # + # resp.to_h outputs the following: + # { + # authorization_data: [ + # { + # authorization_token: "QVdTOkNEXAMPLE", + # expires_at: Time.parse("2022-05-17T06:56:13.652000+00:00"), + # proxy_endpoint: "https://012345678901.dkr.ecr.us-west-2.amazonaws.com", + # }, + # ], + # } + # @example Request syntax with placeholder values + # + # resp = client.get_authorization_token({ + # registry_ids: ["RegistryId"], + # }) + # @example Response structure + # + # resp.authorization_data #=> Array + # resp.authorization_data[0].authorization_token #=> String + # resp.authorization_data[0].expires_at #=> Time + # resp.authorization_data[0].proxy_endpoint #=> String + # @option params + # @overload get_authorization_token + # @param params [Hash] ({}) + # @return [Types::GetAuthorizationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetAuthorizationTokenResponse#authorization_data #authorization_data} => Array<Types::AuthorizationData> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1692 + def get_authorization_token(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves the pre-signed Amazon S3 download URL corresponding to an + # image layer. You can only get URLs for image layers that are + # referenced in an image. + # + # When an image is pulled, the GetDownloadUrlForLayer API is called once + # per image layer that is not already cached. + # + # This operation is used by the Amazon ECR proxy and is not generally + # used by customers for pulling and pushing images. In most cases, you + # should use the `docker` CLI to pull, tag, and push images. + # + # + # + # @example Request syntax with placeholder values + # + # resp = client.get_download_url_for_layer({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # layer_digest: "LayerDigest", # required + # }) + # @example Response structure + # + # resp.download_url #=> String + # resp.layer_digest #=> String + # @option params + # @option params + # @option params + # @overload get_download_url_for_layer + # @param params [Hash] ({}) + # @return [Types::GetDownloadUrlForLayerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetDownloadUrlForLayerResponse#download_url #download_url} => String + # * {Types::GetDownloadUrlForLayerResponse#layer_digest #layer_digest} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1744 + def get_download_url_for_layer(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves the lifecycle policy for the specified repository. + # + # @example Request syntax with placeholder values + # + # resp = client.get_lifecycle_policy({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.lifecycle_policy_text #=> String + # resp.last_evaluated_at #=> Time + # @option params + # @option params + # @overload get_lifecycle_policy + # @param params [Hash] ({}) + # @return [Types::GetLifecyclePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetLifecyclePolicyResponse#registry_id #registry_id} => String + # * {Types::GetLifecyclePolicyResponse#repository_name #repository_name} => String + # * {Types::GetLifecyclePolicyResponse#lifecycle_policy_text #lifecycle_policy_text} => String + # * {Types::GetLifecyclePolicyResponse#last_evaluated_at #last_evaluated_at} => Time + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1784 + def get_lifecycle_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves the results of the lifecycle policy preview request for the + # specified repository. + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage): + # + # * lifecycle_policy_preview_complete + # + # @example Request syntax with placeholder values + # + # resp = client.get_lifecycle_policy_preview({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_ids: [ + # { + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # ], + # next_token: "NextToken", + # max_results: 1, + # filter: { + # tag_status: "TAGGED", # accepts TAGGED, UNTAGGED, ANY + # }, + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.lifecycle_policy_text #=> String + # resp.status #=> String, one of "IN_PROGRESS", "COMPLETE", "EXPIRED", "FAILED" + # resp.next_token #=> String + # resp.preview_results #=> Array + # resp.preview_results[0].image_tags #=> Array + # resp.preview_results[0].image_tags[0] #=> String + # resp.preview_results[0].image_digest #=> String + # resp.preview_results[0].image_pushed_at #=> Time + # resp.preview_results[0].action.type #=> String, one of "EXPIRE" + # resp.preview_results[0].applied_rule_priority #=> Integer + # resp.summary.expiring_image_total_count #=> Integer + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload get_lifecycle_policy_preview + # @param params [Hash] ({}) + # @return [Types::GetLifecyclePolicyPreviewResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetLifecyclePolicyPreviewResponse#registry_id #registry_id} => String + # * {Types::GetLifecyclePolicyPreviewResponse#repository_name #repository_name} => String + # * {Types::GetLifecyclePolicyPreviewResponse#lifecycle_policy_text #lifecycle_policy_text} => String + # * {Types::GetLifecyclePolicyPreviewResponse#status #status} => String + # * {Types::GetLifecyclePolicyPreviewResponse#next_token #next_token} => String + # * {Types::GetLifecyclePolicyPreviewResponse#preview_results #preview_results} => Array<Types::LifecyclePolicyPreviewResult> + # * {Types::GetLifecyclePolicyPreviewResponse#summary #summary} => Types::LifecyclePolicyPreviewSummary + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1884 + def get_lifecycle_policy_preview(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves the permissions policy for a registry. + # + # @example Response structure + # + # resp.registry_id #=> String + # resp.policy_text #=> String + # @overload get_registry_policy + # @param params [Hash] ({}) + # @return [Types::GetRegistryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetRegistryPolicyResponse#registry_id #registry_id} => String + # * {Types::GetRegistryPolicyResponse#policy_text #policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRegistryPolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1905 + def get_registry_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves the scanning configuration for a registry. + # + # @example Response structure + # + # resp.registry_id #=> String + # resp.scanning_configuration.scan_type #=> String, one of "BASIC", "ENHANCED" + # resp.scanning_configuration.rules #=> Array + # resp.scanning_configuration.rules[0].scan_frequency #=> String, one of "SCAN_ON_PUSH", "CONTINUOUS_SCAN", "MANUAL" + # resp.scanning_configuration.rules[0].repository_filters #=> Array + # resp.scanning_configuration.rules[0].repository_filters[0].filter #=> String + # resp.scanning_configuration.rules[0].repository_filters[0].filter_type #=> String, one of "WILDCARD" + # @overload get_registry_scanning_configuration + # @param params [Hash] ({}) + # @return [Types::GetRegistryScanningConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetRegistryScanningConfigurationResponse#registry_id #registry_id} => String + # * {Types::GetRegistryScanningConfigurationResponse#scanning_configuration #scanning_configuration} => Types::RegistryScanningConfiguration + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRegistryScanningConfiguration AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1931 + def get_registry_scanning_configuration(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Retrieves the repository policy for the specified repository. + # + # @example Example: To get the current policy for a repository + # + # # This example obtains the repository policy for the repository named ubuntu. + # + # resp = client.get_repository_policy({ + # repository_name: "ubuntu", + # }) + # + # resp.to_h outputs the following: + # { + # policy_text: "{\n \"Version\" : \"2008-10-17\",\n \"Statement\" : [ {\n \"Sid\" : \"new statement\",\n \"Effect\" : \"Allow\",\n \"Principal\" : {\n \"AWS\" : \"arn:aws:iam::012345678901:role/CodeDeployDemo\"\n },\n\"Action\" : [ \"ecr:GetDownloadUrlForLayer\", \"ecr:BatchGetImage\", \"ecr:BatchCheckLayerAvailability\" ]\n } ]\n}", + # registry_id: "012345678901", + # repository_name: "ubuntu", + # } + # @example Request syntax with placeholder values + # + # resp = client.get_repository_policy({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.policy_text #=> String + # @option params + # @option params + # @overload get_repository_policy + # @param params [Hash] ({}) + # @return [Types::GetRepositoryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetRepositoryPolicyResponse#registry_id #registry_id} => String + # * {Types::GetRepositoryPolicyResponse#repository_name #repository_name} => String + # * {Types::GetRepositoryPolicyResponse#policy_text #policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#1985 + def get_repository_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Notifies Amazon ECR that you intend to upload an image layer. + # + # When an image is pushed, the InitiateLayerUpload API is called once + # per image layer that has not already been uploaded. Whether or not an + # image layer has been uploaded is determined by the + # BatchCheckLayerAvailability API action. + # + # This operation is used by the Amazon ECR proxy and is not generally + # used by customers for pulling and pushing images. In most cases, you + # should use the `docker` CLI to pull, tag, and push images. + # + # + # + # @example Request syntax with placeholder values + # + # resp = client.initiate_layer_upload({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # }) + # @example Response structure + # + # resp.upload_id #=> String + # resp.part_size #=> Integer + # @option params + # @option params + # @overload initiate_layer_upload + # @param params [Hash] ({}) + # @return [Types::InitiateLayerUploadResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::InitiateLayerUploadResponse#upload_id #upload_id} => String + # * {Types::InitiateLayerUploadResponse#part_size #part_size} => Integer + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2032 + def initiate_layer_upload(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Lists all the image IDs for the specified repository. + # + # You can filter images based on whether or not they are tagged by using + # the `tagStatus` filter and specifying either `TAGGED`, `UNTAGGED` or + # `ANY`. For example, you can filter your results to return only + # `UNTAGGED` images and then pipe that result to a BatchDeleteImage + # operation to delete them. Or, you can filter your results to return + # only `TAGGED` images to list all of the tags in your repository. + # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # + # @example Example: To list all images in a repository + # + # # This example lists all of the images in the repository named ubuntu in the default registry in the current account. + # + # resp = client.list_images({ + # repository_name: "ubuntu", + # }) + # + # resp.to_h outputs the following: + # { + # image_ids: [ + # { + # image_digest: "sha256:764f63476bdff6d83a09ba2a818f0d35757063724a9ac3ba5019c56f74ebf42a", + # image_tag: "precise", + # }, + # ], + # } + # @example Request syntax with placeholder values + # + # resp = client.list_images({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # next_token: "NextToken", + # max_results: 1, + # filter: { + # tag_status: "TAGGED", # accepts TAGGED, UNTAGGED, ANY + # }, + # }) + # @example Response structure + # + # resp.image_ids #=> Array + # resp.image_ids[0].image_digest #=> String + # resp.image_ids[0].image_tag #=> String + # resp.next_token #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload list_images + # @param params [Hash] ({}) + # @return [Types::ListImagesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::ListImagesResponse#image_ids #image_ids} => Array<Types::ImageIdentifier> + # * {Types::ListImagesResponse#next_token #next_token} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2130 + def list_images(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # List the tags for an Amazon ECR resource. + # + # @example Request syntax with placeholder values + # + # resp = client.list_tags_for_resource({ + # resource_arn: "Arn", # required + # }) + # @example Response structure + # + # resp.tags #=> Array + # resp.tags[0].key #=> String + # resp.tags[0].value #=> String + # @option params + # @overload list_tags_for_resource + # @param params [Hash] ({}) + # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::ListTagsForResourceResponse#tags #tags} => Array<Types::Tag> + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2162 + def list_tags_for_resource(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates or updates the image manifest and tags associated with an + # image. + # + # When an image is pushed and all new image layers have been uploaded, + # the PutImage API is called once to create or update the image manifest + # and the tags associated with the image. + # + # This operation is used by the Amazon ECR proxy and is not generally + # used by customers for pulling and pushing images. In most cases, you + # should use the `docker` CLI to pull, tag, and push images. + # + # + # + # @example Request syntax with placeholder values + # + # resp = client.put_image({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_manifest: "ImageManifest", # required + # image_manifest_media_type: "MediaType", + # image_tag: "ImageTag", + # image_digest: "ImageDigest", + # }) + # @example Response structure + # + # resp.image.registry_id #=> String + # resp.image.repository_name #=> String + # resp.image.image_id.image_digest #=> String + # resp.image.image_id.image_tag #=> String + # resp.image.image_manifest #=> String + # resp.image.image_manifest_media_type #=> String + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload put_image + # @param params [Hash] ({}) + # @return [Types::PutImageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutImageResponse#image #image} => Types::Image + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2232 + def put_image(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # The `PutImageScanningConfiguration` API is being deprecated, in favor + # of specifying the image scanning configuration at the registry level. + # For more information, see PutRegistryScanningConfiguration. + # + # Updates the image scanning configuration for the specified repository. + # + # @example Request syntax with placeholder values + # + # resp = client.put_image_scanning_configuration({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_scanning_configuration: { # required + # scan_on_push: false, + # }, + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.image_scanning_configuration.scan_on_push #=> Boolean + # @option params + # @option params + # @option params + # @overload put_image_scanning_configuration + # @param params [Hash] ({}) + # @return [Types::PutImageScanningConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutImageScanningConfigurationResponse#registry_id #registry_id} => String + # * {Types::PutImageScanningConfigurationResponse#repository_name #repository_name} => String + # * {Types::PutImageScanningConfigurationResponse#image_scanning_configuration #image_scanning_configuration} => Types::ImageScanningConfiguration + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfiguration AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2284 + def put_image_scanning_configuration(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Updates the image tag mutability settings for the specified + # repository. For more information, see [Image tag mutability][1] in the + # *Amazon Elastic Container Registry User Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html + # + # @example Request syntax with placeholder values + # + # resp = client.put_image_tag_mutability({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_tag_mutability: "MUTABLE", # required, accepts MUTABLE, IMMUTABLE + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.image_tag_mutability #=> String, one of "MUTABLE", "IMMUTABLE" + # @option params + # @option params + # @option params + # @overload put_image_tag_mutability + # @param params [Hash] ({}) + # @return [Types::PutImageTagMutabilityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutImageTagMutabilityResponse#registry_id #registry_id} => String + # * {Types::PutImageTagMutabilityResponse#repository_name #repository_name} => String + # * {Types::PutImageTagMutabilityResponse#image_tag_mutability #image_tag_mutability} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutability AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2337 + def put_image_tag_mutability(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates or updates the lifecycle policy for the specified repository. + # For more information, see [Lifecycle policy template][1]. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html + # + # @example Request syntax with placeholder values + # + # resp = client.put_lifecycle_policy({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # lifecycle_policy_text: "LifecyclePolicyText", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.lifecycle_policy_text #=> String + # @option params + # @option params + # @option params + # @overload put_lifecycle_policy + # @param params [Hash] ({}) + # @return [Types::PutLifecyclePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutLifecyclePolicyResponse#registry_id #registry_id} => String + # * {Types::PutLifecyclePolicyResponse#repository_name #repository_name} => String + # * {Types::PutLifecyclePolicyResponse#lifecycle_policy_text #lifecycle_policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2384 + def put_lifecycle_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates or updates the permissions policy for your registry. + # + # A registry policy is used to specify permissions for another Amazon + # Web Services account and is used when configuring cross-account + # replication. For more information, see [Registry permissions][1] in + # the *Amazon Elastic Container Registry User Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry-permissions.html + # + # @example Request syntax with placeholder values + # + # resp = client.put_registry_policy({ + # policy_text: "RegistryPolicyText", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.policy_text #=> String + # @option params + # @overload put_registry_policy + # @param params [Hash] ({}) + # @return [Types::PutRegistryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutRegistryPolicyResponse#registry_id #registry_id} => String + # * {Types::PutRegistryPolicyResponse#policy_text #policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutRegistryPolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2430 + def put_registry_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates or updates the scanning configuration for your private + # registry. + # + # @example Request syntax with placeholder values + # + # resp = client.put_registry_scanning_configuration({ + # scan_type: "BASIC", # accepts BASIC, ENHANCED + # rules: [ + # { + # scan_frequency: "SCAN_ON_PUSH", # required, accepts SCAN_ON_PUSH, CONTINUOUS_SCAN, MANUAL + # repository_filters: [ # required + # { + # filter: "ScanningRepositoryFilterValue", # required + # filter_type: "WILDCARD", # required, accepts WILDCARD + # }, + # ], + # }, + # ], + # }) + # @example Response structure + # + # resp.registry_scanning_configuration.scan_type #=> String, one of "BASIC", "ENHANCED" + # resp.registry_scanning_configuration.rules #=> Array + # resp.registry_scanning_configuration.rules[0].scan_frequency #=> String, one of "SCAN_ON_PUSH", "CONTINUOUS_SCAN", "MANUAL" + # resp.registry_scanning_configuration.rules[0].repository_filters #=> Array + # resp.registry_scanning_configuration.rules[0].repository_filters[0].filter #=> String + # resp.registry_scanning_configuration.rules[0].repository_filters[0].filter_type #=> String, one of "WILDCARD" + # @option params + # @option params + # @overload put_registry_scanning_configuration + # @param params [Hash] ({}) + # @return [Types::PutRegistryScanningConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutRegistryScanningConfigurationResponse#registry_scanning_configuration #registry_scanning_configuration} => Types::RegistryScanningConfiguration + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutRegistryScanningConfiguration AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2492 + def put_registry_scanning_configuration(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates or updates the replication configuration for a registry. The + # existing replication configuration for a repository can be retrieved + # with the DescribeRegistry API action. The first time the + # PutReplicationConfiguration API is called, a service-linked IAM role + # is created in your account for the replication process. For more + # information, see [Using service-linked roles for Amazon ECR][1] in the + # *Amazon Elastic Container Registry User Guide*. + # + # When configuring cross-account replication, the destination account + # must grant the source account permission to replicate. This permission + # is controlled using a registry permissions policy. For more + # information, see PutRegistryPolicy. + # + # + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/using-service-linked-roles.html + # + # @example Request syntax with placeholder values + # + # resp = client.put_replication_configuration({ + # replication_configuration: { # required + # rules: [ # required + # { + # destinations: [ # required + # { + # region: "Region", # required + # registry_id: "RegistryId", # required + # }, + # ], + # repository_filters: [ + # { + # filter: "RepositoryFilterValue", # required + # filter_type: "PREFIX_MATCH", # required, accepts PREFIX_MATCH + # }, + # ], + # }, + # ], + # }, + # }) + # @example Response structure + # + # resp.replication_configuration.rules #=> Array + # resp.replication_configuration.rules[0].destinations #=> Array + # resp.replication_configuration.rules[0].destinations[0].region #=> String + # resp.replication_configuration.rules[0].destinations[0].registry_id #=> String + # resp.replication_configuration.rules[0].repository_filters #=> Array + # resp.replication_configuration.rules[0].repository_filters[0].filter #=> String + # resp.replication_configuration.rules[0].repository_filters[0].filter_type #=> String, one of "PREFIX_MATCH" + # @option params + # @overload put_replication_configuration + # @param params [Hash] ({}) + # @return [Types::PutReplicationConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::PutReplicationConfigurationResponse#replication_configuration #replication_configuration} => Types::ReplicationConfiguration + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutReplicationConfiguration AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2560 + def put_replication_configuration(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Applies a repository policy to the specified repository to control + # access permissions. For more information, see [Amazon ECR Repository + # policies][1] in the *Amazon Elastic Container Registry User Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policies.html + # + # @example Request syntax with placeholder values + # + # resp = client.set_repository_policy({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # policy_text: "RepositoryPolicyText", # required + # force: false, + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.policy_text #=> String + # @option params + # @option params + # @option params + # @option params + # @overload set_repository_policy + # @param params [Hash] ({}) + # @return [Types::SetRepositoryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::SetRepositoryPolicyResponse#registry_id #registry_id} => String + # * {Types::SetRepositoryPolicyResponse#repository_name #repository_name} => String + # * {Types::SetRepositoryPolicyResponse#policy_text #policy_text} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2621 + def set_repository_policy(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Starts an image vulnerability scan. An image scan can only be started + # once per 24 hours on an individual image. This limit includes if an + # image was scanned on initial push. For more information, see [Image + # scanning][1] in the *Amazon Elastic Container Registry User Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html + # + # @example Request syntax with placeholder values + # + # resp = client.start_image_scan({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # image_id: { # required + # image_digest: "ImageDigest", + # image_tag: "ImageTag", + # }, + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.image_id.image_digest #=> String + # resp.image_id.image_tag #=> String + # resp.image_scan_status.status #=> String, one of "IN_PROGRESS", "COMPLETE", "FAILED", "UNSUPPORTED_IMAGE", "ACTIVE", "PENDING", "SCAN_ELIGIBILITY_EXPIRED", "FINDINGS_UNAVAILABLE" + # resp.image_scan_status.description #=> String + # @option params + # @option params + # @option params + # @overload start_image_scan + # @param params [Hash] ({}) + # @return [Types::StartImageScanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::StartImageScanResponse#registry_id #registry_id} => String + # * {Types::StartImageScanResponse#repository_name #repository_name} => String + # * {Types::StartImageScanResponse#image_id #image_id} => Types::ImageIdentifier + # * {Types::StartImageScanResponse#image_scan_status #image_scan_status} => Types::ImageScanStatus + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScan AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2678 + def start_image_scan(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Starts a preview of a lifecycle policy for the specified repository. + # This allows you to see the results before associating the lifecycle + # policy with the repository. + # + # @example Request syntax with placeholder values + # + # resp = client.start_lifecycle_policy_preview({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # lifecycle_policy_text: "LifecyclePolicyText", + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.lifecycle_policy_text #=> String + # resp.status #=> String, one of "IN_PROGRESS", "COMPLETE", "EXPIRED", "FAILED" + # @option params + # @option params + # @option params + # @overload start_lifecycle_policy_preview + # @param params [Hash] ({}) + # @return [Types::StartLifecyclePolicyPreviewResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::StartLifecyclePolicyPreviewResponse#registry_id #registry_id} => String + # * {Types::StartLifecyclePolicyPreviewResponse#repository_name #repository_name} => String + # * {Types::StartLifecyclePolicyPreviewResponse#lifecycle_policy_text #lifecycle_policy_text} => String + # * {Types::StartLifecyclePolicyPreviewResponse#status #status} => String + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2725 + def start_lifecycle_policy_preview(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Adds specified tags to a resource with the specified ARN. Existing + # tags on a resource are not changed if they are not specified in the + # request parameters. + # + # @example Request syntax with placeholder values + # + # resp = client.tag_resource({ + # resource_arn: "Arn", # required + # tags: [ # required + # { + # key: "TagKey", # required + # value: "TagValue", # required + # }, + # ], + # }) + # @option params + # @option params + # @overload tag_resource + # @param params [Hash] ({}) + # @return [Struct] Returns an empty {Seahorse::Client::Response response}. + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2762 + def tag_resource(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes specified tags from a resource. + # + # @example Request syntax with placeholder values + # + # resp = client.untag_resource({ + # resource_arn: "Arn", # required + # tag_keys: ["TagKey"], # required + # }) + # @option params + # @option params + # @overload untag_resource + # @param params [Hash] ({}) + # @return [Struct] Returns an empty {Seahorse::Client::Response response}. + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2790 + def untag_resource(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Uploads an image layer part to Amazon ECR. + # + # When an image is pushed, each new image layer is uploaded in parts. + # The maximum size of each image layer part can be 20971520 bytes (or + # about 20MB). The UploadLayerPart API is called once per each new image + # layer part. + # + # This operation is used by the Amazon ECR proxy and is not generally + # used by customers for pulling and pushing images. In most cases, you + # should use the `docker` CLI to pull, tag, and push images. + # + # + # + # @example Request syntax with placeholder values + # + # resp = client.upload_layer_part({ + # registry_id: "RegistryId", + # repository_name: "RepositoryName", # required + # upload_id: "UploadId", # required + # part_first_byte: 1, # required + # part_last_byte: 1, # required + # layer_part_blob: "data", # required + # }) + # @example Response structure + # + # resp.registry_id #=> String + # resp.repository_name #=> String + # resp.upload_id #=> String + # resp.last_byte_received #=> Integer + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @overload upload_layer_part + # @param params [Hash] ({}) + # @return [Types::UploadLayerPartResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::UploadLayerPartResponse#registry_id #registry_id} => String + # * {Types::UploadLayerPartResponse#repository_name #repository_name} => String + # * {Types::UploadLayerPartResponse#upload_id #upload_id} => String + # * {Types::UploadLayerPartResponse#last_byte_received #last_byte_received} => Integer + # @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart AWS API Documentation + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2860 + def upload_layer_part(params = T.unsafe(nil), options = T.unsafe(nil)); end + + # Polls an API operation until a resource enters a desired state. + # + # ## Basic Usage + # + # A waiter will call an API operation until: + # + # * It is successful + # * It enters a terminal state + # * It makes the maximum number of attempts + # + # In between attempts, the waiter will sleep. + # + # # polls in a loop, sleeping between attempts + # client.wait_until(waiter_name, params) + # + # ## Configuration + # + # You can configure the maximum number of polling attempts, and the + # delay (in seconds) between each polling attempt. You can pass + # configuration as the final arguments hash. + # + # # poll for ~25 seconds + # client.wait_until(waiter_name, params, { + # max_attempts: 5, + # delay: 5, + # }) + # + # ## Callbacks + # + # You can be notified before each polling attempt and before each + # delay. If you throw `:success` or `:failure` from these callbacks, + # it will terminate the waiter. + # + # started_at = Time.now + # client.wait_until(waiter_name, params, { + # + # # disable max attempts + # max_attempts: nil, + # + # # poll for 1 hour, instead of a number of attempts + # before_wait: -> (attempts, response) do + # throw :failure if Time.now - started_at > 3600 + # end + # }) + # + # ## Handling Errors + # + # When a waiter is unsuccessful, it will raise an error. + # All of the failure errors extend from + # {Aws::Waiters::Errors::WaiterFailed}. + # + # begin + # client.wait_until(...) + # rescue Aws::Waiters::Errors::WaiterFailed + # # resource did not enter the desired state in time + # end + # + # ## Valid Waiters + # + # The following table lists the valid waiter names, the operations they call, + # and the default `:delay` and `:max_attempts` values. + # + # | waiter_name | params | :delay | :max_attempts | + # | --------------------------------- | ------------------------------------- | -------- | ------------- | + # | image_scan_complete | {Client#describe_image_scan_findings} | 5 | 60 | + # | lifecycle_policy_preview_complete | {Client#get_lifecycle_policy_preview} | 5 | 20 | + # + # @option options + # @option options + # @option options + # @option options + # @param waiter_name [Symbol] + # @param params [Hash] ({}) + # @param options [Hash] ({}) + # @raise [Errors::FailureStateError] Raised when the waiter terminates + # because the waiter has entered a state that it will not transition + # out of, preventing success. + # @raise [Errors::TooManyAttemptsError] Raised when the configured + # maximum number of attempts have been made, and the waiter is not + # yet successful. + # @raise [Errors::UnexpectedError] Raised when an error is encounted + # while polling for a resource that is not expected. + # @raise [Errors::NoSuchWaiterError] Raised when you request to wait + # for an unknown state. + # @return [Boolean] Returns `true` if the waiter was successful. + # @yield [w.waiter] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2971 + def wait_until(waiter_name, params = T.unsafe(nil), options = T.unsafe(nil)); end + + # @api private + # @deprecated + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2979 + def waiter_names; end + + private + + # @param waiter_name [Symbol] + # @param options [Hash] ({}) + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2987 + def waiter(waiter_name, options = T.unsafe(nil)); end + + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#2996 + def waiters; end + + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#3009 + def errors_module; end + + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/client.rb#3006 + def identifier; end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#12 +module Aws::ECR::ClientApi + include ::Seahorse::Model +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#1134 +Aws::ECR::ClientApi::API = T.let(T.unsafe(nil), Seahorse::Model::Api) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#16 +Aws::ECR::ClientApi::Arch = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#17 +Aws::ECR::ClientApi::Arn = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#18 +Aws::ECR::ClientApi::Attribute = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#19 +Aws::ECR::ClientApi::AttributeKey = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#20 +Aws::ECR::ClientApi::AttributeList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#21 +Aws::ECR::ClientApi::AttributeValue = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#22 +Aws::ECR::ClientApi::Author = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#23 +Aws::ECR::ClientApi::AuthorizationData = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#24 +Aws::ECR::ClientApi::AuthorizationDataList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#25 +Aws::ECR::ClientApi::AwsEcrContainerImageDetails = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#26 +Aws::ECR::ClientApi::Base64 = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#27 +Aws::ECR::ClientApi::BaseScore = T.let(T.unsafe(nil), Seahorse::Model::Shapes::FloatShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#28 +Aws::ECR::ClientApi::BatchCheckLayerAvailabilityRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#29 +Aws::ECR::ClientApi::BatchCheckLayerAvailabilityResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#30 +Aws::ECR::ClientApi::BatchDeleteImageRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#31 +Aws::ECR::ClientApi::BatchDeleteImageResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#32 +Aws::ECR::ClientApi::BatchGetImageRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#33 +Aws::ECR::ClientApi::BatchGetImageResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#34 +Aws::ECR::ClientApi::BatchGetRepositoryScanningConfigurationRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#35 +Aws::ECR::ClientApi::BatchGetRepositoryScanningConfigurationResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#36 +Aws::ECR::ClientApi::BatchedOperationLayerDigest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#37 +Aws::ECR::ClientApi::BatchedOperationLayerDigestList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#38 +Aws::ECR::ClientApi::CompleteLayerUploadRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#39 +Aws::ECR::ClientApi::CompleteLayerUploadResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#40 +Aws::ECR::ClientApi::CreatePullThroughCacheRuleRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#41 +Aws::ECR::ClientApi::CreatePullThroughCacheRuleResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#42 +Aws::ECR::ClientApi::CreateRepositoryRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#43 +Aws::ECR::ClientApi::CreateRepositoryResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#44 +Aws::ECR::ClientApi::CreationTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#45 +Aws::ECR::ClientApi::CvssScore = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#46 +Aws::ECR::ClientApi::CvssScoreAdjustment = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#47 +Aws::ECR::ClientApi::CvssScoreAdjustmentList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#48 +Aws::ECR::ClientApi::CvssScoreDetails = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#49 +Aws::ECR::ClientApi::CvssScoreList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#50 +Aws::ECR::ClientApi::Date = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#51 +Aws::ECR::ClientApi::DeleteLifecyclePolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#52 +Aws::ECR::ClientApi::DeleteLifecyclePolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#53 +Aws::ECR::ClientApi::DeletePullThroughCacheRuleRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#54 +Aws::ECR::ClientApi::DeletePullThroughCacheRuleResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#55 +Aws::ECR::ClientApi::DeleteRegistryPolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#56 +Aws::ECR::ClientApi::DeleteRegistryPolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#57 +Aws::ECR::ClientApi::DeleteRepositoryPolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#58 +Aws::ECR::ClientApi::DeleteRepositoryPolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#59 +Aws::ECR::ClientApi::DeleteRepositoryRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#60 +Aws::ECR::ClientApi::DeleteRepositoryResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#61 +Aws::ECR::ClientApi::DescribeImageReplicationStatusRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#62 +Aws::ECR::ClientApi::DescribeImageReplicationStatusResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#63 +Aws::ECR::ClientApi::DescribeImageScanFindingsRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#64 +Aws::ECR::ClientApi::DescribeImageScanFindingsResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#65 +Aws::ECR::ClientApi::DescribeImagesFilter = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#66 +Aws::ECR::ClientApi::DescribeImagesRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#67 +Aws::ECR::ClientApi::DescribeImagesResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#68 +Aws::ECR::ClientApi::DescribePullThroughCacheRulesRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#69 +Aws::ECR::ClientApi::DescribePullThroughCacheRulesResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#70 +Aws::ECR::ClientApi::DescribeRegistryRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#71 +Aws::ECR::ClientApi::DescribeRegistryResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#72 +Aws::ECR::ClientApi::DescribeRepositoriesRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#73 +Aws::ECR::ClientApi::DescribeRepositoriesResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#74 +Aws::ECR::ClientApi::EmptyUploadException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#75 +Aws::ECR::ClientApi::EncryptionConfiguration = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#76 +Aws::ECR::ClientApi::EncryptionType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#77 +Aws::ECR::ClientApi::EnhancedImageScanFinding = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#78 +Aws::ECR::ClientApi::EnhancedImageScanFindingList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#79 +Aws::ECR::ClientApi::Epoch = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#80 +Aws::ECR::ClientApi::EvaluationTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#81 +Aws::ECR::ClientApi::ExceptionMessage = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#82 +Aws::ECR::ClientApi::ExpirationTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#83 +Aws::ECR::ClientApi::FilePath = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#84 +Aws::ECR::ClientApi::FindingArn = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#85 +Aws::ECR::ClientApi::FindingDescription = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#86 +Aws::ECR::ClientApi::FindingName = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#87 +Aws::ECR::ClientApi::FindingSeverity = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#88 +Aws::ECR::ClientApi::FindingSeverityCounts = T.let(T.unsafe(nil), Seahorse::Model::Shapes::MapShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#89 +Aws::ECR::ClientApi::ForceFlag = T.let(T.unsafe(nil), Seahorse::Model::Shapes::BooleanShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#90 +Aws::ECR::ClientApi::GetAuthorizationTokenRegistryIdList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#91 +Aws::ECR::ClientApi::GetAuthorizationTokenRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#92 +Aws::ECR::ClientApi::GetAuthorizationTokenResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#93 +Aws::ECR::ClientApi::GetDownloadUrlForLayerRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#94 +Aws::ECR::ClientApi::GetDownloadUrlForLayerResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#95 +Aws::ECR::ClientApi::GetLifecyclePolicyPreviewRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#96 +Aws::ECR::ClientApi::GetLifecyclePolicyPreviewResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#97 +Aws::ECR::ClientApi::GetLifecyclePolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#98 +Aws::ECR::ClientApi::GetLifecyclePolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#99 +Aws::ECR::ClientApi::GetRegistryPolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#100 +Aws::ECR::ClientApi::GetRegistryPolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#101 +Aws::ECR::ClientApi::GetRegistryScanningConfigurationRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#102 +Aws::ECR::ClientApi::GetRegistryScanningConfigurationResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#103 +Aws::ECR::ClientApi::GetRepositoryPolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#104 +Aws::ECR::ClientApi::GetRepositoryPolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#105 +Aws::ECR::ClientApi::Image = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#106 +Aws::ECR::ClientApi::ImageActionType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#107 +Aws::ECR::ClientApi::ImageAlreadyExistsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#108 +Aws::ECR::ClientApi::ImageCount = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#109 +Aws::ECR::ClientApi::ImageDetail = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#110 +Aws::ECR::ClientApi::ImageDetailList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#111 +Aws::ECR::ClientApi::ImageDigest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#112 +Aws::ECR::ClientApi::ImageDigestDoesNotMatchException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#113 +Aws::ECR::ClientApi::ImageFailure = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#114 +Aws::ECR::ClientApi::ImageFailureCode = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#115 +Aws::ECR::ClientApi::ImageFailureList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#116 +Aws::ECR::ClientApi::ImageFailureReason = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#117 +Aws::ECR::ClientApi::ImageIdentifier = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#118 +Aws::ECR::ClientApi::ImageIdentifierList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#119 +Aws::ECR::ClientApi::ImageList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#120 +Aws::ECR::ClientApi::ImageManifest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#121 +Aws::ECR::ClientApi::ImageNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#122 +Aws::ECR::ClientApi::ImageReplicationStatus = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#123 +Aws::ECR::ClientApi::ImageReplicationStatusList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#124 +Aws::ECR::ClientApi::ImageScanFinding = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#125 +Aws::ECR::ClientApi::ImageScanFindingList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#126 +Aws::ECR::ClientApi::ImageScanFindings = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#127 +Aws::ECR::ClientApi::ImageScanFindingsSummary = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#128 +Aws::ECR::ClientApi::ImageScanStatus = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#129 +Aws::ECR::ClientApi::ImageScanningConfiguration = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#130 +Aws::ECR::ClientApi::ImageSizeInBytes = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#131 +Aws::ECR::ClientApi::ImageTag = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#132 +Aws::ECR::ClientApi::ImageTagAlreadyExistsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#133 +Aws::ECR::ClientApi::ImageTagList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#134 +Aws::ECR::ClientApi::ImageTagMutability = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#135 +Aws::ECR::ClientApi::ImageTagsList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#136 +Aws::ECR::ClientApi::InitiateLayerUploadRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#137 +Aws::ECR::ClientApi::InitiateLayerUploadResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#138 +Aws::ECR::ClientApi::InvalidLayerException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#139 +Aws::ECR::ClientApi::InvalidLayerPartException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#140 +Aws::ECR::ClientApi::InvalidParameterException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#141 +Aws::ECR::ClientApi::InvalidTagParameterException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#142 +Aws::ECR::ClientApi::KmsError = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#143 +Aws::ECR::ClientApi::KmsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#144 +Aws::ECR::ClientApi::KmsKey = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#145 +Aws::ECR::ClientApi::Layer = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#146 +Aws::ECR::ClientApi::LayerAlreadyExistsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#147 +Aws::ECR::ClientApi::LayerAvailability = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#148 +Aws::ECR::ClientApi::LayerDigest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#149 +Aws::ECR::ClientApi::LayerDigestList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#150 +Aws::ECR::ClientApi::LayerFailure = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#151 +Aws::ECR::ClientApi::LayerFailureCode = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#152 +Aws::ECR::ClientApi::LayerFailureList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#153 +Aws::ECR::ClientApi::LayerFailureReason = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#154 +Aws::ECR::ClientApi::LayerInaccessibleException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#155 +Aws::ECR::ClientApi::LayerList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#156 +Aws::ECR::ClientApi::LayerPartBlob = T.let(T.unsafe(nil), Seahorse::Model::Shapes::BlobShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#157 +Aws::ECR::ClientApi::LayerPartTooSmallException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#158 +Aws::ECR::ClientApi::LayerSizeInBytes = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#159 +Aws::ECR::ClientApi::LayersNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#160 +Aws::ECR::ClientApi::LifecyclePolicyNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#161 +Aws::ECR::ClientApi::LifecyclePolicyPreviewFilter = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#162 +Aws::ECR::ClientApi::LifecyclePolicyPreviewInProgressException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#163 +Aws::ECR::ClientApi::LifecyclePolicyPreviewNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#164 +Aws::ECR::ClientApi::LifecyclePolicyPreviewResult = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#165 +Aws::ECR::ClientApi::LifecyclePolicyPreviewResultList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#166 +Aws::ECR::ClientApi::LifecyclePolicyPreviewStatus = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#167 +Aws::ECR::ClientApi::LifecyclePolicyPreviewSummary = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#168 +Aws::ECR::ClientApi::LifecyclePolicyRuleAction = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#169 +Aws::ECR::ClientApi::LifecyclePolicyRulePriority = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#170 +Aws::ECR::ClientApi::LifecyclePolicyText = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#171 +Aws::ECR::ClientApi::LifecyclePreviewMaxResults = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#172 +Aws::ECR::ClientApi::LimitExceededException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#173 +Aws::ECR::ClientApi::ListImagesFilter = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#174 +Aws::ECR::ClientApi::ListImagesRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#175 +Aws::ECR::ClientApi::ListImagesResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#176 +Aws::ECR::ClientApi::ListTagsForResourceRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#177 +Aws::ECR::ClientApi::ListTagsForResourceResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#178 +Aws::ECR::ClientApi::MaxResults = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#179 +Aws::ECR::ClientApi::MediaType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#180 +Aws::ECR::ClientApi::MediaTypeList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#181 +Aws::ECR::ClientApi::Metric = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#182 +Aws::ECR::ClientApi::NextToken = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#183 +Aws::ECR::ClientApi::PackageManager = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#184 +Aws::ECR::ClientApi::PackageVulnerabilityDetails = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#185 +Aws::ECR::ClientApi::PartSize = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#186 +Aws::ECR::ClientApi::Platform = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#187 +Aws::ECR::ClientApi::ProxyEndpoint = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#188 +Aws::ECR::ClientApi::PullThroughCacheRule = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#189 +Aws::ECR::ClientApi::PullThroughCacheRuleAlreadyExistsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#190 +Aws::ECR::ClientApi::PullThroughCacheRuleList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#191 +Aws::ECR::ClientApi::PullThroughCacheRuleNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#192 +Aws::ECR::ClientApi::PullThroughCacheRuleRepositoryPrefix = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#193 +Aws::ECR::ClientApi::PullThroughCacheRuleRepositoryPrefixList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#194 +Aws::ECR::ClientApi::PushTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#195 +Aws::ECR::ClientApi::PutImageRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#196 +Aws::ECR::ClientApi::PutImageResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#197 +Aws::ECR::ClientApi::PutImageScanningConfigurationRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#198 +Aws::ECR::ClientApi::PutImageScanningConfigurationResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#199 +Aws::ECR::ClientApi::PutImageTagMutabilityRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#200 +Aws::ECR::ClientApi::PutImageTagMutabilityResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#201 +Aws::ECR::ClientApi::PutLifecyclePolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#202 +Aws::ECR::ClientApi::PutLifecyclePolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#203 +Aws::ECR::ClientApi::PutRegistryPolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#204 +Aws::ECR::ClientApi::PutRegistryPolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#205 +Aws::ECR::ClientApi::PutRegistryScanningConfigurationRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#206 +Aws::ECR::ClientApi::PutRegistryScanningConfigurationResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#207 +Aws::ECR::ClientApi::PutReplicationConfigurationRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#208 +Aws::ECR::ClientApi::PutReplicationConfigurationResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#209 +Aws::ECR::ClientApi::Reason = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#210 +Aws::ECR::ClientApi::Recommendation = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#211 +Aws::ECR::ClientApi::RecommendationText = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#212 +Aws::ECR::ClientApi::RecordedPullTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#213 +Aws::ECR::ClientApi::ReferenceUrlsList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#214 +Aws::ECR::ClientApi::ReferencedImagesNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#215 +Aws::ECR::ClientApi::Region = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#216 +Aws::ECR::ClientApi::RegistryId = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#217 +Aws::ECR::ClientApi::RegistryPolicyNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#218 +Aws::ECR::ClientApi::RegistryPolicyText = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#219 +Aws::ECR::ClientApi::RegistryScanningConfiguration = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#220 +Aws::ECR::ClientApi::RegistryScanningRule = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#221 +Aws::ECR::ClientApi::RegistryScanningRuleList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#222 +Aws::ECR::ClientApi::RelatedVulnerabilitiesList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#223 +Aws::ECR::ClientApi::RelatedVulnerability = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#224 +Aws::ECR::ClientApi::Release = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#225 +Aws::ECR::ClientApi::Remediation = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#226 +Aws::ECR::ClientApi::ReplicationConfiguration = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#227 +Aws::ECR::ClientApi::ReplicationDestination = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#228 +Aws::ECR::ClientApi::ReplicationDestinationList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#229 +Aws::ECR::ClientApi::ReplicationError = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#230 +Aws::ECR::ClientApi::ReplicationRule = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#231 +Aws::ECR::ClientApi::ReplicationRuleList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#232 +Aws::ECR::ClientApi::ReplicationStatus = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#233 +Aws::ECR::ClientApi::Repository = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#234 +Aws::ECR::ClientApi::RepositoryAlreadyExistsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#235 +Aws::ECR::ClientApi::RepositoryFilter = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#236 +Aws::ECR::ClientApi::RepositoryFilterList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#237 +Aws::ECR::ClientApi::RepositoryFilterType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#238 +Aws::ECR::ClientApi::RepositoryFilterValue = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#239 +Aws::ECR::ClientApi::RepositoryList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#240 +Aws::ECR::ClientApi::RepositoryName = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#241 +Aws::ECR::ClientApi::RepositoryNameList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#242 +Aws::ECR::ClientApi::RepositoryNotEmptyException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#243 +Aws::ECR::ClientApi::RepositoryNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#244 +Aws::ECR::ClientApi::RepositoryPolicyNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#245 +Aws::ECR::ClientApi::RepositoryPolicyText = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#246 +Aws::ECR::ClientApi::RepositoryScanningConfiguration = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#247 +Aws::ECR::ClientApi::RepositoryScanningConfigurationFailure = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#248 +Aws::ECR::ClientApi::RepositoryScanningConfigurationFailureList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#249 +Aws::ECR::ClientApi::RepositoryScanningConfigurationList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#250 +Aws::ECR::ClientApi::Resource = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#251 +Aws::ECR::ClientApi::ResourceDetails = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#252 +Aws::ECR::ClientApi::ResourceId = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#253 +Aws::ECR::ClientApi::ResourceList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#254 +Aws::ECR::ClientApi::ScanFrequency = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#255 +Aws::ECR::ClientApi::ScanNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#256 +Aws::ECR::ClientApi::ScanOnPushFlag = T.let(T.unsafe(nil), Seahorse::Model::Shapes::BooleanShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#257 +Aws::ECR::ClientApi::ScanStatus = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#258 +Aws::ECR::ClientApi::ScanStatusDescription = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#259 +Aws::ECR::ClientApi::ScanTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#260 +Aws::ECR::ClientApi::ScanType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#261 +Aws::ECR::ClientApi::ScanningConfigurationFailureCode = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#262 +Aws::ECR::ClientApi::ScanningConfigurationFailureReason = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#263 +Aws::ECR::ClientApi::ScanningConfigurationRepositoryNameList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#264 +Aws::ECR::ClientApi::ScanningRepositoryFilter = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#265 +Aws::ECR::ClientApi::ScanningRepositoryFilterList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#266 +Aws::ECR::ClientApi::ScanningRepositoryFilterType = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#267 +Aws::ECR::ClientApi::ScanningRepositoryFilterValue = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#268 +Aws::ECR::ClientApi::Score = T.let(T.unsafe(nil), Seahorse::Model::Shapes::FloatShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#269 +Aws::ECR::ClientApi::ScoreDetails = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#270 +Aws::ECR::ClientApi::ScoringVector = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#271 +Aws::ECR::ClientApi::ServerException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#272 +Aws::ECR::ClientApi::SetRepositoryPolicyRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#273 +Aws::ECR::ClientApi::SetRepositoryPolicyResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#274 +Aws::ECR::ClientApi::Severity = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#275 +Aws::ECR::ClientApi::SeverityCount = T.let(T.unsafe(nil), Seahorse::Model::Shapes::IntegerShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#276 +Aws::ECR::ClientApi::Source = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#277 +Aws::ECR::ClientApi::SourceLayerHash = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#278 +Aws::ECR::ClientApi::StartImageScanRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#279 +Aws::ECR::ClientApi::StartImageScanResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#280 +Aws::ECR::ClientApi::StartLifecyclePolicyPreviewRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#281 +Aws::ECR::ClientApi::StartLifecyclePolicyPreviewResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#282 +Aws::ECR::ClientApi::Status = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#283 +Aws::ECR::ClientApi::Tag = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#284 +Aws::ECR::ClientApi::TagKey = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#285 +Aws::ECR::ClientApi::TagKeyList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#286 +Aws::ECR::ClientApi::TagList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#287 +Aws::ECR::ClientApi::TagResourceRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#288 +Aws::ECR::ClientApi::TagResourceResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#289 +Aws::ECR::ClientApi::TagStatus = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#290 +Aws::ECR::ClientApi::TagValue = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#291 +Aws::ECR::ClientApi::Tags = T.let(T.unsafe(nil), Seahorse::Model::Shapes::MapShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#292 +Aws::ECR::ClientApi::Title = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#293 +Aws::ECR::ClientApi::TooManyTagsException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#294 +Aws::ECR::ClientApi::Type = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#295 +Aws::ECR::ClientApi::UnsupportedImageTypeException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#296 +Aws::ECR::ClientApi::UnsupportedUpstreamRegistryException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#297 +Aws::ECR::ClientApi::UntagResourceRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#298 +Aws::ECR::ClientApi::UntagResourceResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#299 +Aws::ECR::ClientApi::UploadId = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#300 +Aws::ECR::ClientApi::UploadLayerPartRequest = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#301 +Aws::ECR::ClientApi::UploadLayerPartResponse = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#302 +Aws::ECR::ClientApi::UploadNotFoundException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#303 +Aws::ECR::ClientApi::Url = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#304 +Aws::ECR::ClientApi::ValidationException = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#305 +Aws::ECR::ClientApi::Version = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#306 +Aws::ECR::ClientApi::VulnerabilityId = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#307 +Aws::ECR::ClientApi::VulnerabilitySourceUpdateTimestamp = T.let(T.unsafe(nil), Seahorse::Model::Shapes::TimestampShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#308 +Aws::ECR::ClientApi::VulnerablePackage = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StructureShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#309 +Aws::ECR::ClientApi::VulnerablePackageName = T.let(T.unsafe(nil), Seahorse::Model::Shapes::StringShape) + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/client_api.rb#310 +Aws::ECR::ClientApi::VulnerablePackagesList = T.let(T.unsafe(nil), Seahorse::Model::Shapes::ListShape) + +# Endpoint parameters used to influence endpoints per request. +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoint_parameters.rb#33 +class Aws::ECR::EndpointParameters < ::Struct + include ::Aws::Structure + + # @return [EndpointParameters] a new instance of EndpointParameters + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoint_parameters.rb#51 + def initialize(options = T.unsafe(nil)); end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint; end + + # Override the endpoint used to send this request + # + # @return [String] + def endpoint=(_); end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region; end + + # The AWS region used to dispatch the request. + # + # @return [String] + def region=(_); end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack; end + + # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. + # + # @return [Boolean] + def use_dual_stack=(_); end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips; end + + # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. + # + # @return [Boolean] + def use_fips=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoint_provider.rb#11 +class Aws::ECR::EndpointProvider + # @raise [ArgumentError] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoint_provider.rb#12 + def resolve_endpoint(parameters); end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#13 +module Aws::ECR::Endpoints; end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#15 +class Aws::ECR::Endpoints::BatchCheckLayerAvailability + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#16 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#29 +class Aws::ECR::Endpoints::BatchDeleteImage + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#30 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#43 +class Aws::ECR::Endpoints::BatchGetImage + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#44 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#57 +class Aws::ECR::Endpoints::BatchGetRepositoryScanningConfiguration + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#58 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#71 +class Aws::ECR::Endpoints::CompleteLayerUpload + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#72 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#85 +class Aws::ECR::Endpoints::CreatePullThroughCacheRule + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#86 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#99 +class Aws::ECR::Endpoints::CreateRepository + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#100 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#113 +class Aws::ECR::Endpoints::DeleteLifecyclePolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#114 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#127 +class Aws::ECR::Endpoints::DeletePullThroughCacheRule + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#128 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#141 +class Aws::ECR::Endpoints::DeleteRegistryPolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#142 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#155 +class Aws::ECR::Endpoints::DeleteRepository + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#156 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#169 +class Aws::ECR::Endpoints::DeleteRepositoryPolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#170 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#183 +class Aws::ECR::Endpoints::DescribeImageReplicationStatus + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#184 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#197 +class Aws::ECR::Endpoints::DescribeImageScanFindings + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#198 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#211 +class Aws::ECR::Endpoints::DescribeImages + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#212 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#225 +class Aws::ECR::Endpoints::DescribePullThroughCacheRules + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#226 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#239 +class Aws::ECR::Endpoints::DescribeRegistry + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#240 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#253 +class Aws::ECR::Endpoints::DescribeRepositories + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#254 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#267 +class Aws::ECR::Endpoints::GetAuthorizationToken + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#268 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#281 +class Aws::ECR::Endpoints::GetDownloadUrlForLayer + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#282 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#295 +class Aws::ECR::Endpoints::GetLifecyclePolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#296 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#309 +class Aws::ECR::Endpoints::GetLifecyclePolicyPreview + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#310 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#323 +class Aws::ECR::Endpoints::GetRegistryPolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#324 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#337 +class Aws::ECR::Endpoints::GetRegistryScanningConfiguration + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#338 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#351 +class Aws::ECR::Endpoints::GetRepositoryPolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#352 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#365 +class Aws::ECR::Endpoints::InitiateLayerUpload + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#366 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#379 +class Aws::ECR::Endpoints::ListImages + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#380 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#393 +class Aws::ECR::Endpoints::ListTagsForResource + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#394 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#407 +class Aws::ECR::Endpoints::PutImage + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#408 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#421 +class Aws::ECR::Endpoints::PutImageScanningConfiguration + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#422 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#435 +class Aws::ECR::Endpoints::PutImageTagMutability + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#436 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#449 +class Aws::ECR::Endpoints::PutLifecyclePolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#450 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#463 +class Aws::ECR::Endpoints::PutRegistryPolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#464 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#477 +class Aws::ECR::Endpoints::PutRegistryScanningConfiguration + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#478 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#491 +class Aws::ECR::Endpoints::PutReplicationConfiguration + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#492 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#505 +class Aws::ECR::Endpoints::SetRepositoryPolicy + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#506 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#519 +class Aws::ECR::Endpoints::StartImageScan + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#520 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#533 +class Aws::ECR::Endpoints::StartLifecyclePolicyPreview + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#534 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#547 +class Aws::ECR::Endpoints::TagResource + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#548 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#561 +class Aws::ECR::Endpoints::UntagResource + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#562 + def build(context); end + end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#575 +class Aws::ECR::Endpoints::UploadLayerPart + class << self + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/endpoints.rb#576 + def build(context); end + end +end + +# When ECR returns an error response, the Ruby SDK constructs and raises an error. +# These errors all extend Aws::ECR::Errors::ServiceError < {Aws::Errors::ServiceError} +# +# You can rescue all ECR errors using ServiceError: +# +# begin +# # do stuff +# rescue Aws::ECR::Errors::ServiceError +# # rescues all ECR API errors +# end +# +# +# ## Request Context +# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns +# information about the request that generated the error. +# See {Seahorse::Client::RequestContext} for more information. +# +# ## Error Classes +# * {EmptyUploadException} +# * {ImageAlreadyExistsException} +# * {ImageDigestDoesNotMatchException} +# * {ImageNotFoundException} +# * {ImageTagAlreadyExistsException} +# * {InvalidLayerException} +# * {InvalidLayerPartException} +# * {InvalidParameterException} +# * {InvalidTagParameterException} +# * {KmsException} +# * {LayerAlreadyExistsException} +# * {LayerInaccessibleException} +# * {LayerPartTooSmallException} +# * {LayersNotFoundException} +# * {LifecyclePolicyNotFoundException} +# * {LifecyclePolicyPreviewInProgressException} +# * {LifecyclePolicyPreviewNotFoundException} +# * {LimitExceededException} +# * {PullThroughCacheRuleAlreadyExistsException} +# * {PullThroughCacheRuleNotFoundException} +# * {ReferencedImagesNotFoundException} +# * {RegistryPolicyNotFoundException} +# * {RepositoryAlreadyExistsException} +# * {RepositoryNotEmptyException} +# * {RepositoryNotFoundException} +# * {RepositoryPolicyNotFoundException} +# * {ScanNotFoundException} +# * {ServerException} +# * {TooManyTagsException} +# * {UnsupportedImageTypeException} +# * {UnsupportedUpstreamRegistryException} +# * {UploadNotFoundException} +# * {ValidationException} +# +# Additionally, error classes are dynamically generated for service errors based on the error code +# if they are not defined above. +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#66 +module Aws::ECR::Errors + extend ::Aws::Errors::DynamicErrors +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#70 +class Aws::ECR::Errors::EmptyUploadException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::EmptyUploadException] + # @return [EmptyUploadException] a new instance of EmptyUploadException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#75 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#80 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#85 +class Aws::ECR::Errors::ImageAlreadyExistsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ImageAlreadyExistsException] + # @return [ImageAlreadyExistsException] a new instance of ImageAlreadyExistsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#90 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#95 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#100 +class Aws::ECR::Errors::ImageDigestDoesNotMatchException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ImageDigestDoesNotMatchException] + # @return [ImageDigestDoesNotMatchException] a new instance of ImageDigestDoesNotMatchException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#105 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#110 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#115 +class Aws::ECR::Errors::ImageNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ImageNotFoundException] + # @return [ImageNotFoundException] a new instance of ImageNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#120 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#125 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#130 +class Aws::ECR::Errors::ImageTagAlreadyExistsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ImageTagAlreadyExistsException] + # @return [ImageTagAlreadyExistsException] a new instance of ImageTagAlreadyExistsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#135 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#140 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#145 +class Aws::ECR::Errors::InvalidLayerException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::InvalidLayerException] + # @return [InvalidLayerException] a new instance of InvalidLayerException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#150 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#155 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#160 +class Aws::ECR::Errors::InvalidLayerPartException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::InvalidLayerPartException] + # @return [InvalidLayerPartException] a new instance of InvalidLayerPartException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#165 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#185 + def last_valid_byte_received; end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#190 + def message; end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#170 + def registry_id; end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#175 + def repository_name; end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#180 + def upload_id; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#195 +class Aws::ECR::Errors::InvalidParameterException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::InvalidParameterException] + # @return [InvalidParameterException] a new instance of InvalidParameterException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#200 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#205 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#210 +class Aws::ECR::Errors::InvalidTagParameterException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::InvalidTagParameterException] + # @return [InvalidTagParameterException] a new instance of InvalidTagParameterException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#215 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#220 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#225 +class Aws::ECR::Errors::KmsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::KmsException] + # @return [KmsException] a new instance of KmsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#230 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#240 + def kms_error; end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#235 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#245 +class Aws::ECR::Errors::LayerAlreadyExistsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LayerAlreadyExistsException] + # @return [LayerAlreadyExistsException] a new instance of LayerAlreadyExistsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#250 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#255 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#260 +class Aws::ECR::Errors::LayerInaccessibleException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LayerInaccessibleException] + # @return [LayerInaccessibleException] a new instance of LayerInaccessibleException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#265 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#270 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#275 +class Aws::ECR::Errors::LayerPartTooSmallException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LayerPartTooSmallException] + # @return [LayerPartTooSmallException] a new instance of LayerPartTooSmallException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#280 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#285 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#290 +class Aws::ECR::Errors::LayersNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LayersNotFoundException] + # @return [LayersNotFoundException] a new instance of LayersNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#295 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#300 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#305 +class Aws::ECR::Errors::LifecyclePolicyNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LifecyclePolicyNotFoundException] + # @return [LifecyclePolicyNotFoundException] a new instance of LifecyclePolicyNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#310 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#315 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#320 +class Aws::ECR::Errors::LifecyclePolicyPreviewInProgressException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LifecyclePolicyPreviewInProgressException] + # @return [LifecyclePolicyPreviewInProgressException] a new instance of LifecyclePolicyPreviewInProgressException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#325 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#330 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#335 +class Aws::ECR::Errors::LifecyclePolicyPreviewNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LifecyclePolicyPreviewNotFoundException] + # @return [LifecyclePolicyPreviewNotFoundException] a new instance of LifecyclePolicyPreviewNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#340 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#345 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#350 +class Aws::ECR::Errors::LimitExceededException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::LimitExceededException] + # @return [LimitExceededException] a new instance of LimitExceededException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#355 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#360 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#365 +class Aws::ECR::Errors::PullThroughCacheRuleAlreadyExistsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::PullThroughCacheRuleAlreadyExistsException] + # @return [PullThroughCacheRuleAlreadyExistsException] a new instance of PullThroughCacheRuleAlreadyExistsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#370 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#375 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#380 +class Aws::ECR::Errors::PullThroughCacheRuleNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::PullThroughCacheRuleNotFoundException] + # @return [PullThroughCacheRuleNotFoundException] a new instance of PullThroughCacheRuleNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#385 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#390 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#395 +class Aws::ECR::Errors::ReferencedImagesNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ReferencedImagesNotFoundException] + # @return [ReferencedImagesNotFoundException] a new instance of ReferencedImagesNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#400 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#405 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#410 +class Aws::ECR::Errors::RegistryPolicyNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::RegistryPolicyNotFoundException] + # @return [RegistryPolicyNotFoundException] a new instance of RegistryPolicyNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#415 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#420 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#425 +class Aws::ECR::Errors::RepositoryAlreadyExistsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::RepositoryAlreadyExistsException] + # @return [RepositoryAlreadyExistsException] a new instance of RepositoryAlreadyExistsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#430 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#435 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#440 +class Aws::ECR::Errors::RepositoryNotEmptyException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::RepositoryNotEmptyException] + # @return [RepositoryNotEmptyException] a new instance of RepositoryNotEmptyException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#445 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#450 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#455 +class Aws::ECR::Errors::RepositoryNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::RepositoryNotFoundException] + # @return [RepositoryNotFoundException] a new instance of RepositoryNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#460 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#465 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#470 +class Aws::ECR::Errors::RepositoryPolicyNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::RepositoryPolicyNotFoundException] + # @return [RepositoryPolicyNotFoundException] a new instance of RepositoryPolicyNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#475 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#480 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#485 +class Aws::ECR::Errors::ScanNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ScanNotFoundException] + # @return [ScanNotFoundException] a new instance of ScanNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#490 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#495 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#500 +class Aws::ECR::Errors::ServerException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ServerException] + # @return [ServerException] a new instance of ServerException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#505 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#510 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#0 +class Aws::ECR::Errors::ServiceError < ::Aws::Errors::ServiceError; end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#515 +class Aws::ECR::Errors::TooManyTagsException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::TooManyTagsException] + # @return [TooManyTagsException] a new instance of TooManyTagsException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#520 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#525 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#530 +class Aws::ECR::Errors::UnsupportedImageTypeException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::UnsupportedImageTypeException] + # @return [UnsupportedImageTypeException] a new instance of UnsupportedImageTypeException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#535 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#540 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#545 +class Aws::ECR::Errors::UnsupportedUpstreamRegistryException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::UnsupportedUpstreamRegistryException] + # @return [UnsupportedUpstreamRegistryException] a new instance of UnsupportedUpstreamRegistryException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#550 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#555 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#560 +class Aws::ECR::Errors::UploadNotFoundException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::UploadNotFoundException] + # @return [UploadNotFoundException] a new instance of UploadNotFoundException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#565 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#570 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#575 +class Aws::ECR::Errors::ValidationException < ::Aws::ECR::Errors::ServiceError + # @param context [Seahorse::Client::RequestContext] + # @param message [String] + # @param data [Aws::ECR::Types::ValidationException] + # @return [ValidationException] a new instance of ValidationException + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#580 + def initialize(context, message, data = T.unsafe(nil)); end + + # @return [String] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/errors.rb#585 + def message; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr.rb#56 +Aws::ECR::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#12 +module Aws::ECR::Plugins; end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#13 +class Aws::ECR::Plugins::Endpoints < ::Seahorse::Client::Plugin + # source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#145 + def add_handlers(handlers, _config); end +end + +# @api private +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#26 +class Aws::ECR::Plugins::Endpoints::Handler < ::Seahorse::Client::Handler + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#27 + def call(context); end + + private + + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#46 + def apply_endpoint_headers(context, headers); end + + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/plugins/endpoints.rb#57 + def parameters_for_operation(context); end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/resource.rb#12 +class Aws::ECR::Resource + # @option options + # @param options [{}] + # @return [Resource] a new instance of Resource + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/resource.rb#16 + def initialize(options = T.unsafe(nil)); end + + # @return [Client] + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/resource.rb#21 + def client; end +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#11 +module Aws::ECR::Types; end + +# This data type is used in the ImageScanFinding data type. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Attribute AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#27 +class Aws::ECR::Types::Attribute < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#28 +Aws::ECR::Types::Attribute::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing authorization data for an Amazon ECR registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/AuthorizationData AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#58 +class Aws::ECR::Types::AuthorizationData < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#59 +Aws::ECR::Types::AuthorizationData::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The image details of the Amazon ECR container image. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/AwsEcrContainerImageDetails AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#108 +class Aws::ECR::Types::AwsEcrContainerImageDetails < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#109 +Aws::ECR::Types::AwsEcrContainerImageDetails::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailabilityRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#133 +class Aws::ECR::Types::BatchCheckLayerAvailabilityRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#134 +Aws::ECR::Types::BatchCheckLayerAvailabilityRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailabilityResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#151 +class Aws::ECR::Types::BatchCheckLayerAvailabilityResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#152 +Aws::ECR::Types::BatchCheckLayerAvailabilityResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Deletes specified images within a specified repository. Images are +# specified with either the `imageTag` or `imageDigest`. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImageRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#180 +class Aws::ECR::Types::BatchDeleteImageRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#181 +Aws::ECR::Types::BatchDeleteImageRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImageResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#197 +class Aws::ECR::Types::BatchDeleteImageResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#198 +Aws::ECR::Types::BatchDeleteImageResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImageRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#232 +class Aws::ECR::Types::BatchGetImageRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#233 +Aws::ECR::Types::BatchGetImageRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImageResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#250 +class Aws::ECR::Types::BatchGetImageResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#251 +Aws::ECR::Types::BatchGetImageResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetRepositoryScanningConfigurationRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#262 +class Aws::ECR::Types::BatchGetRepositoryScanningConfigurationRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#263 +Aws::ECR::Types::BatchGetRepositoryScanningConfigurationRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetRepositoryScanningConfigurationResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#279 +class Aws::ECR::Types::BatchGetRepositoryScanningConfigurationResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#280 +Aws::ECR::Types::BatchGetRepositoryScanningConfigurationResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUploadRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#309 +class Aws::ECR::Types::CompleteLayerUploadRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#310 +Aws::ECR::Types::CompleteLayerUploadRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUploadResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#336 +class Aws::ECR::Types::CompleteLayerUploadResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#337 +Aws::ECR::Types::CompleteLayerUploadResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreatePullThroughCacheRuleRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#362 +class Aws::ECR::Types::CreatePullThroughCacheRuleRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#363 +Aws::ECR::Types::CreatePullThroughCacheRuleRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreatePullThroughCacheRuleResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#392 +class Aws::ECR::Types::CreatePullThroughCacheRuleResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#393 +Aws::ECR::Types::CreatePullThroughCacheRuleResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepositoryRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#449 +class Aws::ECR::Types::CreateRepositoryRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#450 +Aws::ECR::Types::CreateRepositoryRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepositoryResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#461 +class Aws::ECR::Types::CreateRepositoryResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#462 +Aws::ECR::Types::CreateRepositoryResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The CVSS score for a finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CvssScore AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#490 +class Aws::ECR::Types::CvssScore < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#491 +Aws::ECR::Types::CvssScore::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Details on adjustments Amazon Inspector made to the CVSS score for a +# finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CvssScoreAdjustment AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#510 +class Aws::ECR::Types::CvssScoreAdjustment < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#511 +Aws::ECR::Types::CvssScoreAdjustment::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Information about the CVSS score. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CvssScoreDetails AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#545 +class Aws::ECR::Types::CvssScoreDetails < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#546 +Aws::ECR::Types::CvssScoreDetails::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#564 +class Aws::ECR::Types::DeleteLifecyclePolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#565 +Aws::ECR::Types::DeleteLifecyclePolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#591 +class Aws::ECR::Types::DeleteLifecyclePolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#592 +Aws::ECR::Types::DeleteLifecyclePolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeletePullThroughCacheRuleRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#611 +class Aws::ECR::Types::DeletePullThroughCacheRuleRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#612 +Aws::ECR::Types::DeletePullThroughCacheRuleRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeletePullThroughCacheRuleResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#639 +class Aws::ECR::Types::DeletePullThroughCacheRuleResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#640 +Aws::ECR::Types::DeletePullThroughCacheRuleResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRegistryPolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#648 +class Aws::ECR::Types::DeleteRegistryPolicyRequest < ::Aws::EmptyStructure; end + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRegistryPolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#662 +class Aws::ECR::Types::DeleteRegistryPolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#663 +Aws::ECR::Types::DeleteRegistryPolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#682 +class Aws::ECR::Types::DeleteRepositoryPolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#683 +Aws::ECR::Types::DeleteRepositoryPolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#704 +class Aws::ECR::Types::DeleteRepositoryPolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#705 +Aws::ECR::Types::DeleteRepositoryPolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#728 +class Aws::ECR::Types::DeleteRepositoryRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#729 +Aws::ECR::Types::DeleteRepositoryRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#740 +class Aws::ECR::Types::DeleteRepositoryResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#741 +Aws::ECR::Types::DeleteRepositoryResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageReplicationStatusRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#764 +class Aws::ECR::Types::DescribeImageReplicationStatusRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#765 +Aws::ECR::Types::DescribeImageReplicationStatusRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageReplicationStatusResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#788 +class Aws::ECR::Types::DescribeImageReplicationStatusResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#789 +Aws::ECR::Types::DescribeImageReplicationStatusResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindingsRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#838 +class Aws::ECR::Types::DescribeImageScanFindingsRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#839 +Aws::ECR::Types::DescribeImageScanFindingsRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindingsResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#880 +class Aws::ECR::Types::DescribeImageScanFindingsResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#881 +Aws::ECR::Types::DescribeImageScanFindingsResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing a filter on a DescribeImages operation. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImagesFilter AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#895 +class Aws::ECR::Types::DescribeImagesFilter < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#896 +Aws::ECR::Types::DescribeImagesFilter::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImagesRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#949 +class Aws::ECR::Types::DescribeImagesRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#950 +Aws::ECR::Types::DescribeImagesRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImagesResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#970 +class Aws::ECR::Types::DescribeImagesResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#971 +Aws::ECR::Types::DescribeImagesResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribePullThroughCacheRulesRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1015 +class Aws::ECR::Types::DescribePullThroughCacheRulesRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1016 +Aws::ECR::Types::DescribePullThroughCacheRulesRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribePullThroughCacheRulesResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1037 +class Aws::ECR::Types::DescribePullThroughCacheRulesResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1038 +Aws::ECR::Types::DescribePullThroughCacheRulesResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRegistryRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1046 +class Aws::ECR::Types::DescribeRegistryRequest < ::Aws::EmptyStructure; end + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRegistryResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1060 +class Aws::ECR::Types::DescribeRegistryResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1061 +Aws::ECR::Types::DescribeRegistryResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositoriesRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1111 +class Aws::ECR::Types::DescribeRepositoriesRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1112 +Aws::ECR::Types::DescribeRepositoriesRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositoriesResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1132 +class Aws::ECR::Types::DescribeRepositoriesResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1133 +Aws::ECR::Types::DescribeRepositoriesResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified layer upload does not contain any layer parts. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/EmptyUploadException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1146 +class Aws::ECR::Types::EmptyUploadException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1147 +Aws::ECR::Types::EmptyUploadException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The encryption configuration for the repository. This determines how +# the contents of your repository are encrypted at rest. +# +# By default, when no encryption configuration is set or the `AES256` +# encryption type is used, Amazon ECR uses server-side encryption with +# Amazon S3-managed encryption keys which encrypts your data at rest +# using an AES-256 encryption algorithm. This does not require any +# action on your part. +# +# For more control over the encryption of the contents of your +# repository, you can use server-side encryption with Key Management +# Service key stored in Key Management Service (KMS) to encrypt your +# images. For more information, see [Amazon ECR encryption at rest][1] +# in the *Amazon Elastic Container Registry User Guide*. +# +# +# +# [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/encryption-at-rest.html +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/EncryptionConfiguration AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1208 +class Aws::ECR::Types::EncryptionConfiguration < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1209 +Aws::ECR::Types::EncryptionConfiguration::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details of an enhanced image scan. This is returned when enhanced +# scanning is enabled for your private registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/EnhancedImageScanFinding AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1295 +class Aws::ECR::Types::EnhancedImageScanFinding < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1296 +Aws::ECR::Types::EnhancedImageScanFinding::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationTokenRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1309 +class Aws::ECR::Types::GetAuthorizationTokenRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1310 +Aws::ECR::Types::GetAuthorizationTokenRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationTokenResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1322 +class Aws::ECR::Types::GetAuthorizationTokenResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1323 +Aws::ECR::Types::GetAuthorizationTokenResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayerRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1347 +class Aws::ECR::Types::GetDownloadUrlForLayerRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1348 +Aws::ECR::Types::GetDownloadUrlForLayerRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayerResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1364 +class Aws::ECR::Types::GetDownloadUrlForLayerResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1365 +Aws::ECR::Types::GetDownloadUrlForLayerResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreviewRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1420 +class Aws::ECR::Types::GetLifecyclePolicyPreviewRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1421 +Aws::ECR::Types::GetLifecyclePolicyPreviewRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreviewResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1466 +class Aws::ECR::Types::GetLifecyclePolicyPreviewResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1467 +Aws::ECR::Types::GetLifecyclePolicyPreviewResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1485 +class Aws::ECR::Types::GetLifecyclePolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1486 +Aws::ECR::Types::GetLifecyclePolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1512 +class Aws::ECR::Types::GetLifecyclePolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1513 +Aws::ECR::Types::GetLifecyclePolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRegistryPolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1521 +class Aws::ECR::Types::GetRegistryPolicyRequest < ::Aws::EmptyStructure; end + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRegistryPolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1535 +class Aws::ECR::Types::GetRegistryPolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1536 +Aws::ECR::Types::GetRegistryPolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @api private +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRegistryScanningConfigurationRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1544 +class Aws::ECR::Types::GetRegistryScanningConfigurationRequest < ::Aws::EmptyStructure; end + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRegistryScanningConfigurationResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1558 +class Aws::ECR::Types::GetRegistryScanningConfigurationResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1559 +Aws::ECR::Types::GetRegistryScanningConfigurationResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1577 +class Aws::ECR::Types::GetRepositoryPolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1578 +Aws::ECR::Types::GetRepositoryPolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1599 +class Aws::ECR::Types::GetRepositoryPolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1600 +Aws::ECR::Types::GetRepositoryPolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing an Amazon ECR image. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Image AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1635 +class Aws::ECR::Types::Image < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1636 +Aws::ECR::Types::Image::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified image has already been pushed, and there were no changes +# to the manifest or image tag after the last push. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageAlreadyExistsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1650 +class Aws::ECR::Types::ImageAlreadyExistsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1651 +Aws::ECR::Types::ImageAlreadyExistsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object that describes an image returned by a DescribeImages +# operation. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageDetail AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1739 +class Aws::ECR::Types::ImageDetail < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1740 +Aws::ECR::Types::ImageDetail::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified image digest does not match the digest that Amazon ECR +# calculated for the image. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageDigestDoesNotMatchException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1753 +class Aws::ECR::Types::ImageDigestDoesNotMatchException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1754 +Aws::ECR::Types::ImageDigestDoesNotMatchException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing an Amazon ECR image failure. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageFailure AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1777 +class Aws::ECR::Types::ImageFailure < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1778 +Aws::ECR::Types::ImageFailure::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object with identifying information for an image in an Amazon ECR +# repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageIdentifier AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1797 +class Aws::ECR::Types::ImageIdentifier < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1798 +Aws::ECR::Types::ImageIdentifier::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The image requested does not exist in the specified repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1810 +class Aws::ECR::Types::ImageNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1811 +Aws::ECR::Types::ImageNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The status of the replication process for an image. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageReplicationStatus AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1840 +class Aws::ECR::Types::ImageReplicationStatus < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1841 +Aws::ECR::Types::ImageReplicationStatus::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains information about an image scan finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageScanFinding AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1876 +class Aws::ECR::Types::ImageScanFinding < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1877 +Aws::ECR::Types::ImageScanFinding::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details of an image scan. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageScanFindings AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1910 +class Aws::ECR::Types::ImageScanFindings < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1911 +Aws::ECR::Types::ImageScanFindings::SENSITIVE = T.let(T.unsafe(nil), Array) + +# A summary of the last completed image scan. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageScanFindingsSummary AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1934 +class Aws::ECR::Types::ImageScanFindingsSummary < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1935 +Aws::ECR::Types::ImageScanFindingsSummary::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The current status of an image scan. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageScanStatus AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1953 +class Aws::ECR::Types::ImageScanStatus < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1954 +Aws::ECR::Types::ImageScanStatus::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The image scanning configuration for a repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageScanningConfiguration AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1975 +class Aws::ECR::Types::ImageScanningConfiguration < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1976 +Aws::ECR::Types::ImageScanningConfiguration::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified image is tagged with a tag that already exists. The +# repository is configured for tag immutability. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageTagAlreadyExistsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1989 +class Aws::ECR::Types::ImageTagAlreadyExistsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#1990 +Aws::ECR::Types::ImageTagAlreadyExistsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUploadRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2008 +class Aws::ECR::Types::InitiateLayerUploadRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2009 +Aws::ECR::Types::InitiateLayerUploadRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUploadResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2027 +class Aws::ECR::Types::InitiateLayerUploadResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2028 +Aws::ECR::Types::InitiateLayerUploadResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The layer digest calculation performed by Amazon ECR upon receipt of +# the image layer does not match the digest specified. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InvalidLayerException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2042 +class Aws::ECR::Types::InvalidLayerException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2043 +Aws::ECR::Types::InvalidLayerException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The layer part size is not valid, or the first byte specified is not +# consecutive to the last byte of a previous layer part upload. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InvalidLayerPartException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2078 +class Aws::ECR::Types::InvalidLayerPartException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2079 +Aws::ECR::Types::InvalidLayerPartException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified parameter is invalid. Review the available parameters +# for the API request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InvalidParameterException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2093 +class Aws::ECR::Types::InvalidParameterException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2094 +Aws::ECR::Types::InvalidParameterException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An invalid parameter has been specified. Tag keys can have a maximum +# character length of 128 characters, and tag values can have a maximum +# length of 256 characters. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InvalidTagParameterException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2108 +class Aws::ECR::Types::InvalidTagParameterException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2109 +Aws::ECR::Types::InvalidTagParameterException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The operation failed due to a KMS exception. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/KmsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2126 +class Aws::ECR::Types::KmsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2127 +Aws::ECR::Types::KmsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing an Amazon ECR image layer. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Layer AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2157 +class Aws::ECR::Types::Layer < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2158 +Aws::ECR::Types::Layer::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The image layer already exists in the associated repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LayerAlreadyExistsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2171 +class Aws::ECR::Types::LayerAlreadyExistsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2172 +Aws::ECR::Types::LayerAlreadyExistsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing an Amazon ECR image layer failure. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LayerFailure AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2195 +class Aws::ECR::Types::LayerFailure < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2196 +Aws::ECR::Types::LayerFailure::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified layer is not available because it is not associated with +# an image. Unassociated image layers may be cleaned up at any time. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LayerInaccessibleException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2210 +class Aws::ECR::Types::LayerInaccessibleException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2211 +Aws::ECR::Types::LayerInaccessibleException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Layer parts must be at least 5 MiB in size. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LayerPartTooSmallException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2224 +class Aws::ECR::Types::LayerPartTooSmallException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2225 +Aws::ECR::Types::LayerPartTooSmallException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified layers could not be found, or the specified layer is not +# valid for this repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LayersNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2239 +class Aws::ECR::Types::LayersNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2240 +Aws::ECR::Types::LayersNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The lifecycle policy could not be found, and no policy is set to the +# repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2253 +class Aws::ECR::Types::LifecyclePolicyNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2254 +Aws::ECR::Types::LifecyclePolicyNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The filter for the lifecycle policy preview. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewFilter AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2267 +class Aws::ECR::Types::LifecyclePolicyPreviewFilter < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2268 +Aws::ECR::Types::LifecyclePolicyPreviewFilter::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The previous lifecycle policy preview request has not completed. Wait +# and try again. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewInProgressException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2281 +class Aws::ECR::Types::LifecyclePolicyPreviewInProgressException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2282 +Aws::ECR::Types::LifecyclePolicyPreviewInProgressException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# There is no dry run for this repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2294 +class Aws::ECR::Types::LifecyclePolicyPreviewNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2295 +Aws::ECR::Types::LifecyclePolicyPreviewNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The result of the lifecycle policy preview. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewResult AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2329 +class Aws::ECR::Types::LifecyclePolicyPreviewResult < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2330 +Aws::ECR::Types::LifecyclePolicyPreviewResult::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The summary of the lifecycle policy preview request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyPreviewSummary AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2343 +class Aws::ECR::Types::LifecyclePolicyPreviewSummary < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2344 +Aws::ECR::Types::LifecyclePolicyPreviewSummary::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The type of action to be taken. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LifecyclePolicyRuleAction AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2357 +class Aws::ECR::Types::LifecyclePolicyRuleAction < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2358 +Aws::ECR::Types::LifecyclePolicyRuleAction::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The operation did not succeed because it would have exceeded a service +# limit for your account. For more information, see [Amazon ECR service +# quotas][1] in the Amazon Elastic Container Registry User Guide. +# +# +# +# [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LimitExceededException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2377 +class Aws::ECR::Types::LimitExceededException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2378 +Aws::ECR::Types::LimitExceededException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing a filter on a ListImages operation. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesFilter AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2392 +class Aws::ECR::Types::ListImagesFilter < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2393 +Aws::ECR::Types::ListImagesFilter::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2444 +class Aws::ECR::Types::ListImagesRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2445 +Aws::ECR::Types::ListImagesRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2464 +class Aws::ECR::Types::ListImagesResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2465 +Aws::ECR::Types::ListImagesResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResourceRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2478 +class Aws::ECR::Types::ListTagsForResourceRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2479 +Aws::ECR::Types::ListTagsForResourceRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResourceResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2490 +class Aws::ECR::Types::ListTagsForResourceResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2491 +Aws::ECR::Types::ListTagsForResourceResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Information about a package vulnerability finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PackageVulnerabilityDetails AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2552 +class Aws::ECR::Types::PackageVulnerabilityDetails < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2553 +Aws::ECR::Types::PackageVulnerabilityDetails::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details of a pull through cache rule. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PullThroughCacheRule AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2584 +class Aws::ECR::Types::PullThroughCacheRule < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2585 +Aws::ECR::Types::PullThroughCacheRule::SENSITIVE = T.let(T.unsafe(nil), Array) + +# A pull through cache rule with these settings already exists for the +# private registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PullThroughCacheRuleAlreadyExistsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2598 +class Aws::ECR::Types::PullThroughCacheRuleAlreadyExistsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2599 +Aws::ECR::Types::PullThroughCacheRuleAlreadyExistsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The pull through cache rule was not found. Specify a valid pull +# through cache rule and try again. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PullThroughCacheRuleNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2612 +class Aws::ECR::Types::PullThroughCacheRuleNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2613 +Aws::ECR::Types::PullThroughCacheRuleNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2655 +class Aws::ECR::Types::PutImageRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2656 +Aws::ECR::Types::PutImageRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2667 +class Aws::ECR::Types::PutImageResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2668 +Aws::ECR::Types::PutImageResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfigurationRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2695 +class Aws::ECR::Types::PutImageScanningConfigurationRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2696 +Aws::ECR::Types::PutImageScanningConfigurationRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfigurationResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2717 +class Aws::ECR::Types::PutImageScanningConfigurationResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2718 +Aws::ECR::Types::PutImageScanningConfigurationResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutabilityRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2746 +class Aws::ECR::Types::PutImageTagMutabilityRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2747 +Aws::ECR::Types::PutImageTagMutabilityRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutabilityResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2768 +class Aws::ECR::Types::PutImageTagMutabilityResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2769 +Aws::ECR::Types::PutImageTagMutabilityResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2792 +class Aws::ECR::Types::PutLifecyclePolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2793 +Aws::ECR::Types::PutLifecyclePolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2814 +class Aws::ECR::Types::PutLifecyclePolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2815 +Aws::ECR::Types::PutLifecyclePolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutRegistryPolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2833 +class Aws::ECR::Types::PutRegistryPolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2834 +Aws::ECR::Types::PutRegistryPolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutRegistryPolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2850 +class Aws::ECR::Types::PutRegistryPolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2851 +Aws::ECR::Types::PutRegistryPolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutRegistryScanningConfigurationRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2881 +class Aws::ECR::Types::PutRegistryScanningConfigurationRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2882 +Aws::ECR::Types::PutRegistryScanningConfigurationRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutRegistryScanningConfigurationResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2893 +class Aws::ECR::Types::PutRegistryScanningConfigurationResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2894 +Aws::ECR::Types::PutRegistryScanningConfigurationResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutReplicationConfigurationRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2905 +class Aws::ECR::Types::PutReplicationConfigurationRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2906 +Aws::ECR::Types::PutReplicationConfigurationRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutReplicationConfigurationResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2917 +class Aws::ECR::Types::PutReplicationConfigurationResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2918 +Aws::ECR::Types::PutReplicationConfigurationResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Details about the recommended course of action to remediate the +# finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Recommendation AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2937 +class Aws::ECR::Types::Recommendation < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2938 +Aws::ECR::Types::Recommendation::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The manifest list is referencing an image that does not exist. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ReferencedImagesNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2950 +class Aws::ECR::Types::ReferencedImagesNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2951 +Aws::ECR::Types::ReferencedImagesNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The registry doesn't have an associated registry policy. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RegistryPolicyNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2963 +class Aws::ECR::Types::RegistryPolicyNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2964 +Aws::ECR::Types::RegistryPolicyNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The scanning configuration for a private registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RegistryScanningConfiguration AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2982 +class Aws::ECR::Types::RegistryScanningConfiguration < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#2983 +Aws::ECR::Types::RegistryScanningConfiguration::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details of a scanning rule for a private registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RegistryScanningRule AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3007 +class Aws::ECR::Types::RegistryScanningRule < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3008 +Aws::ECR::Types::RegistryScanningRule::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Information on how to remediate a finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Remediation AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3022 +class Aws::ECR::Types::Remediation < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3023 +Aws::ECR::Types::Remediation::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The replication configuration for a registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ReplicationConfiguration AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3037 +class Aws::ECR::Types::ReplicationConfiguration < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3038 +Aws::ECR::Types::ReplicationConfiguration::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An array of objects representing the destination for a replication +# rule. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ReplicationDestination AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3059 +class Aws::ECR::Types::ReplicationDestination < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3060 +Aws::ECR::Types::ReplicationDestination::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An array of objects representing the replication destinations and +# repository filters for a replication configuration. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ReplicationRule AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3083 +class Aws::ECR::Types::ReplicationRule < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3084 +Aws::ECR::Types::ReplicationRule::SENSITIVE = T.let(T.unsafe(nil), Array) + +# An object representing a repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Repository AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3140 +class Aws::ECR::Types::Repository < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3141 +Aws::ECR::Types::Repository::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified repository already exists in the specified registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryAlreadyExistsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3154 +class Aws::ECR::Types::RepositoryAlreadyExistsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3155 +Aws::ECR::Types::RepositoryAlreadyExistsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The filter settings used with image replication. Specifying a +# repository filter to a replication rule provides a method for +# controlling which repositories in a private registry are replicated. +# If no filters are added, the contents of all repositories are +# replicated. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryFilter AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3181 +class Aws::ECR::Types::RepositoryFilter < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3182 +Aws::ECR::Types::RepositoryFilter::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified repository contains images. To delete a repository that +# contains images, you must force the deletion with the `force` +# parameter. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryNotEmptyException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3197 +class Aws::ECR::Types::RepositoryNotEmptyException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3198 +Aws::ECR::Types::RepositoryNotEmptyException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified repository could not be found. Check the spelling of the +# specified repository and ensure that you are performing operations on +# the correct registry. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3213 +class Aws::ECR::Types::RepositoryNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3214 +Aws::ECR::Types::RepositoryNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified repository and registry combination does not have an +# associated repository policy. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryPolicyNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3228 +class Aws::ECR::Types::RepositoryPolicyNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3229 +Aws::ECR::Types::RepositoryPolicyNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details of the scanning configuration for a repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryScanningConfiguration AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3262 +class Aws::ECR::Types::RepositoryScanningConfiguration < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3263 +Aws::ECR::Types::RepositoryScanningConfiguration::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details about any failures associated with the scanning +# configuration of a repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/RepositoryScanningConfigurationFailure AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3287 +class Aws::ECR::Types::RepositoryScanningConfigurationFailure < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3288 +Aws::ECR::Types::RepositoryScanningConfigurationFailure::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Details about the resource involved in a finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Resource AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3317 +class Aws::ECR::Types::Resource < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3318 +Aws::ECR::Types::Resource::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Contains details about the resource involved in the finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ResourceDetails AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3332 +class Aws::ECR::Types::ResourceDetails < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3333 +Aws::ECR::Types::ResourceDetails::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified image scan could not be found. Ensure that image +# scanning is enabled on the repository and try again. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ScanNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3346 +class Aws::ECR::Types::ScanNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3347 +Aws::ECR::Types::ScanNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The details of a scanning repository filter. For more information on +# how to use filters, see [Using filters][1] in the *Amazon Elastic +# Container Registry User Guide*. +# +# +# +# [1]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html#image-scanning-filters +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ScanningRepositoryFilter AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3371 +class Aws::ECR::Types::ScanningRepositoryFilter < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3372 +Aws::ECR::Types::ScanningRepositoryFilter::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Information about the Amazon Inspector score given to a finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ScoreDetails AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3386 +class Aws::ECR::Types::ScoreDetails < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3387 +Aws::ECR::Types::ScoreDetails::SENSITIVE = T.let(T.unsafe(nil), Array) + +# These errors are usually caused by a server-side issue. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ServerException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3400 +class Aws::ECR::Types::ServerException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3401 +Aws::ECR::Types::ServerException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicyRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3438 +class Aws::ECR::Types::SetRepositoryPolicyRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3439 +Aws::ECR::Types::SetRepositoryPolicyRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicyResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3460 +class Aws::ECR::Types::SetRepositoryPolicyResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3461 +Aws::ECR::Types::SetRepositoryPolicyResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScanRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3485 +class Aws::ECR::Types::StartImageScanRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3486 +Aws::ECR::Types::StartImageScanRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScanResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3513 +class Aws::ECR::Types::StartImageScanResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3514 +Aws::ECR::Types::StartImageScanResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreviewRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3538 +class Aws::ECR::Types::StartLifecyclePolicyPreviewRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3539 +Aws::ECR::Types::StartLifecyclePolicyPreviewRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreviewResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3565 +class Aws::ECR::Types::StartLifecyclePolicyPreviewResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3566 +Aws::ECR::Types::StartLifecyclePolicyPreviewResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The metadata to apply to a resource to help you categorize and +# organize them. Each tag consists of a key and a value, both of which +# you define. Tag keys can have a maximum character length of 128 +# characters, and tag values can have a maximum length of 256 +# characters. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Tag AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3590 +class Aws::ECR::Types::Tag < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3591 +Aws::ECR::Types::Tag::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResourceRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3612 +class Aws::ECR::Types::TagResourceRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3613 +Aws::ECR::Types::TagResourceRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResourceResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3619 +class Aws::ECR::Types::TagResourceResponse < ::Aws::EmptyStructure; end + +# The list of tags on the repository is over the limit. The maximum +# number of tags that can be applied to a repository is 50. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TooManyTagsException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3630 +class Aws::ECR::Types::TooManyTagsException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3631 +Aws::ECR::Types::TooManyTagsException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The image is of a type that cannot be scanned. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UnsupportedImageTypeException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3643 +class Aws::ECR::Types::UnsupportedImageTypeException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3644 +Aws::ECR::Types::UnsupportedImageTypeException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The specified upstream registry isn't supported. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UnsupportedUpstreamRegistryException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3656 +class Aws::ECR::Types::UnsupportedUpstreamRegistryException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3657 +Aws::ECR::Types::UnsupportedUpstreamRegistryException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResourceRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3675 +class Aws::ECR::Types::UntagResourceRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3676 +Aws::ECR::Types::UntagResourceRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResourceResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3682 +class Aws::ECR::Types::UntagResourceResponse < ::Aws::EmptyStructure; end + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPartRequest AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3721 +class Aws::ECR::Types::UploadLayerPartRequest < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3722 +Aws::ECR::Types::UploadLayerPartRequest::SENSITIVE = T.let(T.unsafe(nil), Array) + +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPartResponse AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3748 +class Aws::ECR::Types::UploadLayerPartResponse < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3749 +Aws::ECR::Types::UploadLayerPartResponse::SENSITIVE = T.let(T.unsafe(nil), Array) + +# The upload could not be found, or the specified upload ID is not valid +# for this repository. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadNotFoundException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3763 +class Aws::ECR::Types::UploadNotFoundException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3764 +Aws::ECR::Types::UploadNotFoundException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# There was an exception validating this request. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ValidationException AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3776 +class Aws::ECR::Types::ValidationException < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3777 +Aws::ECR::Types::ValidationException::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Information on the vulnerable package identified by a finding. +# +# @see http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/VulnerablePackage AWS API Documentation +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3825 +class Aws::ECR::Types::VulnerablePackage < ::Struct + include ::Aws::Structure +end + +# source://aws-sdk-ecr//lib/aws-sdk-ecr/types.rb#3826 +Aws::ECR::Types::VulnerablePackage::SENSITIVE = T.let(T.unsafe(nil), Array) + +# Waiters are utility methods that poll for a particular state to occur +# on a client. Waiters can fail after a number of attempts at a polling +# interval defined for the service client. +# +# For a list of operations that can be waited for and the +# client methods called for each operation, see the table below or the +# {Client#wait_until} field documentation for the {Client}. +# +# # Invoking a Waiter +# To invoke a waiter, call #wait_until on a {Client}. The first parameter +# is the waiter name, which is specific to the service client and indicates +# which operation is being waited for. The second parameter is a hash of +# parameters that are passed to the client method called by the waiter, +# which varies according to the waiter name. +# +# # Wait Failures +# To catch errors in a waiter, use WaiterFailed, +# as shown in the following example. +# +# rescue rescue Aws::Waiters::Errors::WaiterFailed => error +# puts "failed waiting for instance running: #{error.message} +# end +# +# # Configuring a Waiter +# Each waiter has a default polling interval and a maximum number of +# attempts it will make before returning control to your program. +# To set these values, use the `max_attempts` and `delay` parameters +# in your `#wait_until` call. +# The following example waits for up to 25 seconds, polling every five seconds. +# +# client.wait_until(...) do |w| +# w.max_attempts = 5 +# w.delay = 5 +# end +# +# To disable wait failures, set the value of either of these parameters +# to `nil`. +# +# # Extending a Waiter +# To modify the behavior of waiters, you can register callbacks that are +# triggered before each polling attempt and before waiting. +# +# The following example implements an exponential backoff in a waiter +# by doubling the amount of time to wait on every attempt. +# +# client.wait_until(...) do |w| +# w.interval = 0 # disable normal sleep +# w.before_wait do |n, resp| +# sleep(n ** 2) +# end +# end +# +# # Available Waiters +# +# The following table lists the valid waiter names, the operations they call, +# and the default `:delay` and `:max_attempts` values. +# +# | waiter_name | params | :delay | :max_attempts | +# | --------------------------------- | ------------------------------------- | -------- | ------------- | +# | image_scan_complete | {Client#describe_image_scan_findings} | 5 | 60 | +# | lifecycle_policy_preview_complete | {Client#get_lifecycle_policy_preview} | 5 | 20 | +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#75 +module Aws::ECR::Waiters; end + +# Wait until an image scan is complete and findings can be accessed +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#78 +class Aws::ECR::Waiters::ImageScanComplete + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [ImageScanComplete] a new instance of ImageScanComplete + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#86 + def initialize(options); end + + # @option params + # @option params + # @option params + # @option params + # @option params + # @param params [Hash] a customizable set of options + # @return [Types::DescribeImageScanFindingsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::DescribeImageScanFindingsResponse#registry_id #registry_id} => String + # * {Types::DescribeImageScanFindingsResponse#repository_name #repository_name} => String + # * {Types::DescribeImageScanFindingsResponse#image_id #image_id} => Types::ImageIdentifier + # * {Types::DescribeImageScanFindingsResponse#image_scan_status #image_scan_status} => Types::ImageScanStatus + # * {Types::DescribeImageScanFindingsResponse#image_scan_findings #image_scan_findings} => Types::ImageScanFindings + # * {Types::DescribeImageScanFindingsResponse#next_token #next_token} => String + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#113 + def wait(params = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#118 + def waiter; end +end + +# Wait until a lifecycle policy preview request is complete and results can be accessed +# +# source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#123 +class Aws::ECR::Waiters::LifecyclePolicyPreviewComplete + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [LifecyclePolicyPreviewComplete] a new instance of LifecyclePolicyPreviewComplete + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#131 + def initialize(options); end + + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @param params [Hash] a customizable set of options + # @return [Types::GetLifecyclePolicyPreviewResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::GetLifecyclePolicyPreviewResponse#registry_id #registry_id} => String + # * {Types::GetLifecyclePolicyPreviewResponse#repository_name #repository_name} => String + # * {Types::GetLifecyclePolicyPreviewResponse#lifecycle_policy_text #lifecycle_policy_text} => String + # * {Types::GetLifecyclePolicyPreviewResponse#status #status} => String + # * {Types::GetLifecyclePolicyPreviewResponse#next_token #next_token} => String + # * {Types::GetLifecyclePolicyPreviewResponse#preview_results #preview_results} => Array<Types::LifecyclePolicyPreviewResult> + # * {Types::GetLifecyclePolicyPreviewResponse#summary #summary} => Types::LifecyclePolicyPreviewSummary + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#158 + def wait(params = T.unsafe(nil)); end + + # @api private + # + # source://aws-sdk-ecr//lib/aws-sdk-ecr/waiters.rb#163 + def waiter; end +end diff --git a/sorbet/rbi/gems/aws-sigv4@1.6.0.rbi b/sorbet/rbi/gems/aws-sigv4@1.6.0.rbi new file mode 100644 index 0000000000..4ecb098b88 --- /dev/null +++ b/sorbet/rbi/gems/aws-sigv4@1.6.0.rbi @@ -0,0 +1,595 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `aws-sigv4` gem. +# Please instead update this file by running `bin/tapioca gem aws-sigv4`. + +# source://aws-sigv4//lib/aws-sigv4/credentials.rb#3 +module Aws + class << self + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#133 + def config; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#136 + def config=(config); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#195 + def eager_autoload!(*args); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#188 + def empty_connection_pools!; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#145 + def partition(partition_name); end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#150 + def partitions; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#126 + def shared_config; end + + # source://aws-sdk-core/3.181.0/lib/aws-sdk-core.rb#165 + def use_bundled_cert!; end + end +end + +# source://aws-sigv4//lib/aws-sigv4/credentials.rb#4 +module Aws::Sigv4; end + +# Users that wish to configure static credentials can use the +# `:access_key_id` and `:secret_access_key` constructor options. +# +# @api private +# +# source://aws-sigv4//lib/aws-sigv4/credentials.rb#8 +class Aws::Sigv4::Credentials + # @api private + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Credentials] a new instance of Credentials + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#13 + def initialize(options = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#25 + def access_key_id; end + + # @api private + # @return [String] + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#28 + def secret_access_key; end + + # @api private + # @return [String, nil] + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#31 + def session_token; end + + # @api private + # @return [Boolean] Returns `true` if the access key id and secret + # access key are both set. + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#35 + def set?; end +end + +# source://aws-sigv4//lib/aws-sigv4/errors.rb#5 +module Aws::Sigv4::Errors; end + +# source://aws-sigv4//lib/aws-sigv4/errors.rb#7 +class Aws::Sigv4::Errors::MissingCredentialsError < ::ArgumentError + # @return [MissingCredentialsError] a new instance of MissingCredentialsError + # + # source://aws-sigv4//lib/aws-sigv4/errors.rb#8 + def initialize(msg = T.unsafe(nil)); end +end + +# source://aws-sigv4//lib/aws-sigv4/errors.rb#18 +class Aws::Sigv4::Errors::MissingRegionError < ::ArgumentError + # @return [MissingRegionError] a new instance of MissingRegionError + # + # source://aws-sigv4//lib/aws-sigv4/errors.rb#19 + def initialize(*args); end +end + +# source://aws-sigv4//lib/aws-sigv4/signature.rb#5 +class Aws::Sigv4::Signature + # @api private + # @return [Signature] a new instance of Signature + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#8 + def initialize(options); end + + # @return [String] For debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#27 + def canonical_request; end + + # @return [String] For debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#27 + def canonical_request=(_arg0); end + + # @return [String] For debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#33 + def content_sha256; end + + # @return [String] For debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#33 + def content_sha256=(_arg0); end + + # @return [Hash] Internal data for debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#36 + def extra; end + + # @return [Hash] Internal data for debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#36 + def extra=(_arg0); end + + # @return [Hash] A hash of headers that should + # be applied to the HTTP request. Header keys are lower + # cased strings and may include the following: + # + # * 'host' + # * 'x-amz-date' + # * 'x-amz-security-token' + # * 'x-amz-content-sha256' + # * 'authorization' + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#24 + def headers; end + + # @return [Hash] A hash of headers that should + # be applied to the HTTP request. Header keys are lower + # cased strings and may include the following: + # + # * 'host' + # * 'x-amz-date' + # * 'x-amz-security-token' + # * 'x-amz-content-sha256' + # * 'authorization' + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#24 + def headers=(_arg0); end + + # @return [String] For debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#30 + def string_to_sign; end + + # @return [String] For debugging purposes. + # + # source://aws-sigv4//lib/aws-sigv4/signature.rb#30 + def string_to_sign=(_arg0); end +end + +# Utility class for creating AWS signature version 4 signature. This class +# provides two methods for generating signatures: +# +# * {#sign_request} - Computes a signature of the given request, returning +# the hash of headers that should be applied to the request. +# +# * {#presign_url} - Computes a presigned request with an expiration. +# By default, the body of this request is not signed and the request +# expires in 15 minutes. +# +# ## Configuration +# +# To use the signer, you need to specify the service, region, and credentials. +# The service name is normally the endpoint prefix to an AWS service. For +# example: +# +# ec2.us-west-1.amazonaws.com => ec2 +# +# The region is normally the second portion of the endpoint, following +# the service name. +# +# ec2.us-west-1.amazonaws.com => us-west-1 +# +# It is important to have the correct service and region name, or the +# signature will be invalid. +# +# ## Credentials +# +# The signer requires credentials. You can configure the signer +# with static credentials: +# +# signer = Aws::Sigv4::Signer.new( +# service: 's3', +# region: 'us-east-1', +# # static credentials +# access_key_id: 'akid', +# secret_access_key: 'secret' +# ) +# +# You can also provide refreshing credentials via the `:credentials_provider`. +# If you are using the AWS SDK for Ruby, you can use any of the credential +# classes: +# +# signer = Aws::Sigv4::Signer.new( +# service: 's3', +# region: 'us-east-1', +# credentials_provider: Aws::InstanceProfileCredentials.new +# ) +# +# Other AWS SDK for Ruby classes that can be provided via `:credentials_provider`: +# +# * `Aws::Credentials` +# * `Aws::SharedCredentials` +# * `Aws::InstanceProfileCredentials` +# * `Aws::AssumeRoleCredentials` +# * `Aws::ECSCredentials` +# +# A credential provider is any object that responds to `#credentials` +# returning another object that responds to `#access_key_id`, `#secret_access_key`, +# and `#session_token`. +# +# source://aws-sigv4//lib/aws-sigv4/signer.rb#75 +class Aws::Sigv4::Signer + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @overload initialize + # @overload initialize + # @overload initialize + # @param options [Hash] a customizable set of options + # @return [Signer] a new instance of Signer + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#141 + def initialize(options = T.unsafe(nil)); end + + # @return [Boolean] When `true` the `x-amz-content-sha256` header will be signed and + # returned in the signature headers. + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#185 + def apply_checksum_header; end + + # @return [#credentials] Returns an object that responds to + # `#credentials`, returning an object that responds to the following + # methods: + # + # * `#access_key_id` => String + # * `#secret_access_key` => String + # * `#session_token` => String, nil + # * `#set?` => Boolean + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#177 + def credentials_provider; end + + # Signs a URL with query authentication. Using query parameters + # to authenticate requests is useful when you want to express a + # request entirely in a URL. This method is also referred as + # presigning a URL. + # + # See [Authenticating Requests: Using Query Parameters (AWS Signature Version 4)](http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) for more information. + # + # To generate a presigned URL, you must provide a HTTP URI and + # the http method. + # + # url = signer.presign_url( + # http_method: 'GET', + # url: 'https://my-bucket.s3-us-east-1.amazonaws.com/key', + # expires_in: 60 + # ) + # + # By default, signatures are valid for 15 minutes. You can specify + # the number of seconds for the URL to expire in. + # + # url = signer.presign_url( + # http_method: 'GET', + # url: 'https://my-bucket.s3-us-east-1.amazonaws.com/key', + # expires_in: 3600 # one hour + # ) + # + # You can provide a hash of headers that you plan to send with the + # request. Every 'X-Amz-*' header you plan to send with the request + # **must** be provided, or the signature is invalid. Other headers + # are optional, but should be provided for security reasons. + # + # url = signer.presign_url( + # http_method: 'PUT', + # url: 'https://my-bucket.s3-us-east-1.amazonaws.com/key', + # headers: { + # 'X-Amz-Meta-Custom' => 'metadata' + # } + # ) + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [HTTPS::URI, HTTP::URI] + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#402 + def presign_url(options); end + + # @return [String] + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#166 + def region; end + + # @return [String] + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#163 + def service; end + + # Signs a event and returns signature headers and prior signature + # used for next event signing. + # + # Headers of a sigv4 signed event message only contains 2 headers + # * ':chunk-signature' + # * computed signature of the event, binary string, 'bytes' type + # * ':date' + # * millisecond since epoch, 'timestamp' type + # + # Payload of the sigv4 signed event message contains eventstream encoded message + # which is serialized based on input and protocol + # + # To sign events + # + # headers_0, signature_0 = signer.sign_event( + # prior_signature, # hex-encoded string + # payload_0, # binary string (eventstream encoded event 0) + # encoder, # Aws::EventStreamEncoder + # ) + # + # headers_1, signature_1 = signer.sign_event( + # signature_0, + # payload_1, # binary string (eventstream encoded event 1) + # encoder + # ) + # + # The initial prior_signature should be using the signature computed at initial request + # + # Note: + # + # Since ':chunk-signature' header value has bytes type, the signature value provided + # needs to be a binary string instead of a hex-encoded string (like original signature + # V4 algorithm). Thus, when returning signature value used for next event siging, the + # signature value (a binary string) used at ':chunk-signature' needs to converted to + # hex-encoded string using #unpack + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#315 + def sign_event(prior_signature, payload, encoder); end + + # Computes a version 4 signature signature. Returns the resultant + # signature as a hash of headers to apply to your HTTP request. The given + # request is not modified. + # + # signature = signer.sign_request( + # http_method: 'PUT', + # url: 'https://domain.com', + # headers: { + # 'Abc' => 'xyz', + # }, + # body: 'body' # String or IO object + # ) + # + # # Apply the following hash of headers to your HTTP request + # signature.headers['host'] + # signature.headers['x-amz-date'] + # signature.headers['x-amz-security-token'] + # signature.headers['x-amz-content-sha256'] + # signature.headers['authorization'] + # + # In addition to computing the signature headers, the canonicalized + # request, string to sign and content sha256 checksum are also available. + # These values are useful for debugging signature errors returned by AWS. + # + # signature.canonical_request #=> "..." + # signature.string_to_sign #=> "..." + # signature.content_sha256 #=> "..." + # + # @option request + # @option request + # @option request + # @option request + # @param request [Hash] + # @return [Signature] Return an instance of {Signature} that has + # a `#headers` method. The headers must be applied to your request. + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#234 + def sign_request(request); end + + # @return [Set] Returns a set of header names that should not be signed. + # All header names have been downcased. + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#181 + def unsigned_headers; end + + private + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#590 + def canonical_header_value(value); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#578 + def canonical_headers(headers); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#448 + def canonical_request(http_method, url, headers, content_sha256); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#500 + def credential(credentials, date); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#491 + def credential_scope(date); end + + # Returns true if credentials are set (not nil or empty) + # Credentials may not implement the Credentials interface + # and may just be credential like Client response objects + # (eg those returned by sts#assume_role) + # + # @return [Boolean] + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#718 + def credentials_set?(credentials); end + + # the credentials used by CRT must be a + # CRT StaticCredentialsProvider object + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#737 + def crt_fetch_credentials; end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#806 + def crt_presign_url(options); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#747 + def crt_sign_request(request); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#675 + def downcase_headers(headers); end + + # Comparing to original signature v4 algorithm, + # returned signature is a binary string instread of + # hex-encoded string. (Since ':chunk-signature' requires + # 'bytes' type) + # + # Note: + # converting signature from binary string to hex-encoded + # string is handled at #sign_event instead. (Will be used + # as next prior signature for event signing) + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#521 + def event_signature(secret_access_key, date, string_to_sign); end + + # Compared to original #string_to_sign at signature v4 algorithm + # there is no canonical_request concept for an eventstream event, + # instead, an event contains headers and payload two parts, and + # they will be used for computing digest in #event_string_to_sign + # + # Note: + # While headers need to be encoded under eventstream format, + # payload used is already eventstream encoded (event without signature), + # thus no extra encoding is needed. + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#477 + def event_string_to_sign(datetime, headers, payload, prior_signature, encoder); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#647 + def extract_credentials_provider(options); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#682 + def extract_expires_in(options); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#657 + def extract_http_method(request); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#639 + def extract_region(options); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#630 + def extract_service(options); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#666 + def extract_url(request); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#700 + def fetch_credentials; end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#626 + def hexhmac(key, value); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#622 + def hmac(key, value); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#594 + def host(uri); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#539 + def normalized_querystring(querystring); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#529 + def path(url); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#725 + def presigned_url_expiration(options, expiration); end + + # @param value [File, Tempfile, IO#read, String] + # @return [String] + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#605 + def sha256_hexdigest(value); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#504 + def signature(secret_access_key, date, string_to_sign); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#568 + def signed_headers(headers); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#459 + def string_to_sign(datetime, canonical_request); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#692 + def uri_escape(string); end + + # source://aws-sigv4//lib/aws-sigv4/signer.rb#696 + def uri_escape_path(string); end + + class << self + # @api private + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#864 + def uri_escape(string); end + + # @api private + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#859 + def uri_escape_path(path); end + + # @return [Boolean] + # + # source://aws-sigv4//lib/aws-sigv4/signer.rb#854 + def use_crt?; end + end +end + +# Users that wish to configure static credentials can use the +# `:access_key_id` and `:secret_access_key` constructor options. +# +# @api private +# +# source://aws-sigv4//lib/aws-sigv4/credentials.rb#46 +class Aws::Sigv4::StaticCredentialsProvider + # @api private + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [StaticCredentialsProvider] a new instance of StaticCredentialsProvider + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#52 + def initialize(options = T.unsafe(nil)); end + + # @api private + # @return [Credentials] + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#59 + def credentials; end + + # @api private + # @return [Boolean] + # + # source://aws-sigv4//lib/aws-sigv4/credentials.rb#62 + def set?; end +end + +# source://aws-sigv4//lib/aws-sigv4.rb#10 +Aws::Sigv4::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/backport@1.2.0.rbi b/sorbet/rbi/gems/backport@1.2.0.rbi new file mode 100644 index 0000000000..7595d38b56 --- /dev/null +++ b/sorbet/rbi/gems/backport@1.2.0.rbi @@ -0,0 +1,522 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `backport` gem. +# Please instead update this file by running `bin/tapioca gem backport`. + +# An event-driven IO library. +# +# source://backport//lib/backport/version.rb#1 +module Backport + class << self + # @return [Logger] + # + # source://backport//lib/backport.rb#75 + def logger; end + + # Prepare an interval server to run in Backport. + # + # @param period [Float] Seconds between intervals + # @return [void] + # + # source://backport//lib/backport.rb#35 + def prepare_interval(period, &block); end + + # Prepare a STDIO server to run in Backport. + # + # @param adapter [Adapter] + # @return [void] + # + # source://backport//lib/backport.rb#17 + def prepare_stdio_server(adapter: T.unsafe(nil)); end + + # Prepare a TCP server to run in Backport. + # + # @param host [String] + # @param port [Integer] + # @param adapter [Adapter] + # @return [void] + # + # source://backport//lib/backport.rb#27 + def prepare_tcp_server(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil)); end + + # Run the Backport machine. The provided block will be executed before the + # machine starts. Program execution is blocked until the machine stops. + # + # @example Print "tick" once per second + # Backport.run do + # Backport.prepare_interval 1 do + # puts "tick" + # end + # end + # @return [void] + # + # source://backport//lib/backport.rb#50 + def run(&block); end + + # Stop all running Backport machines. + # + # For more accurate control, consider stopping the machine + # from the self reference in Machine#run, e.g.: + # + # ``` + # Backport.run do |machine| + # # ... + # machine.stop + # end + # ``` + # + # @return [void] + # + # source://backport//lib/backport.rb#70 + def stop; end + + private + + # @return [Array] + # + # source://backport//lib/backport.rb#82 + def machines; end + end +end + +# The application interface between Backport servers and clients. +# +# source://backport//lib/backport/adapter.rb#4 +class Backport::Adapter + # @param output [IO] + # @param remote [Hash{Symbol => String, Integer}] + # @return [Adapter] a new instance of Adapter + # + # source://backport//lib/backport/adapter.rb#7 + def initialize(output, remote = T.unsafe(nil)); end + + # Close the client connection. + # + # @note The adapter sets #closed? to true and runs the #closing callback. + # The server is responsible for implementation details like closing the + # client's socket. + # @return [void] + # + # source://backport//lib/backport/adapter.rb#80 + def close; end + + # @return [Boolean] + # + # source://backport//lib/backport/adapter.rb#69 + def closed?; end + + # A callback triggered when a client connection is closing. Subclasses + # and/or modules should override this method to provide their own + # functionality. + # + # @return [void] + # + # source://backport//lib/backport/adapter.rb#41 + def closing; end + + # A callback triggered when a client connection is opening. Subclasses + # and/or modules should override this method to provide their own + # functionality. + # + # @return [void] + # + # source://backport//lib/backport/adapter.rb#34 + def opening; end + + # A callback triggered when the server receives data from the client. + # Subclasses and/or modules should override this method to provide their + # own functionality. + # + # @param data [String] + # @return [void] + # + # source://backport//lib/backport/adapter.rb#49 + def receiving(data); end + + # A hash of information about the client connection. The data can vary + # based on the transport, e.g., :hostname and :address for TCP connections + # or :filename for file streams. + # + # @return [Hash{Symbol => String, Integer}] + # + # source://backport//lib/backport/adapter.rb#25 + def remote; end + + # Send data to the client. + # + # @param data [String] + # @return [void] + # + # source://backport//lib/backport/adapter.rb#55 + def write(data); end + + # Send a line of data to the client. + # + # @param data [String] + # @return [void] + # + # source://backport//lib/backport/adapter.rb#64 + def write_line(data); end +end + +# A client connected to a connectable Backport server. +# +# source://backport//lib/backport/client.rb#6 +class Backport::Client + include ::Observable + + # @param input [IO] + # @param output [IO] + # @param adapter [Class, Module] + # @param remote [Hash] + # @return [Client] a new instance of Client + # + # source://backport//lib/backport/client.rb#16 + def initialize(input, output, adapter, remote = T.unsafe(nil)); end + + # @return [Adapter] + # + # source://backport//lib/backport/client.rb#10 + def adapter; end + + # Start running the client. This method will start the thread that reads + # client input from IO. + # + # @deprecated Prefer #start to #run for non-blocking client/server methods + # @return [void] + # + # source://backport//lib/backport/client.rb#50 + def run; end + + # Start running the client. This method will start the thread that reads + # client input from IO. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#50 + def start; end + + # Close the client connection. + # + # callback. The server is responsible for implementation details like + # closing the client's socket. + # + # @note The client sets #stopped? to true and runs the adapter's #closing + # @return [void] + # + # source://backport//lib/backport/client.rb#38 + def stop; end + + # True if the client is stopped. + # + # @return [Boolean] + # + # source://backport//lib/backport/client.rb#27 + def stopped?; end + + # Handle a tick from the server. This method will check for client input + # and update the adapter accordingly, or stop the client if the adapter is + # closed. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#64 + def tick; end + + private + + # @param mod_cls [Module, Class] The Adapter module or class + # @param remote [Hash] Remote client data + # @return [Adapter] + # + # source://backport//lib/backport/client.rb#86 + def make_adapter(mod_cls, remote); end + + # @return [Mutex] + # + # source://backport//lib/backport/client.rb#98 + def mutex; end + + # Read the client input. Return nil if the input buffer is empty. + # + # @return [String, nil] + # + # source://backport//lib/backport/client.rb#74 + def read; end + + # Read input from the client. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#112 + def read_input; end + + # Start the thread that checks the input IO for client data. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#103 + def run_input_thread; end +end + +# The Backport server controller. +# +# source://backport//lib/backport/machine.rb#4 +class Backport::Machine + # @return [Machine] a new instance of Machine + # + # source://backport//lib/backport/machine.rb#5 + def initialize; end + + # Add a server to the machine. The server will be started when the machine + # starts. If the machine is already running, the server will be started + # immediately. + # + # @param server [Server::Base] + # @return [void] + # + # source://backport//lib/backport/machine.rb#45 + def prepare(server); end + + # Run the machine. If a block is provided, it gets executed before the + # maching starts its main loop. The main loop blocks program execution + # until the machine is stopped. + # + # @return [void] + # @yieldparam [self] + # + # source://backport//lib/backport/machine.rb#16 + def run; end + + # @return [Array] + # + # source://backport//lib/backport/machine.rb#52 + def servers; end + + # Stop the machine. + # + # @return [void] + # + # source://backport//lib/backport/machine.rb#27 + def stop; end + + # True if the machine is stopped. + # + # @return [Boolean] + # + # source://backport//lib/backport/machine.rb#35 + def stopped?; end + + # @param server [Server::Base] + # @return [void] + # + # source://backport//lib/backport/machine.rb#58 + def update(server); end + + private + + # @return [Mutex] + # + # source://backport//lib/backport/machine.rb#70 + def mutex; end + + # Start the thread that updates servers via the #tick method. + # + # @return [void] + # + # source://backport//lib/backport/machine.rb#75 + def run_server_thread; end +end + +# Classes and modules for Backport servers. +# +# source://backport//lib/backport/server.rb#4 +module Backport::Server; end + +# An extendable server class that provides basic start/stop functionality +# and common callbacks. +# +# source://backport//lib/backport/server/base.rb#8 +class Backport::Server::Base + include ::Observable + + # Start the server. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#14 + def start; end + + # @return [Boolean] + # + # source://backport//lib/backport/server/base.rb#31 + def started?; end + + # A callback triggered when a Machine starts running or the server is + # added to a running machine. Subclasses should override this method to + # provide their own functionality. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#44 + def starting; end + + # Stop the server. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#23 + def stop; end + + # @return [Boolean] + # + # source://backport//lib/backport/server/base.rb#35 + def stopped?; end + + # A callback triggered when the server is stopping. Subclasses should + # override this method to provide their own functionality. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#50 + def stopping; end + + # A callback triggered from the main loop of a running Machine. + # Subclasses should override this method to provide their own + # functionality. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#57 + def tick; end +end + +# A mixin for Backport servers that communicate with clients. +# +# Connectable servers check clients for incoming data on each tick. +# +# source://backport//lib/backport/server/connectable.rb#7 +module Backport::Server::Connectable + # @return [Array] + # + # source://backport//lib/backport/server/connectable.rb#19 + def clients; end + + # @return [void] + # + # source://backport//lib/backport/server/connectable.rb#9 + def starting; end + + # @return [void] + # + # source://backport//lib/backport/server/connectable.rb#14 + def stopping; end + + private + + # @return [Mutex] + # + # source://backport//lib/backport/server/connectable.rb#26 + def mutex; end +end + +# A Backport periodical interval server. +# +# source://backport//lib/backport/server/interval.rb#8 +class Backport::Server::Interval < ::Backport::Server::Base + # @param period [Float] The interval time in seconds. + # @param block [Proc] The proc to run on each interval. + # @return [Interval] a new instance of Interval + # @yieldparam [Interval] + # + # source://backport//lib/backport/server/interval.rb#9 + def initialize(period, &block); end + + # source://backport//lib/backport/server/interval.rb#16 + def starting; end + + # source://backport//lib/backport/server/interval.rb#21 + def tick; end + + private + + # @return [void] + # + # source://backport//lib/backport/server/interval.rb#32 + def run_ready_thread; end +end + +# A Backport STDIO server. +# +# source://backport//lib/backport/server/stdio.rb#5 +class Backport::Server::Stdio < ::Backport::Server::Base + include ::Backport::Server::Connectable + + # @param input [IO] + # @param output [IO] + # @param adapter [Module, Class] + # @return [Stdio] a new instance of Stdio + # + # source://backport//lib/backport/server/stdio.rb#11 + def initialize(input: T.unsafe(nil), output: T.unsafe(nil), adapter: T.unsafe(nil)); end + + # @param client [Client] + # @return [void] + # + # source://backport//lib/backport/server/stdio.rb#22 + def update(client); end +end + +# A Backport TCP server. It runs a thread to accept incoming connections +# and automatically stops when the socket is closed. +# +# source://backport//lib/backport/server/tcpip.rb#8 +class Backport::Server::Tcpip < ::Backport::Server::Base + include ::Backport::Server::Connectable + + # @param host [String] + # @param port [Integer] + # @param adapter [Module, Class] + # @param socket_class [Class] + # @return [Tcpip] a new instance of Tcpip + # + # source://backport//lib/backport/server/tcpip.rb#15 + def initialize(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil), socket_class: T.unsafe(nil)); end + + # Accept an incoming connection using accept_nonblock. Return the + # resulting Client if a connection was accepted or nil if no connections + # are pending. + # + # @return [Client, nil] + # + # source://backport//lib/backport/server/tcpip.rb#41 + def accept; end + + # source://backport//lib/backport/server/tcpip.rb#21 + def starting; end + + # source://backport//lib/backport/server/tcpip.rb#25 + def stopping; end + + # @param client [Client] + # @return [void] + # + # source://backport//lib/backport/server/tcpip.rb#78 + def update(client); end + + private + + # @return [TCPSocket] + # + # source://backport//lib/backport/server/tcpip.rb#89 + def socket; end + + # @return [void] + # + # source://backport//lib/backport/server/tcpip.rb#92 + def start_accept_thread; end +end + +# source://backport//lib/backport/version.rb#2 +Backport::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/base64@0.1.1.rbi b/sorbet/rbi/gems/base64@0.1.1.rbi new file mode 100644 index 0000000000..58bcecc248 --- /dev/null +++ b/sorbet/rbi/gems/base64@0.1.1.rbi @@ -0,0 +1,172 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `base64` gem. +# Please instead update this file by running `bin/tapioca gem base64`. + +# The Base64 module provides for the encoding (#encode64, #strict_encode64, +# #urlsafe_encode64) and decoding (#decode64, #strict_decode64, +# #urlsafe_decode64) of binary data using a Base64 representation. +# +# == Example +# +# A simple encoding and decoding. +# +# require "base64" +# +# enc = Base64.encode64('Send reinforcements') +# # -> "U2VuZCByZWluZm9yY2VtZW50cw==\n" +# plain = Base64.decode64(enc) +# # -> "Send reinforcements" +# +# The purpose of using base64 to encode data is that it translates any +# binary data into purely printable characters. +module Base64 + private + + # Returns the Base64-decoded version of +str+. + # This method complies with RFC 2045. + # Characters outside the base alphabet are ignored. + # + # require 'base64' + # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' + + # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' + + # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K' + # puts Base64.decode64(str) + # + # Generates: + # + # This is line one + # This is line two + # This is line three + # And so on... + # + # source://base64//base64.rb#58 + def decode64(str); end + + # Returns the Base64-encoded version of +bin+. + # This method complies with RFC 2045. + # Line feeds are added to every 60 encoded characters. + # + # require 'base64' + # Base64.encode64("Now is the time for all good coders\nto learn Ruby") + # + # Generates: + # + # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g + # UnVieQ== + # + # source://base64//base64.rb#38 + def encode64(bin); end + + # Returns the Base64-decoded version of +str+. + # This method complies with RFC 4648. + # ArgumentError is raised if +str+ is incorrectly padded or contains + # non-alphabet characters. Note that CR or LF are also rejected. + # + # source://base64//base64.rb#73 + def strict_decode64(str); end + + # Returns the Base64-encoded version of +bin+. + # This method complies with RFC 4648. + # No line feeds are added. + # + # source://base64//base64.rb#65 + def strict_encode64(bin); end + + # Returns the Base64-decoded version of +str+. + # This method complies with ``Base 64 Encoding with URL and Filename Safe + # Alphabet'' in RFC 4648. + # The alphabet uses '-' instead of '+' and '_' instead of '/'. + # + # The padding character is optional. + # This method accepts both correctly-padded and unpadded input. + # Note that it still rejects incorrectly-padded input. + # + # source://base64//base64.rb#98 + def urlsafe_decode64(str); end + + # Returns the Base64-encoded version of +bin+. + # This method complies with ``Base 64 Encoding with URL and Filename Safe + # Alphabet'' in RFC 4648. + # The alphabet uses '-' instead of '+' and '_' instead of '/'. + # Note that the result can still contain '='. + # You can remove the padding by setting +padding+ as false. + # + # source://base64//base64.rb#83 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + + class << self + # Returns the Base64-decoded version of +str+. + # This method complies with RFC 2045. + # Characters outside the base alphabet are ignored. + # + # require 'base64' + # str = 'VGhpcyBpcyBsaW5lIG9uZQpUaGlzIG' + + # 'lzIGxpbmUgdHdvClRoaXMgaXMgbGlu' + + # 'ZSB0aHJlZQpBbmQgc28gb24uLi4K' + # puts Base64.decode64(str) + # + # Generates: + # + # This is line one + # This is line two + # This is line three + # And so on... + # + # source://base64//base64.rb#58 + def decode64(str); end + + # Returns the Base64-encoded version of +bin+. + # This method complies with RFC 2045. + # Line feeds are added to every 60 encoded characters. + # + # require 'base64' + # Base64.encode64("Now is the time for all good coders\nto learn Ruby") + # + # Generates: + # + # Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g + # UnVieQ== + # + # source://base64//base64.rb#38 + def encode64(bin); end + + # Returns the Base64-decoded version of +str+. + # This method complies with RFC 4648. + # ArgumentError is raised if +str+ is incorrectly padded or contains + # non-alphabet characters. Note that CR or LF are also rejected. + # + # source://base64//base64.rb#73 + def strict_decode64(str); end + + # Returns the Base64-encoded version of +bin+. + # This method complies with RFC 4648. + # No line feeds are added. + # + # source://base64//base64.rb#65 + def strict_encode64(bin); end + + # Returns the Base64-decoded version of +str+. + # This method complies with ``Base 64 Encoding with URL and Filename Safe + # Alphabet'' in RFC 4648. + # The alphabet uses '-' instead of '+' and '_' instead of '/'. + # + # The padding character is optional. + # This method accepts both correctly-padded and unpadded input. + # Note that it still rejects incorrectly-padded input. + # + # source://base64//base64.rb#98 + def urlsafe_decode64(str); end + + # Returns the Base64-encoded version of +bin+. + # This method complies with ``Base 64 Encoding with URL and Filename Safe + # Alphabet'' in RFC 4648. + # The alphabet uses '-' instead of '+' and '_' instead of '/'. + # Note that the result can still contain '='. + # You can remove the padding by setting +padding+ as false. + # + # source://base64//base64.rb#83 + def urlsafe_encode64(bin, padding: T.unsafe(nil)); end + end +end diff --git a/sorbet/rbi/gems/benchmark@0.2.1.rbi b/sorbet/rbi/gems/benchmark@0.2.1.rbi new file mode 100644 index 0000000000..2c2184835b --- /dev/null +++ b/sorbet/rbi/gems/benchmark@0.2.1.rbi @@ -0,0 +1,596 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `benchmark` gem. +# Please instead update this file by running `bin/tapioca gem benchmark`. + +# The Benchmark module provides methods to measure and report the time +# used to execute Ruby code. +# +# * Measure the time to construct the string given by the expression +# "a"*1_000_000_000: +# +# require 'benchmark' +# +# puts Benchmark.measure { "a"*1_000_000_000 } +# +# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: +# +# 0.350000 0.400000 0.750000 ( 0.835234) +# +# This report shows the user CPU time, system CPU time, the sum of +# the user and system CPU times, and the elapsed real time. The unit +# of time is seconds. +# +# * Do some experiments sequentially using the #bm method: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm do |x| +# x.report { for i in 1..n; a = "1"; end } +# x.report { n.times do ; a = "1"; end } +# x.report { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# 1.010000 0.000000 1.010000 ( 1.014479) +# 1.000000 0.000000 1.000000 ( 0.998261) +# 0.980000 0.000000 0.980000 ( 0.981335) +# +# * Continuing the previous example, put a label in each report: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm(7) do |x| +# x.report("for:") { for i in 1..n; a = "1"; end } +# x.report("times:") { n.times do ; a = "1"; end } +# x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# for: 1.010000 0.000000 1.010000 ( 1.015688) +# times: 1.000000 0.000000 1.000000 ( 1.003611) +# upto: 1.030000 0.000000 1.030000 ( 1.028098) +# +# * The times for some benchmarks depend on the order in which items +# are run. These differences are due to the cost of memory +# allocation and garbage collection. To avoid these discrepancies, +# the #bmbm method is provided. For example, to compare ways to +# sort an array of floats: +# +# require 'benchmark' +# +# array = (1..1000000).map { rand } +# +# Benchmark.bmbm do |x| +# x.report("sort!") { array.dup.sort! } +# x.report("sort") { array.dup.sort } +# end +# +# The result: +# +# Rehearsal ----------------------------------------- +# sort! 1.490000 0.010000 1.500000 ( 1.490520) +# sort 1.460000 0.000000 1.460000 ( 1.463025) +# -------------------------------- total: 2.960000sec +# +# user system total real +# sort! 1.460000 0.000000 1.460000 ( 1.460465) +# sort 1.450000 0.010000 1.460000 ( 1.448327) +# +# * Report statistics of sequential experiments with unique labels, +# using the #benchmark method: +# +# require 'benchmark' +# include Benchmark # we need the CAPTION and FORMAT constants +# +# n = 5000000 +# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| +# tf = x.report("for:") { for i in 1..n; a = "1"; end } +# tt = x.report("times:") { n.times do ; a = "1"; end } +# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# [tf+tt+tu, (tf+tt+tu)/3] +# end +# +# The result: +# +# user system total real +# for: 0.950000 0.000000 0.950000 ( 0.952039) +# times: 0.980000 0.000000 0.980000 ( 0.984938) +# upto: 0.950000 0.000000 0.950000 ( 0.946787) +# >total: 2.880000 0.000000 2.880000 ( 2.883764) +# >avg: 0.960000 0.000000 0.960000 ( 0.961255) +# +# source://benchmark//lib/benchmark.rb#122 +module Benchmark + private + + # Invokes the block with a Benchmark::Report object, which + # may be used to collect and report on the results of individual + # benchmark tests. Reserves +label_width+ leading spaces for + # labels on each line. Prints +caption+ at the top of the + # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of + # Benchmark::Tms objects, these will be used to format + # additional lines of output. If +labels+ parameter are + # given, these are used to label these extra lines. + # + # _Note_: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + # source://benchmark//lib/benchmark.rb#168 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # source://benchmark//lib/benchmark.rb#207 + def bm(label_width = T.unsafe(nil), *labels, &blk); end + + # Sometimes benchmark results are skewed because code executed + # earlier encounters different garbage collection overheads than + # that run later. #bmbm attempts to minimize this effect by running + # the tests twice, the first time as a rehearsal in order to get the + # runtime environment stable, the second time for + # real. GC.start is executed before the start of each of + # the real timings; the cost of this is not included in the + # timings. In reality, though, there's only so much that #bmbm can + # do, and the results are not guaranteed to be isolated from garbage + # collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can + # calculate the required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of + # Benchmark::Tms objects. + # + # source://benchmark//lib/benchmark.rb#249 + def bmbm(width = T.unsafe(nil)); end + + # Returns the time used to execute the given block as a + # Benchmark::Tms object. Takes +label+ option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + # source://benchmark//lib/benchmark.rb#294 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark//lib/benchmark.rb#309 + def realtime; end + + class << self + # Invokes the block with a Benchmark::Report object, which + # may be used to collect and report on the results of individual + # benchmark tests. Reserves +label_width+ leading spaces for + # labels on each line. Prints +caption+ at the top of the + # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of + # Benchmark::Tms objects, these will be used to format + # additional lines of output. If +labels+ parameter are + # given, these are used to label these extra lines. + # + # _Note_: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + # source://benchmark//lib/benchmark.rb#168 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # source://benchmark//lib/benchmark.rb#207 + def bm(label_width = T.unsafe(nil), *labels, &blk); end + + # Sometimes benchmark results are skewed because code executed + # earlier encounters different garbage collection overheads than + # that run later. #bmbm attempts to minimize this effect by running + # the tests twice, the first time as a rehearsal in order to get the + # runtime environment stable, the second time for + # real. GC.start is executed before the start of each of + # the real timings; the cost of this is not included in the + # timings. In reality, though, there's only so much that #bmbm can + # do, and the results are not guaranteed to be isolated from garbage + # collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can + # calculate the required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of + # Benchmark::Tms objects. + # + # source://benchmark//lib/benchmark.rb#249 + def bmbm(width = T.unsafe(nil)); end + + # Returns the time used to execute the given block as a + # Benchmark::Tms object. Takes +label+ option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + # source://benchmark//lib/benchmark.rb#294 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark//lib/benchmark.rb#309 + def realtime; end + end +end + +# A Job is a sequence of labelled blocks to be processed by the +# Benchmark.bmbm method. It is of little direct interest to the user. +# +# source://benchmark//lib/benchmark.rb#321 +class Benchmark::Job + # Returns an initialized Job instance. + # Usually, one doesn't call this method directly, as new + # Job objects are created by the #bmbm method. + # +width+ is a initial value for the label offset used in formatting; + # the #bmbm method passes its +width+ argument to this constructor. + # + # @return [Job] a new instance of Job + # + # source://benchmark//lib/benchmark.rb#329 + def initialize(width); end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark//lib/benchmark.rb#337 + def item(label = T.unsafe(nil), &blk); end + + # An array of 2-element arrays, consisting of label and block pairs. + # + # source://benchmark//lib/benchmark.rb#349 + def list; end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark//lib/benchmark.rb#337 + def report(label = T.unsafe(nil), &blk); end + + # Length of the widest label in the #list. + # + # source://benchmark//lib/benchmark.rb#352 + def width; end +end + +# This class is used by the Benchmark.benchmark and Benchmark.bm methods. +# It is of little direct interest to the user. +# +# source://benchmark//lib/benchmark.rb#359 +class Benchmark::Report + # Returns an initialized Report instance. + # Usually, one doesn't call this method directly, as new + # Report objects are created by the #benchmark and #bm methods. + # +width+ and +format+ are the label offset and + # format string used by Tms#format. + # + # @return [Report] a new instance of Report + # + # source://benchmark//lib/benchmark.rb#367 + def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # source://benchmark//lib/benchmark.rb#376 + def item(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # source://benchmark//lib/benchmark.rb#386 + def list; end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # source://benchmark//lib/benchmark.rb#376 + def report(label = T.unsafe(nil), *format, &blk); end +end + +# A data object, representing the times associated with a benchmark +# measurement. +# +# source://benchmark//lib/benchmark.rb#395 +class Benchmark::Tms + # Returns an initialized Tms object which has + # +utime+ as the user CPU time, +stime+ as the system CPU time, + # +cutime+ as the children's user CPU time, +cstime+ as the children's + # system CPU time, +real+ as the elapsed real time and +label+ as the label. + # + # @return [Tms] a new instance of Tms + # + # source://benchmark//lib/benchmark.rb#430 + def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end + + # Returns a new Tms object obtained by memberwise multiplication + # of the individual times for this Tms object by +x+. + # + # source://benchmark//lib/benchmark.rb#478 + def *(x); end + + # Returns a new Tms object obtained by memberwise summation + # of the individual times for this Tms object with those of the +other+ + # Tms object. + # This method and #/() are useful for taking statistics. + # + # source://benchmark//lib/benchmark.rb#465 + def +(other); end + + # Returns a new Tms object obtained by memberwise subtraction + # of the individual times for the +other+ Tms object from those of this + # Tms object. + # + # source://benchmark//lib/benchmark.rb#472 + def -(other); end + + # Returns a new Tms object obtained by memberwise division + # of the individual times for this Tms object by +x+. + # This method and #+() are useful for taking statistics. + # + # source://benchmark//lib/benchmark.rb#485 + def /(x); end + + # Returns a new Tms object whose times are the sum of the times for this + # Tms object, plus the time required to execute the code block (+blk+). + # + # source://benchmark//lib/benchmark.rb#439 + def add(&blk); end + + # An in-place version of #add. + # Changes the times of this Tms object by making it the sum of the times + # for this Tms object, plus the time required to execute + # the code block (+blk+). + # + # source://benchmark//lib/benchmark.rb#449 + def add!(&blk); end + + # System CPU time of children + # + # source://benchmark//lib/benchmark.rb#413 + def cstime; end + + # User CPU time of children + # + # source://benchmark//lib/benchmark.rb#410 + def cutime; end + + # Returns the contents of this Tms object as + # a formatted string, according to a +format+ string + # like that passed to Kernel.format. In addition, #format + # accepts the following extensions: + # + # %u:: Replaced by the user CPU time, as reported by Tms#utime. + # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") + # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime + # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime + # %t:: Replaced by the total CPU time, as reported by Tms#total + # %r:: Replaced by the elapsed real time, as reported by Tms#real + # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") + # + # If +format+ is not given, FORMAT is used as default value, detailing the + # user, system and real elapsed time. + # + # source://benchmark//lib/benchmark.rb#504 + def format(format = T.unsafe(nil), *args); end + + # Label + # + # source://benchmark//lib/benchmark.rb#422 + def label; end + + # Elapsed real time + # + # source://benchmark//lib/benchmark.rb#416 + def real; end + + # System CPU time + # + # source://benchmark//lib/benchmark.rb#407 + def stime; end + + # Returns a new 6-element array, consisting of the + # label, user CPU time, system CPU time, children's + # user CPU time, children's system CPU time and elapsed + # real time. + # + # source://benchmark//lib/benchmark.rb#529 + def to_a; end + + # Returns a hash containing the same data as `to_a`. + # + # source://benchmark//lib/benchmark.rb#536 + def to_h; end + + # Same as #format. + # + # source://benchmark//lib/benchmark.rb#519 + def to_s; end + + # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ + # + # source://benchmark//lib/benchmark.rb#419 + def total; end + + # User CPU time + # + # source://benchmark//lib/benchmark.rb#404 + def utime; end + + protected + + # Returns a new Tms object obtained by memberwise operation +op+ + # of the individual times for this Tms object with those of the other + # Tms object (+x+). + # + # +op+ can be a mathematical operation such as +, -, + # *, / + # + # source://benchmark//lib/benchmark.rb#557 + def memberwise(op, x); end +end diff --git a/sorbet/rbi/gems/citrus@3.0.2.rbi b/sorbet/rbi/gems/citrus@3.0.2.rbi new file mode 100644 index 0000000000..e92dd7d2b6 --- /dev/null +++ b/sorbet/rbi/gems/citrus@3.0.2.rbi @@ -0,0 +1,1233 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `citrus` gem. +# Please instead update this file by running `bin/tapioca gem citrus`. + +# Citrus is a compact and powerful parsing library for Ruby that combines the +# elegance and expressiveness of the language with the simplicity and power of +# parsing expressions. +# +# http://mjackson.github.io/citrus +# +# source://citrus//lib/citrus/version.rb#1 +module Citrus + class << self + # Returns a map of paths of files that have been loaded via #load to the + # result of #eval on the code in that file. + # + # Note: These paths are not absolute unless you pass an absolute path to + # #load. That means that if you change the working directory and try to + # #require the same file with a different relative path, it will be loaded + # twice. + # + # source://citrus//lib/citrus.rb#29 + def cache; end + + # Evaluates the given Citrus parsing expression grammar +code+ and returns an + # array of any grammar modules that are created. Accepts the same +options+ as + # GrammarMethods#parse. + # + # Citrus.eval(< [MyGrammar] + # + # source://citrus//lib/citrus.rb#46 + def eval(code, options = T.unsafe(nil)); end + + # Loads the grammar(s) from the given +file+. Accepts the same +options+ as + # #eval, plus the following: + # + # force:: Normally this method will not reload a file that is already in + # the #cache. However, if this option is +true+ the file will be + # loaded, regardless of whether or not it is in the cache. Defaults + # to +false+. + # + # Citrus.load('mygrammar') + # # => [MyGrammar] + # + # source://citrus//lib/citrus.rb#71 + def load(file, options = T.unsafe(nil)); end + + # Searches the $LOAD_PATH for a +file+ with the .citrus suffix and + # attempts to load it via #load. Returns the path to the file that was loaded + # on success, +nil+ on failure. Accepts the same +options+ as #load. + # + # path = Citrus.require('mygrammar') + # # => "/path/to/mygrammar.citrus" + # Citrus.cache[path] + # # => [MyGrammar] + # + # source://citrus//lib/citrus.rb#96 + def require(file, options = T.unsafe(nil)); end + + # Evaluates the given expression and creates a new Rule object from it. + # Accepts the same +options+ as #eval. + # + # Citrus.rule('"a" | "b"') + # # => # + # + # source://citrus//lib/citrus.rb#56 + def rule(expr, options = T.unsafe(nil)); end + + # Returns the current version of Citrus as a string. + # + # source://citrus//lib/citrus/version.rb#6 + def version; end + end +end + +# An Alias is a Proxy for a rule in the same grammar. It is used in rule +# definitions when a rule calls some other rule by name. The Citrus notation +# is simply the name of another rule without any other punctuation, e.g.: +# +# name +# +# source://citrus//lib/citrus.rb#809 +class Citrus::Alias + include ::Citrus::Rule + include ::Citrus::Proxy + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#813 + def to_citrus; end + + private + + # Searches this proxy's grammar and any included grammars for a rule with + # this proxy's #rule_name. Raises an error if one cannot be found. + # + # source://citrus//lib/citrus.rb#821 + def resolve!; end +end + +# An AndPredicate is a Nonterminal that contains a rule that must match. Upon +# success an empty match is returned and no input is consumed. The Citrus +# notation is any expression preceded by an ampersand, e.g.: +# +# &expr +# +# source://citrus//lib/citrus.rb#998 +class Citrus::AndPredicate + include ::Citrus::Rule + include ::Citrus::Nonterminal + + # @return [AndPredicate] a new instance of AndPredicate + # + # source://citrus//lib/citrus.rb#1001 + def initialize(rule = T.unsafe(nil)); end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#1011 + def exec(input, events = T.unsafe(nil)); end + + # Returns the Rule object this rule uses to match. + # + # source://citrus//lib/citrus.rb#1006 + def rule; end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#1022 + def to_citrus; end +end + +# A ButPredicate is a Nonterminal that consumes all characters until its rule +# matches. It must match at least one character in order to succeed. The +# Citrus notation is any expression preceded by a tilde, e.g.: +# +# ~expr +# +# source://citrus//lib/citrus.rb#1068 +class Citrus::ButPredicate + include ::Citrus::Rule + include ::Citrus::Nonterminal + + # @return [ButPredicate] a new instance of ButPredicate + # + # source://citrus//lib/citrus.rb#1073 + def initialize(rule = T.unsafe(nil)); end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#1083 + def exec(input, events = T.unsafe(nil)); end + + # Returns the Rule object this rule uses to match. + # + # source://citrus//lib/citrus.rb#1078 + def rule; end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#1102 + def to_citrus; end +end + +# source://citrus//lib/citrus.rb#1071 +Citrus::ButPredicate::DOT_RULE = T.let(T.unsafe(nil), Citrus::Terminal) + +# source://citrus//lib/citrus.rb#20 +Citrus::CLOSE = T.let(T.unsafe(nil), Integer) + +# A Choice is a Nonterminal where only one rule must match. The Citrus +# notation is two or more expressions separated by a vertical bar, e.g.: +# +# expr | expr +# +# source://citrus//lib/citrus.rb#1233 +class Citrus::Choice + include ::Citrus::Rule + include ::Citrus::Nonterminal + + # Returns +true+ if this rule should extend a match but should not appear in + # its event stream. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#1260 + def elide?; end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#1237 + def exec(input, events = T.unsafe(nil)); end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#1265 + def to_citrus; end +end + +# A pattern to match any character, including newline. +# +# source://citrus//lib/citrus.rb#16 +Citrus::DOT = T.let(T.unsafe(nil), Regexp) + +# A base class for all Citrus errors. +# +# source://citrus//lib/citrus.rb#117 +class Citrus::Error < ::StandardError; end + +# A grammar for Citrus grammar files. This grammar is used in Citrus.eval to +# parse and evaluate Citrus grammars and serves as a prime example of how to +# create a complex grammar complete with semantic interpretation in pure Ruby. +# +# source://citrus//lib/citrus/file.rb#0 +module Citrus::File + include ::Citrus::Grammar + extend ::Citrus::GrammarMethods + + class << self + # source://citrus//lib/citrus/file.rb#357 + def parse(*_arg0); end + end +end + +# Inclusion of this module into another extends the receiver with the grammar +# helper methods in GrammarMethods. Although this module does not actually +# provide any methods, constants, or variables to modules that include it, the +# mere act of inclusion provides a useful lookup mechanism to determine if a +# module is in fact a grammar. +# +# source://citrus//lib/citrus.rb#352 +module Citrus::Grammar + mixes_in_class_methods ::Citrus::GrammarMethods + + class << self + # Extends all modules that +include Grammar+ with GrammarMethods and + # exposes Module#include. + # + # source://citrus//lib/citrus.rb#368 + def included(mod); end + + # Creates a new anonymous module that includes Grammar. If a +block+ is + # provided, it is +module_eval+'d in the context of the new module. Grammars + # created with this method may be assigned a name by being assigned to some + # constant, e.g.: + # + # MyGrammar = Citrus::Grammar.new {} + # + # source://citrus//lib/citrus.rb#360 + def new(&block); end + end +end + +# Contains methods that are available to Grammar modules at the class level. +# +# source://citrus//lib/citrus.rb#376 +module Citrus::GrammarMethods + # Creates a new Sequence using all arguments. A block may be provided to + # specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#549 + def all(*args, &block); end + + # Creates a new AndPredicate using the given +rule+. A block may be provided + # to specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#509 + def andp(rule, &block); end + + # Creates a new Choice using all arguments. A block may be provided to + # specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#555 + def any(*args, &block); end + + # Creates a new ButPredicate using the given +rule+. A block may be provided + # to specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#521 + def butp(rule, &block); end + + # Creates a new rule that will match any single character. A block may be + # provided to specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#497 + def dot(&block); end + + # Specifies a Module that will be used to extend all matches created with + # the given +rule+. A block may also be given that will be used to create + # an anonymous module. See Rule#extension=. + # + # source://citrus//lib/citrus.rb#570 + def ext(rule, mod = T.unsafe(nil), &block); end + + # Returns +true+ if this grammar has a rule with the given +name+. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#425 + def has_rule?(name); end + + # Returns an array of all grammars that have been included in this grammar + # in the reverse order they were included. + # + # source://citrus//lib/citrus.rb#409 + def included_grammars; end + + # Adds +label+ to the given +rule+. A block may be provided to specify + # semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#561 + def label(rule, label, &block); end + + # Creates a new Module from the given +block+ and sets it to be the + # extension of the given +rule+. See Rule#extension=. + # + # source://citrus//lib/citrus.rb#579 + def mod(rule, &block); end + + # Returns the name of this grammar as a string. + # + # source://citrus//lib/citrus.rb#403 + def name; end + + # Creates a new NotPredicate using the given +rule+. A block may be provided + # to specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#515 + def notp(rule, &block); end + + # An alias for #rep. + # + # source://citrus//lib/citrus.rb#533 + def one_or_more(rule, &block); end + + # Parses the given +source+ using this grammar's root rule. Accepts the same + # +options+ as Rule#parse, plus the following: + # + # root:: The name of the root rule to start parsing at. Defaults to this + # grammar's #root. + # + # @raise [Error] + # + # source://citrus//lib/citrus.rb#387 + def parse(source, options = T.unsafe(nil)); end + + # Parses the contents of the file at the given +path+ using this grammar's + # #root rule. Accepts the same +options+ as #parse. + # + # source://citrus//lib/citrus.rb#397 + def parse_file(path, options = T.unsafe(nil)); end + + # Creates a new Repeat using the given +rule+. +min+ and +max+ specify the + # minimum and maximum number of times the rule must match. A block may be + # provided to specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#528 + def rep(rule, min = T.unsafe(nil), max = T.unsafe(nil), &block); end + + # Gets/sets the +name+ of the root rule of this grammar. If no root rule is + # explicitly specified, the name of this grammar's first rule is returned. + # + # source://citrus//lib/citrus.rb#482 + def root(name = T.unsafe(nil)); end + + # Gets/sets the rule with the given +name+. If +obj+ is given the rule + # will be set to the value of +obj+ passed through Rule.for. If a block is + # given, its return value will be used for the value of +obj+. + # + # It is important to note that this method will also check any included + # grammars for a rule with the given +name+ if one cannot be found in this + # grammar. + # + # source://citrus//lib/citrus.rb#459 + def rule(name, obj = T.unsafe(nil), &block); end + + # Returns an array of all names of rules in this grammar as symbols ordered + # in the same way they were declared. + # + # source://citrus//lib/citrus.rb#415 + def rule_names; end + + # Returns a hash of all Rule objects in this grammar, keyed by rule name. + # + # source://citrus//lib/citrus.rb#420 + def rules; end + + # Creates a new Super for the rule currently being defined in the grammar. A + # block may be provided to specify semantic behavior (via #ext). + # + # source://citrus//lib/citrus.rb#503 + def sup(&block); end + + # Searches the inheritance hierarchy of this grammar for a rule named +name+ + # and returns it on success. Returns +nil+ on failure. + # + # source://citrus//lib/citrus.rb#443 + def super_rule(name); end + + # An alias for #rep with a minimum of 0. + # + # source://citrus//lib/citrus.rb#538 + def zero_or_more(rule, &block); end + + # An alias for #rep with a minimum of 0 and a maximum of 1. + # + # source://citrus//lib/citrus.rb#543 + def zero_or_one(rule, &block); end + + private + + # Loops through the rule tree for the given +rule+ looking for any Super + # rules. When it finds one, it sets that rule's rule name to the given + # +name+. + # + # source://citrus//lib/citrus.rb#432 + def setup_super(rule, name); end + + class << self + # @raise [ArgumentError] + # + # source://citrus//lib/citrus.rb#377 + def extend_object(obj); end + end +end + +# source://citrus//lib/citrus.rb#18 +Citrus::Infinity = T.let(T.unsafe(nil), Float) + +# An Input is a scanner that is responsible for executing rules at different +# positions in the input string and persisting event streams. +# +# source://citrus//lib/citrus.rb#172 +class Citrus::Input < ::StringScanner + # @return [Input] a new instance of Input + # + # source://citrus//lib/citrus.rb#173 + def initialize(source); end + + # Returns an array of events for the given +rule+ at the current pointer + # position. Objects in this array may be one of three types: a Rule, + # Citrus::CLOSE, or a length (integer). + # + # source://citrus//lib/citrus.rb#246 + def exec(rule, events = T.unsafe(nil)); end + + # Returns the text of the line that contains the character at the given + # +pos+. +pos+ defaults to the current pointer position. + # + # source://citrus//lib/citrus.rb#234 + def line(pos = T.unsafe(nil)); end + + # Returns the 0-based number of the line that contains the character at the + # given +pos+. +pos+ defaults to the current pointer position. + # + # source://citrus//lib/citrus.rb#214 + def line_index(pos = T.unsafe(nil)); end + + # Returns the 1-based number of the line that contains the character at the + # given +pos+. +pos+ defaults to the current pointer position. + # + # source://citrus//lib/citrus.rb#226 + def line_number(pos = T.unsafe(nil)); end + + # Returns the 0-based offset of the given +pos+ in the input on the line + # on which it is found. +pos+ defaults to the current pointer position. + # + # source://citrus//lib/citrus.rb#202 + def line_offset(pos = T.unsafe(nil)); end + + # Returns the 1-based number of the line that contains the character at the + # given +pos+. +pos+ defaults to the current pointer position. + # + # source://citrus//lib/citrus.rb#226 + def lineno(pos = T.unsafe(nil)); end + + # Returns an array containing the lines of text in the input. + # + # source://citrus//lib/citrus.rb#192 + def lines; end + + # The maximum offset in the input that was successfully parsed. + # + # source://citrus//lib/citrus.rb#180 + def max_offset; end + + # Returns +true+ when using memoization to cache match results. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#239 + def memoized?; end + + # source://citrus//lib/citrus.rb#186 + def reset; end + + # The initial source passed at construction. Typically a String + # or a Pathname. + # + # source://citrus//lib/citrus.rb#184 + def source; end + + # Returns the length of a match for the given +rule+ at the current pointer + # position, +nil+ if none can be made. + # + # source://citrus//lib/citrus.rb#261 + def test(rule); end + + # Returns the scanned string. + def to_str; end + + private + + # Appends all events for +rule+ at the given +position+ to +events+. + # + # source://citrus//lib/citrus.rb#287 + def apply_rule(rule, position, events); end + + # Returns the text to parse from +source+. + # + # source://citrus//lib/citrus.rb#274 + def source_text(source); end +end + +# Raised when Citrus.require can't find the file to load. +# +# source://citrus//lib/citrus.rb#120 +class Citrus::LoadError < ::Citrus::Error; end + +# The base class for all matches. Matches are organized into a tree where any +# match may contain any number of other matches. Nodes of the tree are lazily +# instantiated as needed. This class provides several convenient tree +# traversal methods that help when examining and interpreting parse results. +# +# source://citrus//lib/citrus.rb#1274 +class Citrus::Match + # @return [Match] a new instance of Match + # + # source://citrus//lib/citrus.rb#1275 + def initialize(input, events = T.unsafe(nil), offset = T.unsafe(nil)); end + + # source://citrus//lib/citrus.rb#1381 + def ==(other); end + + # Returns the capture at the given +key+. If it is an Integer (and an + # optional length) or a Range, the result of #to_a with the same arguments + # is returned. Otherwise, the value at +key+ in #captures is returned. + # + # source://citrus//lib/citrus.rb#1372 + def [](key, *args); end + + # Convenient method for captures[name].first. + # + # source://citrus//lib/citrus.rb#1335 + def capture(name); end + + # Returns a hash of capture names to arrays of matches with that name, + # in the order they appeared in the input. + # + # source://citrus//lib/citrus.rb#1329 + def captures(name = T.unsafe(nil)); end + + # Prints the entire subtree of this match using the given +indent+ to + # indicate nested match levels. Useful for debugging. + # + # source://citrus//lib/citrus.rb#1400 + def dump(indent = T.unsafe(nil)); end + + # source://citrus//lib/citrus.rb#1381 + def eql?(other); end + + # The array of events for this match. + # + # source://citrus//lib/citrus.rb#1310 + def events; end + + # A shortcut for retrieving the first immediate submatch of this match. + # + # source://citrus//lib/citrus.rb#1346 + def first; end + + # The original Input this Match was generated on. + # + # source://citrus//lib/citrus.rb#1304 + def input; end + + # source://citrus//lib/citrus.rb#1394 + def inspect; end + + # Returns the length of this match. + # + # source://citrus//lib/citrus.rb#1313 + def length; end + + # Returns an array of all immediate submatches of this match. + # + # source://citrus//lib/citrus.rb#1340 + def matches; end + + # The index of this match in the #input. + # + # source://citrus//lib/citrus.rb#1307 + def offset; end + + # Convenient shortcut for +input.source+ + # + # source://citrus//lib/citrus.rb#1318 + def source; end + + # Returns the slice of the source text that this match captures. + # + # source://citrus//lib/citrus.rb#1323 + def string; end + + # Returns this match plus all sub #matches in an array. + # + # source://citrus//lib/citrus.rb#1365 + def to_a; end + + # Returns the slice of the source text that this match captures. + # + # source://citrus//lib/citrus.rb#1323 + def to_s; end + + # Returns the slice of the source text that this match captures. + # This alias allows strings to be compared to the string value of Match + # objects. It is most useful in assertions in unit tests, e.g.: + # + # assert_equal("a string", match) + # + # source://citrus//lib/citrus.rb#1323 + def to_str; end + + # Returns the slice of the source text that this match captures. + # The default value for a match is its string value. This method is + # overridden in most cases to be more meaningful according to the desired + # interpretation. + # + # source://citrus//lib/citrus.rb#1323 + def value; end + + private + + # source://citrus//lib/citrus.rb#1511 + def capture!(rule, match); end + + # Returns a new Hash that is to be used for @captures. This hash normalizes + # String keys to Symbols, returns +nil+ for unknown Numeric keys, and an + # empty Array for all other unknown keys. + # + # source://citrus//lib/citrus.rb#1536 + def captures_hash; end + + # Initializes both the @captures and @matches instance variables. + # + # source://citrus//lib/citrus.rb#1445 + def process_events!; end +end + +# A MemoizedInput is an Input that caches segments of the event stream for +# particular rules in a parse. This technique (also known as "Packrat" +# parsing) guarantees parsers will operate in linear time but costs +# significantly more in terms of time and memory required to perform a parse. +# For more information, please read the paper on Packrat parsing at +# http://pdos.csail.mit.edu/~baford/packrat/icfp02/. +# +# source://citrus//lib/citrus.rb#298 +class Citrus::MemoizedInput < ::Citrus::Input + # @return [MemoizedInput] a new instance of MemoizedInput + # + # source://citrus//lib/citrus.rb#299 + def initialize(string); end + + # A nested hash of rules to offsets and their respective matches. + # + # source://citrus//lib/citrus.rb#306 + def cache; end + + # The number of times the cache was hit. + # + # source://citrus//lib/citrus.rb#309 + def cache_hits; end + + # Returns +true+ when using memoization to cache match results. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#318 + def memoized?; end + + # source://citrus//lib/citrus.rb#311 + def reset; end + + private + + # source://citrus//lib/citrus.rb#324 + def apply_rule(rule, position, events); end +end + +# Some helper methods for rules that alias +module_name+ and don't want to +# use +Kernel#eval+ to retrieve Module objects. +# +# source://citrus//lib/citrus/file.rb#8 +module Citrus::ModuleNameHelpers + # source://citrus//lib/citrus/file.rb#23 + def module_basename; end + + # source://citrus//lib/citrus/file.rb#9 + def module_name; end + + # source://citrus//lib/citrus/file.rb#17 + def module_namespace; end + + # source://citrus//lib/citrus/file.rb#13 + def module_segments; end +end + +# A Nonterminal is a Rule that augments the matching behavior of one or more +# other rules. Nonterminals may not match directly on the input, but instead +# invoke the rule(s) they contain to determine if a match can be made from +# the collective result. +# +# source://citrus//lib/citrus.rb#976 +module Citrus::Nonterminal + include ::Citrus::Rule + + # source://citrus//lib/citrus.rb#979 + def initialize(rules = T.unsafe(nil)); end + + # source://citrus//lib/citrus.rb#986 + def grammar=(grammar); end + + # An array of the actual Rule objects this rule uses to match. + # + # source://citrus//lib/citrus.rb#984 + def rules; end +end + +# A NotPredicate is a Nonterminal that contains a rule that must not match. +# Upon success an empty match is returned and no input is consumed. The Citrus +# notation is any expression preceded by an exclamation mark, e.g.: +# +# !expr +# +# source://citrus//lib/citrus.rb#1033 +class Citrus::NotPredicate + include ::Citrus::Rule + include ::Citrus::Nonterminal + + # @return [NotPredicate] a new instance of NotPredicate + # + # source://citrus//lib/citrus.rb#1036 + def initialize(rule = T.unsafe(nil)); end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#1046 + def exec(input, events = T.unsafe(nil)); end + + # Returns the Rule object this rule uses to match. + # + # source://citrus//lib/citrus.rb#1041 + def rule; end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#1057 + def to_citrus; end +end + +# Raised when a parse fails. +# +# source://citrus//lib/citrus.rb#124 +class Citrus::ParseError < ::Citrus::Error + # The +input+ given here is an instance of Citrus::Input. + # + # @return [ParseError] a new instance of ParseError + # + # source://citrus//lib/citrus.rb#125 + def initialize(input); end + + # Returns a string that, when printed, gives a visual representation of + # exactly where the error occurred on its line in the input. + # + # source://citrus//lib/citrus.rb#154 + def detail; end + + # The text of the line in the input where the error occurred. + # + # source://citrus//lib/citrus.rb#150 + def line; end + + # The 1-based number of the line in the input where the error occurred. + # + # source://citrus//lib/citrus.rb#147 + def line_number; end + + # The 0-based offset at which the error occurred on the line on which it + # occurred in the input. + # + # source://citrus//lib/citrus.rb#144 + def line_offset; end + + # The 0-based offset at which the error occurred in the input, i.e. the + # maximum offset in the input that was successfully parsed before the error + # occurred. + # + # source://citrus//lib/citrus.rb#140 + def offset; end +end + +# A Proxy is a Rule that is a placeholder for another rule. It stores the +# name of some other rule in the grammar internally and resolves it to the +# actual Rule object at runtime. This lazy evaluation permits creation of +# Proxy objects for rules that may not yet be defined. +# +# source://citrus//lib/citrus.rb#756 +module Citrus::Proxy + include ::Citrus::Rule + + # source://citrus//lib/citrus.rb#759 + def initialize(rule_name = T.unsafe(nil)); end + + # Returns +true+ if this rule should extend a match but should not appear in + # its event stream. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#791 + def elide?; end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#777 + def exec(input, events = T.unsafe(nil)); end + + # source://citrus//lib/citrus.rb#795 + def extend_match(match); end + + # Returns the underlying Rule for this proxy. + # + # source://citrus//lib/citrus.rb#772 + def rule; end + + # The name of this proxy's rule. + # + # source://citrus//lib/citrus.rb#769 + def rule_name; end + + # Sets the name of the rule this rule is proxy for. + # + # source://citrus//lib/citrus.rb#764 + def rule_name=(rule_name); end +end + +# A Repeat is a Nonterminal that specifies a minimum and maximum number of +# times its rule must match. The Citrus notation is an integer, +N+, followed +# by an asterisk, followed by another integer, +M+, all of which follow any +# other expression, e.g.: +# +# expr N*M +# +# In this notation +N+ specifies the minimum number of times the preceding +# expression must match and +M+ specifies the maximum. If +N+ is ommitted, +# it is assumed to be 0. Likewise, if +M+ is omitted, it is assumed to be +# infinity (no maximum). Thus, an expression followed by only an asterisk may +# match any number of times, including zero. +# +# The shorthand notation + and ? may be used for the common +# cases of 1* and *1 respectively, e.g.: +# +# expr+ +# expr? +# +# source://citrus//lib/citrus.rb#1126 +class Citrus::Repeat + include ::Citrus::Rule + include ::Citrus::Nonterminal + + # @raise [ArgumentError] + # @return [Repeat] a new instance of Repeat + # + # source://citrus//lib/citrus.rb#1129 + def initialize(rule = T.unsafe(nil), min = T.unsafe(nil), max = T.unsafe(nil)); end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#1142 + def exec(input, events = T.unsafe(nil)); end + + # The maximum number of times this rule may match. + # + # source://citrus//lib/citrus.rb#1169 + def max; end + + # The minimum number of times this rule must match. + # + # source://citrus//lib/citrus.rb#1166 + def min; end + + # Returns the operator this rule uses as a string. Will be one of + # +, ?, or N*M. + # + # source://citrus//lib/citrus.rb#1173 + def operator; end + + # Returns the Rule object this rule uses to match. + # + # source://citrus//lib/citrus.rb#1137 + def rule; end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#1184 + def to_citrus; end +end + +# A Rule is an object that is used by a grammar to create matches on an +# Input during parsing. +# +# source://citrus//lib/citrus.rb#587 +module Citrus::Rule + # source://citrus//lib/citrus.rb#732 + def ==(other); end + + # Tests the given +obj+ for case equality with this rule. + # + # source://citrus//lib/citrus.rb#685 + def ===(obj); end + + # The default set of options to use when calling #parse. + # + # source://citrus//lib/citrus.rb#641 + def default_options; end + + # Returns +true+ if this rule should extend a match but should not appear in + # its event stream. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#696 + def elide?; end + + # source://citrus//lib/citrus.rb#732 + def eql?(other); end + + # source://citrus//lib/citrus.rb#747 + def extend_match(match); end + + # The module this rule uses to extend new matches. + # + # source://citrus//lib/citrus.rb#638 + def extension; end + + # Specifies a module that will be used to extend all Match objects that + # result from this rule. If +mod+ is a Proc, it is used to create an + # anonymous module with a +value+ method. + # + # @raise [ArgumentError] + # + # source://citrus//lib/citrus.rb#627 + def extension=(mod); end + + # The grammar this rule belongs to, if any. + # + # source://citrus//lib/citrus.rb#604 + def grammar; end + + # The grammar this rule belongs to, if any. + # + # source://citrus//lib/citrus.rb#604 + def grammar=(_arg0); end + + # source://citrus//lib/citrus.rb#743 + def inspect; end + + # A label for this rule. If a rule has a label, all matches that it creates + # will be accessible as named captures from the scope of their parent match + # using that label. + # + # source://citrus//lib/citrus.rb#622 + def label; end + + # Sets the label of this rule. + # + # source://citrus//lib/citrus.rb#615 + def label=(label); end + + # The name of this rule. + # + # source://citrus//lib/citrus.rb#612 + def name; end + + # Sets the name of this rule. + # + # source://citrus//lib/citrus.rb#607 + def name=(name); end + + # Returns +true+ if this rule needs to be surrounded by parentheses when + # using #to_embedded_s. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#702 + def needs_paren?; end + + # Attempts to parse the given +string+ and return a Match if any can be + # made. +options+ may contain any of the following keys: + # + # consume:: If this is +true+ a ParseError will be raised unless the + # entire input string is consumed. Defaults to +true+. + # memoize:: If this is +true+ the matches generated during a parse are + # memoized. See MemoizedInput for more information. Defaults to + # +false+. + # offset:: The offset in +string+ at which to start parsing. Defaults + # to 0. + # + # source://citrus//lib/citrus.rb#658 + def parse(source, options = T.unsafe(nil)); end + + # Returns +true+ if this rule is a Terminal. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#690 + def terminal?; end + + # Tests whether or not this rule matches on the given +string+. Returns the + # length of the match if any can be made, +nil+ otherwise. Accepts the same + # +options+ as #parse. + # + # source://citrus//lib/citrus.rb#678 + def test(string, options = T.unsafe(nil)); end + + # Returns the Citrus notation of this rule as a string that is suitable to + # be embedded in the string representation of another rule. + # + # source://citrus//lib/citrus.rb#724 + def to_embedded_s; end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#707 + def to_s; end + + # Returns the Citrus notation of this rule as a string. + # This alias allows strings to be compared to the string representation of + # Rule objects. It is most useful in assertions in unit tests, e.g.: + # + # assert_equal('"a" | "b"', rule) + # + # source://citrus//lib/citrus.rb#707 + def to_str; end + + class << self + # Returns a new Rule object depending on the type of object given. + # + # source://citrus//lib/citrus.rb#589 + def for(obj); end + end +end + +# A Sequence is a Nonterminal where all rules must match. The Citrus notation +# is two or more expressions separated by a space, e.g.: +# +# expr expr +# +# source://citrus//lib/citrus.rb#1194 +class Citrus::Sequence + include ::Citrus::Rule + include ::Citrus::Nonterminal + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#1198 + def exec(input, events = T.unsafe(nil)); end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#1223 + def to_citrus; end +end + +# A StringTerminal is a Terminal that may be instantiated from a String +# object. The Citrus notation is any sequence of characters enclosed in either +# single or double quotes, e.g.: +# +# 'expr' +# "expr" +# +# This notation works the same as it does in Ruby; i.e. strings in double +# quotes may contain escape sequences while strings in single quotes may not. +# In order to specify that a string should ignore case when matching, enclose +# it in backticks instead of single or double quotes, e.g.: +# +# `expr` +# +# Besides case sensitivity, case-insensitive strings have the same semantics +# as double-quoted strings. +# +# source://citrus//lib/citrus.rb#945 +class Citrus::StringTerminal < ::Citrus::Terminal + # The +flags+ will be passed directly to Regexp#new. + # + # @return [StringTerminal] a new instance of StringTerminal + # + # source://citrus//lib/citrus.rb#946 + def initialize(rule = T.unsafe(nil), flags = T.unsafe(nil)); end + + # source://citrus//lib/citrus.rb#951 + def ==(other); end + + # source://citrus//lib/citrus.rb#951 + def eql?(other); end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#963 + def to_citrus; end +end + +# A Super is a Proxy for a rule of the same name that was defined previously +# in the grammar's inheritance chain. Thus, Super's work like Ruby's +super+, +# only for rules in a grammar instead of methods in a module. The Citrus +# notation is the word +super+ without any other punctuation, e.g.: +# +# super +# +# source://citrus//lib/citrus.rb#839 +class Citrus::Super + include ::Citrus::Rule + include ::Citrus::Proxy + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#843 + def to_citrus; end + + private + + # Searches this proxy's included grammars for a rule with this proxy's + # #rule_name. Raises an error if one cannot be found. + # + # source://citrus//lib/citrus.rb#851 + def resolve!; end +end + +# Raised when Citrus::File.parse fails. +# +# source://citrus//lib/citrus.rb#161 +class Citrus::SyntaxError < ::Citrus::Error + # The +error+ given here is an instance of Citrus::ParseError. + # + # @return [SyntaxError] a new instance of SyntaxError + # + # source://citrus//lib/citrus.rb#162 + def initialize(error); end +end + +# A Terminal is a Rule that matches directly on the input stream and may not +# contain any other rule. Terminals are essentially wrappers for regular +# expressions. As such, the Citrus notation is identical to Ruby's regular +# expression notation, e.g.: +# +# /expr/ +# +# Character classes and the dot symbol may also be used in Citrus notation for +# compatibility with other parsing expression implementations, e.g.: +# +# [a-zA-Z] +# . +# +# Character classes have the same semantics as character classes inside Ruby +# regular expressions. The dot matches any character, including newlines. +# +# source://citrus//lib/citrus.rb#878 +class Citrus::Terminal + include ::Citrus::Rule + + # @return [Terminal] a new instance of Terminal + # + # source://citrus//lib/citrus.rb#881 + def initialize(regexp = T.unsafe(nil)); end + + # source://citrus//lib/citrus.rb#906 + def ==(other); end + + # Returns +true+ if this rule is case sensitive. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#902 + def case_sensitive?; end + + # source://citrus//lib/citrus.rb#906 + def eql?(other); end + + # Returns an array of events for this rule on the given +input+. + # + # source://citrus//lib/citrus.rb#889 + def exec(input, events = T.unsafe(nil)); end + + # The actual Regexp object this rule uses to match. + # + # source://citrus//lib/citrus.rb#886 + def regexp; end + + # Returns +true+ if this rule is a Terminal. + # + # @return [Boolean] + # + # source://citrus//lib/citrus.rb#918 + def terminal?; end + + # Returns the Citrus notation of this rule as a string. + # + # source://citrus//lib/citrus.rb#923 + def to_citrus; end +end + +# The current version of Citrus as [major, minor, patch]. +# +# source://citrus//lib/citrus/version.rb#3 +Citrus::VERSION = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/gems/commonmarker@0.23.10.rbi b/sorbet/rbi/gems/commonmarker@0.23.10.rbi new file mode 100644 index 0000000000..aa4e8088c2 --- /dev/null +++ b/sorbet/rbi/gems/commonmarker@0.23.10.rbi @@ -0,0 +1,378 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `commonmarker` gem. +# Please instead update this file by running `bin/tapioca gem commonmarker`. + +# source://commonmarker//lib/commonmarker/config.rb#3 +module CommonMarker + class << self + def extensions; end + + # Public: Parses a Markdown string into a `document` node. + # + # string - {String} to be parsed + # option - A {Symbol} or {Array of Symbol}s indicating the parse options + # extensions - An {Array of Symbol}s indicating the extensions to use + # + # Returns the `document` node. + # + # @raise [TypeError] + # + # source://commonmarker//lib/commonmarker.rb#37 + def render_doc(text, options = T.unsafe(nil), extensions = T.unsafe(nil)); end + + # Public: Parses a Markdown string into an HTML string. + # + # text - A {String} of text + # option - Either a {Symbol} or {Array of Symbol}s indicating the render options + # extensions - An {Array of Symbol}s indicating the extensions to use + # + # Returns a {String} of converted HTML. + # + # @raise [TypeError] + # + # source://commonmarker//lib/commonmarker.rb#23 + def render_html(text, options = T.unsafe(nil), extensions = T.unsafe(nil)); end + end +end + +# For Ruby::Enum, these must be classes, not modules +# +# source://commonmarker//lib/commonmarker/config.rb#5 +module CommonMarker::Config + class << self + # source://commonmarker//lib/commonmarker/config.rb#37 + def process_options(option, type); end + end +end + +# See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673 +# +# source://commonmarker//lib/commonmarker/config.rb#7 +CommonMarker::Config::OPTS = T.let(T.unsafe(nil), Hash) + +# source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#4 +class CommonMarker::HtmlRenderer < ::CommonMarker::Renderer + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#77 + def blockquote(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#159 + def code(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#91 + def code_block(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#5 + def document(_); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#128 + def emph(_); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#223 + def footnote_definition(_); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#219 + def footnote_reference(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#10 + def header(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#85 + def hrule(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#110 + def html(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#146 + def image(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#120 + def inline_html(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#165 + def linebreak(_node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#140 + def link(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#33 + def list(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#57 + def list_item(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#17 + def paragraph(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#169 + def softbreak(_); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#215 + def strikethrough(_); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#132 + def strong(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#179 + def table(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#204 + def table_cell(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#187 + def table_header(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#195 + def table_row(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#66 + def tasklist(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#155 + def text(node); end + + private + + # @return [Boolean] + # + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#252 + def checked?(node); end + + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#239 + def out_footnote_backref; end + + # @return [Boolean] + # + # source://commonmarker//lib/commonmarker/renderer/html_renderer.rb#248 + def tasklist?(node); end +end + +# source://commonmarker//lib/commonmarker/node/inspect.rb#6 +class CommonMarker::Node + include ::Enumerable + include ::CommonMarker::Node::Inspect + + def _render_commonmark(*_arg0); end + def _render_html(_arg0, _arg1); end + def _render_plaintext(*_arg0); end + def _render_xml(_arg0); end + def append_child(_arg0); end + def delete; end + + # Public: Iterate over the children (if any) of the current pointer. + # + # source://commonmarker//lib/commonmarker/node.rb#66 + def each; end + + # Deprecated: Please use `each` instead + # + # source://commonmarker//lib/commonmarker/node.rb#78 + def each_child(&block); end + + def fence_info; end + def fence_info=(_arg0); end + def first_child; end + def header_level; end + def header_level=(_arg0); end + def html_escape_href(_arg0); end + def html_escape_html(_arg0); end + def insert_after(_arg0); end + def insert_before(_arg0); end + def last_child; end + def list_start; end + def list_start=(_arg0); end + def list_tight; end + def list_tight=(_arg0); end + def list_type; end + def list_type=(_arg0); end + def next; end + def parent; end + def prepend_child(_arg0); end + def previous; end + def sourcepos; end + def string_content; end + def string_content=(_arg0); end + def table_alignments; end + def tasklist_item_checked=(_arg0); end + def tasklist_item_checked?; end + def tasklist_state; end + def title; end + def title=(_arg0); end + + # Public: Convert the node to a CommonMark string. + # + # options - A {Symbol} or {Array of Symbol}s indicating the render options + # width - Column to wrap the output at + # + # Returns a {String}. + # + # source://commonmarker//lib/commonmarker/node.rb#49 + def to_commonmark(options = T.unsafe(nil), width = T.unsafe(nil)); end + + # Public: Convert the node to an HTML string. + # + # options - A {Symbol} or {Array of Symbol}s indicating the render options + # extensions - An {Array of Symbol}s indicating the extensions to use + # + # Returns a {String}. + # + # source://commonmarker//lib/commonmarker/node.rb#28 + def to_html(options = T.unsafe(nil), extensions = T.unsafe(nil)); end + + # Public: Convert the node to a plain text string. + # + # options - A {Symbol} or {Array of Symbol}s indicating the render options + # width - Column to wrap the output at + # + # Returns a {String}. + # + # source://commonmarker//lib/commonmarker/node.rb#60 + def to_plaintext(options = T.unsafe(nil), width = T.unsafe(nil)); end + + # Public: Convert the node to an XML string. + # + # options - A {Symbol} or {Array of Symbol}s indicating the render options + # + # Returns a {String}. + # + # source://commonmarker//lib/commonmarker/node.rb#38 + def to_xml(options = T.unsafe(nil)); end + + def type; end + def type_string; end + def url; end + def url=(_arg0); end + + # Public: An iterator that "walks the tree," descending into children recursively. + # + # blk - A {Proc} representing the action to take for each child + # + # @yield [_self] + # @yieldparam _self [CommonMarker::Node] the object that the method was called on + # + # source://commonmarker//lib/commonmarker/node.rb#13 + def walk(&block); end + + class << self + def markdown_to_html(_arg0, _arg1, _arg2); end + def markdown_to_xml(_arg0, _arg1, _arg2); end + def new(_arg0); end + def parse_document(_arg0, _arg1, _arg2, _arg3); end + end +end + +# source://commonmarker//lib/commonmarker/node/inspect.rb#7 +module CommonMarker::Node::Inspect + # source://commonmarker//lib/commonmarker/node/inspect.rb#10 + def inspect; end + + # @param printer [PrettyPrint] pp + # + # source://commonmarker//lib/commonmarker/node/inspect.rb#15 + def pretty_print(printer); end +end + +# source://commonmarker//lib/commonmarker/node/inspect.rb#8 +CommonMarker::Node::Inspect::PP_INDENT_SIZE = T.let(T.unsafe(nil), Integer) + +class CommonMarker::NodeError < ::StandardError; end + +# source://commonmarker//lib/commonmarker/renderer.rb#7 +class CommonMarker::Renderer + # @return [Renderer] a new instance of Renderer + # + # source://commonmarker//lib/commonmarker/renderer.rb#10 + def initialize(options: T.unsafe(nil), extensions: T.unsafe(nil)); end + + # source://commonmarker//lib/commonmarker/renderer.rb#76 + def block; end + + # source://commonmarker//lib/commonmarker/renderer.rb#68 + def blocksep; end + + # source://commonmarker//lib/commonmarker/renderer.rb#56 + def code_block(node); end + + # source://commonmarker//lib/commonmarker/renderer.rb#82 + def container(starter, ender); end + + # source://commonmarker//lib/commonmarker/renderer.rb#72 + def containersep; end + + # source://commonmarker//lib/commonmarker/renderer.rb#62 + def cr; end + + # source://commonmarker//lib/commonmarker/renderer.rb#52 + def document(_node); end + + # Returns the value of attribute in_plain. + # + # source://commonmarker//lib/commonmarker/renderer.rb#8 + def in_plain; end + + # Sets the attribute in_plain + # + # @param value the value to set the attribute in_plain to. + # + # source://commonmarker//lib/commonmarker/renderer.rb#8 + def in_plain=(_arg0); end + + # Returns the value of attribute in_tight. + # + # source://commonmarker//lib/commonmarker/renderer.rb#8 + def in_tight; end + + # Sets the attribute in_tight + # + # @param value the value to set the attribute in_tight to. + # + # source://commonmarker//lib/commonmarker/renderer.rb#8 + def in_tight=(_arg0); end + + # source://commonmarker//lib/commonmarker/renderer.rb#20 + def out(*args); end + + # source://commonmarker//lib/commonmarker/renderer.rb#88 + def plain; end + + # source://commonmarker//lib/commonmarker/renderer.rb#60 + def reference_def(_node); end + + # source://commonmarker//lib/commonmarker/renderer.rb#35 + def render(node); end + + # Returns the value of attribute warnings. + # + # source://commonmarker//lib/commonmarker/renderer.rb#8 + def warnings; end + + # Sets the attribute warnings + # + # @param value the value to set the attribute warnings to. + # + # source://commonmarker//lib/commonmarker/renderer.rb#8 + def warnings=(_arg0); end + + private + + # source://commonmarker//lib/commonmarker/renderer.rb#97 + def escape_href(str); end + + # source://commonmarker//lib/commonmarker/renderer.rb#101 + def escape_html(str); end + + # @return [Boolean] + # + # source://commonmarker//lib/commonmarker/renderer.rb#131 + def option_enabled?(opt); end + + # source://commonmarker//lib/commonmarker/renderer.rb#123 + def sourcepos(node); end + + # source://commonmarker//lib/commonmarker/renderer.rb#105 + def tagfilter(str); end +end + +# source://commonmarker//lib/commonmarker/version.rb#4 +CommonMarker::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/crack@0.4.5.rbi b/sorbet/rbi/gems/crack@0.4.5.rbi new file mode 100644 index 0000000000..e248ecc643 --- /dev/null +++ b/sorbet/rbi/gems/crack@0.4.5.rbi @@ -0,0 +1,144 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `crack` gem. +# Please instead update this file by running `bin/tapioca gem crack`. + +# source://crack//lib/crack/xml.rb#196 +module Crack; end + +# source://crack//lib/crack/xml.rb#197 +class Crack::REXMLParser + class << self + # source://crack//lib/crack/xml.rb#198 + def parse(xml); end + end +end + +# source://crack//lib/crack/xml.rb#225 +class Crack::XML + class << self + # source://crack//lib/crack/xml.rb#234 + def parse(xml); end + + # source://crack//lib/crack/xml.rb#226 + def parser; end + + # source://crack//lib/crack/xml.rb#230 + def parser=(parser); end + end +end + +# This is a slighly modified version of the XMLUtilityNode from +# http://merb.devjavu.com/projects/merb/ticket/95 (has.sox@gmail.com) +# It's mainly just adding vowels, as I ht cd wth n vwls :) +# This represents the hard part of the work, all I did was change the +# underlying parser. +# +# source://crack//lib/crack/xml.rb#23 +class REXMLUtilityNode + # @return [REXMLUtilityNode] a new instance of REXMLUtilityNode + # + # source://crack//lib/crack/xml.rb#56 + def initialize(name, normalized_attributes = T.unsafe(nil)); end + + # source://crack//lib/crack/xml.rb#73 + def add_node(node); end + + # source://crack//lib/crack/xml.rb#24 + def attributes; end + + # source://crack//lib/crack/xml.rb#24 + def attributes=(_arg0); end + + # source://crack//lib/crack/xml.rb#24 + def children; end + + # source://crack//lib/crack/xml.rb#24 + def children=(_arg0); end + + # Get the inner_html of the REXML node. + # + # source://crack//lib/crack/xml.rb#172 + def inner_html; end + + # source://crack//lib/crack/xml.rb#24 + def name; end + + # source://crack//lib/crack/xml.rb#24 + def name=(_arg0); end + + # source://crack//lib/crack/xml.rb#78 + def to_hash; end + + # Converts the node into a readable HTML node. + # + # @return [String] The HTML node in text form. + # + # source://crack//lib/crack/xml.rb#179 + def to_html; end + + # source://crack//lib/crack/xml.rb#185 + def to_s; end + + # source://crack//lib/crack/xml.rb#24 + def type; end + + # source://crack//lib/crack/xml.rb#24 + def type=(_arg0); end + + # Typecasts a value based upon its type. For instance, if + # +node+ has #type == "integer", + # {{[node.typecast_value("12") #=> 12]}} + # + # @note If +self+ does not have a "type" key, or if it's not one of the + # options specified above, the raw +value+ will be returned. + # @param value [String] The value that is being typecast. + # @return [Integer, TrueClass, FalseClass, Time, Date, Object] The result of typecasting +value+. + # + # source://crack//lib/crack/xml.rb#157 + def typecast_value(value); end + + # Take keys of the form foo-bar and convert them to foo_bar + # + # source://crack//lib/crack/xml.rb#164 + def undasherize_keys(params); end + + private + + # source://crack//lib/crack/xml.rb#191 + def unnormalize_xml_entities(value); end + + class << self + # source://crack//lib/crack/xml.rb#34 + def available_typecasts; end + + # source://crack//lib/crack/xml.rb#38 + def available_typecasts=(obj); end + + # source://crack//lib/crack/xml.rb#26 + def typecasts; end + + # source://crack//lib/crack/xml.rb#30 + def typecasts=(obj); end + end +end + +# The Reason behind redefining the String Class for this specific plugin is to +# avoid the dynamic insertion of stuff on it (see version previous to this commit). +# Doing that disables the possibility of efectuating a dump on the structure. This way it goes. +# +# source://crack//lib/crack/xml.rb#14 +class REXMLUtiliyNodeString < ::String + # Returns the value of attribute attributes. + # + # source://crack//lib/crack/xml.rb#15 + def attributes; end + + # Sets the attribute attributes + # + # @param value the value to set the attribute attributes to. + # + # source://crack//lib/crack/xml.rb#15 + def attributes=(_arg0); end +end diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi new file mode 100644 index 0000000000..120f096380 --- /dev/null +++ b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi @@ -0,0 +1,1083 @@ +# 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 + +# 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#75 + 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, which typically means that the objects must + # implement Object#eql? in a way that two identical values compare + # identically for key purposes. That is: + # + # O.new('a').eql?(O.new('a')) == true + # + # source://diff-lcs//lib/diff/lcs.rb#70 + 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#101 + 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#109 + 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#123 + 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#81 + 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#94 + 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#87 + 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#101 + 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#116 + 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#134 + def unpatch_me(patchset); end + + class << self + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + 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#168 + def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + 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#624 + 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#734 + 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#200 + 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, + # noticable 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 indicies +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#475 + 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 indicies +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#285 + 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#728 + 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#38 + 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 + +# 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#101 +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#122 + 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#223 +class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks + # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 + def change(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 + 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 + + 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#106 +class Diff::LCS::DiffCallbacks + # :yields self: + # + # @return [DiffCallbacks] a new instance of DiffCallbacks + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + def initialize; end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 + 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#125 + def finish; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 + def match(_event); end + + private + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 + 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#63 + def blocks; end + + # Returns a diff string based on a format. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#116 + def diff(format, last = T.unsafe(nil)); end + + # Returns the value of attribute end_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def end_new; end + + # Returns the value of attribute end_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def end_old; end + + # Returns the value of attribute file_length_difference. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + 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#70 + def flag_context; end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#72 + 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#98 + def merge(hunk); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#326 + 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#110 + def overlaps?(hunk); end + + # Returns the value of attribute start_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + def start_new; end + + # Returns the value of attribute start_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + 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#98 + def unshift(hunk); end + + private + + # source://diff-lcs//lib/diff/lcs/hunk.rb#213 + 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#293 + def context_range(mode, op, last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#271 + def ed_diff(format, _last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#339 + def encode(literal, target_encoding = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#343 + 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#135 + def old_diff(_last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#160 + 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#311 + def unified_range(mode, last); 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#301 +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#305 + def initialize; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 + def change(event); end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 + def discard_b(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 + 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.rb#52 +Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/docker_registry2@1.18.0.rbi b/sorbet/rbi/gems/docker_registry2@1.18.0.rbi new file mode 100644 index 0000000000..1bbb9674d5 --- /dev/null +++ b/sorbet/rbi/gems/docker_registry2@1.18.0.rbi @@ -0,0 +1,218 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `docker_registry2` gem. +# Please instead update this file by running `bin/tapioca gem docker_registry2`. + +# source://docker_registry2//lib/registry/version.rb#3 +module DockerRegistry2 + class << self + # source://docker_registry2//lib/docker_registry2.rb#10 + def connect(uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + # source://docker_registry2//lib/docker_registry2.rb#22 + def manifest(repository, tag); end + + # source://docker_registry2//lib/docker_registry2.rb#26 + def manifest_digest(repository, tag); end + + # source://docker_registry2//lib/docker_registry2.rb#14 + def search(query = T.unsafe(nil)); end + + # source://docker_registry2//lib/docker_registry2.rb#18 + def tags(repository); end + end +end + +# source://docker_registry2//lib/registry/blob.rb#4 +class DockerRegistry2::Blob + # @return [Blob] a new instance of Blob + # + # source://docker_registry2//lib/registry/blob.rb#7 + def initialize(headers, body); end + + # Returns the value of attribute body. + # + # source://docker_registry2//lib/registry/blob.rb#5 + def body; end + + # Returns the value of attribute headers. + # + # source://docker_registry2//lib/registry/blob.rb#5 + def headers; end +end + +# source://docker_registry2//lib/registry/exceptions.rb#4 +class DockerRegistry2::Exception < ::RuntimeError; end + +# source://docker_registry2//lib/registry/exceptions.rb#31 +class DockerRegistry2::InvalidMethod < ::DockerRegistry2::Exception; end + +# Manifest class represents a manfiest or index in an OCI registry +# +# source://docker_registry2//lib/registry/manifest.rb#5 +class DockerRegistry2::Manifest < ::Hash + # Returns the value of attribute body. + # + # source://docker_registry2//lib/registry/manifest.rb#6 + def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://docker_registry2//lib/registry/manifest.rb#6 + def body=(_arg0); end + + # Returns the value of attribute headers. + # + # source://docker_registry2//lib/registry/manifest.rb#6 + def headers; end + + # Sets the attribute headers + # + # @param value the value to set the attribute headers to. + # + # source://docker_registry2//lib/registry/manifest.rb#6 + def headers=(_arg0); end +end + +# source://docker_registry2//lib/registry/exceptions.rb#28 +class DockerRegistry2::NotFound < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/exceptions.rb#22 +class DockerRegistry2::ReauthenticatedException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/registry.rb#8 +class DockerRegistry2::Registry + # @option options + # @option options + # @option options + # @option options + # @option options + # @param base_uri [#to_s] Docker registry base URI + # @param options [Hash] Client options + # @return [Registry] a new instance of Registry + # + # source://docker_registry2//lib/registry/registry.rb#18 + def initialize(uri, options = T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#202 + def _pull_v1(repo, manifest, dir); end + + # source://docker_registry2//lib/registry/registry.rb#183 + def _pull_v2(repo, manifest, dir); end + + # source://docker_registry2//lib/registry/registry.rb#115 + def blob(repo, digest, outpath = T.unsafe(nil)); end + + # gets the size of a particular blob, given the repo and the content-addressable hash + # usually unneeded, since manifest includes it + # + # source://docker_registry2//lib/registry/registry.rb#236 + def blob_size(repo, blobSum); end + + # source://docker_registry2//lib/registry/registry.rb#232 + def copy(repo, tag, newregistry, newrepo, newtag); end + + # source://docker_registry2//lib/registry/registry.rb#137 + def digest(image, tag, architecture = T.unsafe(nil), os = T.unsafe(nil), variant = T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#36 + def dodelete(url); end + + # source://docker_registry2//lib/registry/registry.rb#28 + def doget(url); end + + # source://docker_registry2//lib/registry/registry.rb#40 + def dohead(url); end + + # source://docker_registry2//lib/registry/registry.rb#32 + def doput(url, payload = T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#259 + def last(header); end + + # source://docker_registry2//lib/registry/registry.rb#105 + def manifest(repo, tag); end + + # source://docker_registry2//lib/registry/registry.rb#129 + def manifest_digest(repo, tag); end + + # source://docker_registry2//lib/registry/registry.rb#270 + def manifest_sum(manifest); end + + # When a result set is too large, the Docker registry returns only the first items and adds a Link header in the + # response with the URL of the next page. See . This method + # iterates over the pages and calls the given block with each response. + # + # source://docker_registry2//lib/registry/registry.rb#47 + def paginate_doget(url); end + + # Parse the value of the Link HTTP header and return a Hash whose keys are the rel values turned into symbols, and + # the values are URLs. For example, `{ next: '/v2/_catalog?n=100&last=x' }`. + # + # source://docker_registry2//lib/registry/registry.rb#243 + def parse_link_header(header); end + + # source://docker_registry2//lib/registry/registry.rb#169 + def pull(repo, tag, dir); end + + # source://docker_registry2//lib/registry/registry.rb#222 + def push(manifest, dir); end + + # source://docker_registry2//lib/registry/registry.rb#162 + def rmtag(image, tag); end + + # source://docker_registry2//lib/registry/registry.rb#59 + def search(query = T.unsafe(nil)); end + + # @raise [DockerRegistry2::RegistryVersionException] + # + # source://docker_registry2//lib/registry/registry.rb#224 + def tag(repo, tag, newrepo, newtag); end + + # source://docker_registry2//lib/registry/registry.rb#69 + def tags(repo, count = T.unsafe(nil), last = T.unsafe(nil), withHashes = T.unsafe(nil), auto_paginate: T.unsafe(nil)); end + + private + + # source://docker_registry2//lib/registry/registry.rb#381 + def authenticate_bearer(header); end + + # source://docker_registry2//lib/registry/registry.rb#317 + def do_basic_req(type, url, stream = T.unsafe(nil), payload = T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#349 + def do_bearer_req(type, url, header, stream = T.unsafe(nil), payload = T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#280 + def doreq(type, url, stream = T.unsafe(nil), payload = T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#420 + def headers(payload: T.unsafe(nil), bearer_token: T.unsafe(nil)); end + + # source://docker_registry2//lib/registry/registry.rb#406 + def split_auth_header(header = T.unsafe(nil)); end +end + +# source://docker_registry2//lib/registry/exceptions.rb#7 +class DockerRegistry2::RegistryAuthenticationException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/exceptions.rb#10 +class DockerRegistry2::RegistryAuthorizationException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/exceptions.rb#16 +class DockerRegistry2::RegistrySSLException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/exceptions.rb#13 +class DockerRegistry2::RegistryUnknownException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/exceptions.rb#19 +class DockerRegistry2::RegistryVersionException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/exceptions.rb#25 +class DockerRegistry2::UnknownRegistryException < ::DockerRegistry2::Exception; end + +# source://docker_registry2//lib/registry/version.rb#4 +DockerRegistry2::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/domain_name@0.5.20190701.rbi b/sorbet/rbi/gems/domain_name@0.5.20190701.rbi new file mode 100644 index 0000000000..39b2203dc2 --- /dev/null +++ b/sorbet/rbi/gems/domain_name@0.5.20190701.rbi @@ -0,0 +1,260 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `domain_name` gem. +# Please instead update this file by running `bin/tapioca gem domain_name`. + +# Represents a domain name ready for extracting its registered domain +# and TLD. +# +# source://domain_name//lib/domain_name/version.rb#1 +class DomainName + # Parses _hostname_ into a DomainName object. An IP address is also + # accepted. An IPv6 address may be enclosed in square brackets. + # + # @return [DomainName] a new instance of DomainName + # + # source://domain_name//lib/domain_name.rb#78 + def initialize(hostname); end + + # source://domain_name//lib/domain_name.rb#195 + def <(other); end + + # source://domain_name//lib/domain_name.rb#217 + def <=(other); end + + # source://domain_name//lib/domain_name.rb#179 + def <=>(other); end + + # source://domain_name//lib/domain_name.rb#174 + def ==(other); end + + # source://domain_name//lib/domain_name.rb#206 + def >(other); end + + # source://domain_name//lib/domain_name.rb#228 + def >=(other); end + + # Returns true if this domain name has a canonical registered + # domain. + # + # @return [Boolean] + # + # source://domain_name//lib/domain_name.rb#70 + def canonical?; end + + # Returns true if this domain name has a canonical TLD. + # + # @return [Boolean] + # + # source://domain_name//lib/domain_name.rb#64 + def canonical_tld?; end + + # Checks if the server represented by this domain is qualified to + # send and receive cookies with a domain attribute value of + # _domain_. A true value given as the second argument represents + # cookies without a domain attribute value, in which case only + # hostname equality is checked. + # + # @return [Boolean] + # + # source://domain_name//lib/domain_name.rb#150 + def cookie_domain?(domain, host_only = T.unsafe(nil)); end + + # The least "universally original" domain part of this domain name. + # For example, "example.co.uk" for "www.sub.example.co.uk". This + # may be nil if the hostname does not have one, like when it is an + # IP address, an effective TLD or higher itself, or of a + # non-canonical domain. + # + # source://domain_name//lib/domain_name.rb#32 + def domain; end + + # source://domain_name//lib/domain_name.rb#256 + def domain_idn; end + + # The full host name normalized, ASCII-ized and downcased using the + # Unicode NFC rules and the Punycode algorithm. If initialized with + # an IP address, the string representation of the IP address + # suitable for opening a connection to. + # + # source://domain_name//lib/domain_name.rb#21 + def hostname; end + + # source://domain_name//lib/domain_name.rb#245 + def hostname_idn; end + + # source://domain_name//lib/domain_name.rb#245 + def idn; end + + # source://domain_name//lib/domain_name.rb#274 + def inspect; end + + # Returns an IPAddr object if this is an IP address. + # + # source://domain_name//lib/domain_name.rb#50 + def ipaddr; end + + # Returns true if this is an IP address, such as "192.168.0.1" and + # "[::1]". + # + # @return [Boolean] + # + # source://domain_name//lib/domain_name.rb#54 + def ipaddr?; end + + # Returns the superdomain of this domain name. + # + # source://domain_name//lib/domain_name.rb#168 + def superdomain; end + + # The TLD part of this domain name. For example, if the hostname is + # "www.sub.example.co.uk", the TLD part is "uk". This property is + # nil only if +ipaddr?+ is true. This may be nil if the hostname + # does not have one, like when it is an IP address or of a + # non-canonical domain. + # + # source://domain_name//lib/domain_name.rb#43 + def tld; end + + # source://domain_name//lib/domain_name.rb#265 + def tld_idn; end + + # source://domain_name//lib/domain_name.rb#239 + def to_s; end + + # source://domain_name//lib/domain_name.rb#239 + def to_str; end + + # Returns a host name representation suitable for use in the host + # name part of a URI. A host name, an IPv4 address, or a IPv6 + # address enclosed in square brackets. + # + # source://domain_name//lib/domain_name.rb#61 + def uri_host; end + + class << self + # source://domain_name//lib/domain_name/etld_data.rb#8784 + def etld_data; end + + # Normalizes a _domain_ using the Punycode algorithm as necessary. + # The result will be a downcased, ASCII-only string. + # + # source://domain_name//lib/domain_name.rb#288 + def normalize(domain); end + end +end + +# source://domain_name//lib/domain_name.rb#74 +DomainName::DOT = T.let(T.unsafe(nil), String) + +# source://domain_name//lib/domain_name/etld_data.rb#4 +DomainName::ETLD_DATA = T.let(T.unsafe(nil), Hash) + +# source://domain_name//lib/domain_name/etld_data.rb#2 +DomainName::ETLD_DATA_DATE = T.let(T.unsafe(nil), String) + +# source://domain_name//lib/domain_name/punycode.rb#52 +module DomainName::Punycode + class << self + # Decode a +string+ encoded in Punycode + # + # source://domain_name//lib/domain_name/punycode.rb#194 + def decode(string); end + + # Decode a hostname using IDN/Punycode algorithms + # + # source://domain_name//lib/domain_name/punycode.rb#276 + def decode_hostname(hostname); end + + # Encode a +string+ in Punycode + # + # source://domain_name//lib/domain_name/punycode.rb#101 + def encode(string); end + + # Encode a hostname using IDN/Punycode algorithms + # + # source://domain_name//lib/domain_name/punycode.rb#181 + def encode_hostname(hostname); end + end +end + +# Most errors we raise are basically kind of ArgumentError. +# +# source://domain_name//lib/domain_name/punycode.rb#96 +class DomainName::Punycode::ArgumentError < ::ArgumentError; end + +# source://domain_name//lib/domain_name/punycode.rb#53 +DomainName::Punycode::BASE = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#97 +class DomainName::Punycode::BufferOverflowError < ::DomainName::Punycode::ArgumentError; end + +# source://domain_name//lib/domain_name/punycode.rb#65 +DomainName::Punycode::CUTOFF = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#57 +DomainName::Punycode::DAMP = T.let(T.unsafe(nil), Integer) + +# Returns the numeric value of a basic code point (for use in +# representing integers) in the range 0 to base-1, or nil if cp +# is does not represent a value. +# +# source://domain_name//lib/domain_name/punycode.rb#72 +DomainName::Punycode::DECODE_DIGIT = T.let(T.unsafe(nil), Hash) + +# source://domain_name//lib/domain_name/punycode.rb#60 +DomainName::Punycode::DELIMITER = T.let(T.unsafe(nil), String) + +# source://domain_name//lib/domain_name/punycode.rb#92 +DomainName::Punycode::DOT = T.let(T.unsafe(nil), String) + +# Returns the basic code point whose value (when used for +# representing integers) is d, which must be in the range 0 to +# BASE-1. The lowercase form is used unless flag is true, in +# which case the uppercase form is used. The behavior is +# undefined if flag is nonzero and digit d has no uppercase +# form. +# +# source://domain_name//lib/domain_name/punycode.rb#86 +DomainName::Punycode::ENCODE_DIGIT = T.let(T.unsafe(nil), Proc) + +# source://domain_name//lib/domain_name/punycode.rb#58 +DomainName::Punycode::INITIAL_BIAS = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#59 +DomainName::Punycode::INITIAL_N = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#64 +DomainName::Punycode::LOBASE = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#62 +DomainName::Punycode::MAXINT = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#93 +DomainName::Punycode::PREFIX = T.let(T.unsafe(nil), String) + +# source://domain_name//lib/domain_name/punycode.rb#67 +DomainName::Punycode::RE_NONBASIC = T.let(T.unsafe(nil), Regexp) + +# source://domain_name//lib/domain_name/punycode.rb#56 +DomainName::Punycode::SKEW = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#55 +DomainName::Punycode::TMAX = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/punycode.rb#54 +DomainName::Punycode::TMIN = T.let(T.unsafe(nil), Integer) + +# source://domain_name//lib/domain_name/version.rb#2 +DomainName::VERSION = T.let(T.unsafe(nil), String) + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://domain_name//lib/domain_name.rb#295 + def DomainName(hostname); end +end diff --git a/sorbet/rbi/gems/e2mmap@0.1.0.rbi b/sorbet/rbi/gems/e2mmap@0.1.0.rbi new file mode 100644 index 0000000000..378360e89a --- /dev/null +++ b/sorbet/rbi/gems/e2mmap@0.1.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `e2mmap` gem. +# Please instead update this file by running `bin/tapioca gem e2mmap`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.12.0.rbi new file mode 100644 index 0000000000..44d28c69ce --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.12.0.rbi @@ -0,0 +1,146 @@ +# 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 + class << self + # source://erubi//lib/erubi.rb#35 + def h(value); end + end +end + +# source://erubi//lib/erubi.rb#54 +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#94 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # source://erubi//lib/erubi.rb#65 + def bufvar; end + + # The filename of the template, if one was given. + # + # source://erubi//lib/erubi.rb#62 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # source://erubi//lib/erubi.rb#59 + def src; end + + private + + # Add ruby code to the template + # + # source://erubi//lib/erubi.rb#226 + 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#235 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#244 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#249 + 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#255 + 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#213 + 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#261 + 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#289 + 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#271 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# source://erubi//lib/erubi.rb#56 +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/excon@0.102.0.rbi b/sorbet/rbi/gems/excon@0.102.0.rbi new file mode 100644 index 0000000000..9d580f3720 --- /dev/null +++ b/sorbet/rbi/gems/excon@0.102.0.rbi @@ -0,0 +1,1430 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `excon` gem. +# Please instead update this file by running `bin/tapioca gem excon`. + +# Define defaults first so they will be available to other files +# +# source://excon//lib/excon/version.rb#3 +module Excon + class << self + # source://excon//lib/excon.rb#260 + def connect(url, params = T.unsafe(nil), &block); end + + # @return [Hash] defaults for Excon connections + # + # source://excon//lib/excon.rb#49 + def defaults; end + + # Change defaults for Excon connections + # + # @return [Hash] defaults for Excon connections + # + # source://excon//lib/excon.rb#55 + def defaults=(new_defaults); end + + # source://excon//lib/excon.rb#260 + def delete(url, params = T.unsafe(nil), &block); end + + # source://excon//lib/excon.rb#59 + def display_warning(warning); end + + # source://excon//lib/excon.rb#260 + def get(url, params = T.unsafe(nil), &block); end + + # source://excon//lib/excon.rb#260 + def head(url, params = T.unsafe(nil), &block); end + + # Status of mocking + # + # source://excon//lib/excon.rb#75 + def mock; end + + # Change the status of mocking + # false is the default and works as expected + # true returns a value from stubs or raises + # + # source://excon//lib/excon.rb#83 + def mock=(new_mock); end + + # Initializes a new keep-alive session for a given remote host + # + # @param url [String] The destination URL + # @param params [Hash] One or more option params to set on the Connection instance + # @return [Connection] A new Excon::Connection instance + # @see Connection#initialize + # + # source://excon//lib/excon.rb#119 + def new(url, params = T.unsafe(nil)); end + + # source://excon//lib/excon.rb#260 + def options(url, params = T.unsafe(nil), &block); end + + # source://excon//lib/excon.rb#260 + def patch(url, params = T.unsafe(nil), &block); end + + # source://excon//lib/excon.rb#260 + def post(url, params = T.unsafe(nil), &block); end + + # source://excon//lib/excon.rb#260 + def put(url, params = T.unsafe(nil), &block); end + + # source://excon//lib/excon.rb#70 + def set_raise_on_warnings!(should_raise); end + + # @return [String] The filesystem path to the SSL Certificate Authority + # + # source://excon//lib/excon.rb#89 + def ssl_ca_path; end + + # Change path to the SSL Certificate Authority + # + # @return [String] The filesystem path to the SSL Certificate Authority + # + # source://excon//lib/excon.rb#96 + def ssl_ca_path=(new_ssl_ca_path); end + + # @return [true, false] Whether or not to verify the peer's SSL certificate / chain + # + # source://excon//lib/excon.rb#102 + def ssl_verify_peer; end + + # Change the status of ssl peer verification + # + # @see Excon#ssl_verify_peer (attr_reader) + # + # source://excon//lib/excon.rb#109 + def ssl_verify_peer=(new_ssl_verify_peer); end + + # push an additional stub onto the list to check for mock requests + # + # @param request_params [Hash] request params to match against, omitted params match all + # @param response_params [Hash] response params to return from matched request or block to call with params + # + # source://excon//lib/excon.rb#148 + def stub(request_params = T.unsafe(nil), response_params = T.unsafe(nil), &block); end + + # get a stub matching params or nil + # + # @param request_params [Hash] request params to match against, omitted params match all + # @return [Hash] response params to return from matched request or block to call with params + # + # source://excon//lib/excon.rb#192 + def stub_for(request_params = T.unsafe(nil)); end + + # get a list of defined stubs + # + # source://excon//lib/excon.rb#239 + def stubs; end + + # source://excon//lib/excon.rb#260 + def trace(url, params = T.unsafe(nil), &block); end + + # remove first/oldest stub matching request_params or nil if none match + # + # @param request_params [Hash] request params to match against, omitted params match all + # @return [Hash] response params from deleted stub + # + # source://excon//lib/excon.rb#251 + def unstub(request_params = T.unsafe(nil)); end + end +end + +# source://excon//lib/excon/constants.rb#12 +Excon::CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# source://excon//lib/excon/constants.rb#4 +Excon::CR_NL = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/connection.rb#5 +class Excon::Connection + include ::Excon::Utils + + # Initializes a new Connection instance + # + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @option params + # @param params [Hash] One or more optional params + # @return [Connection] a new instance of Connection + # + # source://excon//lib/excon/connection.rb#64 + def initialize(params = T.unsafe(nil)); end + + # Sends the supplied requests to the destination host using pipelining in + # batches of @limit [Numeric] requests. This is your soft file descriptor + # limit by default, typically 256. + # + # @param pipeline_params [Array] An array of one or more optional params, override defaults set in Connection.new, see #request for details + # + # source://excon//lib/excon/connection.rb#351 + def batch_requests(pipeline_params, limit = T.unsafe(nil)); end + + # source://excon//lib/excon/connection.rb#372 + def connect(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#10 + def connection; end + + # source://excon//lib/excon/connection.rb#14 + def connection=(new_params); end + + # Returns the value of attribute data. + # + # source://excon//lib/excon/connection.rb#8 + def data; end + + # source://excon//lib/excon/connection.rb#372 + def delete(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#109 + def error_call(datum); end + + # source://excon//lib/excon/connection.rb#372 + def get(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#372 + def head(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#388 + def inspect; end + + # source://excon//lib/excon/connection.rb#37 + def logger; end + + # source://excon//lib/excon/connection.rb#42 + def logger=(logger); end + + # source://excon//lib/excon/connection.rb#372 + def options(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#19 + def params; end + + # source://excon//lib/excon/connection.rb#23 + def params=(new_params); end + + # source://excon//lib/excon/connection.rb#372 + def patch(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#372 + def post(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#28 + def proxy; end + + # source://excon//lib/excon/connection.rb#32 + def proxy=(new_proxy); end + + # source://excon//lib/excon/connection.rb#372 + def put(params = T.unsafe(nil), &block); end + + # Sends the supplied request to the destination host. + # + # @option params + # @option params + # @option params + # @option params + # @param params [Hash] One or more optional params, override defaults set in Connection.new + # @yield [chunk] @see Response#self.parse + # + # source://excon//lib/excon/connection.rb#230 + def request(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#115 + def request_call(datum); end + + # Sends the supplied requests to the destination host using pipelining. + # + # @param pipeline_params [Array] An array of one or more optional params, override defaults set in Connection.new, see #request for details + # + # source://excon//lib/excon/connection.rb#324 + def requests(pipeline_params); end + + # source://excon//lib/excon/connection.rb#362 + def reset; end + + # source://excon//lib/excon/connection.rb#209 + def response_call(datum); end + + # source://excon//lib/excon/connection.rb#383 + def retry_limit; end + + # source://excon//lib/excon/connection.rb#378 + def retry_limit=(new_retry_limit); end + + # source://excon//lib/excon/connection.rb#372 + def trace(params = T.unsafe(nil), &block); end + + # source://excon//lib/excon/connection.rb#402 + def valid_request_keys(middlewares); end + + private + + # source://excon//lib/excon/connection.rb#408 + def detect_content_length(body); end + + # source://excon//lib/excon/connection.rb#522 + def proxy_from_env; end + + # source://excon//lib/excon/connection.rb#509 + def proxy_match_host_port(host, port); end + + # source://excon//lib/excon/connection.rb#501 + def raise_socket_error(error); end + + # source://excon//lib/excon/connection.rb#459 + def response(datum = T.unsafe(nil)); end + + # source://excon//lib/excon/connection.rb#550 + def setup_proxy; end + + # source://excon//lib/excon/connection.rb#470 + def socket(datum = T.unsafe(nil)); end + + # source://excon//lib/excon/connection.rb#481 + def sockets; end + + # source://excon//lib/excon/connection.rb#420 + def valid_middleware_keys(middlewares); end + + # source://excon//lib/excon/connection.rb#433 + def validate_params(validation, params, middlewares); end + + class << self + # source://webmock/3.19.1/lib/webmock/http_lib_adapters/excon_adapter.rb#157 + def new(args = T.unsafe(nil)); end + end +end + +# these come last as they rely on the above +# +# source://excon//lib/excon/constants.rb#136 +Excon::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://excon//lib/excon/constants.rb#6 +Excon::DEFAULT_CA_FILE = T.let(T.unsafe(nil), String) + +# 1 megabyte +# +# source://excon//lib/excon/constants.rb#8 +Excon::DEFAULT_CHUNK_SIZE = T.let(T.unsafe(nil), Integer) + +# source://excon//lib/excon/constants.rb#15 +Excon::DEFAULT_REDIRECT_LIMIT = T.let(T.unsafe(nil), Integer) + +# source://excon//lib/excon/constants.rb#19 +Excon::DEFAULT_RETRY_ERRORS = T.let(T.unsafe(nil), Array) + +# source://excon//lib/excon/constants.rb#17 +Excon::DEFAULT_RETRY_LIMIT = T.let(T.unsafe(nil), Integer) + +# source://excon//lib/excon/constants.rb#112 +Excon::DEPRECATED_VALID_REQUEST_KEYS = T.let(T.unsafe(nil), Hash) + +# Excon exception classes +# +# source://excon//lib/excon/error.rb#4 +class Excon::Error < ::StandardError + class << self + # Messages for nicer exceptions, from rfc2616 + # + # source://excon//lib/excon/error.rb#174 + def status_error(request, response); end + + # source://excon//lib/excon/error.rb#127 + def status_errors; end + end +end + +# 202 +# +# source://excon//lib/excon/error.rb#89 +class Excon::Error::Accepted < ::Excon::Error::Success; end + +# 502 +# +# source://excon//lib/excon/error.rb#123 +class Excon::Error::BadGateway < ::Excon::Error::Server; end + +# 400 +# +# source://excon//lib/excon/error.rb#101 +class Excon::Error::BadRequest < ::Excon::Error::Client; end + +# Certificate related errors +# +# source://excon//lib/excon/error.rb#27 +class Excon::Error::Certificate < ::Excon::Error::Socket + # @return [Certificate] a new instance of Certificate + # + # source://excon//lib/excon/error.rb#28 + def initialize(socket_error = T.unsafe(nil)); end +end + +# source://excon//lib/excon/error.rb#82 +class Excon::Error::Client < ::Excon::Error::HTTPStatus; end + +# 409 +# +# source://excon//lib/excon/error.rb#110 +class Excon::Error::Conflict < ::Excon::Error::Client; end + +# 100 +# +# source://excon//lib/excon/error.rb#85 +class Excon::Error::Continue < ::Excon::Error::Informational; end + +# 201 +# +# source://excon//lib/excon/error.rb#88 +class Excon::Error::Created < ::Excon::Error::Success; end + +# 417 +# +# source://excon//lib/excon/error.rb#118 +class Excon::Error::ExpectationFailed < ::Excon::Error::Client; end + +# 403 +# +# source://excon//lib/excon/error.rb#104 +class Excon::Error::Forbidden < ::Excon::Error::Client; end + +# 302 +# +# source://excon//lib/excon/error.rb#96 +class Excon::Error::Found < ::Excon::Error::Redirection; end + +# 504 +# +# source://excon//lib/excon/error.rb#125 +class Excon::Error::GatewayTimeout < ::Excon::Error::Server; end + +# 410 +# +# source://excon//lib/excon/error.rb#111 +class Excon::Error::Gone < ::Excon::Error::Client; end + +# Base class for HTTP Error classes +# +# source://excon//lib/excon/error.rb#68 +class Excon::Error::HTTPStatus < ::Excon::Error + # @return [HTTPStatus] a new instance of HTTPStatus + # + # source://excon//lib/excon/error.rb#71 + def initialize(msg, request = T.unsafe(nil), response = T.unsafe(nil)); end + + # Returns the value of attribute request. + # + # source://excon//lib/excon/error.rb#69 + def request; end + + # Returns the value of attribute response. + # + # source://excon//lib/excon/error.rb#69 + def response; end +end + +# HTTP Error classes +# +# source://excon//lib/excon/error.rb#79 +class Excon::Error::Informational < ::Excon::Error::HTTPStatus; end + +# 500 +# +# source://excon//lib/excon/error.rb#121 +class Excon::Error::InternalServerError < ::Excon::Error::Server; end + +# source://excon//lib/excon/error.rb#49 +class Excon::Error::InvalidHeaderKey < ::Excon::Error; end + +# source://excon//lib/excon/error.rb#50 +class Excon::Error::InvalidHeaderValue < ::Excon::Error; end + +# source://excon//lib/excon/error.rb#8 +class Excon::Error::InvalidStub < ::Excon::Error; end + +# 411 +# +# source://excon//lib/excon/error.rb#112 +class Excon::Error::LengthRequired < ::Excon::Error::Client; end + +# 405 +# +# source://excon//lib/excon/error.rb#106 +class Excon::Error::MethodNotAllowed < ::Excon::Error::Client; end + +# 301 +# +# source://excon//lib/excon/error.rb#95 +class Excon::Error::MovedPermanently < ::Excon::Error::Redirection; end + +# 300 +# +# source://excon//lib/excon/error.rb#94 +class Excon::Error::MultipleChoices < ::Excon::Error::Redirection; end + +# 204 +# +# source://excon//lib/excon/error.rb#91 +class Excon::Error::NoContent < ::Excon::Error::Success; end + +# 203 +# +# source://excon//lib/excon/error.rb#90 +class Excon::Error::NonAuthoritativeInformation < ::Excon::Error::Success; end + +# 406 +# +# source://excon//lib/excon/error.rb#107 +class Excon::Error::NotAcceptable < ::Excon::Error::Client; end + +# 404 +# +# source://excon//lib/excon/error.rb#105 +class Excon::Error::NotFound < ::Excon::Error::Client; end + +# 501 +# +# source://excon//lib/excon/error.rb#122 +class Excon::Error::NotImplemented < ::Excon::Error::Server; end + +# 304 +# +# source://excon//lib/excon/error.rb#98 +class Excon::Error::NotModified < ::Excon::Error::Redirection; end + +# 200 +# +# source://excon//lib/excon/error.rb#87 +class Excon::Error::OK < ::Excon::Error::Success; end + +# 206 +# +# source://excon//lib/excon/error.rb#93 +class Excon::Error::PartialContent < ::Excon::Error::Success; end + +# 402 +# +# source://excon//lib/excon/error.rb#103 +class Excon::Error::PaymentRequired < ::Excon::Error::Client; end + +# 412 +# +# source://excon//lib/excon/error.rb#113 +class Excon::Error::PreconditionFailed < ::Excon::Error::Client; end + +# 407 +# +# source://excon//lib/excon/error.rb#108 +class Excon::Error::ProxyAuthenticationRequired < ::Excon::Error::Client; end + +# source://excon//lib/excon/error.rb#54 +class Excon::Error::ProxyConnectionError < ::Excon::Error + # @return [ProxyConnectionError] a new instance of ProxyConnectionError + # + # source://excon//lib/excon/error.rb#57 + def initialize(msg, request = T.unsafe(nil), response = T.unsafe(nil)); end + + # Returns the value of attribute request. + # + # source://excon//lib/excon/error.rb#55 + def request; end + + # Returns the value of attribute response. + # + # source://excon//lib/excon/error.rb#55 + def response; end +end + +# source://excon//lib/excon/error.rb#64 +class Excon::Error::ProxyParse < ::Excon::Error; end + +# source://excon//lib/excon/error.rb#81 +class Excon::Error::Redirection < ::Excon::Error::HTTPStatus; end + +# 413 +# +# source://excon//lib/excon/error.rb#114 +class Excon::Error::RequestEntityTooLarge < ::Excon::Error::Client; end + +# 408 +# +# source://excon//lib/excon/error.rb#109 +class Excon::Error::RequestTimeout < ::Excon::Error::Client; end + +# 414 +# +# source://excon//lib/excon/error.rb#115 +class Excon::Error::RequestURITooLong < ::Excon::Error::Client; end + +# 416 +# +# source://excon//lib/excon/error.rb#117 +class Excon::Error::RequestedRangeNotSatisfiable < ::Excon::Error::Client; end + +# 205 +# +# source://excon//lib/excon/error.rb#92 +class Excon::Error::ResetContent < ::Excon::Error::Success; end + +# source://excon//lib/excon/error.rb#52 +class Excon::Error::ResponseParse < ::Excon::Error; end + +# 303 +# +# source://excon//lib/excon/error.rb#97 +class Excon::Error::SeeOther < ::Excon::Error::Redirection; end + +# source://excon//lib/excon/error.rb#83 +class Excon::Error::Server < ::Excon::Error::HTTPStatus; end + +# 503 +# +# source://excon//lib/excon/error.rb#124 +class Excon::Error::ServiceUnavailable < ::Excon::Error::Server; end + +# Socket related errors +# +# source://excon//lib/excon/error.rb#12 +class Excon::Error::Socket < ::Excon::Error + # @return [Socket] a new instance of Socket + # + # source://excon//lib/excon/error.rb#15 + def initialize(socket_error = T.unsafe(nil)); end + + # Returns the value of attribute socket_error. + # + # source://excon//lib/excon/error.rb#13 + def socket_error; end +end + +# source://excon//lib/excon/error.rb#7 +class Excon::Error::StubNotFound < ::Excon::Error; end + +# source://excon//lib/excon/error.rb#80 +class Excon::Error::Success < ::Excon::Error::HTTPStatus; end + +# 101 +# +# source://excon//lib/excon/error.rb#86 +class Excon::Error::SwitchingProtocols < ::Excon::Error::Informational; end + +# 307 +# +# source://excon//lib/excon/error.rb#100 +class Excon::Error::TemporaryRedirect < ::Excon::Error::Redirection; end + +# source://excon//lib/excon/error.rb#51 +class Excon::Error::Timeout < ::Excon::Error; end + +# source://excon//lib/excon/error.rb#65 +class Excon::Error::TooManyRedirects < ::Excon::Error; end + +# 429 +# +# source://excon//lib/excon/error.rb#120 +class Excon::Error::TooManyRequests < ::Excon::Error::Client; end + +# 401 +# +# source://excon//lib/excon/error.rb#102 +class Excon::Error::Unauthorized < ::Excon::Error::Client; end + +# 422 +# +# source://excon//lib/excon/error.rb#119 +class Excon::Error::UnprocessableEntity < ::Excon::Error::Client; end + +# 415 +# +# source://excon//lib/excon/error.rb#116 +class Excon::Error::UnsupportedMediaType < ::Excon::Error::Client; end + +# 305 +# +# source://excon//lib/excon/error.rb#99 +class Excon::Error::UseProxy < ::Excon::Error::Redirection; end + +# source://excon//lib/excon/error.rb#9 +class Excon::Error::Warning < ::Excon::Error; end + +# Legacy +# +# source://excon//lib/excon/error.rb#199 +module Excon::Errors + class << self + # source://excon//lib/excon/error.rb#225 + def status_error(request, response); end + end +end + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Accepted = Excon::Error::Accepted + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::BadGateway = Excon::Error::BadGateway + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::BadRequest = Excon::Error::BadRequest + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::CertificateError = Excon::Error::Certificate + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ClientError = Excon::Error::Client + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Conflict = Excon::Error::Conflict + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Continue = Excon::Error::Continue + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Created = Excon::Error::Created + +# source://excon//lib/excon/error.rb#200 +Excon::Errors::Error = Excon::Error + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ExpectationFailed = Excon::Error::ExpectationFailed + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Forbidden = Excon::Error::Forbidden + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Found = Excon::Error::Found + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::GatewayTimeout = Excon::Error::GatewayTimeout + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Gone = Excon::Error::Gone + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::HTTPStatusError = Excon::Error::HTTPStatus + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Informational = Excon::Error::Informational + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::InternalServerError = Excon::Error::InternalServerError + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::InvalidHeaderKey = Excon::Error::InvalidHeaderKey + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::InvalidHeaderValue = Excon::Error::InvalidHeaderValue + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::InvalidStub = Excon::Error::InvalidStub + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::LengthRequired = Excon::Error::LengthRequired + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::MethodNotAllowed = Excon::Error::MethodNotAllowed + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::MovedPermanently = Excon::Error::MovedPermanently + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::MultipleChoices = Excon::Error::MultipleChoices + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::NoContent = Excon::Error::NoContent + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::NonAuthoritativeInformation = Excon::Error::NonAuthoritativeInformation + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::NotAcceptable = Excon::Error::NotAcceptable + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::NotFound = Excon::Error::NotFound + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::NotImplemented = Excon::Error::NotImplemented + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::NotModified = Excon::Error::NotModified + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::OK = Excon::Error::OK + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::PartialContent = Excon::Error::PartialContent + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::PaymentRequired = Excon::Error::PaymentRequired + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::PreconditionFailed = Excon::Error::PreconditionFailed + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ProxyAuthenticationRequired = Excon::Error::ProxyAuthenticationRequired + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ProxyConnectionError = Excon::Error::ProxyConnectionError + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ProxyParse = Excon::Error::ProxyParse + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Redirection = Excon::Error::Redirection + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::RequestEntityTooLarge = Excon::Error::RequestEntityTooLarge + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::RequestTimeout = Excon::Error::RequestTimeout + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::RequestURITooLong = Excon::Error::RequestURITooLong + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::RequestedRangeNotSatisfiable = Excon::Error::RequestedRangeNotSatisfiable + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ResetContent = Excon::Error::ResetContent + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ResponseParse = Excon::Error::ResponseParse + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::SeeOther = Excon::Error::SeeOther + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ServerError = Excon::Error::Server + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::ServiceUnavailable = Excon::Error::ServiceUnavailable + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::SocketError = Excon::Error::Socket + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::StubNotFound = Excon::Error::StubNotFound + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Success = Excon::Error::Success + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::SwitchingProtocols = Excon::Error::SwitchingProtocols + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::TemporaryRedirect = Excon::Error::TemporaryRedirect + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Timeout = Excon::Error::Timeout + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::TooManyRedirects = Excon::Error::TooManyRedirects + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::TooManyRequests = Excon::Error::TooManyRequests + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Unauthorized = Excon::Error::Unauthorized + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::UnprocessableEntity = Excon::Error::UnprocessableEntity + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::UnsupportedMediaType = Excon::Error::UnsupportedMediaType + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::UseProxy = Excon::Error::UseProxy + +# source://excon//lib/excon/error.rb#222 +Excon::Errors::Warning = Excon::Error::Warning + +# source://excon//lib/excon/constants.rb#25 +Excon::FORCE_ENC = T.let(T.unsafe(nil), TrueClass) + +# source://excon//lib/excon/constants.rb#31 +Excon::HTTPS = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/constants.rb#27 +Excon::HTTP_1_1 = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/constants.rb#29 +Excon::HTTP_VERBS = T.let(T.unsafe(nil), Array) + +# source://excon//lib/excon/headers.rb#3 +class Excon::Headers < ::Hash + # @return [Headers] a new instance of Headers + # + # source://excon//lib/excon/headers.rb#24 + def initialize; end + + # source://excon//lib/excon/headers.rb#29 + def [](key); end + + # source://excon//lib/excon/headers.rb#33 + def []=(key, value); end + + # source://excon//lib/excon/headers.rb#40 + def assoc(obj); end + + # source://excon//lib/excon/headers.rb#45 + def delete(key, &proc); end + + # source://excon//lib/excon/headers.rb#50 + def fetch(key, default = T.unsafe(nil), &proc); end + + # @return [Boolean] + # + # source://excon//lib/excon/headers.rb#58 + def has_key?(key); end + + # @return [Boolean] + # + # source://excon//lib/excon/headers.rb#58 + def key?(key); end + + # @return [Boolean] + # + # source://excon//lib/excon/headers.rb#58 + def member?(key); end + + # source://excon//lib/excon/headers.rb#64 + def merge(other_hash); end + + # source://excon//lib/excon/headers.rb#68 + def merge!(other_hash); end + + def raw_assoc(_arg0); end + def raw_delete(_arg0); end + def raw_fetch(*_arg0); end + def raw_has_key?(_arg0); end + def raw_include?(_arg0); end + def raw_key?(_arg0); end + def raw_member?(_arg0); end + def raw_merge(*_arg0); end + def raw_merge!(*_arg0); end + def raw_reader(_arg0); end + def raw_rehash; end + def raw_store(_arg0, _arg1); end + def raw_values_at(*_arg0); end + def raw_writer(_arg0, _arg1); end + + # source://excon//lib/excon/headers.rb#75 + def rehash; end + + # source://excon//lib/excon/headers.rb#33 + def store(key, value); end + + # source://excon//lib/excon/headers.rb#80 + def values_at(*keys); end +end + +# source://excon//lib/excon/headers.rb#5 +Excon::Headers::SENTINEL = T.let(T.unsafe(nil), Hash) + +# source://excon//lib/excon/instrumentors/logging_instrumentor.rb#4 +class Excon::LoggingInstrumentor + class << self + # source://excon//lib/excon/instrumentors/logging_instrumentor.rb#6 + def instrument(name, params = T.unsafe(nil)); end + end +end + +# source://excon//lib/excon/middlewares/base.rb#3 +module Excon::Middleware; end + +# source://excon//lib/excon/middlewares/base.rb#4 +class Excon::Middleware::Base + # @return [Base] a new instance of Base + # + # source://excon//lib/excon/middlewares/base.rb#11 + def initialize(stack); end + + # source://excon//lib/excon/middlewares/base.rb#15 + def error_call(datum); end + + # source://excon//lib/excon/middlewares/base.rb#20 + def request_call(datum); end + + # source://excon//lib/excon/middlewares/base.rb#25 + def response_call(datum); end + + class << self + # Returns the list of parameters that this middleware uses that are valid + # as arguments to `Connection#request` or `Connection#new`. + # + # source://excon//lib/excon/middlewares/base.rb#7 + def valid_parameter_keys; end + end +end + +# source://excon//lib/excon/middlewares/capture_cookies.rb#4 +class Excon::Middleware::CaptureCookies < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/capture_cookies.rb#6 + def extract_cookies_from_set_cookie(set_cookie); end + + # source://excon//lib/excon/middlewares/capture_cookies.rb#10 + def get_header(datum, header); end + + # source://excon//lib/excon/middlewares/capture_cookies.rb#17 + def response_call(datum); end +end + +# source://excon//lib/excon/middlewares/decompress.rb#4 +class Excon::Middleware::Decompress < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/decompress.rb#9 + def request_call(datum); end + + # source://excon//lib/excon/middlewares/decompress.rb#19 + def response_call(datum); end +end + +# Zlib::MAX_WBITS * -1 +# +# source://excon//lib/excon/middlewares/decompress.rb#7 +Excon::Middleware::Decompress::INFLATE_RAW = T.let(T.unsafe(nil), Integer) + +# Zlib::MAX_WBITS + 32 +# +# source://excon//lib/excon/middlewares/decompress.rb#6 +Excon::Middleware::Decompress::INFLATE_ZLIB_OR_GZIP = T.let(T.unsafe(nil), Integer) + +# source://excon//lib/excon/middlewares/escape_path.rb#4 +class Excon::Middleware::EscapePath < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/escape_path.rb#5 + def request_call(datum); end +end + +# source://excon//lib/excon/middlewares/expects.rb#4 +class Excon::Middleware::Expects < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/expects.rb#11 + def response_call(datum); end + + class << self + # source://excon//lib/excon/middlewares/expects.rb#5 + def valid_parameter_keys; end + end +end + +# source://excon//lib/excon/middlewares/idempotent.rb#6 +class Excon::Middleware::Idempotent < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/idempotent.rb#22 + def error_call(datum); end + + # source://excon//lib/excon/middlewares/idempotent.rb#17 + def request_call(datum); end + + class << self + # source://excon//lib/excon/middlewares/idempotent.rb#7 + def valid_parameter_keys; end + end +end + +# source://excon//lib/excon/middlewares/instrumentor.rb#4 +class Excon::Middleware::Instrumentor < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/instrumentor.rb#13 + def error_call(datum); end + + # source://excon//lib/excon/middlewares/instrumentor.rb#23 + def request_call(datum); end + + # source://excon//lib/excon/middlewares/instrumentor.rb#38 + def response_call(datum); end + + class << self + # source://excon//lib/excon/middlewares/instrumentor.rb#5 + def valid_parameter_keys; end + end +end + +# source://excon//lib/excon/middlewares/mock.rb#4 +class Excon::Middleware::Mock < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/mock.rb#13 + def request_call(datum); end + + class << self + # source://excon//lib/excon/middlewares/mock.rb#5 + def valid_parameter_keys; end + end +end + +# source://excon//lib/excon/middlewares/redirect_follower.rb#4 +class Excon::Middleware::RedirectFollower < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/redirect_follower.rb#18 + def get_header(datum, header); end + + # source://excon//lib/excon/middlewares/redirect_follower.rb#12 + def request_call(datum); end + + # source://excon//lib/excon/middlewares/redirect_follower.rb#25 + def response_call(datum); end + + class << self + # source://excon//lib/excon/middlewares/redirect_follower.rb#5 + def valid_parameter_keys; end + end +end + +# source://excon//lib/excon/middlewares/response_parser.rb#4 +class Excon::Middleware::ResponseParser < ::Excon::Middleware::Base + # source://excon//lib/excon/middlewares/response_parser.rb#5 + def response_call(datum); end +end + +# source://excon//lib/excon/constants.rb#33 +Excon::NO_ENTITY = T.let(T.unsafe(nil), Array) + +# source://excon//lib/excon/pretty_printer.rb#3 +class Excon::PrettyPrinter + class << self + # source://excon//lib/excon/pretty_printer.rb#4 + def pp(io, datum, indent = T.unsafe(nil)); end + end +end + +# source://excon//lib/excon/constants.rb#35 +Excon::REDACTED = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/response.rb#3 +class Excon::Response + # @return [Response] a new instance of Response + # + # source://excon//lib/excon/response.rb#213 + def initialize(params = T.unsafe(nil)); end + + # source://excon//lib/excon/response.rb#227 + def [](key); end + + # source://excon//lib/excon/response.rb#11 + def body; end + + # backwards compatability reader/writers + # + # source://excon//lib/excon/response.rb#8 + def body=(new_body); end + + # Returns the value of attribute data. + # + # source://excon//lib/excon/response.rb#5 + def data; end + + # Sets the attribute data + # + # @param value the value to set the attribute data to. + # + # source://excon//lib/excon/response.rb#5 + def data=(_arg0); end + + # Retrieve a specific header value. Header names are treated case-insensitively. + # + # @param name [String] Header name + # + # source://excon//lib/excon/response.rb#242 + def get_header(name); end + + # source://excon//lib/excon/response.rb#17 + def headers; end + + # source://excon//lib/excon/response.rb#14 + def headers=(new_headers); end + + # source://excon//lib/excon/response.rb#20 + def host; end + + # can't be named "method" + # + # source://excon//lib/excon/response.rb#32 + def http_method; end + + # source://excon//lib/excon/response.rb#26 + def local_address; end + + # source://excon//lib/excon/response.rb#29 + def local_port; end + + # source://excon//lib/excon/response.rb#231 + def params; end + + # source://excon//lib/excon/response.rb#35 + def path; end + + # source://excon//lib/excon/response.rb#41 + def port; end + + # source://excon//lib/excon/response.rb#236 + def pp; end + + # source://excon//lib/excon/response.rb#38 + def query; end + + # source://excon//lib/excon/response.rb#47 + def reason_phrase; end + + # source://excon//lib/excon/response.rb#44 + def reason_phrase=(new_reason_phrase); end + + # source://excon//lib/excon/response.rb#53 + def remote_ip; end + + # source://excon//lib/excon/response.rb#50 + def remote_ip=(new_remote_ip); end + + # source://excon//lib/excon/response.rb#23 + def scheme; end + + # source://excon//lib/excon/response.rb#59 + def status; end + + # source://excon//lib/excon/response.rb#56 + def status=(new_status); end + + # source://excon//lib/excon/response.rb#62 + def status_line; end + + # source://excon//lib/excon/response.rb#65 + def status_line=(new_status_line); end + + class << self + # source://excon//lib/excon/response.rb#69 + def parse(socket, datum); end + + # source://excon//lib/excon/response.rb#193 + def parse_headers(socket, datum); end + end +end + +# source://excon//lib/excon/ssl_socket.rb#3 +class Excon::SSLSocket < ::Excon::Socket + # @return [SSLSocket] a new instance of SSLSocket + # + # source://excon//lib/excon/ssl_socket.rb#8 + def initialize(data = T.unsafe(nil)); end + + private + + # source://excon//lib/excon/ssl_socket.rb#171 + def client_cert_data; end + + # source://excon//lib/excon/ssl_socket.rb#182 + def client_chain_data; end + + # source://excon//lib/excon/ssl_socket.rb#196 + def client_key_data; end + + # source://excon//lib/excon/ssl_socket.rb#207 + def client_key_pass; end + + # source://excon//lib/excon/ssl_socket.rb#190 + def connect; end +end + +# source://excon//lib/excon/ssl_socket.rb#4 +Excon::SSLSocket::HAVE_NONBLOCK = T.let(T.unsafe(nil), TrueClass) + +# source://excon//lib/excon/socket.rb#5 +class Excon::Socket + include ::Excon::Utils + extend ::Forwardable + + # @return [Socket] a new instance of Socket + # + # source://excon//lib/excon/socket.rb#44 + def initialize(data = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def close(*args, **_arg1, &block); end + + # Returns the value of attribute data. + # + # source://excon//lib/excon/socket.rb#10 + def data; end + + # Sets the attribute data + # + # @param value the value to set the attribute data to. + # + # source://excon//lib/excon/socket.rb#10 + def data=(_arg0); end + + # source://excon//lib/excon/socket.rb#101 + def local_address; end + + # source://excon//lib/excon/socket.rb#105 + def local_port; end + + # source://excon//lib/excon/socket.rb#29 + def params; end + + # source://excon//lib/excon/socket.rb#34 + def params=(new_params); end + + # source://excon//lib/excon/socket.rb#54 + def read(max_length = T.unsafe(nil)); end + + # source://excon//lib/excon/socket.rb#64 + def readline; end + + # Returns the value of attribute remote_ip. + # + # source://excon//lib/excon/socket.rb#39 + def remote_ip; end + + # source://excon//lib/excon/socket.rb#93 + def write(data); end + + private + + # source://excon//lib/excon/socket.rb#190 + def add_to_read_buffer(str); end + + # source://excon//lib/excon/socket.rb#111 + def connect; end + + # source://excon//lib/excon/socket.rb#237 + def read_block(max_length); end + + # source://excon//lib/excon/socket.rb#195 + def read_nonblock(max_length); end + + # source://excon//lib/excon/socket.rb#296 + def select_with_timeout(socket, type); end + + # source://excon//lib/excon/socket.rb#310 + def unpacked_sockaddr; end + + # source://excon//lib/excon/socket.rb#286 + def write_block(data); end + + # source://excon//lib/excon/socket.rb#251 + def write_nonblock(data); end +end + +# read/write drawn from https://github.com/ruby-amqp/bunny/commit/75d9dd79551b31a5dd3d1254c537bad471f108cf +# +# source://excon//lib/excon/socket.rb#13 +Excon::Socket::CONNECT_RETRY_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# Ruby >= 2.1 +# +# source://excon//lib/excon/socket.rb#18 +Excon::Socket::READ_RETRY_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# Ruby >= 2.1 +# +# source://excon//lib/excon/socket.rb#23 +Excon::Socket::WRITE_RETRY_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# source://excon//lib/excon/instrumentors/standard_instrumentor.rb#3 +class Excon::StandardInstrumentor + class << self + # source://excon//lib/excon/instrumentors/standard_instrumentor.rb#4 + def instrument(name, params = T.unsafe(nil)); end + end +end + +# source://excon//lib/excon/constants.rb#37 +Excon::UNIX = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/constants.rb#39 +Excon::USER_AGENT = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/unix_socket.rb#3 +class Excon::UnixSocket < ::Excon::Socket + private + + # source://excon//lib/excon/unix_socket.rb#7 + def connect; end +end + +# source://excon//lib/excon/utils.rb#3 +module Excon::Utils + extend ::Excon::Utils + + # source://excon//lib/excon/utils.rb#13 + def binary_encode(string); end + + # source://excon//lib/excon/utils.rb#25 + def connection_uri(datum = T.unsafe(nil)); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # source://excon//lib/excon/utils.rb#104 + def escape_uri(str); end + + # Performs validation on the passed header hash and returns a string representation of the headers + # + # source://excon//lib/excon/utils.rb#126 + def headers_hash_to_s(headers); end + + # source://excon//lib/excon/utils.rb#64 + def port_string(datum); end + + # source://excon//lib/excon/utils.rb#72 + def query_string(datum); end + + # Redact sensitive info from provided data + # + # source://excon//lib/excon/utils.rb#37 + def redact(datum); end + + # source://excon//lib/excon/utils.rb#60 + def request_uri(datum); end + + # Splits a header value +str+ according to HTTP specification. + # + # source://excon//lib/excon/utils.rb#95 + def split_header_value(str); end + + # Unescape form encoded values in +str+ + # + # source://excon//lib/excon/utils.rb#118 + def unescape_form(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # source://excon//lib/excon/utils.rb#111 + def unescape_uri(str); end +end + +# source://excon//lib/excon/utils.rb#6 +Excon::Utils::CONTROL = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/utils.rb#7 +Excon::Utils::DELIMS = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/utils.rb#11 +Excon::Utils::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# source://excon//lib/excon/utils.rb#9 +Excon::Utils::NONASCII = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/utils.rb#10 +Excon::Utils::UNESCAPED = T.let(T.unsafe(nil), Regexp) + +# source://excon//lib/excon/utils.rb#8 +Excon::Utils::UNWISE = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/constants.rb#68 +Excon::VALID_CONNECTION_KEYS = T.let(T.unsafe(nil), Array) + +# source://excon//lib/excon/constants.rb#43 +Excon::VALID_REQUEST_KEYS = T.let(T.unsafe(nil), Array) + +# source://excon//lib/excon/version.rb#4 +Excon::VERSION = T.let(T.unsafe(nil), String) + +# source://excon//lib/excon/constants.rb#41 +Excon::VERSIONS = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi b/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi new file mode 100644 index 0000000000..5f210766e7 --- /dev/null +++ b/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi @@ -0,0 +1,146 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-net_http` gem. +# Please instead update this file by running `bin/tapioca gem faraday-net_http`. + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#12 +module Faraday + class << self + # source://faraday/2.7.10/lib/faraday.rb#55 + def default_adapter; end + + # source://faraday/2.7.10/lib/faraday.rb#102 + def default_adapter=(adapter); end + + # source://faraday/2.7.10/lib/faraday.rb#59 + def default_adapter_options; end + + # source://faraday/2.7.10/lib/faraday.rb#59 + def default_adapter_options=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#120 + def default_connection; end + + # source://faraday/2.7.10/lib/faraday.rb#62 + def default_connection=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#127 + def default_connection_options; end + + # source://faraday/2.7.10/lib/faraday.rb#134 + def default_connection_options=(options); end + + # source://faraday/2.7.10/lib/faraday.rb#67 + def ignore_env_proxy; end + + # source://faraday/2.7.10/lib/faraday.rb#67 + def ignore_env_proxy=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#46 + def lib_path; end + + # source://faraday/2.7.10/lib/faraday.rb#46 + def lib_path=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#96 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/2.7.10/lib/faraday.rb#107 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/2.7.10/lib/faraday.rb#42 + def root_path; end + + # source://faraday/2.7.10/lib/faraday.rb#42 + def root_path=(_arg0); end + + private + + # source://faraday/2.7.10/lib/faraday.rb#143 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#13 +class Faraday::Adapter + # source://faraday/2.7.10/lib/faraday/adapter.rb#28 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/2.7.10/lib/faraday/adapter.rb#55 + def call(env); end + + # source://faraday/2.7.10/lib/faraday/adapter.rb#50 + def close; end + + # source://faraday/2.7.10/lib/faraday/adapter.rb#41 + def connection(env); end + + private + + # source://faraday/2.7.10/lib/faraday/adapter.rb#85 + def request_timeout(type, options); end + + # source://faraday/2.7.10/lib/faraday/adapter.rb#62 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil), finished: T.unsafe(nil)); end +end + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#14 +class Faraday::Adapter::NetHttp < ::Faraday::Adapter + # @return [NetHttp] a new instance of NetHttp + # + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#38 + def initialize(app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#43 + def build_connection(env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#63 + def call(env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#51 + def net_http_connection(env); end + + private + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#152 + def configure_request(http, req); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#135 + def configure_ssl(http, ssl); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#79 + def create_request(env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#191 + def encoded_body(http_response); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#95 + def perform_request(http, env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#109 + def request_with_wrapped_block(http, env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#125 + def save_http_response(env, http_response); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#172 + def ssl_cert_store(ssl); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#181 + def ssl_verify_mode(ssl); end + + # @return [Boolean] + # + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#203 + def verify_hostname_enabled?(http, ssl); end +end + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#36 +Faraday::Adapter::NetHttp::NET_HTTP_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://faraday-net_http//lib/faraday/net_http/version.rb#4 +module Faraday::NetHttp; end + +# source://faraday-net_http//lib/faraday/net_http/version.rb#5 +Faraday::NetHttp::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-retry@2.2.0.rbi b/sorbet/rbi/gems/faraday-retry@2.2.0.rbi new file mode 100644 index 0000000000..8bd0fcdcc0 --- /dev/null +++ b/sorbet/rbi/gems/faraday-retry@2.2.0.rbi @@ -0,0 +1,207 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-retry` gem. +# Please instead update this file by running `bin/tapioca gem faraday-retry`. + +# Faraday namespace. +# +# source://faraday-retry//lib/faraday/retriable_response.rb#4 +module Faraday + class << self + # source://faraday/2.7.10/lib/faraday.rb#55 + def default_adapter; end + + # source://faraday/2.7.10/lib/faraday.rb#102 + def default_adapter=(adapter); end + + # source://faraday/2.7.10/lib/faraday.rb#59 + def default_adapter_options; end + + # source://faraday/2.7.10/lib/faraday.rb#59 + def default_adapter_options=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#120 + def default_connection; end + + # source://faraday/2.7.10/lib/faraday.rb#62 + def default_connection=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#127 + def default_connection_options; end + + # source://faraday/2.7.10/lib/faraday.rb#134 + def default_connection_options=(options); end + + # source://faraday/2.7.10/lib/faraday.rb#67 + def ignore_env_proxy; end + + # source://faraday/2.7.10/lib/faraday.rb#67 + def ignore_env_proxy=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#46 + def lib_path; end + + # source://faraday/2.7.10/lib/faraday.rb#46 + def lib_path=(_arg0); end + + # source://faraday/2.7.10/lib/faraday.rb#96 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/2.7.10/lib/faraday.rb#107 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/2.7.10/lib/faraday.rb#42 + def root_path; end + + # source://faraday/2.7.10/lib/faraday.rb#42 + def root_path=(_arg0); end + + private + + # source://faraday/2.7.10/lib/faraday.rb#143 + def method_missing(name, *args, &block); end + end +end + +# Exception used to control the Retry middleware. +# +# source://faraday-retry//lib/faraday/retriable_response.rb#6 +class Faraday::RetriableResponse < ::Faraday::Error; end + +# Middleware main module. +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#4 +module Faraday::Retry; end + +# This class provides the main implementation for your middleware. +# Your middleware can implement any of the following methods: +# * on_request - called when the request is being prepared +# * on_complete - called when the response is being processed +# +# Optionally, you can also override the following methods from Faraday::Middleware +# * initialize(app, options = {}) - the initializer method +# * call(env) - the main middleware invocation method. +# This already calls on_request and on_complete, so you normally don't need to override it. +# You may need to in case you need to "wrap" the request or need more control +# (see "retry" middleware: https://github.com/lostisland/faraday/blob/main/lib/faraday/request/retry.rb#L142). +# IMPORTANT: Remember to call `@app.call(env)` or `super` to not interrupt the middleware chain! +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#17 +class Faraday::Retry::Middleware < ::Faraday::Middleware + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param app [#call] + # @param options [Hash] + # @return [Middleware] a new instance of Middleware + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#127 + def initialize(app, options = T.unsafe(nil)); end + + # An exception matcher for the rescue clause can usually be any object + # that responds to `===`, but for Ruby 1.8 it has to be a Class or Module. + # + # @api private + # @param exceptions [Array] + # @return [Module] an exception matcher + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#185 + def build_exception_matcher(exceptions); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#133 + def calculate_sleep_amount(retries, env); end + + # @param env [Faraday::Env] + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#147 + def call(env); end + + private + + # RFC for RateLimit Header Fields for HTTP: + # https://www.ietf.org/archive/id/draft-ietf-httpapi-ratelimit-headers-05.html#name-fields-definition + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#222 + def calculate_rate_limit_reset(env); end + + # MDN spec for Retry-After header: + # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#229 + def calculate_retry_after(env); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#234 + def calculate_retry_interval(retries); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#245 + def parse_retry_header(env, header); end + + # @return [Boolean] + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#206 + def retry_request?(env, exception); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#211 + def rewind_files(body); end +end + +# source://faraday-retry//lib/faraday/retry/middleware.rb#18 +Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://faraday-retry//lib/faraday/retry/middleware.rb#22 +Faraday::Retry::Middleware::IDEMPOTENT_METHODS = T.let(T.unsafe(nil), Array) + +# Options contains the configurable parameters for the Retry middleware. +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#30 +class Faraday::Retry::Middleware::Options < ::Faraday::Options + # source://faraday-retry//lib/faraday/retry/middleware.rb#58 + def backoff_factor; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#62 + def exceptions; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#46 + def interval; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#54 + def interval_randomness; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#42 + def max; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#50 + def max_interval; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#66 + def methods; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#74 + def retry_block; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#70 + def retry_if; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#78 + def retry_statuses; end + + class << self + # source://faraday-retry//lib/faraday/retry/middleware.rb#34 + def from(value); end + end +end + +# source://faraday-retry//lib/faraday/retry/middleware.rb#32 +Faraday::Retry::Middleware::Options::DEFAULT_CHECK = T.let(T.unsafe(nil), Proc) + +# source://faraday-retry//lib/faraday/retry/version.rb#5 +Faraday::Retry::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday@2.7.10.rbi b/sorbet/rbi/gems/faraday@2.7.10.rbi new file mode 100644 index 0000000000..da6d9002c5 --- /dev/null +++ b/sorbet/rbi/gems/faraday@2.7.10.rbi @@ -0,0 +1,2894 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday` gem. +# Please instead update this file by running `bin/tapioca gem faraday`. + +# conn.get '/' +# +# source://faraday//lib/faraday/version.rb#3 +module Faraday + class << self + # @overload default_adapter + # @overload default_adapter= + # + # source://faraday//lib/faraday.rb#55 + def default_adapter; end + + # Documented elsewhere, see default_adapter reader + # + # source://faraday//lib/faraday.rb#102 + def default_adapter=(adapter); end + + # Option for the default_adapter + # @return [Hash] default_adapter options + # + # source://faraday//lib/faraday.rb#59 + def default_adapter_options; end + + # Option for the default_adapter + # @return [Hash] default_adapter options + # + # source://faraday//lib/faraday.rb#59 + def default_adapter_options=(_arg0); end + + # @overload default_connection + # @overload default_connection= + # + # source://faraday//lib/faraday.rb#120 + def default_connection; end + + # Documented below, see default_connection + # + # source://faraday//lib/faraday.rb#62 + def default_connection=(_arg0); end + + # Gets the default connection options used when calling {Faraday#new}. + # + # @return [Faraday::ConnectionOptions] + # + # source://faraday//lib/faraday.rb#127 + def default_connection_options; end + + # Sets the default options used when calling {Faraday#new}. + # + # @param options [Hash, Faraday::ConnectionOptions] + # + # source://faraday//lib/faraday.rb#134 + def default_connection_options=(options); end + + # Tells Faraday to ignore the environment proxy (http_proxy). + # Defaults to `false`. + # + # @return [Boolean] + # + # source://faraday//lib/faraday.rb#67 + def ignore_env_proxy; end + + # Tells Faraday to ignore the environment proxy (http_proxy). + # Defaults to `false`. + # + # @return [Boolean] + # + # source://faraday//lib/faraday.rb#67 + def ignore_env_proxy=(_arg0); end + + # Gets or sets the path that the Faraday libs are loaded from. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#46 + def lib_path; end + + # Gets or sets the path that the Faraday libs are loaded from. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#46 + def lib_path=(_arg0); end + + # Initializes a new {Connection}. + # + # @example With an URL argument + # Faraday.new 'http://faraday.com' + # # => Faraday::Connection to http://faraday.com + # @example With an URL argument and an options hash + # Faraday.new 'http://faraday.com', params: { page: 1 } + # # => Faraday::Connection to http://faraday.com?page=1 + # @example With everything in an options hash + # Faraday.new url: 'http://faraday.com', + # params: { page: 1 } + # # => Faraday::Connection to http://faraday.com?page=1 + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [String, Hash] The optional String base URL to use as a prefix + # for all requests. Can also be the options Hash. Any of these + # values will be set on every request made, unless overridden + # for a specific request. + # @param options [Hash] + # @return [Faraday::Connection] + # + # source://faraday//lib/faraday.rb#96 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://faraday//lib/faraday.rb#107 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # The root path that Faraday is being loaded from. + # + # This is the root from where the libraries are auto-loaded. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#42 + def root_path; end + + # The root path that Faraday is being loaded from. + # + # This is the root from where the libraries are auto-loaded. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#42 + def root_path=(_arg0); end + + private + + # Internal: Proxies method calls on the Faraday constant to + # .default_connection. + # + # source://faraday//lib/faraday.rb#143 + def method_missing(name, *args, &block); end + end +end + +# Base class for all Faraday adapters. Adapters are +# responsible for fulfilling a Faraday request. +# +# source://faraday//lib/faraday/adapter.rb#6 +class Faraday::Adapter + extend ::Faraday::MiddlewareRegistry + extend ::Faraday::Adapter::Parallelism + + # @return [Adapter] a new instance of Adapter + # + # source://faraday//lib/faraday/adapter.rb#28 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter.rb#55 + def call(env); end + + # Close any persistent connections. The adapter should still be usable + # after calling close. + # + # source://faraday//lib/faraday/adapter.rb#50 + def close; end + + # Yields or returns an adapter's configured connection. Depends on + # #build_connection being defined on this adapter. + # + # @param env [Faraday::Env, Hash] The env object for a faraday request. + # @return The return value of the given block, or the HTTP connection object + # if no block is given. + # @yield [conn] + # + # source://faraday//lib/faraday/adapter.rb#41 + def connection(env); end + + private + + # Fetches either a read, write, or open timeout setting. Defaults to the + # :timeout value if a more specific one is not given. + # + # @param type [Symbol] Describes which timeout setting to get: :read, + # :write, or :open. + # @param options [Hash] Hash containing Symbol keys like :timeout, + # :read_timeout, :write_timeout, or :open_timeout + # @return [Integer, nil] Timeout duration in seconds, or nil if no timeout + # has been set. + # + # source://faraday//lib/faraday/adapter.rb#85 + def request_timeout(type, options); end + + # source://faraday//lib/faraday/adapter.rb#62 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil), finished: T.unsafe(nil)); end +end + +# source://faraday//lib/faraday/adapter.rb#9 +Faraday::Adapter::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# This module marks an Adapter as supporting parallel requests. +# +# source://faraday//lib/faraday/adapter.rb#12 +module Faraday::Adapter::Parallelism + # source://faraday//lib/faraday/adapter.rb#19 + def inherited(subclass); end + + # Sets the attribute supports_parallel + # + # @param value the value to set the attribute supports_parallel to. + # + # source://faraday//lib/faraday/adapter.rb#13 + def supports_parallel=(_arg0); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter.rb#15 + def supports_parallel?; end +end + +# source://faraday//lib/faraday/adapter.rb#93 +Faraday::Adapter::TIMEOUT_KEYS = T.let(T.unsafe(nil), Hash) + +# @example +# test = Faraday::Connection.new do +# use Faraday::Adapter::Test do |stub| +# # Define matcher to match the request +# stub.get '/resource.json' do +# # return static content +# [200, {'Content-Type' => 'application/json'}, 'hi world'] +# end +# +# # response with content generated based on request +# stub.get '/showget' do |env| +# [200, {'Content-Type' => 'text/plain'}, env[:method].to_s] +# end +# +# # A regular expression can be used as matching filter +# stub.get /\A\/items\/(\d+)\z/ do |env, meta| +# # in case regular expression is used, an instance of MatchData +# # can be received +# [200, +# {'Content-Type' => 'text/plain'}, +# "showing item: #{meta[:match_data][1]}" +# ] +# end +# +# # Test the request body is the same as the stubbed body +# stub.post('/bar', 'name=YK&word=call') { [200, {}, ''] } +# +# # You can pass a proc as a stubbed body and check the request body in your way. +# # In this case, the proc should return true or false. +# stub.post('/foo', ->(request_body) do +# JSON.parse(request_body).slice('name') == { 'name' => 'YK' } }) { [200, {}, ''] +# end +# +# # You can set strict_mode to exactly match the stubbed requests. +# stub.strict_mode = true +# end +# end +# +# resp = test.get '/resource.json' +# resp.body # => 'hi world' +# +# resp = test.get '/showget' +# resp.body # => 'get' +# +# resp = test.get '/items/1' +# resp.body # => 'showing item: 1' +# +# resp = test.get '/items/2' +# resp.body # => 'showing item: 2' +# +# resp = test.post '/bar', 'name=YK&word=call' +# resp.status # => 200 +# +# resp = test.post '/foo', JSON.dump(name: 'YK', created_at: Time.now) +# resp.status # => 200 +# +# source://faraday//lib/faraday/adapter/test.rb#62 +class Faraday::Adapter::Test < ::Faraday::Adapter + # @return [Test] a new instance of Test + # + # source://faraday//lib/faraday/adapter/test.rb#258 + def initialize(app, stubs = T.unsafe(nil), &block); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/adapter/test.rb#269 + def call(env); end + + # @yield [stubs] + # + # source://faraday//lib/faraday/adapter/test.rb#264 + def configure; end + + # Returns the value of attribute stubs. + # + # source://faraday//lib/faraday/adapter/test.rb#63 + def stubs; end + + # Sets the attribute stubs + # + # @param value the value to set the attribute stubs to. + # + # source://faraday//lib/faraday/adapter/test.rb#63 + def stubs=(_arg0); end +end + +# Stub request +# +# source://faraday//lib/faraday/adapter/test.rb#187 +class Faraday::Adapter::Test::Stub < ::Struct + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute body + # + # @return [Object] the current value of body + def body; end + + # Sets the attribute body + # + # @param value [Object] the value to set the attribute body to. + # @return [Object] the newly set value + def body=(_); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#242 + def body_match?(request_body); end + + # Returns the value of attribute headers + # + # @return [Object] the current value of headers + def headers; end + + # Sets the attribute headers + # + # @param value [Object] the value to set the attribute headers to. + # @return [Object] the newly set value + def headers=(_); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#227 + def headers_match?(request_headers); end + + # Returns the value of attribute host + # + # @return [Object] the current value of host + def host; end + + # Sets the attribute host + # + # @param value [Object] the value to set the attribute host to. + # @return [Object] the newly set value + def host=(_); end + + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#189 + def matches?(env); end + + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#214 + def params_match?(env); end + + # Returns the value of attribute path + # + # @return [Object] the current value of path + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + def path=(_); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#205 + def path_match?(request_path, meta); end + + # Returns the value of attribute query + # + # @return [Object] the current value of query + def query; end + + # Sets the attribute query + # + # @param value [Object] the value to set the attribute query to. + # @return [Object] the newly set value + def query=(_); end + + # Returns the value of attribute strict_mode + # + # @return [Object] the current value of strict_mode + def strict_mode; end + + # Sets the attribute strict_mode + # + # @param value [Object] the value to set the attribute strict_mode to. + # @return [Object] the newly set value + def strict_mode=(_); end + + # source://faraday//lib/faraday/adapter/test.rb#253 + def to_s; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# A stack of Stubs +# +# source://faraday//lib/faraday/adapter/test.rb#66 +class Faraday::Adapter::Test::Stubs + # @return [Stubs] a new instance of Stubs + # @yield [_self] + # @yieldparam _self [Faraday::Adapter::Test::Stubs] the object that the method was called on + # + # source://faraday//lib/faraday/adapter/test.rb#70 + def initialize(strict_mode: T.unsafe(nil)); end + + # source://faraday//lib/faraday/adapter/test.rb#122 + def delete(path, headers = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#79 + def empty?; end + + # source://faraday//lib/faraday/adapter/test.rb#102 + def get(path, headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#106 + def head(path, headers = T.unsafe(nil), &block); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/adapter/test.rb#84 + def match(env); end + + # source://faraday//lib/faraday/adapter/test.rb#126 + def options(path, headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#118 + def patch(path, body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#110 + def post(path, body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#114 + def put(path, body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # Set strict_mode. If the value is true, this adapter tries to find matched requests strictly, + # which means that all of a path, parameters, and headers must be the same as an actual request. + # + # source://faraday//lib/faraday/adapter/test.rb#147 + def strict_mode=(value); end + + # Raises an error if any of the stubbed calls have not been made. + # + # source://faraday//lib/faraday/adapter/test.rb#131 + def verify_stubbed_calls; end + + protected + + # @param stack [Hash] + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#177 + def matches?(stack, env); end + + # source://faraday//lib/faraday/adapter/test.rb#158 + def new_stub(request_method, path, headers = T.unsafe(nil), body = T.unsafe(nil), &block); end +end + +# source://faraday//lib/faraday/adapter/test.rb#67 +class Faraday::Adapter::Test::Stubs::NotFound < ::StandardError; end + +# AdapterRegistry registers adapter class names so they can be looked up by a +# String or Symbol name. +# +# source://faraday//lib/faraday/adapter_registry.rb#8 +class Faraday::AdapterRegistry + # @return [AdapterRegistry] a new instance of AdapterRegistry + # + # source://faraday//lib/faraday/adapter_registry.rb#9 + def initialize; end + + # source://faraday//lib/faraday/adapter_registry.rb#14 + def get(name); end + + # source://faraday//lib/faraday/adapter_registry.rb#23 + def set(klass, name = T.unsafe(nil)); end +end + +# Raised by Faraday::Response::RaiseError in case of a 400 response. +# +# source://faraday//lib/faraday/error.rb#96 +class Faraday::BadRequestError < ::Faraday::ClientError; end + +# source://faraday//lib/faraday.rb#34 +Faraday::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# Faraday client error class. Represents 4xx status responses. +# +# source://faraday//lib/faraday/error.rb#92 +class Faraday::ClientError < ::Faraday::Error; end + +# Raised by Faraday::Response::RaiseError in case of a 409 response. +# +# source://faraday//lib/faraday/error.rb#120 +class Faraday::ConflictError < ::Faraday::ClientError; end + +# Connection objects manage the default properties and the middleware +# stack for fulfilling an HTTP request. +# +# @example +# +# conn = Faraday::Connection.new 'http://httpbingo.org' +# +# # GET http://httpbingo.org/nigiri +# conn.get 'nigiri' +# # => # +# +# source://faraday//lib/faraday/connection.rb#15 +class Faraday::Connection + extend ::Forwardable + + # Initializes a new Faraday::Connection. + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [URI, String] URI or String base URL to use as a prefix for all + # requests (optional). + # @param options [Hash, Faraday::ConnectionOptions] + # @return [Connection] a new instance of Connection + # @yield [self] after all setup has been done + # + # source://faraday//lib/faraday/connection.rb#63 + def initialize(url = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def adapter(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def app(*args, **_arg1, &block); end + + # Build an absolute URL based on url_prefix. + # + # of the resulting url (default: nil). + # + # @param url [String, URI, nil] + # @param params [Faraday::Utils::ParamsHash] A Faraday::Utils::ParamsHash to + # replace the query values + # @return [URI] + # + # source://faraday//lib/faraday/connection.rb#470 + def build_exclusive_url(url = T.unsafe(nil), params = T.unsafe(nil), params_encoder = T.unsafe(nil)); end + + # Creates and configures the request object. + # + # @param method [Symbol] + # @return [Faraday::Request] + # @yield [Faraday::Request] if block given + # + # source://faraday//lib/faraday/connection.rb#453 + def build_request(method); end + + # Takes a relative url for a request and combines it with the defaults + # set on the connection instance. + # + # @example + # conn = Faraday::Connection.new { ... } + # conn.url_prefix = "https://httpbingo.org/api?token=abc" + # conn.scheme # => https + # conn.path_prefix # => "/api" + # + # conn.build_url("nigiri?page=2") + # # => https://httpbingo.org/api/nigiri?token=abc&page=2 + # + # conn.build_url("nigiri", page: 2) + # # => https://httpbingo.org/api/nigiri?token=abc&page=2 + # @param url [String, URI, nil] + # @param extra_params [Hash] + # + # source://faraday//lib/faraday/connection.rb#407 + def build_url(url = T.unsafe(nil), extra_params = T.unsafe(nil)); end + + # @return [Faraday::RackBuilder] Builder for this Connection. + # + # source://faraday//lib/faraday/connection.rb#31 + def builder; end + + # Closes the underlying resources and/or connections. In the case of + # persistent connections, this closes all currently open connections + # but does not prevent new connections from being made. + # + # source://faraday//lib/faraday/connection.rb#125 + def close; end + + # Check if the adapter is parallel-capable. + # + # @api private + # @return [Object, nil] a parallel manager or nil if yielded + # @yield if the adapter isn't parallel-capable, or if no adapter is set yet. + # + # source://faraday//lib/faraday/connection.rb#291 + def default_parallel_manager; end + + # Sets the default parallel manager for this connection. + # + # source://faraday//lib/faraday/connection.rb#40 + def default_parallel_manager=(_arg0); end + + # source://faraday//lib/faraday/connection.rb#199 + def delete(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # Creates a duplicate of this Faraday::Connection. + # + # @api private + # @return [Faraday::Connection] + # + # source://faraday//lib/faraday/connection.rb#490 + def dup; end + + # source://faraday//lib/faraday/connection.rb#533 + def find_default_proxy; end + + # source://faraday//lib/faraday/connection.rb#199 + def get(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # source://faraday//lib/faraday/connection.rb#199 + def head(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # @return [Hash] unencoded HTTP header key/value pairs. + # + # source://faraday//lib/faraday/connection.rb#24 + def headers; end + + # Sets the Hash of unencoded HTTP header key/value pairs. + # + # @param hash [Hash] + # + # source://faraday//lib/faraday/connection.rb#114 + def headers=(hash); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def host=(*args, **_arg1, &block); end + + # Sets up the parallel manager to make a set of requests. + # + # @param manager [Object] The parallel manager that this Connection's + # Adapter uses. + # @return [void] + # @yield a block to execute multiple requests. + # + # source://faraday//lib/faraday/connection.rb#317 + def in_parallel(manager = T.unsafe(nil)); end + + # Determine if this Faraday::Connection can make parallel requests. + # + # @return [Boolean] + # + # source://faraday//lib/faraday/connection.rb#306 + def in_parallel?; end + + # source://faraday//lib/faraday/connection.rb#96 + def initialize_proxy(url, options); end + + # @example + # conn.options '/items/1' + # @overload options + # @overload options + # @return [Faraday::Response] + # @yield [Faraday::Request] for further request customizations + # + # source://faraday//lib/faraday/connection.rb#222 + def options(*args); end + + # @return [Object] the parallel manager for this Connection. + # + # source://faraday//lib/faraday/connection.rb#37 + def parallel_manager; end + + # @return [Hash] URI query unencoded key/value pairs. + # + # source://faraday//lib/faraday/connection.rb#21 + def params; end + + # Sets the Hash of URI query unencoded key/value pairs. + # + # @param hash [Hash] + # + # source://faraday//lib/faraday/connection.rb#108 + def params=(hash); end + + # source://faraday//lib/faraday/connection.rb#279 + def patch(url = T.unsafe(nil), body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def path_prefix(*args, **_arg1, &block); end + + # Sets the path prefix and ensures that it always has a leading + # slash. + # + # @param value [String] + # @return [String] the new path prefix + # + # source://faraday//lib/faraday/connection.rb#382 + def path_prefix=(value); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def port(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def port=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/connection.rb#279 + def post(url = T.unsafe(nil), body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # @return [Hash] proxy options. + # + # source://faraday//lib/faraday/connection.rb#43 + def proxy; end + + # Sets the Hash proxy options. + # + # @param new_value [Object] + # + # source://faraday//lib/faraday/connection.rb#333 + def proxy=(new_value); end + + # source://faraday//lib/faraday/connection.rb#541 + def proxy_for_request(url); end + + # source://faraday//lib/faraday/connection.rb#513 + def proxy_from_env(url); end + + # source://faraday//lib/faraday/connection.rb#279 + def put(url = T.unsafe(nil), body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def request(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def response(*args, **_arg1, &block); end + + # Builds and runs the Faraday::Request. + # + # @param method [Symbol] HTTP method. + # @param url [String, URI, nil] String or URI to access. + # @param body [String, nil] The request body that will eventually be converted to + # a string. + # @param headers [Hash, nil] unencoded HTTP header key/value pairs. + # @return [Faraday::Response] + # + # source://faraday//lib/faraday/connection.rb#431 + def run_request(method, url, body, headers); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def scheme(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def scheme=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/connection.rb#371 + def set_basic_auth(user, password); end + + # @return [Hash] SSL options. + # + # source://faraday//lib/faraday/connection.rb#34 + def ssl; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/connection.rb#551 + def support_parallel?(adapter); end + + # source://faraday//lib/faraday/connection.rb#199 + def trace(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # @return [String] a URI with the prefix used for all requests from this + # Connection. This includes a default host name, scheme, port, and path. + # + # source://faraday//lib/faraday/connection.rb#28 + def url_prefix; end + + # Parses the given URL with URI and stores the individual + # components in this connection. These components serve as defaults for + # requests made by this connection. + # + # @example + # + # conn = Faraday::Connection.new { ... } + # conn.url_prefix = "https://httpbingo.org/api" + # conn.scheme # => https + # conn.path_prefix # => "/api" + # + # conn.get("nigiri?page=2") # accesses https://httpbingo.org/api/nigiri + # @param url [String, URI] + # @param encoder [Object] + # + # source://faraday//lib/faraday/connection.rb#356 + def url_prefix=(url, encoder = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def use(*args, **_arg1, &block); end + + # Yields username and password extracted from a URI if they both exist. + # + # @api private + # @param uri [URI] + # @return [void] + # @yield [username, password] any username and password + # @yieldparam username [String] any username from URI + # @yieldparam password [String] any password from URI + # + # source://faraday//lib/faraday/connection.rb#507 + def with_uri_credentials(uri); end +end + +# A Set of allowed HTTP verbs. +# +# source://faraday//lib/faraday/connection.rb#17 +Faraday::Connection::METHODS = T.let(T.unsafe(nil), Set) + +# source://faraday//lib/faraday/connection.rb#18 +Faraday::Connection::USER_AGENT = T.let(T.unsafe(nil), String) + +# A unified error for failed connections. +# +# source://faraday//lib/faraday/error.rb#147 +class Faraday::ConnectionFailed < ::Faraday::Error; end + +# ConnectionOptions contains the configurable properties for a Faraday +# connection object. +# +# source://faraday//lib/faraday/options/connection_options.rb#8 +class Faraday::ConnectionOptions < ::Faraday::Options + def builder; end + def builder=(_); end + + # source://faraday//lib/faraday/options.rb#178 + def builder_class; end + + def builder_class=(_); end + def headers; end + def headers=(_); end + + # source://faraday//lib/faraday/options/connection_options.rb#19 + def new_builder(block); end + + def parallel_manager; end + def parallel_manager=(_); end + def params; end + def params=(_); end + def proxy; end + def proxy=(_); end + + # source://faraday//lib/faraday/options.rb#178 + def request; end + + def request=(_); end + + # source://faraday//lib/faraday/options.rb#178 + def ssl; end + + def ssl=(_); end + def url; end + def url=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Sub-module for decoding query-string into parameters. +# +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#81 +module Faraday::DecodeMethods + # @param query [nil, String] + # @raise [TypeError] if the nesting is incorrect + # @return [Array] the decoded params + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#87 + def decode(query); end + + protected + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#144 + def add_to_context(is_array, context, value, subkey); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#107 + def decode_pair(key, value, context); end + + # Internal: convert a nested hash with purely numeric keys into an array. + # FIXME: this is not compatible with Rack::Utils.parse_nested_query + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#151 + def dehash(hash, depth); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#139 + def match_context(context, subkey); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#129 + def new_context(subkey, is_array, context); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#119 + def prepare_context(context, subkey, is_array, last_subkey); end +end + +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#105 +Faraday::DecodeMethods::SUBKEYS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Sub-module for encoding parameters into query-string. +# +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#5 +module Faraday::EncodeMethods + # @param params [nil, Array, #to_hash] parameters to be encoded + # @raise [TypeError] if params can not be converted to a Hash + # @return [String] the encoded params + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#11 + def encode(params); end + + protected + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#64 + def encode_array(parent, value); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#53 + def encode_hash(parent, value); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#40 + def encode_pair(parent, value); end +end + +# source://faraday//lib/faraday/options/env.rb#57 +class Faraday::Env < ::Faraday::Options + extend ::Forwardable + + # source://faraday//lib/faraday/options/env.rb#89 + def [](key); end + + # source://faraday//lib/faraday/options/env.rb#101 + def []=(key, value); end + + # string. + # + # @return [String] The request body that will eventually be converted to a + # + # source://faraday//lib/faraday/options/env.rb#118 + def body; end + + # string. + # + # @return [String] The request body that will eventually be converted to a + # + # source://faraday//lib/faraday/options/env.rb#122 + def body=(value); end + + # source://faraday//lib/faraday/options/env.rb#138 + def clear_body; end + + # source://faraday//lib/faraday/options/env.rb#114 + def current_body; end + + # source://faraday//lib/faraday/options/env.rb#184 + def custom_members; end + + # source://faraday//lib/faraday/options/env.rb#190 + def in_member_set?(key); end + + # source://faraday//lib/faraday/options/env.rb#154 + def inspect; end + + # @return [Symbol] HTTP method (`:get`, `:post`) + def method; end + + # @return [Symbol] HTTP method (`:get`, `:post`) + def method=(_); end + + # source://faraday//lib/faraday/options/env.rb#133 + def needs_body?; end + + # source://faraday//lib/faraday/options/env.rb#150 + def parallel?; end + + # @return [Object] sent if the connection is in parallel mode + def parallel_manager; end + + # @return [Object] sent if the connection is in parallel mode + def parallel_manager=(_); end + + # @return [Hash] + def params; end + + # @return [Hash] + def params=(_); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def params_encoder(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/options/env.rb#145 + def parse_body?; end + + # @return [String] + def reason_phrase; end + + # @return [String] + def reason_phrase=(_); end + + # Options for configuring the request. + # + # - `:timeout` - time limit for the entire request (Integer in + # seconds) + # - `:open_timeout` - time limit for just the connection phase (e.g. + # handshake) (Integer in seconds) + # - `:read_timeout` - time limit for the first response byte received from + # the server (Integer in seconds) + # - `:write_timeout` - time limit for the client to send the request to the + # server (Integer in seconds) + # - `:on_data` - Proc for streaming + # - `:proxy` - Hash of proxy options + # - `:uri` - Proxy server URI + # - `:user` - Proxy server username + # - `:password` - Proxy server password + # + # @return [Hash] options for configuring the request. + def request; end + + # Options for configuring the request. + # + # - `:timeout` - time limit for the entire request (Integer in + # seconds) + # - `:open_timeout` - time limit for just the connection phase (e.g. + # handshake) (Integer in seconds) + # - `:read_timeout` - time limit for the first response byte received from + # the server (Integer in seconds) + # - `:write_timeout` - time limit for the client to send the request to the + # server (Integer in seconds) + # - `:on_data` - Proc for streaming + # - `:proxy` - Hash of proxy options + # - `:uri` - Proxy server URI + # - `:user` - Proxy server username + # - `:password` - Proxy server password + # + # @return [Hash] options for configuring the request. + def request=(_); end + + def request_body; end + def request_body=(_); end + + # @return [Hash] HTTP Headers to be sent to the server. + def request_headers; end + + # @return [Hash] HTTP Headers to be sent to the server. + def request_headers=(_); end + + # @return [Response] + def response; end + + # @return [Response] + def response=(_); end + + def response_body; end + def response_body=(_); end + + # @return [Hash] HTTP headers from the server + def response_headers; end + + # @return [Hash] HTTP headers from the server + def response_headers=(_); end + + # @return [Hash] options for configuring SSL requests + def ssl; end + + # @return [Hash] options for configuring SSL requests + def ssl=(_); end + + # @return [Integer] HTTP response status code + def status; end + + # @return [Integer] HTTP response status code + def status=(_); end + + # source://faraday//lib/faraday/options/env.rb#169 + def stream_response(&block); end + + # source://faraday//lib/faraday/options/env.rb#165 + def stream_response?; end + + # source://faraday//lib/faraday/options/env.rb#127 + def success?; end + + # @return [URI] URI instance for the current request. + def url; end + + # @return [URI] URI instance for the current request. + def url=(_); end + + class << self + def [](*_arg0); end + + # source://faraday//lib/faraday/options/env.rb#80 + def from(value); end + + def inspect; end + def keyword_init?; end + + # source://faraday//lib/faraday/options/env.rb#200 + def member_set; end + + def members; end + def new(*_arg0); end + end +end + +# source://faraday//lib/faraday/options/env.rb#61 +Faraday::Env::ContentLength = T.let(T.unsafe(nil), String) + +# source://faraday//lib/faraday/options/env.rb#67 +Faraday::Env::MethodsWithBodies = T.let(T.unsafe(nil), Set) + +# source://faraday//lib/faraday/options/env.rb#62 +Faraday::Env::StatusesWithoutBody = T.let(T.unsafe(nil), Set) + +# source://faraday//lib/faraday/options/env.rb#63 +Faraday::Env::SuccessfulStatuses = T.let(T.unsafe(nil), Range) + +# Faraday error base class. +# +# source://faraday//lib/faraday/error.rb#6 +class Faraday::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://faraday//lib/faraday/error.rb#9 + def initialize(exc = T.unsafe(nil), response = T.unsafe(nil)); end + + # source://faraday//lib/faraday/error.rb#15 + def backtrace; end + + # source://faraday//lib/faraday/error.rb#23 + def inspect; end + + # Returns the value of attribute response. + # + # source://faraday//lib/faraday/error.rb#7 + def response; end + + # source://faraday//lib/faraday/error.rb#43 + def response_body; end + + # source://faraday//lib/faraday/error.rb#37 + def response_headers; end + + # source://faraday//lib/faraday/error.rb#31 + def response_status; end + + # Returns the value of attribute wrapped_exception. + # + # source://faraday//lib/faraday/error.rb#7 + def wrapped_exception; end + + protected + + # Pulls out potential parent exception and response hash. + # + # source://faraday//lib/faraday/error.rb#81 + def exc_msg_and_response(exc, response = T.unsafe(nil)); end + + # Pulls out potential parent exception and response hash, storing them in + # instance variables. + # exc - Either an Exception, a string message, or a response hash. + # response - Hash + # :status - Optional integer HTTP response status + # :headers - String key/value hash of HTTP response header + # values. + # :body - Optional string HTTP response body. + # :request - Hash + # :method - Symbol with the request HTTP method. + # :url - URI object with the url requested. + # :url_path - String with the url path requested. + # :params - String key/value hash of query params + # present in the request. + # :headers - String key/value hash of HTTP request + # header values. + # :body - String HTTP request body. + # + # If a subclass has to call this, then it should pass a string message + # to `super`. See NilStatusError. + # + # source://faraday//lib/faraday/error.rb#71 + def exc_msg_and_response!(exc, response = T.unsafe(nil)); end +end + +# FlatParamsEncoder manages URI params as a flat hash. Any Array values repeat +# the parameter multiple times. +# +# source://faraday//lib/faraday/encoders/flat_params_encoder.rb#6 +module Faraday::FlatParamsEncoder + class << self + # Decode converts the given URI querystring into a hash. + # + # @example + # + # decode('a=one&a=two&a=three&b=true&c=C') + # # => {"a"=>["one", "two", "three"], "b"=>"true", "c"=>"C"} + # @param query [String] query arguments to parse. + # @return [Hash] parsed keys and value strings from the querystring. + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#74 + def decode(query); end + + # Encode converts the given param into a URI querystring. Keys and values + # will converted to strings and appropriately escaped for the URI. + # + # @example + # + # encode({a: %w[one two three], b: true, c: "C"}) + # # => 'a=one&a=two&a=three&b=true&c=C' + # @param params [Hash] query arguments to convert. + # @return [String] the URI querystring (without the leading '?') + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#23 + def encode(params); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def escape(*args, **_arg1, &block); end + + # Returns the value of attribute sort_params. + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#99 + def sort_params; end + + # Sets the attribute sort_params + # + # @param value the value to set the attribute sort_params to. + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#99 + def sort_params=(_arg0); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def unescape(*args, **_arg1, &block); end + end +end + +# Raised by Faraday::Response::RaiseError in case of a 403 response. +# +# source://faraday//lib/faraday/error.rb#104 +class Faraday::ForbiddenError < ::Faraday::ClientError; end + +# source://faraday//lib/faraday/logging/formatter.rb#6 +module Faraday::Logging; end + +# Serves as an integration point to customize logging +# +# source://faraday//lib/faraday/logging/formatter.rb#8 +class Faraday::Logging::Formatter + extend ::Forwardable + + # @return [Formatter] a new instance of Formatter + # + # source://faraday//lib/faraday/logging/formatter.rb#14 + def initialize(logger:, options:); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def debug(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def error(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/logging/formatter.rb#41 + def exception(exc); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def fatal(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/logging/formatter.rb#52 + def filter(filter_word, filter_replacement); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def info(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/logging/formatter.rb#25 + def request(env); end + + # source://faraday//lib/faraday/logging/formatter.rb#34 + def response(env); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def warn(*args, **_arg1, &block); end + + private + + # source://faraday//lib/faraday/logging/formatter.rb#98 + def apply_filters(output); end + + # source://faraday//lib/faraday/logging/formatter.rb#64 + def dump_body(body); end + + # source://faraday//lib/faraday/logging/formatter.rb#58 + def dump_headers(headers); end + + # source://faraday//lib/faraday/logging/formatter.rb#113 + def log_body(type, body); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/logging/formatter.rb#85 + def log_body?(type); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/logging/formatter.rb#94 + def log_errors?; end + + # source://faraday//lib/faraday/logging/formatter.rb#109 + def log_headers(type, headers); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/logging/formatter.rb#76 + def log_headers?(type); end + + # source://faraday//lib/faraday/logging/formatter.rb#105 + def log_level; end + + # source://faraday//lib/faraday/logging/formatter.rb#72 + def pretty_inspect(body); end +end + +# source://faraday//lib/faraday/logging/formatter.rb#11 +Faraday::Logging::Formatter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://faraday//lib/faraday/methods.rb#5 +Faraday::METHODS_WITH_BODY = T.let(T.unsafe(nil), Array) + +# source://faraday//lib/faraday/methods.rb#4 +Faraday::METHODS_WITH_QUERY = T.let(T.unsafe(nil), Array) + +# Middleware is the basic base class of any Faraday middleware. +# +# source://faraday//lib/faraday/middleware.rb#5 +class Faraday::Middleware + extend ::Faraday::MiddlewareRegistry + + # @return [Middleware] a new instance of Middleware + # + # source://faraday//lib/faraday/middleware.rb#10 + def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute app. + # + # source://faraday//lib/faraday/middleware.rb#8 + def app; end + + # source://faraday//lib/faraday/middleware.rb#15 + def call(env); end + + # source://faraday//lib/faraday/middleware.rb#25 + def close; end + + # Returns the value of attribute options. + # + # source://faraday//lib/faraday/middleware.rb#8 + def options; end +end + +# Adds the ability for other modules to register and lookup +# middleware classes. +# +# source://faraday//lib/faraday/middleware_registry.rb#8 +module Faraday::MiddlewareRegistry + # Lookup middleware class with a registered Symbol shortcut. + # + # @example + # + # module Faraday + # class Whatever < Middleware + # register_middleware(foo: Whatever) + # end + # end + # + # Faraday::Middleware.lookup_middleware(:foo) + # # => Faraday::Whatever + # @param key [Symbol] key for the registered middleware. + # @raise [Faraday::Error] if given key is not registered + # @return [Class] a middleware Class. + # + # source://faraday//lib/faraday/middleware_registry.rb#55 + def lookup_middleware(key); end + + # Register middleware class(es) on the current module. + # + # @example Lookup by a constant + # + # module Faraday + # class Whatever < Middleware + # # Middleware looked up by :foo returns Faraday::Whatever::Foo. + # register_middleware(foo: Whatever) + # end + # end + # @param mappings [Hash] Middleware mappings from a lookup symbol to a middleware class. + # @return [void] + # + # source://faraday//lib/faraday/middleware_registry.rb#26 + def register_middleware(**mappings); end + + # source://faraday//lib/faraday/middleware_registry.rb#9 + def registered_middleware; end + + # Unregister a previously registered middleware class. + # + # @param key [Symbol] key for the registered middleware. + # + # source://faraday//lib/faraday/middleware_registry.rb#35 + def unregister_middleware(key); end + + private + + # source://faraday//lib/faraday/middleware_registry.rb#67 + def load_middleware(key); end + + # source://faraday//lib/faraday/middleware_registry.rb#62 + def middleware_mutex(&block); end +end + +# This is the default encoder for Faraday requests. +# Using this encoder, parameters will be encoded respecting their structure, +# so you can send objects such as Arrays or Hashes as parameters +# for your requests. +# +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#168 +module Faraday::NestedParamsEncoder + extend ::Faraday::EncodeMethods + extend ::Faraday::DecodeMethods + + class << self + # Returns the value of attribute array_indices. + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#170 + def array_indices; end + + # Sets the attribute array_indices + # + # @param value the value to set the attribute array_indices to. + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#170 + def array_indices=(_arg0); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def escape(*args, **_arg1, &block); end + + # Returns the value of attribute sort_params. + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#170 + def sort_params; end + + # Sets the attribute sort_params + # + # @param value the value to set the attribute sort_params to. + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#170 + def sort_params=(_arg0); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def unescape(*args, **_arg1, &block); end + end +end + +# Raised by Faraday::Response::RaiseError in case of a nil status in response. +# +# source://faraday//lib/faraday/error.rb#139 +class Faraday::NilStatusError < ::Faraday::ServerError + # @return [NilStatusError] a new instance of NilStatusError + # + # source://faraday//lib/faraday/error.rb#140 + def initialize(exc, response = T.unsafe(nil)); end +end + +# Subclasses Struct with some special helpers for converting from a Hash to +# a Struct. +# +# source://faraday//lib/faraday/options.rb#7 +class Faraday::Options < ::Struct + # source://faraday//lib/faraday/options.rb#186 + def [](key); end + + # Public + # + # source://faraday//lib/faraday/options.rb#46 + def clear; end + + # Public + # + # source://faraday//lib/faraday/options.rb#71 + def deep_dup; end + + # Public + # + # source://faraday//lib/faraday/options.rb#39 + def delete(key); end + + # Public + # + # source://faraday//lib/faraday/options.rb#13 + def each; end + + # Public + # + # source://faraday//lib/faraday/options.rb#106 + def each_key(&block); end + + # Public + # + # source://faraday//lib/faraday/options.rb#120 + def each_value(&block); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#101 + def empty?; end + + # Public + # + # source://faraday//lib/faraday/options.rb#76 + def fetch(key, *args); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#113 + def has_key?(key); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#127 + def has_value?(value); end + + # Internal + # + # source://faraday//lib/faraday/options.rb#144 + def inspect; end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#113 + def key?(key); end + + # Public + # + # source://faraday//lib/faraday/options.rb#96 + def keys; end + + # Public + # + # source://faraday//lib/faraday/options.rb#66 + def merge(other); end + + # Public + # + # source://faraday//lib/faraday/options.rb#51 + def merge!(other); end + + # source://faraday//lib/faraday/options.rb#195 + def symbolized_key_set; end + + # Public + # + # source://faraday//lib/faraday/options.rb#134 + def to_hash; end + + # Public + # + # source://faraday//lib/faraday/options.rb#22 + def update(obj); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#127 + def value?(value); end + + # Public + # + # source://faraday//lib/faraday/options.rb#91 + def values_at(*keys); end + + class << self + # Internal + # + # source://faraday//lib/faraday/options.rb#166 + def attribute_options; end + + # source://faraday//lib/faraday/options.rb#205 + def fetch_error_class; end + + # Public + # + # source://faraday//lib/faraday/options.rb#8 + def from(value); end + + # @private + # + # source://faraday//lib/faraday/options.rb#199 + def inherited(subclass); end + + # source://faraday//lib/faraday/options.rb#170 + def memoized(key, &block); end + + # source://faraday//lib/faraday/options.rb#182 + def memoized_attributes; end + + # Internal + # + # source://faraday//lib/faraday/options.rb#156 + def options(mapping); end + + # Internal + # + # source://faraday//lib/faraday/options.rb#161 + def options_for(key); end + end +end + +# Raised by middlewares that parse the response, like the JSON response middleware. +# +# source://faraday//lib/faraday/error.rb#155 +class Faraday::ParsingError < ::Faraday::Error; end + +# Raised by Faraday::Response::RaiseError in case of a 407 response. +# +# source://faraday//lib/faraday/error.rb#112 +class Faraday::ProxyAuthError < ::Faraday::ClientError; end + +# ProxyOptions contains the configurable properties for the proxy +# configuration used when making an HTTP request. +# +# source://faraday//lib/faraday/options/proxy_options.rb#8 +class Faraday::ProxyOptions < ::Faraday::Options + extend ::Forwardable + + # source://forwardable/1.3.2/forwardable.rb#229 + def host(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def host=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/options.rb#178 + def password; end + + def password=(_); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def path(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def path=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def port(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def port=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def scheme(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def scheme=(*args, **_arg1, &block); end + + def uri; end + def uri=(_); end + + # source://faraday//lib/faraday/options.rb#178 + def user; end + + def user=(_); end + + class << self + def [](*_arg0); end + + # source://faraday//lib/faraday/options/proxy_options.rb#13 + def from(value); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# A Builder that processes requests into responses by passing through an inner +# middleware stack (heavily inspired by Rack). +# +# @example +# Faraday::Connection.new(url: 'http://httpbingo.org') do |builder| +# builder.request :url_encoded # Faraday::Request::UrlEncoded +# builder.adapter :net_http # Faraday::Adapter::NetHttp +# end +# +# source://faraday//lib/faraday/rack_builder.rb#15 +class Faraday::RackBuilder + # @return [RackBuilder] a new instance of RackBuilder + # + # source://faraday//lib/faraday/rack_builder.rb#61 + def initialize(&block); end + + # source://faraday//lib/faraday/rack_builder.rb#179 + def ==(other); end + + # source://faraday//lib/faraday/rack_builder.rb#79 + def [](idx); end + + # source://faraday//lib/faraday/rack_builder.rb#110 + def adapter(klass = T.unsafe(nil), *args, **_arg2, &block); end + + # The "rack app" wrapped in middleware. All requests are sent here. + # + # The builder is responsible for creating the app object. After this, + # the builder gets locked to ensure no further modifications are made + # to the middleware stack. + # + # Returns an object that responds to `call` and returns a Response. + # + # source://faraday//lib/faraday/rack_builder.rb#163 + def app; end + + # source://faraday//lib/faraday/rack_builder.rb#73 + def build; end + + # ENV Keys + # :http_method - a symbolized request HTTP method (:get, :post) + # :body - the request body that will eventually be converted to a string. + # :url - URI instance for the current request. + # :status - HTTP response status code + # :request_headers - hash of HTTP Headers to be sent to the server + # :response_headers - Hash of HTTP headers from the server + # :parallel_manager - sent if the connection is in parallel mode + # :request - Hash of options for configuring the request. + # :timeout - open/read timeout Integer in seconds + # :open_timeout - read timeout Integer in seconds + # :proxy - Hash of proxy options + # :uri - Proxy Server URI + # :user - Proxy server username + # :password - Proxy server password + # :ssl - Hash of options for configuring SSL requests. + # + # source://faraday//lib/faraday/rack_builder.rb#201 + def build_env(connection, request); end + + # Processes a Request into a Response by passing it through this Builder's + # middleware stack. + # + # @param connection [Faraday::Connection] + # @param request [Faraday::Request] + # @return [Faraday::Response] + # + # source://faraday//lib/faraday/rack_builder.rb#152 + def build_response(connection, request); end + + # source://faraday//lib/faraday/rack_builder.rb#140 + def delete(handler); end + + # Returns the value of attribute handlers. + # + # source://faraday//lib/faraday/rack_builder.rb#19 + def handlers; end + + # Sets the attribute handlers + # + # @param value the value to set the attribute handlers to. + # + # source://faraday//lib/faraday/rack_builder.rb#19 + def handlers=(_arg0); end + + # methods to push onto the various positions in the stack: + # + # source://faraday//lib/faraday/rack_builder.rb#119 + def insert(index, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#128 + def insert_after(index, *args, **_arg2, &block); end + + # methods to push onto the various positions in the stack: + # + # source://faraday//lib/faraday/rack_builder.rb#119 + def insert_before(index, *args, **_arg2, &block); end + + # Locks the middleware stack to ensure no further modifications are made. + # + # source://faraday//lib/faraday/rack_builder.rb#84 + def lock!; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/rack_builder.rb#88 + def locked?; end + + # source://faraday//lib/faraday/rack_builder.rb#102 + def request(key, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#106 + def response(key, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#133 + def swap(index, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#171 + def to_app; end + + # source://faraday//lib/faraday/rack_builder.rb#92 + def use(klass, *args, **_arg2, &block); end + + private + + # @return [Boolean] + # + # source://faraday//lib/faraday/rack_builder.rb#233 + def adapter_set?; end + + # source://faraday//lib/faraday/rack_builder.rb#245 + def assert_index(index); end + + # @raise [MISSING_ADAPTER_ERROR] + # + # source://faraday//lib/faraday/rack_builder.rb#229 + def ensure_adapter!; end + + # source://faraday//lib/faraday/rack_builder.rb#67 + def initialize_dup(original); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/rack_builder.rb#237 + def is_adapter?(klass); end + + # source://faraday//lib/faraday/rack_builder.rb#223 + def raise_if_adapter(klass); end + + # @raise [StackLocked] + # + # source://faraday//lib/faraday/rack_builder.rb#219 + def raise_if_locked; end + + # source://faraday//lib/faraday/rack_builder.rb#241 + def use_symbol(mod, key, *args, **_arg3, &block); end +end + +# borrowed from ActiveSupport::Dependencies::Reference & +# ActionDispatch::MiddlewareStack::Middleware +# +# source://faraday//lib/faraday/rack_builder.rb#26 +class Faraday::RackBuilder::Handler + # source://faraday//lib/faraday/rack_builder.rb#31 + def initialize(klass, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#46 + def ==(other); end + + # source://faraday//lib/faraday/rack_builder.rb#56 + def build(app = T.unsafe(nil)); end + + # source://faraday//lib/faraday/rack_builder.rb#42 + def inspect; end + + # source://faraday//lib/faraday/rack_builder.rb#38 + def klass; end + + # Returns the value of attribute name. + # + # source://faraday//lib/faraday/rack_builder.rb#29 + def name; end +end + +# source://faraday//lib/faraday/rack_builder.rb#27 +Faraday::RackBuilder::Handler::REGISTRY = T.let(T.unsafe(nil), Faraday::AdapterRegistry) + +# source://faraday//lib/faraday/rack_builder.rb#214 +Faraday::RackBuilder::LOCK_ERR = T.let(T.unsafe(nil), String) + +# source://faraday//lib/faraday/rack_builder.rb#215 +Faraday::RackBuilder::MISSING_ADAPTER_ERROR = T.let(T.unsafe(nil), String) + +# Used to detect missing arguments +# +# source://faraday//lib/faraday/rack_builder.rb#17 +Faraday::RackBuilder::NO_ARGUMENT = T.let(T.unsafe(nil), Object) + +# Error raised when trying to modify the stack after calling `lock!` +# +# source://faraday//lib/faraday/rack_builder.rb#22 +class Faraday::RackBuilder::StackLocked < ::RuntimeError; end + +# Used to setup URLs, params, headers, and the request body in a sane manner. +# +# @example +# @connection.post do |req| +# req.url 'http://localhost', 'a' => '1' # 'http://localhost?a=1' +# req.headers['b'] = '2' # Header +# req.params['c'] = '3' # GET Param +# req['b'] = '2' # also Header +# req.body = 'abc' +# end +# +# source://faraday//lib/faraday/request.rb#27 +class Faraday::Request < ::Struct + extend ::Faraday::MiddlewareRegistry + + # @param key [Object] key to look up in headers + # @return [Object] value of the given header name + # + # source://faraday//lib/faraday/request.rb#92 + def [](key); end + + # @param key [Object] key of header to write + # @param value [Object] value of header + # + # source://faraday//lib/faraday/request.rb#98 + def []=(key, value); end + + # @return [String] body + def body; end + + # @return [String] body + def body=(_); end + + # @return [Faraday::Utils::Headers] headers + def headers; end + + # Replace request headers, preserving the existing hash type. + # + # @param hash [Hash] new headers + # + # source://faraday//lib/faraday/request.rb#61 + def headers=(hash); end + + # @return [Symbol] the HTTP method of the Request + def http_method; end + + # @return [Symbol] the HTTP method of the Request + def http_method=(_); end + + # Marshal serialization support. + # + # @return [Hash] the hash ready to be serialized in Marshal. + # + # source://faraday//lib/faraday/request.rb#105 + def marshal_dump; end + + # Marshal serialization support. + # Restores the instance variables according to the +serialised+. + # + # @param serialised [Hash] the serialised object. + # + # source://faraday//lib/faraday/request.rb#119 + def marshal_load(serialised); end + + # @return [RequestOptions] options + def options; end + + # @return [RequestOptions] options + def options=(_); end + + # @return [Hash] query parameters + def params; end + + # Replace params, preserving the existing hash type. + # + # @param hash [Hash] new params + # + # source://faraday//lib/faraday/request.rb#49 + def params=(hash); end + + # @return [URI, String] the path + def path; end + + # @return [URI, String] the path + def path=(_); end + + # @return [Env] the Env for this Request + # + # source://faraday//lib/faraday/request.rb#129 + def to_env(connection); end + + # Update path and params. + # + # @param path [URI, String] + # @param params [Hash, nil] + # @return [void] + # + # source://faraday//lib/faraday/request.rb#74 + def url(path, params = T.unsafe(nil)); end + + private + + def member_get(_arg0); end + def member_set(_arg0, _arg1); end + + class << self + def [](*_arg0); end + + # @param request_method [String] + # @return [Request] + # @yield [request] for block customization, if block given + # @yieldparam request [Request] + # + # source://faraday//lib/faraday/request.rb#39 + def create(request_method); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Request middleware for the Authorization HTTP header +# +# source://faraday//lib/faraday/request/authorization.rb#6 +class Faraday::Request::Authorization < ::Faraday::Middleware + # @param app [#call] + # @param type [String, Symbol] Type of Authorization + # @param params [Array] parameters to build the Authorization header. + # If the type is `:basic`, then these can be a login and password pair. + # Otherwise, a single value is expected that will be appended after the type. + # This value can be a proc or an object responding to `.call`, in which case + # it will be invoked on each request. + # @return [Authorization] a new instance of Authorization + # + # source://faraday//lib/faraday/request/authorization.rb#16 + def initialize(app, type, *params); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/request/authorization.rb#23 + def on_request(env); end + + private + + # @param type [String, Symbol] + # @param env [Faraday::Env] + # @param params [Array] + # @return [String] a header value + # + # source://faraday//lib/faraday/request/authorization.rb#35 + def header_from(type, env, *params); end +end + +# source://faraday//lib/faraday/request/authorization.rb#7 +Faraday::Request::Authorization::KEY = T.let(T.unsafe(nil), String) + +# Middleware for instrumenting Requests. +# +# source://faraday//lib/faraday/request/instrumentation.rb#7 +class Faraday::Request::Instrumentation < ::Faraday::Middleware + # Instruments requests using Active Support. + # + # Measures time spent only for synchronous requests. + # + # @example Using ActiveSupport::Notifications to measure time spent + # for Faraday requests. + # ActiveSupport::Notifications + # .subscribe('request.faraday') do |name, starts, ends, _, env| + # url = env[:url] + # http_method = env[:method].to_s.upcase + # duration = ends - starts + # $stderr.puts '[%s] %s %s (%.3f s)' % + # [url.host, http_method, url.request_uri, duration] + # end + # @option options + # @option options + # @param app [#call] + # @param options [nil, Hash] Options hash + # @return [Instrumentation] a new instance of Instrumentation + # + # source://faraday//lib/faraday/request/instrumentation.rb#42 + def initialize(app, options = T.unsafe(nil)); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/request/instrumentation.rb#49 + def call(env); end +end + +# Options class used in Request::Instrumentation class. +# +# source://faraday//lib/faraday/request/instrumentation.rb#8 +class Faraday::Request::Instrumentation::Options < ::Faraday::Options + # source://faraday//lib/faraday/request/instrumentation.rb#17 + def instrumenter; end + + def instrumenter=(_); end + + # source://faraday//lib/faraday/request/instrumentation.rb#11 + def name; end + + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Request middleware that encodes the body as JSON. +# +# Processes only requests with matching Content-type or those without a type. +# If a request doesn't have a type but has a body, it sets the Content-type +# to JSON MIME-type. +# +# Doesn't try to encode bodies that already are in string form. +# +# source://faraday//lib/faraday/request/json.rb#14 +class Faraday::Request::Json < ::Faraday::Middleware + # source://faraday//lib/faraday/request/json.rb#18 + def on_request(env); end + + private + + # @return [Boolean] + # + # source://faraday//lib/faraday/request/json.rb#42 + def body?(env); end + + # source://faraday//lib/faraday/request/json.rb#26 + def encode(data); end + + # @yield [] + # + # source://faraday//lib/faraday/request/json.rb#30 + def match_content_type(env); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/request/json.rb#37 + def process_request?(env); end + + # source://faraday//lib/faraday/request/json.rb#55 + def request_type(env); end +end + +# source://faraday//lib/faraday/request/json.rb#15 +Faraday::Request::Json::MIME_TYPE = T.let(T.unsafe(nil), String) + +# source://faraday//lib/faraday/request/json.rb#16 +Faraday::Request::Json::MIME_TYPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Middleware for supporting urlencoded requests. +# +# source://faraday//lib/faraday/request/url_encoded.rb#6 +class Faraday::Request::UrlEncoded < ::Faraday::Middleware + # Encodes as "application/x-www-form-urlencoded" if not already encoded or + # of another type. + # + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/request/url_encoded.rb#20 + def call(env); end + + # @param env [Faraday::Env] + # @yield [request_body] Body of the request + # + # source://faraday//lib/faraday/request/url_encoded.rb#30 + def match_content_type(env); end + + # @param env [Faraday::Env] + # @return [Boolean] True if the request has a body and its Content-Type is + # urlencoded. + # + # source://faraday//lib/faraday/request/url_encoded.rb#43 + def process_request?(env); end + + # @param env [Faraday::Env] + # @return [String] + # + # source://faraday//lib/faraday/request/url_encoded.rb#51 + def request_type(env); end + + class << self + # Returns the value of attribute mime_type. + # + # source://faraday//lib/faraday/request/url_encoded.rb#12 + def mime_type; end + + # Sets the attribute mime_type + # + # @param value the value to set the attribute mime_type to. + # + # source://faraday//lib/faraday/request/url_encoded.rb#12 + def mime_type=(_arg0); end + end +end + +# source://faraday//lib/faraday/request/url_encoded.rb#8 +Faraday::Request::UrlEncoded::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# RequestOptions contains the configurable properties for a Faraday request. +# +# source://faraday//lib/faraday/options/request_options.rb#7 +class Faraday::RequestOptions < ::Faraday::Options + # source://faraday//lib/faraday/options/request_options.rb#11 + def []=(key, value); end + + def bind; end + def bind=(_); end + def boundary; end + def boundary=(_); end + def context; end + def context=(_); end + def oauth; end + def oauth=(_); end + def on_data; end + def on_data=(_); end + def open_timeout; end + def open_timeout=(_); end + def params_encoder; end + def params_encoder=(_); end + def proxy; end + def proxy=(_); end + def read_timeout; end + def read_timeout=(_); end + + # source://faraday//lib/faraday/options/request_options.rb#19 + def stream_response?; end + + def timeout; end + def timeout=(_); end + def write_timeout; end + def write_timeout=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Raised by Faraday::Response::RaiseError in case of a 408 response. +# +# source://faraday//lib/faraday/error.rb#116 +class Faraday::RequestTimeoutError < ::Faraday::ClientError; end + +# Raised by Faraday::Response::RaiseError in case of a 404 response. +# +# source://faraday//lib/faraday/error.rb#108 +class Faraday::ResourceNotFound < ::Faraday::ClientError; end + +# Response represents an HTTP response from making an HTTP request. +# +# source://faraday//lib/faraday/response.rb#7 +class Faraday::Response + extend ::Forwardable + extend ::Faraday::MiddlewareRegistry + + # @return [Response] a new instance of Response + # + # source://faraday//lib/faraday/response.rb#11 + def initialize(env = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def [](*args, **_arg1, &block); end + + # Expand the env with more properties, without overriding existing ones. + # Useful for applying request params after restoring a marshalled Response. + # + # source://faraday//lib/faraday/response.rb#80 + def apply_request(request_env); end + + # source://faraday//lib/faraday/response.rb#32 + def body; end + + # Returns the value of attribute env. + # + # source://faraday//lib/faraday/response.rb#16 + def env; end + + # source://faraday//lib/faraday/response.rb#49 + def finish(env); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/response.rb#36 + def finished?; end + + # source://faraday//lib/faraday/response.rb#26 + def headers; end + + # because @on_complete_callbacks cannot be marshalled + # + # source://faraday//lib/faraday/response.rb#70 + def marshal_dump; end + + # source://faraday//lib/faraday/response.rb#74 + def marshal_load(env); end + + # source://faraday//lib/faraday/response.rb#40 + def on_complete(&block); end + + # source://faraday//lib/faraday/response.rb#22 + def reason_phrase; end + + # source://faraday//lib/faraday/response.rb#18 + def status; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/response.rb#57 + def success?; end + + # source://faraday//lib/faraday/response.rb#61 + def to_hash; end +end + +# Parse response bodies as JSON. +# +# source://faraday//lib/faraday/response/json.rb#8 +class Faraday::Response::Json < ::Faraday::Middleware + # @return [Json] a new instance of Json + # + # source://faraday//lib/faraday/response/json.rb#9 + def initialize(app = T.unsafe(nil), parser_options: T.unsafe(nil), content_type: T.unsafe(nil), preserve_raw: T.unsafe(nil)); end + + # source://faraday//lib/faraday/response/json.rb#16 + def on_complete(env); end + + private + + # source://faraday//lib/faraday/response/json.rb#29 + def parse(body); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/response/json.rb#33 + def parse_response?(env); end + + # source://faraday//lib/faraday/response/json.rb#22 + def process_response(env); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/response/json.rb#38 + def process_response_type?(env); end + + # source://faraday//lib/faraday/response/json.rb#45 + def response_type(env); end +end + +# Logger is a middleware that logs internal events in the HTTP request +# lifecycle to a given Logger object. By default, this logs to STDOUT. See +# Faraday::Logging::Formatter to see specifically what is logged. +# +# source://faraday//lib/faraday/response/logger.rb#12 +class Faraday::Response::Logger < ::Faraday::Middleware + # @return [Logger] a new instance of Logger + # @yield [@formatter] + # + # source://faraday//lib/faraday/response/logger.rb#13 + def initialize(app, logger = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://faraday//lib/faraday/response/logger.rb#21 + def call(env); end + + # source://faraday//lib/faraday/response/logger.rb#26 + def on_complete(env); end + + # source://faraday//lib/faraday/response/logger.rb#30 + def on_error(exc); end +end + +# RaiseError is a Faraday middleware that raises exceptions on common HTTP +# client or server error responses. +# +# source://faraday//lib/faraday/response/raise_error.rb#8 +class Faraday::Response::RaiseError < ::Faraday::Middleware + # source://faraday//lib/faraday/response/raise_error.rb#13 + def on_complete(env); end + + # source://faraday//lib/faraday/response/raise_error.rb#58 + def query_params(env); end + + # source://faraday//lib/faraday/response/raise_error.rb#42 + def response_values(env); end +end + +# source://faraday//lib/faraday/response/raise_error.rb#9 +Faraday::Response::RaiseError::ClientErrorStatuses = T.let(T.unsafe(nil), Range) + +# source://faraday//lib/faraday/response/raise_error.rb#10 +Faraday::Response::RaiseError::ServerErrorStatuses = T.let(T.unsafe(nil), Range) + +# A unified client error for SSL errors. +# +# source://faraday//lib/faraday/error.rb#151 +class Faraday::SSLError < ::Faraday::Error; end + +# SSL-related options. +# +# source://faraday//lib/faraday/options/ssl_options.rb#50 +class Faraday::SSLOptions < ::Faraday::Options + # @return [String] CA file + def ca_file; end + + # @return [String] CA file + def ca_file=(_); end + + # @return [String] CA path + def ca_path; end + + # @return [String] CA path + def ca_path=(_); end + + # @return [OpenSSL::X509::Store] certificate store + def cert_store; end + + # @return [OpenSSL::X509::Store] certificate store + def cert_store=(_); end + + # @return [OpenSSL::X509::Certificate] certificate (Excon only) + def certificate; end + + # @return [OpenSSL::X509::Certificate] certificate (Excon only) + def certificate=(_); end + + # @return [String, OpenSSL::X509::Certificate] client certificate + def client_cert; end + + # @return [String, OpenSSL::X509::Certificate] client certificate + def client_cert=(_); end + + # @return [String, OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] client key + def client_key; end + + # @return [String, OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] client key + def client_key=(_); end + + # source://faraday//lib/faraday/options/ssl_options.rb#61 + def disable?; end + + # @return [String, Symbol] maximum SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D) + def max_version; end + + # @return [String, Symbol] maximum SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D) + def max_version=(_); end + + # @return [String, Symbol] minimum SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D) + def min_version; end + + # @return [String, Symbol] minimum SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D) + def min_version=(_); end + + # @return [OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] private key (Excon only) + def private_key; end + + # @return [OpenSSL::PKey::RSA, OpenSSL::PKey::DSA] private key (Excon only) + def private_key=(_); end + + # @return [Boolean] whether to verify SSL certificates or not + def verify; end + + # @return [Boolean] whether to verify SSL certificates or not + def verify=(_); end + + # source://faraday//lib/faraday/options/ssl_options.rb#56 + def verify?; end + + # @return [Integer] maximum depth for the certificate chain verification + def verify_depth; end + + # @return [Integer] maximum depth for the certificate chain verification + def verify_depth=(_); end + + # @return [Boolean] whether to enable hostname verification on server certificates + # during the handshake or not (see https://github.com/ruby/openssl/pull/60) + def verify_hostname; end + + # @return [Boolean] whether to enable hostname verification on server certificates + # during the handshake or not (see https://github.com/ruby/openssl/pull/60) + def verify_hostname=(_); end + + # source://faraday//lib/faraday/options/ssl_options.rb#66 + def verify_hostname?; end + + # @return [Integer] Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html) + def verify_mode; end + + # @return [Integer] Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html) + def verify_mode=(_); end + + # @return [String, Symbol] SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D) + def version; end + + # @return [String, Symbol] SSL version (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D) + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Faraday server error class. Represents 5xx status responses. +# +# source://faraday//lib/faraday/error.rb#128 +class Faraday::ServerError < ::Faraday::Error; end + +# A unified client error for timeouts. +# +# source://faraday//lib/faraday/error.rb#132 +class Faraday::TimeoutError < ::Faraday::ServerError + # @return [TimeoutError] a new instance of TimeoutError + # + # source://faraday//lib/faraday/error.rb#133 + def initialize(exc = T.unsafe(nil), response = T.unsafe(nil)); end +end + +# Raised by Faraday::Response::RaiseError in case of a 401 response. +# +# source://faraday//lib/faraday/error.rb#100 +class Faraday::UnauthorizedError < ::Faraday::ClientError; end + +# Raised by Faraday::Response::RaiseError in case of a 422 response. +# +# source://faraday//lib/faraday/error.rb#124 +class Faraday::UnprocessableEntityError < ::Faraday::ClientError; end + +# Utils contains various static helper methods. +# +# source://faraday//lib/faraday/utils/headers.rb#4 +module Faraday::Utils + private + + # Normalize URI() behavior across Ruby versions + # + # url - A String or URI. + # + # Returns a parsed URI. + # + # source://faraday//lib/faraday/utils.rb#71 + def URI(url); end + + # source://faraday//lib/faraday/utils.rb#56 + def basic_header_from(login, pass); end + + # source://faraday//lib/faraday/utils.rb#17 + def build_nested_query(params); end + + # source://faraday//lib/faraday/utils.rb#13 + def build_query(params); end + + # Recursive hash merge + # + # source://faraday//lib/faraday/utils.rb#114 + def deep_merge(source, hash); end + + # Recursive hash update + # + # source://faraday//lib/faraday/utils.rb#102 + def deep_merge!(target, hash); end + + # source://faraday//lib/faraday/utils.rb#52 + def default_params_encoder; end + + # source://faraday//lib/faraday/utils.rb#21 + def default_space_encoding; end + + # source://faraday//lib/faraday/utils.rb#81 + def default_uri_parser; end + + # source://faraday//lib/faraday/utils.rb#85 + def default_uri_parser=(parser); end + + # source://faraday//lib/faraday/utils.rb#31 + def escape(str); end + + # Receives a String or URI and returns just + # the path with the query string sorted. + # + # source://faraday//lib/faraday/utils.rb#95 + def normalize_path(url); end + + # source://faraday//lib/faraday/utils.rb#48 + def parse_nested_query(query); end + + # Adapted from Rack + # + # source://faraday//lib/faraday/utils.rb#44 + def parse_query(query); end + + # source://faraday//lib/faraday/utils.rb#118 + def sort_query_params(query); end + + # source://faraday//lib/faraday/utils.rb#37 + def unescape(str); end + + class << self + # Normalize URI() behavior across Ruby versions + # + # url - A String or URI. + # + # Returns a parsed URI. + # + # source://faraday//lib/faraday/utils.rb#71 + def URI(url); end + + # source://faraday//lib/faraday/utils.rb#56 + def basic_header_from(login, pass); end + + # source://faraday//lib/faraday/utils.rb#17 + def build_nested_query(params); end + + # source://faraday//lib/faraday/utils.rb#13 + def build_query(params); end + + # Recursive hash merge + # + # source://faraday//lib/faraday/utils.rb#114 + def deep_merge(source, hash); end + + # Recursive hash update + # + # source://faraday//lib/faraday/utils.rb#102 + def deep_merge!(target, hash); end + + # source://faraday//lib/faraday/utils.rb#52 + def default_params_encoder; end + + # Sets the attribute default_params_encoder + # + # @param value the value to set the attribute default_params_encoder to. + # + # source://faraday//lib/faraday/utils.rb#63 + def default_params_encoder=(_arg0); end + + # source://faraday//lib/faraday/utils.rb#21 + def default_space_encoding; end + + # Sets the attribute default_space_encoding + # + # @param value the value to set the attribute default_space_encoding to. + # + # source://faraday//lib/faraday/utils.rb#26 + def default_space_encoding=(_arg0); end + + # source://faraday//lib/faraday/utils.rb#81 + def default_uri_parser; end + + # source://faraday//lib/faraday/utils.rb#85 + def default_uri_parser=(parser); end + + # source://faraday//lib/faraday/utils.rb#31 + def escape(str); end + + # Receives a String or URI and returns just + # the path with the query string sorted. + # + # source://faraday//lib/faraday/utils.rb#95 + def normalize_path(url); end + + # source://faraday//lib/faraday/utils.rb#48 + def parse_nested_query(query); end + + # Adapted from Rack + # + # source://faraday//lib/faraday/utils.rb#44 + def parse_query(query); end + + # source://faraday//lib/faraday/utils.rb#118 + def sort_query_params(query); end + + # source://faraday//lib/faraday/utils.rb#37 + def unescape(str); end + end +end + +# source://faraday//lib/faraday/utils.rb#41 +Faraday::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# source://faraday//lib/faraday/utils.rb#29 +Faraday::Utils::ESCAPE_RE = T.let(T.unsafe(nil), Regexp) + +# A case-insensitive Hash that preserves the original case of a header +# when set. +# +# Adapted from Rack::Utils::HeaderHash +# +# source://faraday//lib/faraday/utils/headers.rb#9 +class Faraday::Utils::Headers < ::Hash + # @return [Headers] a new instance of Headers + # + # source://faraday//lib/faraday/utils/headers.rb#20 + def initialize(hash = T.unsafe(nil)); end + + # source://faraday//lib/faraday/utils/headers.rb#52 + def [](key); end + + # source://faraday//lib/faraday/utils/headers.rb#57 + def []=(key, val); end + + # source://faraday//lib/faraday/utils/headers.rb#71 + def delete(key); end + + # source://faraday//lib/faraday/utils/headers.rb#65 + def fetch(key, *args, &block); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def has_key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def include?(key); end + + # source://faraday//lib/faraday/utils/headers.rb#26 + def initialize_names; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def member?(key); end + + # source://faraday//lib/faraday/utils/headers.rb#95 + def merge(other); end + + # source://faraday//lib/faraday/utils/headers.rb#88 + def merge!(other); end + + # source://faraday//lib/faraday/utils/headers.rb#111 + def parse(header_string); end + + # source://faraday//lib/faraday/utils/headers.rb#100 + def replace(other); end + + # source://faraday//lib/faraday/utils/headers.rb#107 + def to_hash; end + + # source://faraday//lib/faraday/utils/headers.rb#88 + def update(other); end + + protected + + # Returns the value of attribute names. + # + # source://faraday//lib/faraday/utils/headers.rb#129 + def names; end + + private + + # Join multiple values with a comma. + # + # source://faraday//lib/faraday/utils/headers.rb#134 + def add_parsed(key, value); end + + # on dup/clone, we need to duplicate @names hash + # + # source://faraday//lib/faraday/utils/headers.rb#31 + def initialize_copy(other); end + + class << self + # source://faraday//lib/faraday/utils/headers.rb#14 + def allocate; end + + # source://faraday//lib/faraday/utils/headers.rb#10 + def from(value); end + end +end + +# symbol -> string mapper + cache +# +# source://faraday//lib/faraday/utils/headers.rb#40 +Faraday::Utils::Headers::KeyMap = T.let(T.unsafe(nil), Hash) + +# A hash with stringified keys. +# +# source://faraday//lib/faraday/utils/params_hash.rb#6 +class Faraday::Utils::ParamsHash < ::Hash + # source://faraday//lib/faraday/utils/params_hash.rb#7 + def [](key); end + + # source://faraday//lib/faraday/utils/params_hash.rb#11 + def []=(key, value); end + + # source://faraday//lib/faraday/utils/params_hash.rb#15 + def delete(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def has_key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def include?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def member?(key); end + + # source://faraday//lib/faraday/utils/params_hash.rb#35 + def merge(params); end + + # source://faraday//lib/faraday/utils/params_hash.rb#27 + def merge!(params); end + + # source://faraday//lib/faraday/utils/params_hash.rb#44 + def merge_query(query, encoder = T.unsafe(nil)); end + + # source://faraday//lib/faraday/utils/params_hash.rb#39 + def replace(other); end + + # source://faraday//lib/faraday/utils/params_hash.rb#50 + def to_query(encoder = T.unsafe(nil)); end + + # source://faraday//lib/faraday/utils/params_hash.rb#27 + def update(params); end + + private + + # source://faraday//lib/faraday/utils/params_hash.rb#56 + def convert_key(key); end +end + +# source://faraday//lib/faraday/version.rb#4 +Faraday::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/gitlab@4.19.0.rbi b/sorbet/rbi/gems/gitlab@4.19.0.rbi new file mode 100644 index 0000000000..984de2b349 --- /dev/null +++ b/sorbet/rbi/gems/gitlab@4.19.0.rbi @@ -0,0 +1,8421 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `gitlab` gem. +# Please instead update this file by running `bin/tapioca gem gitlab`. + +# source://gitlab//lib/gitlab/version.rb#3 +module Gitlab + extend ::Gitlab::Configuration + + class << self + # Returns an unsorted array of available client methods. + # + # @return [Array] + # + # source://gitlab//lib/gitlab.rb#51 + def actions; end + + # Alias for Gitlab::Client.new + # + # @return [Gitlab::Client] + # + # source://gitlab//lib/gitlab.rb#20 + def client(options = T.unsafe(nil)); end + + # Delegate to HTTParty.http_proxy + # + # source://gitlab//lib/gitlab.rb#44 + def http_proxy(address = T.unsafe(nil), port = T.unsafe(nil), username = T.unsafe(nil), password = T.unsafe(nil)); end + + # source://gitlab//lib/gitlab.rb#25 + def method_missing(method, *args, **keywargs, &block); end + + # Delegate to Gitlab::Client + # + # @return [Boolean] + # + # source://gitlab//lib/gitlab.rb#39 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + end +end + +# @private +# +# source://gitlab//lib/gitlab/api.rb#6 +class Gitlab::API < ::Gitlab::Request + # Creates a new API. + # + # @raise [Error:MissingCredentials] + # @return [API] a new instance of API + # + # source://gitlab//lib/gitlab/api.rb#14 + def initialize(options = T.unsafe(nil)); end + + # @private + # + # source://gitlab//lib/gitlab/api.rb#7 + def auth_token=(_arg0); end + + # source://gitlab//lib/gitlab/api.rb#7 + def endpoint; end + + # source://gitlab//lib/gitlab/api.rb#7 + def endpoint=(_arg0); end + + # source://gitlab//lib/gitlab/api.rb#7 + def httparty; end + + # source://gitlab//lib/gitlab/api.rb#7 + def httparty=(_arg0); end + + # source://gitlab//lib/gitlab/api.rb#7 + def private_token; end + + # source://gitlab//lib/gitlab/api.rb#7 + def private_token=(_arg0); end + + # source://gitlab//lib/gitlab/api.rb#7 + def sudo; end + + # source://gitlab//lib/gitlab/api.rb#7 + def sudo=(_arg0); end + + # source://gitlab//lib/gitlab/api.rb#7 + def user_agent; end + + # source://gitlab//lib/gitlab/api.rb#7 + def user_agent=(_arg0); end + + class << self + def default_cookies; end + def default_options; end + end +end + +# source://gitlab//lib/gitlab/cli_helpers.rb#7 +class Gitlab::CLI; end + +# Defines methods related to CLI output and formatting. +# +# source://gitlab//lib/gitlab/cli_helpers.rb#9 +module Gitlab::CLI::Helpers + private + + # Returns actions available to CLI & Shell + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#15 + def actions; end + + # Returns Gitlab::Client instance + # + # @return [Gitlab::Client] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#22 + def client; end + + # Confirms command with a desctructive action. + # + # @return [String] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#72 + def confirm_command(cmd); end + + # Returns filtered excluded fields. + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#48 + def excluded_fields(args); end + + # Returns fields filtered by a keyword. + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#55 + def filtered_fields(args, key); end + + # Helper function to get rows and keys from data returned from API call + # + # source://gitlab//lib/gitlab/cli_helpers.rb#199 + def get_keys(args, data); end + + # Helper function to call Gitlab commands with args. + # + # source://gitlab//lib/gitlab/cli_helpers.rb#208 + def gitlab_helper(cmd, args = T.unsafe(nil)); end + + # Gets defined help for a specific command/action. + # + # @return [String] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#88 + def help(cmd = T.unsafe(nil), &block); end + + # Check if arg is a color in 6-digit hex notation with leading '#' sign + # + # source://gitlab//lib/gitlab/cli_helpers.rb#230 + def hex_color?(arg); end + + # Returns method names and their owners + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#29 + def method_owners; end + + # source://gitlab//lib/gitlab/cli_helpers.rb#108 + def output_json(cmd, args, data); end + + # Outputs a nicely formatted table or error message. + # + # source://gitlab//lib/gitlab/cli_helpers.rb#97 + def output_table(cmd, args, data); end + + # Renders the result of given commands and arguments into a Hash + # + # @param data [Array] Resultset from the API call + # @param cmd [String] The command passed to the API + # @param args [Array] Options passed to the API call + # @param single_value [bool] If set to true, a single result should be returned + # @return [Hash] Result hash + # + # source://gitlab//lib/gitlab/cli_helpers.rb#165 + def record_hash(data, cmd, args, single_value: T.unsafe(nil)); end + + # Table to display records. + # + # @return [Terminal::Table] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#127 + def record_table(data, cmd, args); end + + # Returns filtered required fields. + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#41 + def required_fields(args); end + + # Convert a hash (recursively) to use symbol hash keys + # + # @return [Hash] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#217 + def symbolize_keys(hash); end + + # Confirms command is valid. + # + # @return [Boolean] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#64 + def valid_command?(cmd); end + + # YAML::load on a single argument + # + # source://gitlab//lib/gitlab/cli_helpers.rb#237 + def yaml_load(arg); end + + class << self + # Returns actions available to CLI & Shell + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#15 + def actions; end + + # Returns Gitlab::Client instance + # + # @return [Gitlab::Client] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#22 + def client; end + + # Confirms command with a desctructive action. + # + # @return [String] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#72 + def confirm_command(cmd); end + + # Returns filtered excluded fields. + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#48 + def excluded_fields(args); end + + # Returns fields filtered by a keyword. + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#55 + def filtered_fields(args, key); end + + # Helper function to get rows and keys from data returned from API call + # + # source://gitlab//lib/gitlab/cli_helpers.rb#199 + def get_keys(args, data); end + + # Helper function to call Gitlab commands with args. + # + # source://gitlab//lib/gitlab/cli_helpers.rb#208 + def gitlab_helper(cmd, args = T.unsafe(nil)); end + + # Gets defined help for a specific command/action. + # + # @return [String] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#88 + def help(cmd = T.unsafe(nil), &block); end + + # Check if arg is a color in 6-digit hex notation with leading '#' sign + # + # @return [Boolean] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#230 + def hex_color?(arg); end + + # Returns method names and their owners + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#29 + def method_owners; end + + # source://gitlab//lib/gitlab/cli_helpers.rb#108 + def output_json(cmd, args, data); end + + # Outputs a nicely formatted table or error message. + # + # source://gitlab//lib/gitlab/cli_helpers.rb#97 + def output_table(cmd, args, data); end + + # Renders the result of given commands and arguments into a Hash + # + # @param data [Array] Resultset from the API call + # @param cmd [String] The command passed to the API + # @param args [Array] Options passed to the API call + # @param single_value [bool] If set to true, a single result should be returned + # @return [Hash] Result hash + # + # source://gitlab//lib/gitlab/cli_helpers.rb#165 + def record_hash(data, cmd, args, single_value: T.unsafe(nil)); end + + # Table to display records. + # + # @return [Terminal::Table] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#127 + def record_table(data, cmd, args); end + + # Returns filtered required fields. + # + # @return [Array] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#41 + def required_fields(args); end + + # Convert a hash (recursively) to use symbol hash keys + # + # @return [Hash] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#217 + def symbolize_keys(hash); end + + # Confirms command is valid. + # + # @return [Boolean] + # + # source://gitlab//lib/gitlab/cli_helpers.rb#64 + def valid_command?(cmd); end + + # YAML::load on a single argument + # + # source://gitlab//lib/gitlab/cli_helpers.rb#237 + def yaml_load(arg); end + end +end + +# Wrapper for the Gitlab REST API. +# +# source://gitlab//lib/gitlab/client.rb#5 +class Gitlab::Client < ::Gitlab::API + include ::Gitlab::Client::AccessRequests + include ::Gitlab::Client::ApplicationSettings + include ::Gitlab::Client::Avatar + include ::Gitlab::Client::AwardEmojis + include ::Gitlab::Client::Boards + include ::Gitlab::Client::Branches + include ::Gitlab::Client::BroadcastMessages + include ::Gitlab::Client::BuildVariables + include ::Gitlab::Client::Builds + include ::Gitlab::Client::Commits + include ::Gitlab::Client::ContainerRegistry + include ::Gitlab::Client::Deployments + include ::Gitlab::Client::Environments + include ::Gitlab::Client::EpicIssues + include ::Gitlab::Client::Epics + include ::Gitlab::Client::Events + include ::Gitlab::Client::Features + include ::Gitlab::Client::GroupBadges + include ::Gitlab::Client::GroupBoards + include ::Gitlab::Client::GroupLabels + include ::Gitlab::Client::GroupMilestones + include ::Gitlab::Client::Groups + include ::Gitlab::Client::IssueLinks + include ::Gitlab::Client::Issues + include ::Gitlab::Client::Jobs + include ::Gitlab::Client::Keys + include ::Gitlab::Client::Labels + include ::Gitlab::Client::Lint + include ::Gitlab::Client::Markdown + include ::Gitlab::Client::MergeRequestApprovals + include ::Gitlab::Client::MergeRequests + include ::Gitlab::Client::Milestones + include ::Gitlab::Client::Namespaces + include ::Gitlab::Client::Notes + include ::Gitlab::Client::Packages + include ::Gitlab::Client::PipelineSchedules + include ::Gitlab::Client::PipelineTriggers + include ::Gitlab::Client::Pipelines + include ::Gitlab::Client::ProjectBadges + include ::Gitlab::Client::ProjectClusters + include ::Gitlab::Client::ProjectReleaseLinks + include ::Gitlab::Client::ProjectReleases + include ::Gitlab::Client::Projects + include ::Gitlab::Client::ProtectedTags + include ::Gitlab::Client::RemoteMirrors + include ::Gitlab::Client::Repositories + include ::Gitlab::Client::RepositoryFiles + include ::Gitlab::Client::RepositorySubmodules + include ::Gitlab::Client::ResourceLabelEvents + include ::Gitlab::Client::ResourceStateEvents + include ::Gitlab::Client::Runners + include ::Gitlab::Client::Search + include ::Gitlab::Client::Services + include ::Gitlab::Client::Sidekiq + include ::Gitlab::Client::Snippets + include ::Gitlab::Client::SystemHooks + include ::Gitlab::Client::Tags + include ::Gitlab::Client::Templates + include ::Gitlab::Client::Todos + include ::Gitlab::Client::Users + include ::Gitlab::Client::UserSnippets + include ::Gitlab::Client::Versions + include ::Gitlab::Client::Wikis + + # Text representation of the client, masking private token. + # + # @return [String] + # + # source://gitlab//lib/gitlab/client.rb#76 + def inspect; end + + # Utility method for URL encoding of a string. + # Copied from https://ruby-doc.org/stdlib-2.7.0/libdoc/erb/rdoc/ERB/Util.html + # + # @return [String] + # + # source://gitlab//lib/gitlab/client.rb#86 + def url_encode(url); end + + private + + # source://gitlab//lib/gitlab/client.rb#92 + def only_show_last_four_chars(token); end + + class << self + def default_cookies; end + def default_options; end + end +end + +# Defines methods related to Award Emojis. +# +# @see https://docs.gitlab.com/ce/api/access_requests.html +# +# source://gitlab//lib/gitlab/client/access_requests.rb#6 +module Gitlab::Client::AccessRequests + # Approves a group access request for the given user. + # + # @example + # Gitlab.approve_group_access_request(1, 1) + # Gitlab.approve_group_access_request(1, 1, {access_level: '30'}) + # @option options + # @param :group(required) [Integer, String] The ID or name of a group. + # @param :user_id(required) [Integer] The user ID of the access requester + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about the approved group access request + # + # source://gitlab//lib/gitlab/client/access_requests.rb#75 + def approve_group_access_request(group, user_id, options = T.unsafe(nil)); end + + # Approves a project access request for the given user. + # + # @example + # Gitlab.approve_project_access_request(1, 1) + # Gitlab.approve_project_access_request(1, 1, {access_level: '30'}) + # @option options + # @param :project(required) [Integer, String] The ID or name of a project. + # @param :user_id(required) [Integer] The user ID of the access requester + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about the approved project access request + # + # source://gitlab//lib/gitlab/client/access_requests.rb#61 + def approve_project_access_request(project, user_id, options = T.unsafe(nil)); end + + # Denies a group access request for the given user. + # + # @example + # Gitlab.deny_group_access_request(1, 1) + # @param :group(required) [Integer, String] The ID or name of a group. + # @param :user_id(required) [Integer] The user ID of the access requester + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/access_requests.rb#99 + def deny_group_access_request(group, user_id); end + + # Denies a project access request for the given user. + # + # @example + # Gitlab.deny_project_access_request(1, 1) + # @param :project(required) [Integer, String] The ID or name of a project. + # @param :user_id(required) [Integer] The user ID of the access requester + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/access_requests.rb#87 + def deny_project_access_request(project, user_id); end + + # Gets a list of access requests for a group viewable by the authenticated user. + # + # @example + # Gitlab.group_access_requests(1) + # @param :group(required) [Integer, String] The ID or name of a group. + # @return [Array] List of group access requests + # + # source://gitlab//lib/gitlab/client/access_requests.rb#25 + def group_access_requests(group); end + + # Gets a list of access requests for a project viewable by the authenticated user. + # + # @example + # Gitlab.project_access_requests(1) + # @param :project(required) [Integer, String] The ID or name of a project. + # @return [Array] List of project access requests + # + # source://gitlab//lib/gitlab/client/access_requests.rb#14 + def project_access_requests(project); end + + # Requests access for the authenticated user to a group. + # + # @example + # Gitlab.request_group_access(1) + # @param :group(required) [Integer, String] The ID or name of a group. + # @return [Gitlab::ObjectifiedHash] Information about the requested group access + # + # source://gitlab//lib/gitlab/client/access_requests.rb#47 + def request_group_access(group); end + + # Requests access for the authenticated user to a project. + # + # @example + # Gitlab.request_project_access(1) + # @param :project(required) [Integer, String] The ID or name of a project. + # @return [Gitlab::ObjectifiedHash] Information about the requested project access + # + # source://gitlab//lib/gitlab/client/access_requests.rb#36 + def request_project_access(project); end +end + +# Defines methods related to application settings. +# +# @see https://docs.gitlab.com/ee/api/settings.html +# +# source://gitlab//lib/gitlab/client/application_settings.rb#6 +module Gitlab::Client::ApplicationSettings + # Retrives the application settings of Gitlab. + # + # @example + # Gitlab.application_settings + # @return [Array] + # + # source://gitlab//lib/gitlab/client/application_settings.rb#13 + def application_settings; end + + # Edit the applications settings of Gitlab. + # + # @example + # Gitlab.edit_application_settings({ signup_enabled: false }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/application_settings.rb#168 + def edit_application_settings(options = T.unsafe(nil)); end +end + +# Defines methods related to avatar. +# +# @see https://docs.gitlab.com/ce/api/avatar.html +# +# source://gitlab//lib/gitlab/client/avatar.rb#6 +module Gitlab::Client::Avatar + # Get a single avatar URL for a user with the given email address. + # + # @example + # Gitlab.avatar(email: 'admin@example.com') + # Gitlab.avatar(email: 'admin@example.com', size: 32) + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/avatar.rb#17 + def avatar(options = T.unsafe(nil)); end +end + +# Defines methods related to Award Emojis. +# +# @see https://docs.gitlab.com/ce/api/award_emoji.html +# +# source://gitlab//lib/gitlab/client/award_emojis.rb#6 +module Gitlab::Client::AwardEmojis + # Gets a single award emoji for an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.award_emoji(1, 80, 'issue', 4) + # Gitlab.award_emoji(1, 60, 'merge_request', 4) + # Gitlab.award_emoji(1, 40, 'snippet', 4) + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param award_id [Integer] The ID of an award emoji. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#50 + def award_emoji(project, awardable_id, awardable_type, award_id); end + + # Gets a list of all award emoji for an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.award_emojis(1, 80, 'issue') + # Gitlab.award_emojis(1, 60, 'merge_request') + # Gitlab.award_emojis(1, 40, 'snippet') + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @return [Array] + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#18 + def award_emojis(project, awardable_id, awardable_type); end + + # Awards a new emoji to an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.create_award_emoji(1, 80, 'issue', 'blowfish') + # Gitlab.create_award_emoji(1, 80, 'merge_request', 'blowfish') + # Gitlab.create_award_emoji(1, 80, 'snippet', 'blowfish') + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param emoji_name [String] The name of the emoji, without colons. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#83 + def create_award_emoji(project, awardable_id, awardable_type, emoji_name); end + + # Awards a new emoji to a note on an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.create_note_award_emoji(1, 80, 'issue', 1, 'blowfish') + # Gitlab.create_note_award_emoji(1, 80, 'merge_request', 1, 'blowfish') + # Gitlab.create_note_award_emoji(1, 80, 'snippet', 1, 'blowfish') + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param note_id [Integer] The ID of a note. + # @param emoji_name [String] The name of the emoji, without colons. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#100 + def create_note_award_emoji(project, awardable_id, awardable_type, note_id, emoji_name); end + + # Deletes a single award emoji from an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.delete_award_emoji(1, 80, 'issue', 4) + # Gitlab.delete_award_emoji(1, 60, 'merge_request', 4) + # Gitlab.delete_award_emoji(1, 40, 'snippet', 4) + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param award_id [Integer] The ID of an award emoji. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#116 + def delete_award_emoji(project, awardable_id, awardable_type, award_id); end + + # Deletes a single award emoji from a single note on an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.delete_note_award_emoji(1, 80, 'issue', 1, 4) + # Gitlab.delete_note_award_emoji(1, 60, 'merge_request', 1, 4) + # Gitlab.delete_note_award_emoji(1, 40, 'snippet', 1, 4) + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param note_id [Integer] The ID of a note. + # @param award_id [Integer] The ID of an award emoji. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#133 + def delete_note_award_emoji(project, awardable_id, awardable_type, note_id, award_id); end + + # Gets a single award emoji from a single note on an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.note_award_emoji(1, 80, 'issue', 1, 4) + # Gitlab.note_award_emoji(1, 60, 'merge_request', 1, 4) + # Gitlab.note_award_emoji(1, 40, 'snippet', 1, 4) + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param note_id [Integer] The ID of a note. + # @param award_id [Integer] The ID of an award emoji. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#67 + def note_award_emoji(project, awardable_id, awardable_type, note_id, award_id); end + + # Gets a list of all award emoji for a single note on an awardable(issue, merge request or snippet) + # + # @example + # Gitlab.note_award_emojis(1, 80, 'issue', 1) + # Gitlab.note_award_emojis(1, 60, 'merge_request', 1) + # Gitlab.note_award_emojis(1, 40, 'snippet', 1) + # @param project [Integer] The ID of a project. + # @param awardable_id [Integer] The ID of an awardable(issue, merge request or snippet). + # @param awardable_type [String] The type of the awardable(can be 'issue', 'merge_request' or 'snippet') + # @param note_id [Integer] The ID of a note. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/award_emojis.rb#34 + def note_award_emojis(project, awardable_id, awardable_type, note_id); end +end + +# Defines methods related to issue boards. +# +# @see https://docs.gitlab.com/ce/api/boards.html +# +# source://gitlab//lib/gitlab/client/boards.rb#6 +module Gitlab::Client::Boards + # Get a single board. + # + # @example + # Gitlab.board(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a board. + # @return [Gitlab::ObjectifiedHash] Returns information about the board + # + # source://gitlab//lib/gitlab/client/boards.rb#30 + def board(project, id); end + + # Gets a single board list + # + # @example + # Gitlab.board_list(5, 42, 25) + # @param project [Integer, String] The ID or name of a project. + # @param board_id [Integer] The ID of a board. + # @param id [Integer] The ID of a list. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/boards.rb#100 + def board_list(project, board_id, id); end + + # Gets a board lists + # + # @example + # Gitlab.board_lists(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a board. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/boards.rb#86 + def board_lists(project, id); end + + # Gets a list of project's boards. + # + # @example + # Gitlab.boards(5) + # Gitlab.boards({ per_page: 40 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/boards.rb#18 + def boards(project, options = T.unsafe(nil)); end + + # Creates a new board. + # + # @example + # Gitlab.create_board(5, 'newboard') + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of the new board. + # @return [Gitlab::ObjectifiedHash] Information about created board. + # + # source://gitlab//lib/gitlab/client/boards.rb#42 + def create_board(project, name); end + + # Creates a new board list. + # Only for admins and project owners + # + # @example + # Gitlab.create_board_list(5, 42, 25) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a board. + # @param label_id [Integer] The ID of a label. + # @return [Gitlab::ObjectifiedHash] Information about created list. + # + # source://gitlab//lib/gitlab/client/boards.rb#114 + def create_board_list(project, board_id, label_id); end + + # Deletes a board. + # + # @example + # Gitlab.delete_board(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a board. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/boards.rb#74 + def delete_board(project, id); end + + # Deletes a board list. + # Only for admins and project owners + # + # @example + # Gitlab.delete_board_list(3, 42, 32) + # @param project [Integer, String] The ID or name of a project. + # @param board_id [Integer] The ID of a board. + # @param id [Integer] The ID of a list. + # @return [Gitlab::ObjectifiedHash] Information about deleted board list. + # + # source://gitlab//lib/gitlab/client/boards.rb#142 + def delete_board_list(project, board_id, id); end + + # Updates a board. + # + # @example + # Gitlab.edit_board(5, 1, name: 'new_name') + # Gitlab.edit_board(5, 1, name: 'new_name', assignee_id: 1, milestone_id: 1) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a board. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated board. + # + # source://gitlab//lib/gitlab/client/boards.rb#62 + def edit_board(project, id, options = T.unsafe(nil)); end + + # Updates a board list. + # Only for admins and project owners + # + # @example + # Gitlab.edit_board_list(6, 1, 12, 5) + # @param project [Integer, String] The ID or name of a project. + # @param board_id [Integer] The ID of a board. + # @param id [Integer] The ID of a list. + # @return [Gitlab::ObjectifiedHash] Information about updated board list. + # + # source://gitlab//lib/gitlab/client/boards.rb#128 + def edit_board_list(project, board_id, id, position); end +end + +# Defines methods related to repositories. +# +# @see https://docs.gitlab.com/ce/api/branches.html +# +# source://gitlab//lib/gitlab/client/branches.rb#6 +module Gitlab::Client::Branches + # Gets information about a repository branch. + # + # @example + # Gitlab.branch(3, 'api') + # Gitlab.repo_branch(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/branches.rb#31 + def branch(project, branch); end + + # Gets a list of project repositiory branches. + # + # @example + # Gitlab.branches(42) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/branches.rb#17 + def branches(project, options = T.unsafe(nil)); end + + # Creates a repository branch. Requires Gitlab >= 6.8.x + # + # @example + # Gitlab.create_branch(3, 'api', 'feat/new-api') + # Gitlab.repo_create_branch(5, 'master', 'develop') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the new branch. + # @param ref [String] Create branch from commit sha or existing branch + # @return [Gitlab::ObjectifiedHash] Details about the branch + # + # source://gitlab//lib/gitlab/client/branches.rb#80 + def create_branch(project, branch, ref); end + + # Deletes a repository branch. Requires Gitlab >= 6.8.x + # + # @example + # Gitlab.delete_branch(3, 'api') + # Gitlab.repo_delete_branch(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch to delete + # + # source://gitlab//lib/gitlab/client/branches.rb#93 + def delete_branch(project, branch); end + + # Delete all branches that are merged into the project default branch. Protected branches will not be deleted as part of this operation. + # + # @example + # Gitlab.delete_merged_branches(3) + # @param project [Integer, String] The ID or name of a project. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/branches.rb#105 + def delete_merged_branches(project); end + + # Protects a repository branch. + # + # To update options, call `protect_branch` again with new options (i.e. `developers_can_push: false`) + # + # @example + # Gitlab.protect_branch(3, 'api') + # Gitlab.repo_protect_branch(5, 'master') + # Gitlab.protect_branch(5, 'api', developers_can_push: true) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Details about the branch + # + # source://gitlab//lib/gitlab/client/branches.rb#51 + def protect_branch(project, branch, options = T.unsafe(nil)); end + + # Gets a single protected branch or wildcard protected branch + # + # @example + # Gitlab.protected_branch(3, 'api') + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of the branch or wildcard + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/branches.rb#130 + def protected_branch(project, branch); end + + # Gets a list of protected branches from a project. + # + # @example + # Gitlab.protected_branches(42) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/branches.rb#117 + def protected_branches(project); end + + # Gets information about a repository branch. + # + # @example + # Gitlab.branch(3, 'api') + # Gitlab.repo_branch(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/branches.rb#31 + def repo_branch(project, branch); end + + # Gets a list of project repositiory branches. + # + # @example + # Gitlab.branches(42) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/branches.rb#17 + def repo_branches(project, options = T.unsafe(nil)); end + + # Creates a repository branch. Requires Gitlab >= 6.8.x + # + # @example + # Gitlab.create_branch(3, 'api', 'feat/new-api') + # Gitlab.repo_create_branch(5, 'master', 'develop') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the new branch. + # @param ref [String] Create branch from commit sha or existing branch + # @return [Gitlab::ObjectifiedHash] Details about the branch + # + # source://gitlab//lib/gitlab/client/branches.rb#80 + def repo_create_branch(project, branch, ref); end + + # Deletes a repository branch. Requires Gitlab >= 6.8.x + # + # @example + # Gitlab.delete_branch(3, 'api') + # Gitlab.repo_delete_branch(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch to delete + # + # source://gitlab//lib/gitlab/client/branches.rb#93 + def repo_delete_branch(project, branch); end + + # Delete all branches that are merged into the project default branch. Protected branches will not be deleted as part of this operation. + # + # @example + # Gitlab.delete_merged_branches(3) + # @param project [Integer, String] The ID or name of a project. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/branches.rb#105 + def repo_delete_merged_branches(project); end + + # Protects a repository branch. + # + # To update options, call `protect_branch` again with new options (i.e. `developers_can_push: false`) + # + # @example + # Gitlab.protect_branch(3, 'api') + # Gitlab.repo_protect_branch(5, 'master') + # Gitlab.protect_branch(5, 'api', developers_can_push: true) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Details about the branch + # + # source://gitlab//lib/gitlab/client/branches.rb#51 + def repo_protect_branch(project, branch, options = T.unsafe(nil)); end + + # Gets a single protected branch or wildcard protected branch + # + # @example + # Gitlab.protected_branch(3, 'api') + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of the branch or wildcard + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/branches.rb#130 + def repo_protected_branch(project, branch); end + + # Gets a list of protected branches from a project. + # + # @example + # Gitlab.protected_branches(42) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/branches.rb#117 + def repo_protected_branches(project); end + + # Unprotects a repository branch. + # + # @example + # Gitlab.unprotect_branch(3, 'api') + # Gitlab.repo_unprotect_branch(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch. + # @return [Gitlab::ObjectifiedHash] Details about the branch + # + # source://gitlab//lib/gitlab/client/branches.rb#65 + def repo_unprotect_branch(project, branch); end + + # Unprotects a repository branch. + # + # @example + # Gitlab.unprotect_branch(3, 'api') + # Gitlab.repo_unprotect_branch(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] The name of the branch. + # @return [Gitlab::ObjectifiedHash] Details about the branch + # + # source://gitlab//lib/gitlab/client/branches.rb#65 + def unprotect_branch(project, branch); end +end + +# Defines methods related to broadcast messages (only accessible to administrators). +# +# @see https://docs.gitlab.com/ce/api/broadcast_messages.html +# +# source://gitlab//lib/gitlab/client/broadcast_messages.rb#6 +module Gitlab::Client::BroadcastMessages + # Get a specific broadcast message + # + # @example + # Gitlab.broadcast_message(3) + # @param id [Integer] The ID of broadcast message + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/broadcast_messages.rb#24 + def broadcast_message(id); end + + # Get all broadcast messages + # + # @example + # Gitlab.broadcast_messages + # @return [Array] + # + # source://gitlab//lib/gitlab/client/broadcast_messages.rb#13 + def broadcast_messages; end + + # Create a broadcast message. + # + # @example + # Gitlab.create_broadcast_message('Mayday') + # Gitlab.create_broadcast_message('Mayday', {starts_at: Time.zone.now, ends_at: Time.zone.now + 30.minutes, color: '#cecece', font: '#FFFFFF'}) + # @option options + # @option options + # @option options + # @option options + # @param message [String] Message to display + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created broadcast message. + # + # source://gitlab//lib/gitlab/client/broadcast_messages.rb#41 + def create_broadcast_message(message, options = T.unsafe(nil)); end + + # Delete a broadcast message. + # + # @example + # Gitlab.delete_broadcast_message(3) + # @param id [Integer] The ID of a broadcast message. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/broadcast_messages.rb#71 + def delete_broadcast_message(id); end + + # Update a broadcast message + # + # @example + # Gitlab.edit_broadcast_message(6, { message: 'No Mayday' }) + # Gitlab.edit_broadcast_message(6, { font: '#FEFEFE' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param id [Integer] The ID of a broadcast message + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated broadcast message. + # + # source://gitlab//lib/gitlab/client/broadcast_messages.rb#60 + def edit_broadcast_message(id, options = T.unsafe(nil)); end +end + +# Defines methods related to builds. +# +# @see https://docs.gitlab.com/ce/api/project_level_variables.html +# @see https://docs.gitlab.com/ce/api/group_level_variables.html +# +# source://gitlab//lib/gitlab/client/build_variables.rb#7 +module Gitlab::Client::BuildVariables + # Create a build variable for a group. + # + # @example + # Gitlab.create_group_variable(5, "NEW_VARIABLE", "new value") + # @param group [Integer, String] The ID or name of a group. + # @param key [String] The key of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9` and `_` are allowed + # @param value [String] The value of a variable + # @param opts [Hash] optional parameters + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#105 + def create_group_variable(group, key, value, **opts); end + + # Create a build variable for a project. + # + # @example + # Gitlab.create_variable(5, "NEW_VARIABLE", "new value") + # @param project [Integer, String] The ID or name of a project. + # @param key [String] The key of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9` and `_` are allowed + # @param value [String] The value of a variable + # @param opts [Hash] optional parameters + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#41 + def create_variable(project, key, value, **opts); end + + # Gets details of a group's specific build variable. + # + # @example + # Gitlab.group_variable(5, "TEST_VARIABLE_1") + # @param group [Integer, String] The ID or name of a group. + # @param key [String] The key of a variable. + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#91 + def group_variable(group, key); end + + # Gets a list of the group's build variables + # + # @example + # Gitlab.group_variables(5) + # @param group [Integer, String] The ID or name of a group. + # @return [Array] The list of variables. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#79 + def group_variables(group); end + + # Remove a group's build variable. + # + # @example + # Gitlab.remove_group_variable(5, "VARIABLE_1") + # @param group [Integer, String] The ID or name of a group. + # @param key [String] The key of a variable. + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#131 + def remove_group_variable(group, key); end + + # Remove a project's build variable. + # + # @example + # Gitlab.remove_variable(5, "VARIABLE_1") + # @param project [Integer, String] The ID or name of a project. + # @param key [String] The key of a variable. + # @param opts [Hash] optional parameters + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#68 + def remove_variable(project, key, **opts); end + + # Update a group's build variable. + # + # @example + # Gitlab.update_group_variable(5, "NEW_VARIABLE", "updated value") + # @param group [Integer, String] The ID or name of a group. + # @param key [String] The key of a variable + # @param value [String] The value of a variable + # @param opts [Hash] optional parameters + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#119 + def update_group_variable(group, key, value, **opts); end + + # Update a project's build variable. + # + # @example + # Gitlab.update_variable(5, "NEW_VARIABLE", "updated value") + # @param project [Integer, String] The ID or name of a project. + # @param key [String] The key of a variable + # @param value [String] The value of a variable + # @param opts [Hash] optional parameters + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#55 + def update_variable(project, key, value, **opts); end + + # Gets details of a project's specific build variable. + # + # @example + # Gitlab.variable(5, "TEST_VARIABLE_1") + # @param project [Integer, String] The ID or name of a project. + # @param key [String] The key of a variable. + # @return [Gitlab::ObjectifiedHash] The variable. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#27 + def variable(project, key); end + + # Gets a list of the project's build variables + # + # @example + # Gitlab.variables(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] The list of variables. + # + # source://gitlab//lib/gitlab/client/build_variables.rb#15 + def variables(project); end +end + +# Defines methods related to builds. +# +# @see https://docs.gitlab.com/ce/api/builds.html +# +# source://gitlab//lib/gitlab/client/builds.rb#6 +module Gitlab::Client::Builds + # Gets a single build. + # + # @example + # Gitlab.build(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a build. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/builds.rb#31 + def build(project, id); end + + # Gets build artifacts. + # + # @example + # Gitlab.build_artifacts(1, 8) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a build. + # @return [Gitlab::FileResponse] + # + # source://gitlab//lib/gitlab/client/builds.rb#43 + def build_artifacts(project, id); end + + # Cancels a build. + # + # @example + # Gitlab.build_cancel(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a build. + # @return [Gitlab::ObjectifiedHash] The builds changes. + # + # source://gitlab//lib/gitlab/client/builds.rb#80 + def build_cancel(project, id); end + + # Erase a single build of a project (remove build artifacts and a build trace) + # + # @example + # Gitlab.build_erase(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a build. + # @return [Gitlab::ObjectifiedHash] The build's changes. + # + # source://gitlab//lib/gitlab/client/builds.rb#104 + def build_erase(project, id); end + + # Retry a build. + # + # @example + # Gitlab.build_retry(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a build. + # @return [Array] The builds changes. + # + # source://gitlab//lib/gitlab/client/builds.rb#92 + def build_retry(project, id); end + + # Gets a list of project builds. + # + # @example + # Gitlab.builds(5) + # Gitlab.builds(5, { per_page: 10, page: 2 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @param project [Integer, String] The ID or name of a project. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/builds.rb#19 + def builds(project, options = T.unsafe(nil)); end + + # Gets a list of builds for specific commit in a project. + # + # @example + # Gitlab.commit_builds(5, 'asdf') + # Gitlab.commit_builds(5, 'asdf', { per_page: 10, page: 2 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The SHA checksum of a commit. + # @param options [Hash] A customizable set of options. + # @return [Array] The list of builds. + # + # source://gitlab//lib/gitlab/client/builds.rb#68 + def commit_builds(project, sha, options = T.unsafe(nil)); end +end + +# Defines methods related to repository commits. +# +# @see https://docs.gitlab.com/ce/api/commits.html +# +# source://gitlab//lib/gitlab/client/commits.rb#6 +module Gitlab::Client::Commits + # Cherry picks a commit to a given branch. + # + # @example + # Gitlab.cherry_pick_commit(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'master') + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash or name of a repository branch or tag + # @param branch [String] The name of the branch + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#65 + def cherry_pick_commit(project, sha, branch, options = T.unsafe(nil)); end + + # Gets a specific commit identified by the commit hash or name of a branch or tag. + # + # @example + # Gitlab.commit(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # Gitlab.repo_commit(3, 'ed899a2f4b50b4370feeea94676502b42383c746') + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash or name of a repository branch or tag + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#33 + def commit(project, sha); end + + # Gets a list of comments for a commit. + # + # @example + # Gitlab.commit_comments(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b') + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param sha [String] The commit hash or name of a repository branch or tag. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/commits.rb#112 + def commit_comments(project, commit, options = T.unsafe(nil)); end + + # Get the diff of a commit in a project. + # + # @example + # Gitlab.commit_diff(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # Gitlab.repo_commit_diff(3, 'ed899a2f4b50b4370feeea94676502b42383c746') + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The name of a repository branch or tag or if not given the default branch. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#97 + def commit_diff(project, sha); end + + # Gets a list of merge requests for a commit. + # + # Introduced in Gitlab 10.7 + # + # @example + # Gitlab.commit_merge_requests(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b') + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param sha [String] The commit hash. + # @param options [Hash] a customizable set of options + # @return [Array] + # @see https://docs.gitlab.com/ce/api/commits.html#list-merge-requests-associated-with-a-commit + # + # source://gitlab//lib/gitlab/client/commits.rb#211 + def commit_merge_requests(project, commit, options = T.unsafe(nil)); end + + # Get all references (from branches or tags) a commit is pushed to. + # + # @example + # Gitlab.commit_refs(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#50 + def commit_refs(project, sha, options = T.unsafe(nil)); end + + # Get the status of a commit + # + # @example + # Gitlab.commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # Gitlab.commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', { name: 'jenkins' }) + # Gitlab.commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', { name: 'jenkins', all: true }) + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash + # @param options [Hash] A customizable set of options. + # + # source://gitlab//lib/gitlab/client/commits.rb#149 + def commit_status(project, sha, options = T.unsafe(nil)); end + + # Gets a list of project commits. + # + # @example + # Gitlab.commits('viking') + # Gitlab.repo_commits('gitlab', { ref: 'api' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/commits.rb#19 + def commits(project, options = T.unsafe(nil)); end + + # Creates a single commit with one or more changes + # + # Introduced in Gitlab 8.13 + # + # Gitlab.create_commit(2726132, 'master', 'refactors everything', [{action: 'create', file_path: '/foo.txt', content: 'bar'}]) + # Gitlab.create_commit(2726132, 'master', 'refactors everything', [{action: 'delete', file_path: '/foo.txt'}]) + # + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param branch [String] the branch name you wish to commit to + # @param message [String] the commit message + # @param An [Array[Hash]] array of action hashes to commit as a batch. See the next table for what attributes it can take. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] hash of commit related data + # @see https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions + # + # source://gitlab//lib/gitlab/client/commits.rb#189 + def create_commit(project, branch, message, actions, options = T.unsafe(nil)); end + + # Creates a new comment for a commit. + # + # @example + # Gitlab.create_commit_comment(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b', 'Nice work on this commit!') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash or name of a repository branch or tag. + # @param note [String] The text of a comment. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created comment. + # + # source://gitlab//lib/gitlab/client/commits.rb#130 + def create_commit_comment(project, commit, note, options = T.unsafe(nil)); end + + # Gets a specific commit identified by the commit hash or name of a branch or tag. + # + # @example + # Gitlab.commit(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # Gitlab.repo_commit(3, 'ed899a2f4b50b4370feeea94676502b42383c746') + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash or name of a repository branch or tag + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#33 + def repo_commit(project, sha); end + + # Gets a list of comments for a commit. + # + # @example + # Gitlab.commit_comments(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b') + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param sha [String] The commit hash or name of a repository branch or tag. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/commits.rb#112 + def repo_commit_comments(project, commit, options = T.unsafe(nil)); end + + # Get the diff of a commit in a project. + # + # @example + # Gitlab.commit_diff(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # Gitlab.repo_commit_diff(3, 'ed899a2f4b50b4370feeea94676502b42383c746') + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The name of a repository branch or tag or if not given the default branch. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#97 + def repo_commit_diff(project, sha); end + + # Gets a list of merge requests for a commit. + # + # Introduced in Gitlab 10.7 + # + # @example + # Gitlab.commit_merge_requests(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b') + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param sha [String] The commit hash. + # @param options [Hash] a customizable set of options + # @return [Array] + # @see https://docs.gitlab.com/ce/api/commits.html#list-merge-requests-associated-with-a-commit + # + # source://gitlab//lib/gitlab/client/commits.rb#211 + def repo_commit_merge_requests(project, commit, options = T.unsafe(nil)); end + + # Get the status of a commit + # + # @example + # Gitlab.commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6') + # Gitlab.commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', { name: 'jenkins' }) + # Gitlab.commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', { name: 'jenkins', all: true }) + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash + # @param options [Hash] A customizable set of options. + # + # source://gitlab//lib/gitlab/client/commits.rb#149 + def repo_commit_status(project, sha, options = T.unsafe(nil)); end + + # Gets a list of project commits. + # + # @example + # Gitlab.commits('viking') + # Gitlab.repo_commits('gitlab', { ref: 'api' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/commits.rb#19 + def repo_commits(project, options = T.unsafe(nil)); end + + # Creates a new comment for a commit. + # + # @example + # Gitlab.create_commit_comment(5, 'c9f9662a9b1116c838b523ed64c6abdb4aae4b8b', 'Nice work on this commit!') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash or name of a repository branch or tag. + # @param note [String] The text of a comment. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created comment. + # + # source://gitlab//lib/gitlab/client/commits.rb#130 + def repo_create_commit_comment(project, commit, note, options = T.unsafe(nil)); end + + # Adds or updates a status of a commit. + # + # @example + # Gitlab.update_commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'success') + # Gitlab.update_commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'failed', { name: 'jenkins' }) + # Gitlab.update_commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'canceled', { name: 'jenkins', target_url: 'http://example.com/builds/1' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash + # @param state [String] of the status. Can be: pending, running, success, failed, canceled + # @param options [Hash] A customizable set of options. + # + # source://gitlab//lib/gitlab/client/commits.rb#168 + def repo_update_commit_status(project, sha, state, options = T.unsafe(nil)); end + + # Reverts a commit in a given branch. + # + # @example + # Gitlab.revert_commit(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'master') + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash or name of a repository branch or tag + # @param branch [String] The name of the branch + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/commits.rb#82 + def revert_commit(project, sha, branch, options = T.unsafe(nil)); end + + # Adds or updates a status of a commit. + # + # @example + # Gitlab.update_commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'success') + # Gitlab.update_commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'failed', { name: 'jenkins' }) + # Gitlab.update_commit_status(42, '6104942438c14ec7bd21c6cd5bd995272b3faff6', 'canceled', { name: 'jenkins', target_url: 'http://example.com/builds/1' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param sha [String] The commit hash + # @param state [String] of the status. Can be: pending, running, success, failed, canceled + # @param options [Hash] A customizable set of options. + # + # source://gitlab//lib/gitlab/client/commits.rb#168 + def update_commit_status(project, sha, state, options = T.unsafe(nil)); end +end + +# Defines methods related to GitLab Container Registry. +# +# @see https://docs.gitlab.com/ce/api/container_registry.html +# +# source://gitlab//lib/gitlab/client/container_registry.rb#6 +module Gitlab::Client::ContainerRegistry + # Delete repository tags in bulk based on given criteria. + # + # @example + # Gitlab.bulk_delete_registry_repository_tags(5, 2, name_regex: '.*') + # Gitlab.bulk_delete_registry_repository_tags(5, 2, name_regex: '[0-9a-z]{40}', keep_n: 5, older_than: '1d') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param repository_id [Integer] The ID of registry repository. + # @param options [Hash] A customizable set of options. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/container_registry.rb#81 + def bulk_delete_registry_repository_tags(project, repository_id, options = T.unsafe(nil)); end + + # Delete a repository in registry. + # + # @example + # Gitlab.delete_registry_repository(5, 2) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of registry repository. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/container_registry.rb#26 + def delete_registry_repository(project, id); end + + # Delete a registry repository tag. + # + # @example + # Gitlab.delete_registry_repository_tag(5, 2, 'v10.0.0') + # @param project [Integer, String] The ID or name of a project. + # @param repository_id [Integer] The ID of registry repository. + # @param tag_name [String] The name of tag. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/container_registry.rb#64 + def delete_registry_repository_tag(project, repository_id, tag_name); end + + # Get a list of registry repositories in a project. + # + # @example + # Gitlab.registry_repositories(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] Returns list of registry repositories in a project. + # + # source://gitlab//lib/gitlab/client/container_registry.rb#14 + def registry_repositories(project); end + + # Get details of a registry repository tag. + # + # @example + # Gitlab.registry_repository_tag(5, 2, 'v10.0.0') + # @param project [Integer, String] The ID or name of a project. + # @param repository_id [Integer] The ID of registry repository. + # @param tag_name [String] The name of tag. + # @return [Gitlab::ObjectifiedHash] Returns details about the registry repository tag + # + # source://gitlab//lib/gitlab/client/container_registry.rb#51 + def registry_repository_tag(project, repository_id, tag_name); end + + # Get a list of tags for given registry repository. + # + # @example + # Gitlab.registry_repository_tags(5, 2) + # @param project [Integer, String] The ID or name of a project. + # @param repository_id [Integer] The ID of registry repository. + # @return [Array] Returns list of tags of a registry repository. + # + # source://gitlab//lib/gitlab/client/container_registry.rb#38 + def registry_repository_tags(project, repository_id); end +end + +# Defines methods related to deployments. +# +# @see https://docs.gitlab.com/ce/api/deployments.html +# +# source://gitlab//lib/gitlab/client/deployments.rb#6 +module Gitlab::Client::Deployments + # Gets a single deployment. + # + # @example + # Gitlab.deployment(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an deployment. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/deployments.rb#30 + def deployment(project, id); end + + # Gets a list of project deployments. + # + # @example + # Gitlab.deployments(5) + # Gitlab.deployments(5, { per_page: 10, page: 2 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/deployments.rb#18 + def deployments(project, options = T.unsafe(nil)); end +end + +# Defines methods related to environments. +# +# @see https://docs.gitlab.com/ce/api/environments.html +# +# source://gitlab//lib/gitlab/client/environments.rb#6 +module Gitlab::Client::Environments + # Create an environment. + # + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param env_name [String] Name for the environment + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] The updated environment. + # + # source://gitlab//lib/gitlab/client/environments.rb#44 + def create_environment(project, env_name, options = T.unsafe(nil)); end + + # Deletes an environment. + # + # @example + # Gitlab.delete_environment(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an environment. + # @return [Gitlab::ObjectifiedHash] Information about the deleted environment. + # + # source://gitlab//lib/gitlab/client/environments.rb#73 + def delete_environment(project, id); end + + # Update an environment. + # + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an environment. + # @param options [Hash] A hash of the attribute keys & values to update. + # @return [Gitlab::ObjectifiedHash] The updated environment. + # + # source://gitlab//lib/gitlab/client/environments.rb#61 + def edit_environment(project, id, options = T.unsafe(nil)); end + + # Gets a single environment. + # + # @example + # Gitlab.environment(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an environment. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/environments.rb#30 + def environment(project, id); end + + # Gets a list of project environments. + # + # @example + # Gitlab.environments(5) + # Gitlab.environments(5, { per_page: 10, page: 2 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/environments.rb#18 + def environments(project, options = T.unsafe(nil)); end + + # Stop an environment. + # + # @example + # Gitlab.stop_environment(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an environment. + # @return [Array] The stopped environment. + # + # source://gitlab//lib/gitlab/client/environments.rb#85 + def stop_environment(project, id); end +end + +# Defines methods related to issues. +# +# @see https://docs.gitlab.com/ee/api/epic_issues.html +# +# source://gitlab//lib/gitlab/client/epic_issues.rb#6 +module Gitlab::Client::EpicIssues + # List issues for an epic. + # Gets all issues that are assigned to an epic and the authenticated user has access to.. + # + # @example + # Gitlab.epic_issues(5, 7) + # Gitlab.epic_issues(5, 7, { per_page: 40 }) + # @option options + # @option options + # @param group [Integer, String] The ID or name of a group. + # @param epic [Integer] The iid of an epic. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/epic_issues.rb#19 + def epic_issues(group, epic, options = T.unsafe(nil)); end +end + +# Defines methods related to Epics. +# +# @see https://docs.gitlab.com/ee/api/epics.html +# +# source://gitlab//lib/gitlab/client/epics.rb#6 +module Gitlab::Client::Epics + # Creates a new epic. + # + # @example + # Gitlab.create_epic(123, "My new epic title") + # @param group_id [Integer] The ID of a group. + # @param title [String] + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created epic. + # + # source://gitlab//lib/gitlab/client/epics.rb#44 + def create_epic(group_id, title, options = T.unsafe(nil)); end + + # Deletes an epic. + # + # @example + # Gitlab.delete_epic(42, 123) + # @param group_id [Integer] The ID of a group. + # @param epic_iid [Integer] The IID of an epic. + # + # source://gitlab//lib/gitlab/client/epics.rb#55 + def delete_epic(group_id, epic_iid); end + + # Updates an existing epic. + # + # @example + # Gitlab.edit_epic(42) + # Gitlab.edit_epic(42, 123, { title: 'New epic title' }) + # @param group_id [Integer] The ID. + # @param epic_iid [Integer] The IID of an epic. + # @param options [Hash] A customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about the edited epic. + # + # source://gitlab//lib/gitlab/client/epics.rb#69 + def edit_epic(group_id, epic_iid, options = T.unsafe(nil)); end + + # Gets a single epic. + # + # @example + # Gitlab.epic(123, 1) + # @param group_id [Integer] The ID of a group. + # @param epic_iid [Integer] The ID of a epic. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/epics.rb#31 + def epic(group_id, epic_iid, options = T.unsafe(nil)); end + + # Gets a list of epics. + # + # @example + # Gitlab.epics(123) + # Gitlab.epics(123, { per_page: 40, page: 2 }) + # @option options + # @option options + # @param group_id [Integer] The ID of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/epics.rb#18 + def epics(group_id, options = T.unsafe(nil)); end +end + +# Defines methods related to events. +# +# @see https://docs.gitlab.com/ce/api/events.html +# +# source://gitlab//lib/gitlab/client/events.rb#6 +module Gitlab::Client::Events + # Gets a list of authenticated user's events + # + # @example + # Gitlab.events() + # Gitlab.events({ action: 'created', target_type: 'issue' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/events.rb#20 + def events(options = T.unsafe(nil)); end + + # Gets a list of visible project events + # + # @example + # Gitlab.project_events(1) + # Gitlab.project_events(1, { action: created }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer] The ID of project + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/events.rb#56 + def project_events(project, options = T.unsafe(nil)); end + + # Gets a list of user contribution events + # + # @example + # Gitlab.user_events(1) + # Gitlab.user_events(1, { action: created}) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param user [Integer, String] The ID or username of user + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/events.rb#38 + def user_events(user, options = T.unsafe(nil)); end +end + +# Defines methods related to feature flags. +# https://docs.gitlab.com/ce/api/features.html +# +# source://gitlab//lib/gitlab/client/features.rb#6 +module Gitlab::Client::Features + # Delete a feature. + # + # @example + # Gitlab.delete_feature('new_library') + # @param name [String] Name of the feature to delete + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/features.rb#44 + def delete_feature(name); end + + # Get a list of all persisted features, with its gate values. + # + # @example + # Gitlab.features + # @return [Array] + # + # source://gitlab//lib/gitlab/client/features.rb#13 + def features; end + + # Set a features gate value. + # If a feature with the given name does not exist yet it will be created. The value can be a boolean, or an integer to indicate percentage of time. + # + # @example + # Gitlab.set_feature('new_library', true) + # Gitlab.set_feature('new_library', 8) + # Gitlab.set_feature('new_library', true, {user: 'gitlab'}) + # @option options + # @option options + # @option options + # @param name(required) [String] Name of the feature to create or update + # @param value(required) [String, Integer] true or false to enable/disable, or an integer for percentage of time + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the set/created/updated feature. + # + # source://gitlab//lib/gitlab/client/features.rb#32 + def set_feature(name, value, options = T.unsafe(nil)); end +end + +# Defines methods related to group badges. +# +# @see https://docs.gitlab.com/ee/api/group_badges.html +# +# source://gitlab//lib/gitlab/client/group_badges.rb#6 +module Gitlab::Client::GroupBadges + # Adds a badge to a group. + # + # @example + # Gitlab.add_group_badge(5, { link_url: 'https://abc.com/gitlab/gitlab-ce/commits/master', image_url: 'https://shields.io/my/badge1' }) + # @option options + # @option options + # @param group(required) [Integer, String] The ID or URL-encoded path of the group owned by the authenticated user. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the added group badge. + # + # source://gitlab//lib/gitlab/client/group_badges.rb#43 + def add_group_badge(group, options = T.unsafe(nil)); end + + # Updates a badge of a group. + # + # @example + # Gitlab.edit_group_badge(5, 1, { link_url: 'https://abc.com/gitlab/gitlab-ce/commits/master', image_url: 'https://shields.io/my/badge1' }) + # @option options + # @option options + # @param group(required) [Integer, String] The ID or URL-encoded path of the group owned by the authenticated user. + # @param badge_id(required) [Integer] The badge ID. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the updated group badge. + # + # source://gitlab//lib/gitlab/client/group_badges.rb#58 + def edit_group_badge(group, badge_id, options = T.unsafe(nil)); end + + # Gets a badge of a group. + # + # @example + # Gitlab.group_badge(5, 42) + # @param group(required) [Integer, String] The ID or URL-encoded path of the group owned by the authenticated user. + # @param badge_id(required) [Integer] The badge ID. + # @return [Gitlab::ObjectifiedHash] Information about the requested badge + # + # source://gitlab//lib/gitlab/client/group_badges.rb#29 + def group_badge(group, badge_id); end + + # Gets a list of a groups badges. + # + # @example + # Gitlab.group_badges(5) + # Gitlab.group_badges(5, 'Coverage') + # @param group(required) [Integer, String] The ID or URL-encoded path of the group owned by the authenticated user. + # @param name(optional) [String] Name of the badges to return (case-sensitive). + # @return [Array] List of all badges of a group + # + # source://gitlab//lib/gitlab/client/group_badges.rb#16 + def group_badges(group, name = T.unsafe(nil)); end + + # Preview a badge from a group. + # + # @example + # Gitlab.preview_group_badge(3, 'https://abc.com/gitlab/gitlab-ce/commits/master', 'https://shields.io/my/badge1') + # @param group(required) [Integer, String] The ID or URL-encoded path of the group owned by the authenticated user. + # @param :link_url(required) [String] URL of the badge link + # @param :image_url(required) [String] URL of the badge image + # @return [Gitlab::ObjectifiedHash] Returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation. + # + # source://gitlab//lib/gitlab/client/group_badges.rb#83 + def preview_group_badge(group, link_url, image_url); end + + # Removes a badge from a group. + # + # @example + # Gitlab.remove_group_badge(5, 42) + # @param group(required) [Integer, String] The ID or URL-encoded path of the group owned by the authenticated user. + # @param badge_id(required) [Integer] The badge ID. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/group_badges.rb#70 + def remove_group_badge(group, badge_id); end +end + +# Defines methods related to group issue boards. +# +# @see https://docs.gitlab.com/ee/api/group_boards.html +# +# source://gitlab//lib/gitlab/client/group_boards.rb#6 +module Gitlab::Client::GroupBoards + # Creates a new group issue board. + # + # @example + # Gitlab.create_group_board(5, 'Documentcloud') + # @param group [Integer, String] The ID or name of a group. + # @param name [String] The name of the new board. + # @return [Gitlab::ObjectifiedHash] Information about created group issue board. + # + # source://gitlab//lib/gitlab/client/group_boards.rb#38 + def create_group_board(group, name); end + + # Creates a new group issue board list. + # + # @example + # Gitlab.create_group_board_list(5, 1) + # @param group [Integer, String] The ID or name of a group. + # @param board_id [Integer] The ID of the group issue board. + # @param label_id [Integer] The ID of a label. + # @return [Gitlab::ObjectifiedHash] Information about created group issue board list. + # + # source://gitlab//lib/gitlab/client/group_boards.rb#108 + def create_group_board_list(group, board_id, label_id); end + + # Deletes a group issue board. + # + # @example + # Gitlab.delete_group_board(5, 1) + # @param group [Integer, String] The ID or name of a group. + # @param id [Integer] The ID of the issue board. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/group_boards.rb#70 + def delete_group_board(group, id); end + + # Deletes a group issue board list. + # + # @example + # Gitlab.delete_group_board_list(5, 1, 1) + # @param group [Integer, String] The ID or name of a group. + # @param board_id [Integer] The ID of the group issue board. + # @param list_id [Integer] The ID of a boards list. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/group_boards.rb#137 + def delete_group_board_list(group, board_id, id); end + + # Updates a group issue board. + # + # @example + # Gitlab.edit_group_board(5, 1, { name: 'DocumentCloud2' }) + # Gitlab.edit_group_board(5, 1, { name: 'DocumentCloud2', assignee_id: 3 }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param group [Integer, String] The ID or name of a group. + # @param id [Integer] The ID of the issue board. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated group issue board. + # + # source://gitlab//lib/gitlab/client/group_boards.rb#58 + def edit_group_board(group, id, options = T.unsafe(nil)); end + + # Updates an existing group issue board list. This call is used to change list position. + # + # @example + # Gitlab.edit_group_board_list(5, 1, 1, { position: 1 }) + # @option options + # @param group [Integer, String] The ID or name of a group. + # @param board_id [Integer] The ID of the group issue board. + # @param list_id [Integer] The ID of a boards list. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated group issue board list. + # + # source://gitlab//lib/gitlab/client/group_boards.rb#124 + def edit_group_board_list(group, board_id, id, options = T.unsafe(nil)); end + + # Gets a single group issue board. + # + # @example + # Gitlab.group_board(5, 1) + # @param group [Integer, String] The ID or name of a group. + # @param id [Integer] The ID of the issue board. + # @return [Gitlab::ObjectifiedHash] Returns information about a group issue board + # + # source://gitlab//lib/gitlab/client/group_boards.rb#26 + def group_board(group, id); end + + # Get a single group issue board list. + # + # @example + # Gitlab.group_board_list(5, 1, 1) + # @param group [Integer, String] The ID or name of a group. + # @param board_id [Integer] The ID of the group issue board. + # @param list_id [Integer] The ID of a boards list. + # @return [Gitlab::ObjectifiedHash] Returns information about a single group issue board list + # + # source://gitlab//lib/gitlab/client/group_boards.rb#95 + def group_board_list(group, board_id, id); end + + # Get a list of the boards lists. Does not include open and closed lists + # + # @example + # Gitlab.group_board_lists(5, 1) + # @param group [Integer, String] The ID or name of a group. + # @param board_id [Integer] The ID of the group issue board. + # @return [Array] List of boards lists of the group + # + # source://gitlab//lib/gitlab/client/group_boards.rb#82 + def group_board_lists(group, board_id); end + + # Lists Issue Boards in the given group. + # + # @example + # Gitlab.group_boards(5) + # @param group [Integer, String] The ID or name of a group. + # @return [Array] List of issue boards of the group + # + # source://gitlab//lib/gitlab/client/group_boards.rb#14 + def group_boards(group); end +end + +# Defines methods related to group labels. +# +# @note Requires GitLab 11.8+ +# @see https://docs.gitlab.com/ee/api/group_labels.html +# +# source://gitlab//lib/gitlab/client/group_labels.rb#8 +module Gitlab::Client::GroupLabels + # Creates a new group label. + # + # @example + # Gitlab.create_group_label('globex', 'Backlog', '#DD10AA') + # @option options + # @param group [Integer, String] The ID or name of a group. + # @param name [String] The name of a label. + # @param color [String] The color of a label. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created label. + # + # source://gitlab//lib/gitlab/client/group_labels.rb#31 + def create_group_label(group, name, color, options = T.unsafe(nil)); end + + # Deletes a group label. + # + # @example + # Gitlab.delete_group_label('globex', 'Backlog') + # @param group [Integer, String] The ID or name of a group. + # @param name [String] The name of a label. + # @return [Gitlab::ObjectifiedHash] Information about deleted label. + # + # source://gitlab//lib/gitlab/client/group_labels.rb#60 + def delete_group_label(group, name); end + + # Updates a group label. + # + # @example + # Gitlab.edit_group_label('globex', 'Backlog', { new_name: 'Priority' }) + # Gitlab.edit_group_label('globex', 'Backlog', { new_name: 'Priority', color: '#DD10AA' }) + # @option options + # @option options + # @option options + # @param group [Integer, String] The ID or name of a group. + # @param name [String] The name of a label. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated label. + # + # source://gitlab//lib/gitlab/client/group_labels.rb#48 + def edit_group_label(group, name, options = T.unsafe(nil)); end + + # Gets a list of group's labels. + # + # @example + # Gitlab.group_labels('globex') + # @param group [Integer, String] The ID or name of a group. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/group_labels.rb#16 + def group_labels(group, options = T.unsafe(nil)); end + + # Subscribes the user to a group label to receive notifications + # + # @example + # Gitlab.subscribe_to_group_label('globex', 'Backlog') + # @param group [Integer, String] The ID or name of a group. + # @param name [String] The name of a label. + # @return [Gitlab::ObjectifiedHash] Information about the label subscribed to. + # + # source://gitlab//lib/gitlab/client/group_labels.rb#72 + def subscribe_to_group_label(group, name); end + + # Unsubscribes the user from a group label to not receive notifications from it + # + # @example + # Gitlab.unsubscribe_from_group_label('globex', 'Backlog') + # @param group [Integer, String] The ID or name of a group. + # @param name [String] The name of a label. + # @return [Gitlab::ObjectifiedHash] Information about the label unsubscribed from. + # + # source://gitlab//lib/gitlab/client/group_labels.rb#84 + def unsubscribe_from_group_label(group, name); end +end + +# Defines methods related to group milestones. +# +# @see https://docs.gitlab.com/ee/api/group_milestones.html +# +# source://gitlab//lib/gitlab/client/group_milestones.rb#6 +module Gitlab::Client::GroupMilestones + # Creates a new group milestone. + # + # @example + # Gitlab.create_group_milestone(5, 'v1.0') + # @option options + # @option options + # @param id [Integer, String] The ID or name of a group. + # @param title [String] The title of a milestone. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created milestone. + # + # source://gitlab//lib/gitlab/client/group_milestones.rb#44 + def create_group_milestone(id, title, options = T.unsafe(nil)); end + + # Updates a group milestone. + # + # @example + # Gitlab.edit_group_milestone(5, 2, { state_event: 'activate' }) + # @option options + # @option options + # @option options + # @option options + # @param id [Integer, String] The ID or name of a group. + # @param milestone_id [Integer] The ID of a milestone. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated milestone. + # + # source://gitlab//lib/gitlab/client/group_milestones.rb#62 + def edit_group_milestone(id, milestone_id, options = T.unsafe(nil)); end + + # Gets a single group milestone. + # + # @example + # Gitlab.group_milestone(5, 36) + # @param id [Integer, String] The ID or name of a group. + # @param milestone_id [Integer] The ID of a milestone. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/group_milestones.rb#29 + def group_milestone(id, milestone_id); end + + # Gets the issues of a given group milestone. + # + # @example + # Gitlab.group_milestone_issues(5, 2) + # @option options + # @option options + # @param id [Integer, String] The ID or name of a group. + # @param milestone_id [Integer, String] The ID of a milestone. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/group_milestones.rb#76 + def group_milestone_issues(id, milestone_id, options = T.unsafe(nil)); end + + # Gets the merge_requests of a given group milestone. + # + # @example + # Gitlab.group_milestone_merge_requests(5, 2) + # @option options + # @option options + # @param group [Integer, String] The ID or name of a group. + # @param milestone_id [Integer, String] The ID of a milestone. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/group_milestones.rb#90 + def group_milestone_merge_requests(id, milestone_id, options = T.unsafe(nil)); end + + # Gets a list of a group's milestones. + # + # @example + # Gitlab.group_milestones(5) + # @option options + # @option options + # @param id [Integer, String] The ID or name of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/group_milestones.rb#17 + def group_milestones(id, options = T.unsafe(nil)); end +end + +# Defines methods related to groups. +# +# @see https://docs.gitlab.com/ce/api/groups.html +# +# source://gitlab//lib/gitlab/client/groups.rb#6 +module Gitlab::Client::Groups + # Creates a new custom_attribute + # + # @example + # Gitlab.add_custom_attribute('some_new_key', 'some_new_value', 2) + # @param key [String] The custom_attributes key + # @param value [String] The custom_attributes value + # @param group_id [Integer] The ID of a group. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/groups.rb#340 + def add_group_custom_attribute(key, value, group_id); end + + # Adds a user to group. + # + # @example + # Gitlab.add_group_member(1, 2, 40) + # @param team_id [Integer] The group id to add a member to. + # @param user_id [Integer] The user id of the user to add to the team. + # @param access_level [Integer] Project access level. + # @return [Gitlab::ObjectifiedHash] Information about added team member. + # + # source://gitlab//lib/gitlab/client/groups.rb#156 + def add_group_member(team_id, user_id, access_level); end + + # Add LDAP group link + # + # @example + # Gitlab.add_ldap_group_links(1, 'all', 50, 'ldap') + # @param id [Integer] The ID of a group + # @param cn [String] The CN of a LDAP group + # @param group_access [Integer] Minimum access level for members of the LDAP group. + # @param provider [String] LDAP provider for the LDAP group + # @return [Gitlab::ObjectifiedHash] Information about added ldap group link + # + # source://gitlab//lib/gitlab/client/groups.rb#292 + def add_ldap_group_links(id, commonname, group_access, provider); end + + # Gets a list of all group members including inherited members. + # + # @example + # Gitlab.all_group_members(1) + # Gitlab.all_group_members(1, { per_page: 40 }) + # @option options + # @option options + # @param id [Integer] The ID of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#85 + def all_group_members(id, options = T.unsafe(nil)); end + + # Creates a new group. + # + # @example + # Gitlab.create_group('new-group', 'group-path') + # Gitlab.create_group('gitlab', 'gitlab-path', { description: 'New Gitlab project' }) + # @param name [String] The name of a group. + # @param path [String] The path of a group. + # @return [Gitlab::ObjectifiedHash] Information about created group. + # + # source://gitlab//lib/gitlab/client/groups.rb#44 + def create_group(name, path, options = T.unsafe(nil)); end + + # Delete's a group. + # + # @example + # Gitlab.delete_group(42) + # @param id [Integer] The ID of a group + # @return [Gitlab::ObjectifiedHash] Information about the deleted group. + # + # source://gitlab//lib/gitlab/client/groups.rb#55 + def delete_group(id); end + + # Delete custom_attribute + # Will delete a custom_attribute + # + # @example + # Gitlab.delete_group_custom_attribute('somekey', 2) + # @param key [String] The custom_attribute key to delete + # @param group_id [Integer] The ID of a group. + # @return [Boolean] + # + # source://gitlab//lib/gitlab/client/groups.rb#354 + def delete_group_custom_attribute(key, group_id = T.unsafe(nil)); end + + # Delete LDAP group link + # + # @example + # Gitlab.delete_ldap_group_links(1, 'all') + # @param id [Integer] The ID of a group + # @param cn [String] The CN of a LDAP group + # @return [Gitlab::ObjectifiedHash] Empty hash + # + # source://gitlab//lib/gitlab/client/groups.rb#304 + def delete_ldap_group_links(id, commonname, provider); end + + # Updates an existing group. + # + # @example + # Gitlab.edit_group(42) + # Gitlab.edit_group(42, { name: 'Group Name' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param group [Integer] The ID. + # @param options [Hash] A customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about the edited group. + # + # source://gitlab//lib/gitlab/client/groups.rb#255 + def edit_group(id, options = T.unsafe(nil)); end + + # Edit a user of a group. + # + # @example + # Gitlab.edit_group_member(1, 2, 40) + # @param team_id [Integer] The group id of member to edit. + # @param user_id [Integer] The user id of the user to edit. + # @param access_level [Integer] Project access level. + # @return [Gitlab::ObjectifiedHash] Information about edited team member. + # + # source://gitlab//lib/gitlab/client/groups.rb#169 + def edit_group_member(team_id, user_id, access_level); end + + # Gets a single group. + # + # @example + # Gitlab.group(42) + # @option options + # @option options + # @param id [Integer] The ID of a group. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/groups.rb#31 + def group(id, options = T.unsafe(nil)); end + + # Get a list of group members that are billable. + # + # @example + # Gitlab.group_billable_members(1) + # Gitlab.group_billable_members(1, { per_page: 40 }) + # @option options + # @option options + # @param id [Integer] The ID of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#119 + def group_billable_members(id, options = T.unsafe(nil)); end + + # Gets single group custom_attribute. + # + # @example + # Gitlab.group_custom_attribute('key', 2) + # @param key [String] The custom_attributes key + # @param group_id [Integer] The ID of a group. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/groups.rb#327 + def group_custom_attribute(key, group_id); end + + # Gets group custom_attributes. + # + # @example + # Gitlab.group_custom_attributes(2) + # @param group_id [Integer] The ID of a group. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/groups.rb#315 + def group_custom_attributes(group_id); end + + # Get a list of descendant groups of a group. + # + # @example + # Gitlab.group_descendants(42) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param id [Integer] the ID of a group + # @param options [Hash] A customizable set of options. + # @return [Array] List of all subgroups under a group + # + # source://gitlab//lib/gitlab/client/groups.rb#104 + def group_descendants(id, options = T.unsafe(nil)); end + + # Gets a list of issues of a group. + # + # @example + # Gitlab.group_issues(5) + # @param group_id [Integer, String] The ID or name of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#267 + def group_issues(group, options = T.unsafe(nil)); end + + # Get details of a single group member. + # + # @example + # Gitlab.group_member(1, 10) + # @param team_id [Integer] The ID of the group to find a member in. + # @param user_id [Integer] The user id of the member to find. + # @return [Gitlab::ObjectifiedHash] (id, username, name, email, state, access_level ...) + # + # source://gitlab//lib/gitlab/client/groups.rb#131 + def group_member(team_id, user_id); end + + # Get a list of group members. + # + # @example + # Gitlab.group_members(1) + # Gitlab.group_members(1, { per_page: 40 }) + # @option options + # @option options + # @param id [Integer] The ID of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#70 + def group_members(id, options = T.unsafe(nil)); end + + # Gets a list of merge requests of a group. + # + # @example + # Gitlab.group_merge_requests(5) + # @param group_id [Integer, String] The ID or name of a group. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#143 + def group_merge_requests(group, options = T.unsafe(nil)); end + + # Get a list of projects under a group + # + # @example + # Gitlab.group_projects(1) + # @param id [Integer] The ID of a group + # @return [Array] List of projects under a group + # + # source://gitlab//lib/gitlab/client/groups.rb#218 + def group_projects(id, options = T.unsafe(nil)); end + + # Search for groups by name + # + # @example + # Gitlab.group_search('gitlab') + # @option options + # @option options + # @param search [String] A string to search for in group names and paths. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#207 + def group_search(search, options = T.unsafe(nil)); end + + # Get a list of subgroups under a group + # + # @example + # Gitlab.group_subgroups(1) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param id [Integer] the ID of a group + # @param options [Hash] A customizable set of options. + # @return [Array] List of subgroups under a group + # + # source://gitlab//lib/gitlab/client/groups.rb#236 + def group_subgroups(id, options = T.unsafe(nil)); end + + # Gets a list of groups. + # + # @example + # Gitlab.groups + # Gitlab.groups({ per_page: 40, page: 2 }) + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#17 + def groups(options = T.unsafe(nil)); end + + # Removes user from user group. + # + # @example + # Gitlab.remove_group_member(1, 2) + # @param team_id [Integer] The group ID. + # @param user_id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] Information about removed team member. + # + # source://gitlab//lib/gitlab/client/groups.rb#181 + def remove_group_member(team_id, user_id); end + + # Sync group with LDAP + # + # @example + # Gitlab.sync_ldap_group(1) + # @param id [Integer] The ID or name of a group. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/groups.rb#278 + def sync_ldap_group(id); end + + # Transfers a project to a group + # + # @example + # Gitlab.transfer_project_to_group(3, 50) + # @param id [Integer] The ID of a group. + # @param project_id [Integer] The ID of a project. + # + # source://gitlab//lib/gitlab/client/groups.rb#192 + def transfer_project_to_group(id, project_id); end +end + +# Defines methods related to issue links. +# +# @see https://docs.gitlab.com/ee/api/issue_links.html +# +# source://gitlab//lib/gitlab/client/issue_links.rb#6 +module Gitlab::Client::IssueLinks + # Creates a new issue link. + # + # @example + # Gitlab.create_issue_link(6, 1, 6, 2) + # @param project [Integer, String] The ID or name of a project. + # @param issue [Integer] The ID of an issue. + # @param target_project_id [Integer] Project ID the target issue is located in. + # @param target_issue_iid [Integer] The ID of the target issue. + # @return [Gitlab::ObjectifiedHash] Information about created link. + # + # source://gitlab//lib/gitlab/client/issue_links.rb#31 + def create_issue_link(project, issue, target_project_id, target_issue_iid); end + + # Deletes an issue link. + # + # @example + # Gitlab.delete_issue_link(5, 10, 123) + # @param project [Integer] The ID of a project. + # @param issue [Integer] The ID of an issue. + # @param id [Integer] The ID of a link. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/issue_links.rb#44 + def delete_issue_link(project, issue, id); end + + # Gets a list of links for a issue. + # + # @example + # Gitlab.issue_links(5, 10) + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param issue [Integer] The ID of an issue. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/issue_links.rb#17 + def issue_links(project, issue, options = T.unsafe(nil)); end +end + +# Defines methods related to issues. +# +# @see https://docs.gitlab.com/ce/api/issues.html +# +# source://gitlab//lib/gitlab/client/issues.rb#6 +module Gitlab::Client::Issues + # Adds spent time for an issue + # + # @example + # Gitlab.estimate_time_of_issue(3, 42, '3h30m') + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @param duration [String] The time spent in human format. e.g: 3h30m + # + # source://gitlab//lib/gitlab/client/issues.rb#183 + def add_time_spent_on_issue(project, id, duration); end + + # Closes an issue. + # + # @example + # Gitlab.close_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @return [Gitlab::ObjectifiedHash] Information about closed issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#86 + def close_issue(project, id); end + + # Creates a new issue. + # + # @example + # Gitlab.create_issue(5, 'New issue') + # Gitlab.create_issue(5, 'New issue', { description: 'This is a new issue', assignee_id: 42 }) + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param title [String] The title of an issue. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#54 + def create_issue(project, title, options = T.unsafe(nil)); end + + # Deletes an issue. + # Only for admins and project owners + # + # @example + # Gitlab.delete_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @return [Gitlab::ObjectifiedHash] Information about deleted issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#135 + def delete_issue(project, id); end + + # Updates an issue. + # + # @example + # Gitlab.edit_issue(6, 1, { title: 'Updated title' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#74 + def edit_issue(project, id, options = T.unsafe(nil)); end + + # Sets an estimated time of work for an issue. + # + # @example + # Gitlab.estimate_time_of_issue(3, 42, '3h30m') + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @param duration [String] The duration in human format. e.g: 3h30m + # + # source://gitlab//lib/gitlab/client/issues.rb#160 + def estimate_time_of_issue(project, id, duration); end + + # Gets a single issue. + # + # @example + # Gitlab.issue(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/issues.rb#36 + def issue(project, id); end + + # Gets a list of user's issues. + # Will return a list of project's issues if project ID passed. + # + # @example + # Gitlab.issues + # Gitlab.issues(5) + # Gitlab.issues({ per_page: 40 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/issues.rb#20 + def issues(project = T.unsafe(nil), options = T.unsafe(nil)); end + + # List merge requests that will close issue on merge + # + # @example + # Gitlab.merge_requests_closing_issue_on_merge(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#227 + def merge_requests_closing_issue_on_merge(project, id); end + + # Move an issue. + # + # @example + # Gitlab.move_issue(3, 42, { to_project_id: '4' }) + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about moved issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#148 + def move_issue(project, id, options = T.unsafe(nil)); end + + # Get participants on issue + # + # @example + # @gitlab.participants_on_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#216 + def participants_on_issue(project, id); end + + # Reopens an issue. + # + # @example + # Gitlab.reopen_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @return [Gitlab::ObjectifiedHash] Information about reopened issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#98 + def reopen_issue(project, id); end + + # Resets the estimated time for an issue to 0 seconds. + # + # @example + # Gitlab.reset_time_estimate_of_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#171 + def reset_time_estimate_of_issue(project, id); end + + # Resets the total spent time for this issue to 0 seconds. + # + # @example + # Gitlab.reset_time_spent_on_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#194 + def reset_time_spent_on_issue(project, id); end + + # Subscribe to an issue. + # + # @example + # Gitlab.subscribe_to_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @return [Gitlab::ObjectifiedHash] Information about subscribed issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#110 + def subscribe_to_issue(project, id); end + + # Get time tracking stats for an issue + # + # @example + # @gitlab.time_stats_for_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#205 + def time_stats_for_issue(project, id); end + + # Unsubscribe from an issue. + # + # @example + # Gitlab.unsubscribe_from_issue(3, 42) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of an issue. + # @return [Gitlab::ObjectifiedHash] Information about unsubscribed issue. + # + # source://gitlab//lib/gitlab/client/issues.rb#122 + def unsubscribe_from_issue(project, id); end +end + +# Defines methods related to projects. +# +# @see https://docs.gitlab.com/ee/api/jobs.html +# +# source://gitlab//lib/gitlab/client/jobs.rb#6 +module Gitlab::Client::Jobs + # Download a single artifact file from specific tag or branch + # + # @example + # Gitlab.download_branch_artifact_file(1, "master", "some/release/file.pdf", 'pdf') + # @param project_id(required) [Integer, String] The ID or name of a project. + # @param ref_name(required) [String] Branch or tag name in repository. HEAD or SHA references are not supported. + # @param artifact_path(required) [String] Path to a file inside the artifacts archive. + # @param job(required) [String] The name of the job. + # @return [Gitlab::FileResponse] + # + # source://gitlab//lib/gitlab/client/jobs.rb#138 + def download_branch_artifact_file(project_id, ref_name, artifact_path, job); end + + # Download a single artifact file by job ID + # + # @example + # Gitlab.download_job_artifact_file(1, 5, "some/release/file.pdf") + # @param project_id(required) [Integer, String] The ID or name of a project. + # @param job_id(required) [String] The unique job identifier. + # @param artifact_path(required) [String] Path to a file inside the artifacts archive. + # @return [Gitlab::FileResponse] + # + # source://gitlab//lib/gitlab/client/jobs.rb#115 + def download_job_artifact_file(project_id, job_id, artifact_path); end + + # Download a single artifact file from specific tag or branch + # + # @example + # Gitlab.download_branch_artifact_file(1, "master", "some/release/file.pdf", 'pdf') + # @param project_id(required) [Integer, String] The ID or name of a project. + # @param ref_name(required) [String] Branch or tag name in repository. HEAD or SHA references are not supported. + # @param artifact_path(required) [String] Path to a file inside the artifacts archive. + # @param job(required) [String] The name of the job. + # @return [Gitlab::FileResponse] + # + # source://gitlab//lib/gitlab/client/jobs.rb#138 + def download_tag_artifact_file(project_id, ref_name, artifact_path, job); end + + # Gets a single job + # + # @example + # Gitlab.job(1, 2) + # Gitlab.job("project", 2) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # + # source://gitlab//lib/gitlab/client/jobs.rb#62 + def job(project_id, job_id); end + + # Gets artifacts from a job + # + # @example + # Gitlab.job_artifacts(1, 2) + # Gitlab.job_artifacts("project", 2) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#75 + def job_artifacts(project_id, job_id); end + + # Delete Artifacts + # Deletes the artifacts associated with a job. + # + # @example + # Gitlab.job_artifacts_delete(1,1) + # Gitlab.job_artifacts_delete("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#246 + def job_artifacts_delete(project_id, job_id); end + + # Download Job Artifact + # + # @example + # Gitlab.job_artifacts_download(1, "master", "release") + # Gitlab.job_artifacts_download("project", "master", "release") + # @param project_id [Integer, String] The ID or name of a project. + # @param ref [String] Ref Name + # @param job [String] jobname + # @return [Gitlab::FileResponse] + # + # source://gitlab//lib/gitlab/client/jobs.rb#92 + def job_artifacts_download(project_id, ref_name, job_name); end + + # Keep Artifacts + # Prevents artifacts from being deleted when expiration is set. + # + # @example + # Gitlab.job_artifacts_keep(1,1) + # Gitlab.job_artifacts_keep("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#232 + def job_artifacts_keep(project_id, job_id); end + + # Cancel a job + # + # @example + # Gitlab.job_cancel(1,1) + # Gitlab.job_cancel("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#178 + def job_cancel(project_id, job_id); end + + # Erase Job + # + # @example + # Gitlab.job_erase(1,1) + # Gitlab.job_erase("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#204 + def job_erase(project_id, job_id); end + + # Play a Job + # Triggers a manual action to start a job. + # + # @example + # Gitlab.job_play(1,1) + # Gitlab.job_play("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#218 + def job_play(project_id, job_id); end + + # Retry a job + # + # @example + # Gitlab.job_retry(1,1) + # Gitlab.job_retry("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#191 + def job_retry(project_id, job_id); end + + # Get Job Trace + # + # @example + # Gitlab.job_trace(1,1) + # Gitlab.job_trace("project", 1) + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the job + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#162 + def job_trace(project_id, job_id); end + + # Gets a list of Jobs for a Project + # + # @example + # Gitlab.jobs(1) + # Gitlab.jobs("project") + # Gitlab.jobs("project", {scope: ["manual", "success"], per_page: 100 }) + # @option options + # @option options + # @option options + # @param id [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#20 + def jobs(project_id, options = T.unsafe(nil)); end + + # Gets a list of Bridge Jobs from a pipeline + # + # @example + # Gitlab.pipeline_bridges(1, 2) + # Gitlab.pipeline_bridges("project", 2) + # @option options + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the pipeline + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#50 + def pipeline_bridges(project_id, pipeline_id, options = T.unsafe(nil)); end + + # Gets a list of Jobs from a pipeline + # + # @example + # Gitlab.pipeline_jobs(1, 2) + # Gitlab.pipeline_jobs("project", 2) + # @option options + # @param The [Integer, String] ID or name of a project. + # @param the [Integer] id of the pipeline + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/jobs.rb#35 + def pipeline_jobs(project_id, pipeline_id, options = T.unsafe(nil)); end +end + +# Defines methods related to keys. +# +# @see https://docs.gitlab.com/ce/api/keys.html +# +# source://gitlab//lib/gitlab/client/keys.rb#6 +module Gitlab::Client::Keys + # Gets information about a key. + # + # @example + # Gitlab.key(1) + # @param id [Integer] The ID of a key. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/keys.rb#14 + def key(id); end + + # Gets information about a key by key fingerprint. + # + # @example + # Gitlab.key_by_fingerprint("9f:70:33:b3:50:4d:9a:a3:ef:ea:13:9b:87:0f:7f:7e") + # @param fingerprint [String] The Fingerprint of a key. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/keys.rb#25 + def key_by_fingerprint(fingerprint); end +end + +# Defines methods related to project labels. +# +# @see https://docs.gitlab.com/ce/api/labels.html +# +# source://gitlab//lib/gitlab/client/labels.rb#6 +module Gitlab::Client::Labels + # Creates a new label. + # + # @example + # Gitlab.create_label(42, "Backlog", '#DD10AA') + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of a label. + # @param color [String] The color of a label. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created label. + # + # source://gitlab//lib/gitlab/client/labels.rb#30 + def create_label(project, name, color, options = T.unsafe(nil)); end + + # Deletes a label. + # + # @example + # Gitlab.delete_label(2, 'Backlog') + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of a label. + # @return [Gitlab::ObjectifiedHash] Information about deleted label. + # + # source://gitlab//lib/gitlab/client/labels.rb#60 + def delete_label(project, name); end + + # Updates a label. + # + # @example + # Gitlab.edit_label(42, "Backlog", { new_name: 'TODO' }) + # Gitlab.edit_label(42, "Backlog", { new_name: 'TODO', color: '#DD10AA' }) + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of a label. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated label. + # + # source://gitlab//lib/gitlab/client/labels.rb#48 + def edit_label(project, name, options = T.unsafe(nil)); end + + # Gets a list of project's labels. + # + # @example + # Gitlab.labels(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/labels.rb#14 + def labels(project, options = T.unsafe(nil)); end + + # Subscribes the user to a label to receive notifications + # + # @example + # Gitlab.subscribe_to_label(2, 'Backlog') + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of a label. + # @return [Gitlab::ObjectifiedHash] Information about the label subscribed to. + # + # source://gitlab//lib/gitlab/client/labels.rb#72 + def subscribe_to_label(project, name); end + + # Unsubscribes the user from a label to not receive notifications from it + # + # @example + # Gitlab.unsubscribe_from_label(2, 'Backlog') + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of a label. + # @return [Gitlab::ObjectifiedHash] Information about the label unsubscribed from. + # + # source://gitlab//lib/gitlab/client/labels.rb#84 + def unsubscribe_from_label(project, name); end +end + +# Defines methods related to lint/validations. +# +# @see https://docs.gitlab.com/ce/api/lint.html +# +# source://gitlab//lib/gitlab/client/lint.rb#6 +module Gitlab::Client::Lint + # Checks if your .gitlab-ci.yml file is valid. + # + # @example + # Gitlab.validate_gitlab_ci_yml("{ \"image\": \"ruby:2.6\", \"services\": [\"postgres\"], \"before_script\": [\"bundle install\", \"bundle exec rake db:create\"], \"variables\": {\"DB_NAME\": \"postgres\"}, \"types\": [\"test\", \"deploy\", \"notify\"], \"rspec\": { \"script\": \"rake spec\", \"tags\": [\"ruby\", \"postgres\"], \"only\": [\"branches\"]}}") + # @param content [String] the .gitlab-ci.yaml content. + # @return [Gitlab::ObjectifiedHash] Returns information about validity of the yml. + # + # source://gitlab//lib/gitlab/client/lint.rb#14 + def validate_gitlab_ci_yml(content); end +end + +# Defines methods related to markdown. +# +# @see https://docs.gitlab.com/ce/api/markdown.html +# +# source://gitlab//lib/gitlab/client/markdown.rb#6 +module Gitlab::Client::Markdown + # Render an arbitrary Markdown document + # + # @example + # Gitlab.markdown('Hello world! :tada:') + # Gitlab.markdown('Hello world! :tada:', gfm: true, project: 'group_example/project_example') + # @option options + # @option options + # @param text [String] The markdown text to render. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Returns the rendered markdown as response + # + # source://gitlab//lib/gitlab/client/markdown.rb#18 + def markdown(text, options = T.unsafe(nil)); end +end + +# Defines methods related to MR Approvals. +# +# @see https://docs.gitlab.com/ee/api/merge_request_approvals.html +# +# source://gitlab//lib/gitlab/client/merge_request_approvals.rb#6 +module Gitlab::Client::MergeRequestApprovals + # Approve a merge request + # + # @example + # Gitlab.approve_merge_request(1, 5) + # Gitlab.approve_merge_request(1, 5, sha: 'fe678da') + # @option options + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge request. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#236 + def approve_merge_request(project, merge_request, options = T.unsafe(nil)); end + + # Create merge request level rule + # + # Important: When approval_project_rule_id is set, the name, users and groups of project-level rule are copied. + # The approvals_required specified is used. + # + # @example + # Gitlab.create_merge_request_level_rule(1, 2, { + # name: "devs", + # approvals_required: 2, + # approval_project_rule_id: 99, + # user_ids: [3, 4], + # group_ids: [5, 6], + # }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge request. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] New MR level approval rule + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#168 + def create_merge_request_level_rule(project, merge_request, options = T.unsafe(nil)); end + + # Create MR Approval Rule for a project + # + # @example + # Gitlab.create_project_merge_request_approval_rule(1, {name: "security", approvals_required: 1}) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] New MR approval rule + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#57 + def create_project_merge_request_approval_rule(project, options = T.unsafe(nil)); end + + # Delete merge request level rule + # + # Important: Deleting a report_approver or code_owner rule is not allowed. + # These are system generated rules. + # + # @example + # Gitlab.delete_merge_request_level_rule(1, 2, 69) + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge request. + # @param appr_rule_id(required) [Integer] The ID of a approval rule + # @return [void] This API call returns an empty response body + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#222 + def delete_merge_request_level_rule(project, merge_request, appr_rule_id); end + + # Delete MR Approval Rule for a project + # + # @example + # Gitlab.delete_project_merge_request_approval_rule(1, 1) + # @param project(required) [Integer] The ID of a project. + # @param approval_rule_id(required) [Integer] The ID of a approval rule + # @return [void] This API call returns an empty response body + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#86 + def delete_project_merge_request_approval_rule(project, approval_rule_id); end + + # Change configuration for approvals on a specific merge request. + # + # @example + # Gitlab.edit_merge_request_approvals(1, 5, approvals_required: 2) + # @option options + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge_request. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Updated MR approval configuration information about the merge request + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#126 + def edit_merge_request_approvals(project, merge_request, options = T.unsafe(nil)); end + + # Change allowed approvers and approver groups for a merge request + # See Gitlab.create_merge_request_level_rule + # + # @deprecated Since Gitlab 13.12 /approvers endpoints are removed!!! + # @example + # Gitlab.edit_merge_request_approvers(1, 5, {approver_ids: [5], approver_groups: [1]}) + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge_request. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#142 + def edit_merge_request_approvers(project, merge_request, options = T.unsafe(nil)); end + + # Change allowed approvers and approver groups for a project + # See Gitlab.create_project_merge_request_approval_rule + # + # @deprecated Since Gitlab 13.12 /approvers endpoints are removed!!! + # @example + # Gitlab.edit_project_approvers(1, {approver_ids: [5], approver_groups: [1]}) + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#101 + def edit_project_approvers(project, options = T.unsafe(nil)); end + + # Change MR Approval Configuration for a project + # + # @example + # Gitlab.edit_project_merge_request_approvals(1, {approvals_before_merge: 3}) + # Gitlab.edit_project_merge_request_approvals(1, {approvals_before_merge: 3, reset_approvals_on_push: true}) + # Gitlab.edit_project_merge_request_approvals(1, {approvals_before_merge: 3, disable_overriding_approvers_per_merge_request: false}) + # @option options + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#30 + def edit_project_merge_request_approvals(project, options = T.unsafe(nil)); end + + # Get the approval state of merge requests + # + # @example + # Gitlab.merge_request_approval_state(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#261 + def merge_request_approval_state(project, id); end + + # Get Configuration for approvals on a specific Merge Request. + # + # @example + # Gitlab.merge_request_approvals(1, 5) + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge_request. + # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the merge request + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#113 + def merge_request_approvals(project, merge_request); end + + # Get merge request level rule + # + # @example + # Gitlab.merge_request_level_rule(1, 2) + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge request. + # @return [Gitlab::ObjectifiedHash] New MR level approval rule + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#180 + def merge_request_level_rule(project, merge_request); end + + # Gets MR Approval Rules for a project + # + # @example + # Gitlab.project_merge_request_approval_rules(1) + # @param project [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] MR approval rules for the project + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#41 + def project_merge_request_approval_rules(project); end + + # Gets MR Approval Configuration for a project + # + # @example + # Gitlab.project_merge_request_approvals(1) + # @param project [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] MR approval configuration information about the project + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#14 + def project_merge_request_approvals(project); end + + # Unapprove a merge request + # + # @example + # Gitlab.unapprove_merge_request(1, 5) + # @option options + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge request. + # @param options [Hash] a customizable set of options + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#249 + def unapprove_merge_request(project, merge_request, options = T.unsafe(nil)); end + + # Update merge request level rule + # + # Important: Approvers and groups not in the users/groups parameters are removed + # Important: Updating a report_approver or code_owner rule is not allowed. + # These are system generated rules. + # + # @example + # Gitlab.update_merge_request_level_rule(1, 2, 69, { + # name: "devs", + # approvals_required: 2, + # user_ids: [3, 4], + # group_ids: [5, 6], + # }) + # @option options + # @option options + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param merge_request(required) [Integer] The IID of a merge request. + # @param appr_rule_id(required) [Integer] The ID of a approval rule + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Updated MR level approval rule + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#206 + def update_merge_request_level_rule(project, merge_request, appr_rule_id, options = T.unsafe(nil)); end + + # Update MR Approval Rule for a project + # + # @example + # Gitlab.update_project_merge_request_approval_rule(1, {name: "security", approvals_required: 2}) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project(required) [Integer] The ID of a project. + # @param approval_rule_id(required) [Integer] The ID of a project Approval Rule + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Updated MR approval rule + # + # source://gitlab//lib/gitlab/client/merge_request_approvals.rb#74 + def update_project_merge_request_approval_rule(project, approval_rule_id, options = T.unsafe(nil)); end +end + +# Defines methods related to merge requests. +# +# @see https://docs.gitlab.com/ce/api/merge_requests.html +# +# source://gitlab//lib/gitlab/client/merge_requests.rb#6 +module Gitlab::Client::MergeRequests + # Accepts a merge request. + # + # @example + # Gitlab.accept_merge_request(5, 42, { merge_commit_message: 'Nice!' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated merge request. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#154 + def accept_merge_request(project, id, options = T.unsafe(nil)); end + + # Creates a merge request. + # + # @example + # Gitlab.create_merge_request(5, 'New merge request', + # { source_branch: 'source_branch', target_branch: 'target_branch' }) + # Gitlab.create_merge_request(5, 'New merge request', + # { source_branch: 'source_branch', target_branch: 'target_branch', assignee_id: 42 }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param title [String] The title of a merge request. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created merge request. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#116 + def create_merge_request(project, title, options = T.unsafe(nil)); end + + # Create new merge request discussion + # + # @example + # Gitlab.create_merge_request_discussion(5, 1, body: 'discuss') + # Gitlab.create_merge_request_discussion('gitlab', 1, body: 'discuss') + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param options [Hash] A customizable set of options. + # * :body (String) The content of a discussion + # * :created_at (String) Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z + # * :position (Hash) Position when creating a diff note + # * :base_sha (String) Base commit SHA in the source branch + # * :start_sha (String) SHA referencing commit in target branch + # * :head_sha (String) SHA referencing HEAD of this merge request + # * :position_type (String) Type of the position reference', allowed values: 'text' or 'image' + # * :new_path (String) File path after change + # * :new_line (Integer) Line number after change (for 'text' diff notes) + # * :old_path (String) File path before change + # * :old_line (Integer) Line number before change (for 'text' diff notes) + # * :width (Integer) Width of the image (for 'image' diff notes) + # * :height (Integer) Height of the image (for 'image' diff notes) + # * :x (Integer) X coordinate (for 'image' diff notes) + # * :y (Integer) Y coordinate (for 'image' diff notes) + # @return [Gitlab::ObjectifiedHash] The created merge request discussion. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#268 + def create_merge_request_discussion(project, merge_request_id, options = T.unsafe(nil)); end + + # Add note to existing merge request discussion + # + # @example + # Gitlab.create_merge_request_discussion_note(5, 1, 1, note_id: 1, body: 'note') + # Gitlab.create_merge_request_discussion_note('gitlab', 1, 1, note_id: 1, body: 'note') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param discussion_id [Integer] The ID of a discussion. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] The merge request discussion note. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#300 + def create_merge_request_discussion_note(project, merge_request_id, discussion_id, options); end + + # Create a new pipeline for a merge request. + # A pipeline created via this endpoint doesnt run a regular branch/tag pipeline. + # It requires .gitlab-ci.yml to be configured with only: [merge_requests] to create jobs. + # + # The new pipeline can be: + # + # A detached merge request pipeline. + # A pipeline for merged results if the project setting is enabled. + # + # @example + # Gitlab.create_merge_request_pipeline(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param iid [Integer] The internal ID of a merge request. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#77 + def create_merge_request_pipeline(project, iid); end + + # Delete a merge request + # + # @example + # Gitlab.delete_merge_request(5, 1) + # Gitlab.delete_merge_request('gitlab', 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Gitlab::ObjectifiedHash] An empty response. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#343 + def delete_merge_request(project, merge_request_id); end + + # Delete a merge request discussion note + # + # @example + # Gitlab.delete_merge_request_discussion_note(5, 1, 1, 1) + # Gitlab.delete_merge_request_discussion_note('gitlab', 1, 1, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param discussion_id [Integer] The ID of a discussion. + # @param note_id [Integer] The ID of a discussion note. + # @return [Gitlab::ObjectifiedHash] An empty response. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#331 + def delete_merge_request_discussion_note(project, merge_request_id, discussion_id, note_id); end + + # Gets a single merge request. + # + # @example + # Gitlab.merge_request(5, 36) + # Gitlab.merge_request(5, 36, { include_diverged_commits_count: true }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#46 + def merge_request(project, id, options = T.unsafe(nil)); end + + # Gets the changes of a merge request. + # + # @example + # Gitlab.merge_request_changes(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Gitlab::ObjectifiedHash] The merge request's changes. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#166 + def merge_request_changes(project, id); end + + # List issues that will close on merge + # + # @example + # Gitlab.merge_request_closes_issues(5, 1) + # @param project [Integer] The ID of a project + # @param iid [Integer] The internal ID of a merge request + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#189 + def merge_request_closes_issues(project_id, merge_request_iid); end + + # Gets the commits of a merge request. + # + # @example + # Gitlab.merge_request_commits(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Array] The merge request's commits. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#178 + def merge_request_commits(project, id); end + + # Gets the diff a single merge request diff version\ + # + # @example + # Gitlab.merge_request_diff_version(5, 1, 1) + # Gitlab.merge_request_diff_version('gitlab', 1, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param id [Integer] The ID of a merge request diff version. + # @return [Gitlab::ObjectifiedHash] Record of the specific diff + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#368 + def merge_request_diff_version(project, merge_request_id, version_id); end + + # Gets a list of merge request diff versions + # + # @example + # Gitlab.merge_request_versions(5, 1) + # Gitlab.merge_request_versions('gitlab', 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Gitlab::ObjectifiedHash] A list of the merge request versions. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#355 + def merge_request_diff_versions(project, merge_request_id); end + + # Get single merge request discussion + # + # @example + # Gitlab.merge_request_discussion(5, 1, 1) + # Gitlab.merge_request_discussion('gitlab', 1, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param discussion_id [Integer] The ID of a discussion. + # @return [Gitlab::ObjectifiedHash] The merge request discussion. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#240 + def merge_request_discussion(project, merge_request_id, discussion_id); end + + # List project merge request discussions + # + # @example + # Gitlab.merge_request_discussions(5, 1) + # Gitlab.merge_request_discussions('gitlab', 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Gitlab::ObjectifiedHash] List of the merge request discussions. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#227 + def merge_request_discussions(project, merge_request_id); end + + # Get a list of merge request participants. + # + # @example + # Gitlab.merge_request_participants(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#89 + def merge_request_participants(project, id); end + + # Gets a list of merge request pipelines. + # + # @example + # Gitlab.merge_request_pipelines(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#58 + def merge_request_pipelines(project, id); end + + # Gets a list of project merge requests. + # + # @example + # Gitlab.merge_requests(5) + # Gitlab.merge_requests(5, { per_page: 40 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#30 + def merge_requests(project, options = T.unsafe(nil)); end + + # Rebase a merge request. + # + # @example + # Gitlab.rebase_merge_request(5, 42, { skip_ci: true }) + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Rebase progress status + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#382 + def rebase_merge_request(project, id, options = T.unsafe(nil)); end + + # Resolve a merge request discussion + # + # @example + # Gitlab.resolve_merge_request_discussion(5, 1, 1, true) + # Gitlab.resolve_merge_request_discussion('gitlab', 1, 1, false) + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param discussion_id [Integer] The ID of a discussion. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] The merge request discussion. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#283 + def resolve_merge_request_discussion(project, merge_request_id, discussion_id, options); end + + # Subscribes to a merge request. + # + # @example + # Gitlab.subscribe_to_merge_request(5, 1) + # Gitlab.subscribe_to_merge_request('gitlab', 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Gitlab::ObjectifiedHash] Information about subscribed merge request. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#202 + def subscribe_to_merge_request(project, id); end + + # Unsubscribes from a merge request. + # + # @example + # Gitlab.unsubscribe_from_merge_request(5, 1) + # Gitlab.unsubscribe_from_merge_request('gitlab', 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @return [Gitlab::ObjectifiedHash] Information about unsubscribed merge request. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#215 + def unsubscribe_from_merge_request(project, id); end + + # Updates a merge request. + # + # @example + # Gitlab.update_merge_request(5, 42, { title: 'New title' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated merge request. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#135 + def update_merge_request(project, id, options = T.unsafe(nil)); end + + # Modify an existing merge request discussion note + # + # @example + # Gitlab.update_merge_request_discussion_note(5, 1, 1, 1, body: 'note') + # Gitlab.update_merge_request_discussion_note('gitlab', 1, 1, 1, body: 'note') + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a merge request. + # @param discussion_id [Integer] The ID of a discussion. + # @param note_id [Integer] The ID of a discussion note. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] The merge request discussion note. + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#317 + def update_merge_request_discussion_note(project, merge_request_id, discussion_id, note_id, options); end + + # Gets a list of all of the merge requests the authenticated user has access to. + # + # @example + # Gitlab.user_merge_requests + # Gitlab.user_merge_requests(state: :opened, scope: :all) + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/merge_requests.rb#15 + def user_merge_requests(options = T.unsafe(nil)); end +end + +# Defines methods related to milestones. +# +# @see https://docs.gitlab.com/ce/api/milestones.html +# +# source://gitlab//lib/gitlab/client/milestones.rb#6 +module Gitlab::Client::Milestones + # Creates a new milestone. + # + # @example + # Gitlab.create_milestone(5, 'v1.0') + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param title [String] The title of a milestone. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created milestone. + # + # source://gitlab//lib/gitlab/client/milestones.rb#72 + def create_milestone(project, title, options = T.unsafe(nil)); end + + # Delete a project milestone. + # + # @example + # Gitlab.delete_milestone(5, 2) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a milestone. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/milestones.rb#102 + def delete_milestone(project, id); end + + # Updates a milestone. + # + # @example + # Gitlab.edit_milestone(5, 2, { state_event: 'activate' }) + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a milestone. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated milestone. + # + # source://gitlab//lib/gitlab/client/milestones.rb#90 + def edit_milestone(project, id, options = T.unsafe(nil)); end + + # Gets a single milestone. + # + # @example + # Gitlab.milestone(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a milestone. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/milestones.rb#29 + def milestone(project, id); end + + # Gets the issues of a given milestone. + # + # @example + # Gitlab.milestone_issues(5, 2) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param milestone [Integer, String] The ID of a milestone. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/milestones.rb#43 + def milestone_issues(project, milestone, options = T.unsafe(nil)); end + + # Gets the merge_requests of a given milestone. + # + # @example + # Gitlab.milestone_merge_requests(5, 2) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param milestone [Integer, String] The ID of a milestone. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/milestones.rb#57 + def milestone_merge_requests(project, milestone, options = T.unsafe(nil)); end + + # Gets a list of project's milestones. + # + # @example + # Gitlab.milestones(5) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/milestones.rb#17 + def milestones(project, options = T.unsafe(nil)); end +end + +# Defines methods related to namespaces +# +# @see https://docs.gitlab.com/ce/api/namespaces.html +# +# source://gitlab//lib/gitlab/client/namespaces.rb#6 +module Gitlab::Client::Namespaces + # Gets a list of namespaces. + # + # @example + # Gitlab.namespaces + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces + # + # source://gitlab//lib/gitlab/client/namespaces.rb#18 + def namespaces(options = T.unsafe(nil)); end +end + +# Defines methods related to notes. +# +# @see https://docs.gitlab.com/ce/api/notes.html +# +# source://gitlab//lib/gitlab/client/notes.rb#6 +module Gitlab::Client::Notes + # Creates a new epic note. + # + # @example + # Gitlab.create_epic_note(6, 1, 'Adding a note to my epic.') + # @param group [Integer, String] The ID or name of a group. + # @param epic [Integer] The ID of an epic. + # @param body [String] The body of a note. + # @return [Gitlab::ObjectifiedHash] Information about created note. + # + # source://gitlab//lib/gitlab/client/notes.rb#188 + def create_epic_note(group, epic, body); end + + # Creates a new issue note. + # + # @example + # Gitlab.create_issue_note(6, 1, 'Adding a note to my issue.') + # @param project [Integer, String] The ID or name of a project. + # @param issue [Integer] The ID of an issue. + # @param body [String] The body of a note. + # @return [Gitlab::ObjectifiedHash] Information about created note. + # + # source://gitlab//lib/gitlab/client/notes.rb#149 + def create_issue_note(project, issue, body); end + + # Creates a new note for a single merge request. + # + # @example + # Gitlab.create_merge_request_note(5, 3, 'This MR is ready for review.') + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge request. + # @param body [String] The content of a note. + # + # source://gitlab//lib/gitlab/client/notes.rb#174 + def create_merge_request_comment(project, merge_request, body); end + + # Creates a new note for a single merge request. + # + # @example + # Gitlab.create_merge_request_note(5, 3, 'This MR is ready for review.') + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge request. + # @param body [String] The content of a note. + # + # source://gitlab//lib/gitlab/client/notes.rb#174 + def create_merge_request_note(project, merge_request, body); end + + # Creates a new wall note. + # + # @example + # Gitlab.create_note(5, 'This is a wall note!') + # @param project [Integer, String] The ID or name of a project. + # @param body [String] The body of a note. + # @return [Gitlab::ObjectifiedHash] Information about created note. + # + # source://gitlab//lib/gitlab/client/notes.rb#136 + def create_note(project, body); end + + # Creates a new snippet note. + # + # @example + # Gitlab.create_snippet_note(3, 2, 'Look at this awesome snippet!') + # @param project [Integer, String] The ID or name of a project. + # @param snippet [Integer] The ID of a snippet. + # @param body [String] The body of a note. + # @return [Gitlab::ObjectifiedHash] Information about created note. + # + # source://gitlab//lib/gitlab/client/notes.rb#162 + def create_snippet_note(project, snippet, body); end + + # Deletes an issue note. + # + # @example + # Gitlab.delete_issue_note(5, 10, 1) + # @param project [Integer] The ID of a project. + # @param issue [Integer] The ID of an issue. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#213 + def delete_issue_note(project, issue, id); end + + # Deletes a merge_request note. + # + # @example + # Gitlab.delete_merge_request_note(5, 11, 3) + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge_request. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#239 + def delete_merge_request_comment(project, merge_request, id); end + + # Deletes a merge_request note. + # + # @example + # Gitlab.delete_merge_request_note(5, 11, 3) + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge_request. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#239 + def delete_merge_request_note(project, merge_request, id); end + + # Deletes a wall note. + # + # @example + # Gitlab.delete_note(5, 15) + # @param project [Integer] The ID of a project. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#200 + def delete_note(project, id); end + + # Deletes a snippet note. + # + # @example + # Gitlab.delete_snippet_note(5, 11, 3) + # @param project [Integer] The ID of a project. + # @param snippet [Integer] The ID of a snippet. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#226 + def delete_snippet_note(project, snippet, id); end + + # Modifies an issue note. + # + # @example + # Gitlab.edit_issue_note(5, 10, 1, 'This is an edited issue note') + # @param project [Integer] The ID of a project. + # @param issue [Integer] The ID of an issue. + # @param id [Integer] The ID of a note. + # @param body [String] The content of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#267 + def edit_issue_note(project, issue, id, body); end + + # Modifies a merge_request note. + # + # @example + # Gitlab.edit_merge_request_note(5, 11, 3, 'This is an edited merge request note') + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge_request. + # @param id [Integer] The ID of a note. + # @param body [String] The content of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#295 + def edit_merge_request_comment(project, merge_request, id, body); end + + # Modifies a merge_request note. + # + # @example + # Gitlab.edit_merge_request_note(5, 11, 3, 'This is an edited merge request note') + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge_request. + # @param id [Integer] The ID of a note. + # @param body [String] The content of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#295 + def edit_merge_request_note(project, merge_request, id, body); end + + # Modifies a wall note. + # + # @example + # Gitlab.edit_note(5, 15, 'This is an edited note') + # @param project [Integer] The ID of a project. + # @param id [Integer] The ID of a note. + # @param body [String] The content of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#253 + def edit_note(project, id, body); end + + # Modifies a snippet note. + # + # @example + # Gitlab.edit_snippet_note(5, 11, 3, 'This is an edited snippet note') + # @param project [Integer] The ID of a project. + # @param snippet [Integer] The ID of a snippet. + # @param id [Integer] The ID of a note. + # @param body [String] The content of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#281 + def edit_snippet_note(project, snippet, id, body); end + + # Gets a list of notes for an epic. + # + # @example + # Gitlab.epic_notes(5, 10) + # @option options + # @option options + # @param project [Integer] The ID of a group. + # @param epic [Integer] The ID of an epic. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/notes.rb#73 + def epic_notes(group, epic, options = T.unsafe(nil)); end + + # Gets a single issue note. + # + # @example + # Gitlab.issue_note(5, 10, 1) + # @param project [Integer] The ID of a project. + # @param issue [Integer] The ID of an issue. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#98 + def issue_note(project, issue, id); end + + # Gets a list of notes for a issue. + # + # @example + # Gitlab.issue_notes(5, 10) + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param issue [Integer] The ID of an issue. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/notes.rb#30 + def issue_notes(project, issue, options = T.unsafe(nil)); end + + # Gets a list of notes for a merge request. + # + # @example + # Gitlab.merge_request_notes(5, 1) + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge request. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/notes.rb#58 + def merge_request_comments(project, merge_request, options = T.unsafe(nil)); end + + # Gets a single merge_request note. + # + # @example + # Gitlab.merge_request_note(5, 11, 3) + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge_request. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#124 + def merge_request_note(project, merge_request, id); end + + # Gets a list of notes for a merge request. + # + # @example + # Gitlab.merge_request_notes(5, 1) + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param merge_request [Integer] The ID of a merge request. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/notes.rb#58 + def merge_request_notes(project, merge_request, options = T.unsafe(nil)); end + + # Gets a single wall note. + # + # @example + # Gitlab.note(5, 15) + # @param project [Integer] The ID of a project. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#85 + def note(project, id); end + + # Gets a list of projects notes. + # + # @example + # Gitlab.notes(5) + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/notes.rb#16 + def notes(project, options = T.unsafe(nil)); end + + # Gets a single snippet note. + # + # @example + # Gitlab.snippet_note(5, 11, 3) + # @param project [Integer] The ID of a project. + # @param snippet [Integer] The ID of a snippet. + # @param id [Integer] The ID of a note. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/notes.rb#111 + def snippet_note(project, snippet, id); end + + # Gets a list of notes for a snippet. + # + # @example + # Gitlab.snippet_notes(5, 1) + # @option options + # @option options + # @param project [Integer] The ID of a project. + # @param snippet [Integer] The ID of a snippet. + # @param options [Hash] a customizable set of options + # @return [Array] + # + # source://gitlab//lib/gitlab/client/notes.rb#44 + def snippet_notes(project, snippet, options = T.unsafe(nil)); end + + private + + # TODO: Remove this method after a couple deprecation cycles. Replace calls with the code + # in the 'else'. + # + # source://gitlab//lib/gitlab/client/notes.rb#304 + def note_content(body); end +end + +# Defines methods related to GitLab Packages. +# +# @see https://docs.gitlab.com/ee/api/packages.html +# +# source://gitlab//lib/gitlab/client/packages.rb#6 +module Gitlab::Client::Packages + # Deletes a project package. + # + # @example + # Gitlab.delete_project_package(5, 3) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] ID of a package. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/packages.rb#78 + def delete_project_package(project, id); end + + # Delete a package file. + # + # @example + # Gitlab.delete_project_file(5, 3, 1) + # @param project [Integer, String] The ID or name of a project. + # @param package_id [Integer] ID of a package. + # @param file_id [Integer] ID of a package file. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/packages.rb#91 + def delete_project_package_file(project, package_id, file_id); end + + # Gets a list of project packages. + # + # @example + # Gitlab.group_packages(5) + # Gitlab.group_packages(5, { package_type: 'npm', sort: 'desc' }) + # @param project [Integer, String] the ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/packages.rb#42 + def group_packages(group, options = T.unsafe(nil)); end + + # Get a single project package. + # + # @example + # Gitlab.project_package(5, 3) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] ID of a package. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/packages.rb#54 + def project_package(project, id); end + + # Get a list of package files of a single package. + # + # @example + # Gitlab.project_package_files(5, 3) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] ID of a package. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/packages.rb#66 + def project_package_files(project, id); end + + # Gets a list of project packages. + # + # @example + # Gitlab.project_packages(5) + # Gitlab.project_packages(5, { package_type: 'npm', sort: 'desc' }) + # @param :project [Integer, String] the ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/packages.rb#22 + def project_packages(project, options = T.unsafe(nil)); end +end + +# Defines methods related to pipeline schedules. +# +# @see https://docs.gitlab.com/ce/api/pipeline_schedules.html +# +# source://gitlab//lib/gitlab/client/pipeline_schedules.rb#6 +module Gitlab::Client::PipelineSchedules + # Create a pipeline schedule. + # + # @example + # Gitlab.create_pipeline_schedule(5, { description: 'example' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#46 + def create_pipeline_schedule(project, options = T.unsafe(nil)); end + + # Create a pipeline schedule variable. + # + # @example + # Gitlab.create_pipeline_schedule_variable(5, 1, { key: 'foo', value: 'bar' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The pipeline schedule ID. + # @param options [Hash] A customizable set of options. + # @return [Array] The created pipeline schedule variable. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#115 + def create_pipeline_schedule_variable(project, pipeline_schedule_id, options = T.unsafe(nil)); end + + # Delete a pipeline schedule. + # + # @example + # Gitlab.delete_pipeline_schedule(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The pipeline schedule ID. + # @return [Gitlab::ObjectifiedHash] The deleted pipeline schedule. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#100 + def delete_pipeline_schedule(project, pipeline_schedule_id); end + + # Delete the variable of a pipeline schedule + # + # @example + # Gitlab.delete_pipeline_schedule_variable(3, 2, "foo") + # @param project [Integer, String] The ID or name of a project. + # @param The [Integer] pipeline schedule ID. + # @param The [String] key of a variable. + # @return [Array] The deleted pipeline schedule variable. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#143 + def delete_pipeline_schedule_variable(project, pipeline_schedule_id, key, _options = T.unsafe(nil)); end + + # Updates the pipeline schedule of a project. + # + # @example + # Gitlab.edit_pipeline_schedule(3, 2, { description: 'example2' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param The [Integer] pipeline schedule ID. + # @param options [Hash] A customizable set of options. + # @return [Array] The updated pipeline schedule. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#64 + def edit_pipeline_schedule(project, pipeline_schedule_id, options = T.unsafe(nil)); end + + # Updates the variable of a pipeline schedule. + # + # @example + # Gitlab.edit_pipeline_schedule_variable(3, 2, "foo" { value: 'bar' }) + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param The [Integer] pipeline schedule ID. + # @param The [String] key of a variable. + # @param options [Hash] A customizable set of options. + # @return [Array] The updated pipeline schedule variable. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#130 + def edit_pipeline_schedule_variable(project, pipeline_schedule_id, key, options = T.unsafe(nil)); end + + # Gets a single pipeline schedule. + # + # @example + # Gitlab.pipeline_schedule(5, 3) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of the pipeline schedule. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#29 + def pipeline_schedule(project, id); end + + # Take ownership of a pipeline schedule. + # + # @example + # Gitlab.pipeline_schedule_take_ownership(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The pipeline schedule ID. + # @return [Gitlab::ObjectifiedHash] The updated pipeline schedule. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#76 + def pipeline_schedule_take_ownership(project, pipeline_schedule_id); end + + # Gets a list of project pipeline schedules. + # + # @example + # Gitlab.pipeline_schedules(5) + # Gitlab.pipeline_schedules(5, { scope: 'active' }) + # @param project [Integer, String] the ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#17 + def pipeline_schedules(project, options = T.unsafe(nil)); end + + # Run a scheduled pipeline immediately. + # + # @example + # Gitlab.run_pipeline_schedule(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The pipeline schedule ID. + # @return [Gitlab::ObjectifiedHash] Pipeline created message. + # + # source://gitlab//lib/gitlab/client/pipeline_schedules.rb#88 + def run_pipeline_schedule(project, pipeline_schedule_id); end +end + +# Defines methods related to pipelines. +# +# @see https://docs.gitlab.com/ce/api/pipeline_triggers.html +# @see https://docs.gitlab.com/ce/ci/triggers/README.html +# +# source://gitlab//lib/gitlab/client/pipeline_triggers.rb#7 +module Gitlab::Client::PipelineTriggers + # Create a pipeline trigger for a project. + # + # @example + # Gitlab.create_trigger(5, description: "my description") + # @param project [Integer, String] The ID or name of a project. + # @param description [String] The trigger name + # @return [Gitlab::ObjectifiedHash] The created trigger. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#39 + def create_trigger(project, description); end + + # Remove a project's pipeline trigger. + # + # @example + # Gitlab.remove_trigger(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The trigger ID. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#77 + def delete_trigger(project, trigger_id); end + + # Remove a project's pipeline trigger. + # + # @example + # Gitlab.remove_trigger(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The trigger ID. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#77 + def remove_trigger(project, trigger_id); end + + # Run the given project pipeline trigger. + # + # @example + # Gitlab.run_trigger(5, '7b9148c158980bbd9bcea92c17522d', 'master') + # Gitlab.run_trigger(5, '7b9148c158980bbd9bcea92c17522d', 'master', { variable1: "value", variable2: "value2" }) + # @param project [Integer, String] The ID or name of the project. + # @param token [String] The token of a trigger. + # @param ref [String] Branch or tag name to build. + # @param variables [Hash] A set of build variables to use for the build. (optional) + # @return [Gitlab::ObjectifiedHash] The trigger. + # @see https://docs.gitlab.com/ce/ci/triggers/README.html + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#95 + def run_trigger(project, token, ref, variables = T.unsafe(nil)); end + + # Gets details of project's pipeline trigger. + # + # @example + # Gitlab.trigger(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The trigger ID. + # @return [Gitlab::ObjectifiedHash] The trigger. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#27 + def trigger(project, trigger_id); end + + # Take ownership of a project trigger + # + # @example + # Gitlab.trigger_take_ownership(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The trigger ID. + # @return [Gitlab::ObjectifiedHash] The updated trigger. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#65 + def trigger_take_ownership(project, trigger_id); end + + # Gets a list of the project's pipeline triggers + # + # @example + # Gitlab.triggers(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] The list of triggers. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#15 + def triggers(project); end + + # Update a project trigger + # + # @example + # Gitlab.update_trigger(5, 1, description: "my description") + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param trigger_id [Integer] The trigger ID. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] The updated trigger. + # + # source://gitlab//lib/gitlab/client/pipeline_triggers.rb#53 + def update_trigger(project, trigger_id, options = T.unsafe(nil)); end +end + +# Defines methods related to pipelines. +# +# @see https://docs.gitlab.com/ce/api/pipelines.html +# +# source://gitlab//lib/gitlab/client/pipelines.rb#6 +module Gitlab::Client::Pipelines + # Cancels a pipeline. + # + # @example + # Gitlab.cancel_pipeline(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a pipeline. + # @return [Gitlab::ObjectifiedHash] The pipelines changes. + # + # source://gitlab//lib/gitlab/client/pipelines.rb#77 + def cancel_pipeline(project, id); end + + # Create a pipeline. + # + # @example + # Gitlab.create_pipeline(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param ref [String] Reference to commit. + # @param variables [Hash] Variables passed to pipelines + # @return [Gitlab::ObjectifiedHash] The pipelines changes. + # + # source://gitlab//lib/gitlab/client/pipelines.rb#55 + def create_pipeline(project, ref, variables = T.unsafe(nil)); end + + # Delete a pipeline + # + # @example + # Gitlab.delete_pipeline(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a pipeline. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/pipelines.rb#101 + def delete_pipeline(project, id); end + + # Gets a single pipeline. + # + # @example + # Gitlab.pipeline(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a pipeline. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/pipelines.rb#30 + def pipeline(project, id); end + + # Gets a single pipeline's test report. + # + # @example + # Gitlab.pipeline_test_report(5, 36) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a pipeline. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/pipelines.rb#42 + def pipeline_test_report(project, id); end + + # Gets a list of project pipelines. + # + # @example + # Gitlab.pipelines(5) + # Gitlab.pipelines(5, { per_page: 10, page: 2 }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/pipelines.rb#18 + def pipelines(project, options = T.unsafe(nil)); end + + # Retry a pipeline. + # + # @example + # Gitlab.retry_pipeline(5, 1) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a pipeline. + # @return [Array] The pipelines changes. + # + # source://gitlab//lib/gitlab/client/pipelines.rb#89 + def retry_pipeline(project, id); end +end + +# Defines methods related to project badges. +# +# @see https://docs.gitlab.com/ee/api/project_badges.html +# +# source://gitlab//lib/gitlab/client/project_badges.rb#6 +module Gitlab::Client::ProjectBadges + # Adds a badge to a project. + # + # @example + # Gitlab.add_project_badge(5, { link_url: 'https://abc.com/gitlab/gitlab-ce/commits/master', image_url: 'https://shields.io/my/badge1' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the added project badge. + # + # source://gitlab//lib/gitlab/client/project_badges.rb#40 + def add_project_badge(project, options = T.unsafe(nil)); end + + # Updates a badge of a project.. + # + # @example + # Gitlab.edit_project_badge(5, 1, { link_url: 'https://abc.com/gitlab/gitlab-ce/commits/master', image_url: 'https://shields.io/my/badge1' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param badge_id [Integer] The badge ID. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the updated project badge. + # + # source://gitlab//lib/gitlab/client/project_badges.rb#55 + def edit_project_badge(project, badge_id, options = T.unsafe(nil)); end + + # Preview a badge from a project. + # + # @example + # Gitlab.preview_project_badge(3, 'https://abc.com/gitlab/gitlab-ce/commits/master', 'https://shields.io/my/badge1') + # @param project [Integer, String] The ID or name of a project. + # @param :link_url [String] URL of the badge link + # @param :image_url [String] URL of the badge image + # @return [Gitlab::ObjectifiedHash] Returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation. + # + # source://gitlab//lib/gitlab/client/project_badges.rb#80 + def preview_project_badge(project, link_url, image_url); end + + # Gets a badge of a project. + # + # @example + # Gitlab.project_badge(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param badge_id [Integer] The badge ID. + # @return [Gitlab::ObjectifiedHash] Information about the requested badge + # + # source://gitlab//lib/gitlab/client/project_badges.rb#26 + def project_badge(project, badge_id); end + + # Gets a list of a projects badges and its group badges. + # + # @example + # Gitlab.project_badges(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] List of all badges of a project + # + # source://gitlab//lib/gitlab/client/project_badges.rb#14 + def project_badges(project); end + + # Removes a badge from a project. Only projects badges will be removed by using this endpoint. + # + # @example + # Gitlab.remove_project_badge(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param badge_id [Integer] The badge ID. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/project_badges.rb#67 + def remove_project_badge(project, badge_id); end +end + +# Defines methods related to project clusters. +# +# @see https://docs.gitlab.com/ce/api/project_clusters.html +# +# source://gitlab//lib/gitlab/client/project_clusters.rb#6 +module Gitlab::Client::ProjectClusters + # Adds an existing Kubernetes cluster to the project. + # + # @example + # Gitlab.add_project_cluster(5, 'cluster-5', { enabled: false, platform_kubernetes_attributes: { api_url: 'https://35.111.51.20', token: '12345', ca_cert: "-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----", namespace: 'cluster-5-namespace', authorization_type: 'rbac' } }) + # Gitlab.add_project_cluster(5, 'cluster-5', { platform_kubernetes_attributes: { api_url: 'https://35.111.51.20', token: '12345' } }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param name [String] The name of the existing cluster. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the added project cluster. + # + # source://gitlab//lib/gitlab/client/project_clusters.rb#47 + def add_project_cluster(project, name, options = T.unsafe(nil)); end + + # Deletes an existing project cluster. + # + # @example + # Gitlab.delete_project_cluster(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param cluster_id [Integer] The ID of the cluster. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/project_clusters.rb#79 + def delete_project_cluster(project, cluster_id); end + + # Updates an existing project cluster. + # + # @example + # Gitlab.edit_project_cluster(5, 1, { name: 'cluster-6', platform_kubernetes_attributes: { api_url: 'https://35.111.51.20', token: '12345', ca_cert: "-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----", namespace: 'cluster-6-namespace' } }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param cluster_id [Integer] The ID of the cluster. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the updated project cluster. + # + # source://gitlab//lib/gitlab/client/project_clusters.rb#67 + def edit_project_cluster(project, cluster_id, options = T.unsafe(nil)); end + + # Gets a single project cluster. + # + # @example + # Gitlab.project_cluster(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param cluster_id [Integer] The ID of the cluster. + # @return [Gitlab::ObjectifiedHash] Information about the requested cluster + # + # source://gitlab//lib/gitlab/client/project_clusters.rb#26 + def project_cluster(project, cluster_id); end + + # Returns a list of project clusters. + # + # @example + # Gitlab.project_clusters(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] List of all clusters of a project + # + # source://gitlab//lib/gitlab/client/project_clusters.rb#14 + def project_clusters(project); end +end + +# Defines methods related to project release links. +# +# @see https://docs.gitlab.com/ce/api/releases/links.html +# +# source://gitlab//lib/gitlab/client/project_release_links.rb#6 +module Gitlab::Client::ProjectReleaseLinks + # Create an asset as a link from a Release. + # + # @example + # Gitlab.create_project_release_link(5, 'v0.1', { name: 'awesome-v0.2.dmg', url: 'http://192.168.10.15:3000' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag associated with the Release. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the created release link. + # + # source://gitlab//lib/gitlab/client/project_release_links.rb#43 + def create_project_release_link(project, tag_name, options = T.unsafe(nil)); end + + # Delete an asset as a link from a Release. + # + # @example + # Gitlab.delete_project_release_link(5, 'v0.3', 1) + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag where the release will be created from. + # @param link_id [Integer] The id of the link. + # @return [Gitlab::ObjectifiedHash] Information about the deleted release link. + # + # source://gitlab//lib/gitlab/client/project_release_links.rb#72 + def delete_project_release_link(project, tag_name, link_id); end + + # Get an asset as link from a Release. + # + # @example + # Gitlab.project_release_link(5, 'v0.3', 1) + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag associated with the Release. + # @param link_id [Integer] The id of the link. + # @return [Gitlab::ObjectifiedHash] Information about the release link + # + # source://gitlab//lib/gitlab/client/project_release_links.rb#28 + def project_release_link(project, tag_name, link_id); end + + # Get assets as links from a Release. + # + # @example + # Gitlab.project_release_links(5, 'v0.3') + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag associated with the Release. + # @return [Array] List of assets as links from a Release. + # + # source://gitlab//lib/gitlab/client/project_release_links.rb#15 + def project_release_links(project, tag_name); end + + # Update an asset as a link from a Release. You have to specify at least one of name or url + # + # @example + # Gitlab.update_project_release_link(5, 'v0.3', 1, { name: 'awesome-v0.2.dmg', url: 'http://192.168.10.15:3000' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag where the release will be created from. + # @param link_id [Integer] The id of the link. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the updated release link. + # + # source://gitlab//lib/gitlab/client/project_release_links.rb#59 + def update_project_release_link(project, tag_name, link_id, options = T.unsafe(nil)); end +end + +# Defines methods related to project releases. +# +# @see https://docs.gitlab.com/ce/api/releases/ +# +# source://gitlab//lib/gitlab/client/project_releases.rb#6 +module Gitlab::Client::ProjectReleases + # Creates a Release. You need push access to the repository to create a Release. + # + # @example + # Gitlab.create_project_release(5, { name: 'New Release', tag_name: 'v0.3', description: 'Super nice release' }) + # Gitlab.create_project_release(5, { name: 'New Release', tag_name: 'v0.3', description: 'Super nice release', assets: { links: [{ name: 'hoge', url: 'https://google.com' }] } }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the created release. + # + # source://gitlab//lib/gitlab/client/project_releases.rb#48 + def create_project_release(project, options = T.unsafe(nil)); end + + # Delete a Release. Deleting a Release will not delete the associated tag. + # + # @example + # Gitlab.delete_project_release(5, 'v0.3') + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag where the release will be created from. + # @return [Gitlab::ObjectifiedHash] Information about the deleted release. + # + # source://gitlab//lib/gitlab/client/project_releases.rb#75 + def delete_project_release(project, tag_name); end + + # Gets a Release by a tag name + # + # @example + # Gitlab.project_release(5, 'v0.1') + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag where the release will be created from.. + # @return [Gitlab::ObjectifiedHash] Information about the release + # + # source://gitlab//lib/gitlab/client/project_releases.rb#26 + def project_release(project, tag_name); end + + # Returns Paginated list of a project's releases, sorted by created_at. + # + # @example + # Gitlab.project_releases(5) + # @param project [Integer, String] The ID or name of a project. + # @return [Array] Paginated list of Releases, sorted by created_at. + # + # source://gitlab//lib/gitlab/client/project_releases.rb#14 + def project_releases(project); end + + # Updates a release. + # + # @example + # Gitlab.update_project_release(5, 'v0.3', { name: 'New Release', description: 'Super nice release' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The tag where the release will be created from. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the updated release. + # + # source://gitlab//lib/gitlab/client/project_releases.rb#63 + def update_project_release(project, tag_name, options = T.unsafe(nil)); end +end + +# Defines methods related to projects. +# +# @see https://docs.gitlab.com/ce/api/projects.html +# +# source://gitlab//lib/gitlab/client/projects.rb#6 +module Gitlab::Client::Projects + # Creates a new custom_attribute + # + # @example + # Gitlab.add_custom_attribute('some_new_key', 'some_new_value', 2) + # @param key [String] The custom_attributes key + # @param value [String] The custom_attributes value + # @param project_id [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#679 + def add_project_custom_attribute(key, value, project_id); end + + # Adds a new hook to the project. + # + # @example + # Gitlab.add_project_hook(42, 'https://api.example.net/v1/webhooks/ci') + # @param project [Integer, String] The ID or path of a project. + # @param url [String] The hook URL. + # @param options [Hash] A customizable set of options. + # @param option [Boolean] :push_events Trigger hook on push events (0 = false, 1 = true) + # @param option [Boolean] :issues_events Trigger hook on issues events (0 = false, 1 = true) + # @param option [Boolean] :merge_requests_events Trigger hook on merge_requests events (0 = false, 1 = true) + # @param option [Boolean] :tag_push_events Trigger hook on push_tag events (0 = false, 1 = true) + # @return [Gitlab::ObjectifiedHash] Information about added hook. + # + # source://gitlab//lib/gitlab/client/projects.rb#224 + def add_project_hook(project, url, options = T.unsafe(nil)); end + + # Adds a project push rule. + # + # @example + # Gitlab.add_push_rule(42, { deny_delete_tag: false, commit_message_regex: '\\b[A-Z]{3}-[0-9]+\\b' }) + # @param id [Integer] The ID of a project. + # @param options [Hash] A customizable set of options. + # @param option [Boolean] :deny_delete_tag Do not allow users to remove git tags with git push (0 = false, 1 = true) + # @param option [String] :commit_message_regex Commit message regex + # @return [Gitlab::ObjectifiedHash] Information about added push rule. + # @see https://docs.gitlab.com/ee/api/projects.html#add-project-push-rule + # + # source://gitlab//lib/gitlab/client/projects.rb#283 + def add_push_rule(id, options = T.unsafe(nil)); end + + # Adds a user to project team. + # + # @example + # Gitlab.add_team_member('gitlab', 2, 40) + # Gitlab.add_team_member('gitlab', 2, 40, { expires_at: "2018-12-31"}) + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a user. + # @param access_level [Integer] The access level to project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about added team member. + # + # source://gitlab//lib/gitlab/client/projects.rb#148 + def add_team_member(project, id, access_level, options = T.unsafe(nil)); end + + # Gets a list of all project team members including inherited members. + # + # @example + # Gitlab.all_members(42) + # Gitlab.all_members('gitlab') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#120 + def all_members(project, options = T.unsafe(nil)); end + + # Archives a project. + # + # @example + # Gitlab.archive_project(4) + # @param id [Integer, String] The ID or path of a project. + # @return [Gitlab::ObjectifiedHash] Information about archived project. + # + # source://gitlab//lib/gitlab/client/projects.rb#632 + def archive_project(id); end + + # Creates a new deploy key. + # + # @example + # Gitlab.create_deploy_key(42, 'My Key', 'Key contents', can_push: true) + # @param project [Integer, String] The ID or path of a project. + # @param title [String] The title of a deploy key. + # @param key [String] The content of a deploy key. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created deploy key. + # + # source://gitlab//lib/gitlab/client/projects.rb#374 + def create_deploy_key(project, title, key, options = T.unsafe(nil)); end + + # Forks a project into the user namespace. + # + # @example + # Gitlab.create_fork(42) + # Gitlab.create_fork(42, { sudo: 'another_username' }) + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about the forked project. + # + # source://gitlab//lib/gitlab/client/projects.rb#438 + def create_fork(id, options = T.unsafe(nil)); end + + # Creates a new project. + # + # @example + # Gitlab.create_project('gitlab') + # Gitlab.create_project('viking', { description: 'Awesome project' }) + # Gitlab.create_project('Red', { wall_enabled: false }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] The name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created project. + # + # source://gitlab//lib/gitlab/client/projects.rb#76 + def create_project(name, options = T.unsafe(nil)); end + + # Deletes a deploy key from project. + # + # @example + # Gitlab.delete_deploy_key(42, 1) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a deploy key. + # @return [Gitlab::ObjectifiedHash] Information about deleted deploy key. + # + # source://gitlab//lib/gitlab/client/projects.rb#424 + def delete_deploy_key(project, id); end + + # Deletes a project. + # + # @example + # Gitlab.delete_project(4) + # @param id [Integer, String] The ID or path of a project. + # @return [Gitlab::ObjectifiedHash] Information about deleted project. + # + # source://gitlab//lib/gitlab/client/projects.rb#88 + def delete_project(id); end + + # Delete custom_attribute + # Will delete a custom_attribute + # + # @example + # Gitlab.delete_project_custom_attribute('somekey', 2) + # @param key [String] The custom_attribute key to delete + # @param project_id [Integer] The ID of a project. + # @return [Boolean] + # + # source://gitlab//lib/gitlab/client/projects.rb#693 + def delete_project_custom_attribute(key, project_id = T.unsafe(nil)); end + + # Deletes a hook from project. + # + # @example + # Gitlab.delete_project_hook('gitlab', 4) + # @param project [Integer, String] The ID or path of a project. + # @param id [String] The ID of the hook. + # @return [Gitlab::ObjectifiedHash] Information about deleted hook. + # + # source://gitlab//lib/gitlab/client/projects.rb#256 + def delete_project_hook(project, id); end + + # Deletes a push rule from a project. + # + # @example + # Gitlab.delete_push_rule(42) + # @param id [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] Information about deleted push rule. + # @see https://docs.gitlab.com/ee/api/projects.html#delete-project-push-rule + # + # source://gitlab//lib/gitlab/client/projects.rb#310 + def delete_push_rule(id); end + + # Gets a single project deploy key. + # + # @example + # Gitlab.deploy_key(42, 1) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a deploy key. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#360 + def deploy_key(project, id); end + + # Gets a project deploy keys. + # + # @example + # Gitlab.deploy_keys(42) + # @option options + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#348 + def deploy_keys(project, options = T.unsafe(nil)); end + + # Disables a deploy key at the project. + # + # @example + # Gitlab.disable_deploy_key(42, 66) + # @param project [Integer, String] The ID or path of a project. + # @param key [Integer] The ID of a deploy key. + # @return [Gitlab::ObjectifiedHash] Information about the disabled deploy key. + # + # source://gitlab//lib/gitlab/client/projects.rb#398 + def disable_deploy_key(project, key); end + + # Updates an existing deploy key. + # + # @example + # Gitlab.edit_deploy_key(42, 66, 'New key name', can_push: false) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a deploy key. + # @param title [String] The title of a deploy key. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created deploy key. + # + # source://gitlab//lib/gitlab/client/projects.rb#412 + def edit_deploy_key(project, id, title, options = T.unsafe(nil)); end + + # Updates an existing project. + # + # (Any provided options will be passed to Gitlab. See {https://docs.gitlab.com/ce/api/projects.html#edit-project Gitlab docs} for all valid options) + # + # @example + # Gitlab.edit_project(42) + # Gitlab.edit_project(42, { name: 'Project Name' }) + # Gitlab.edit_project('project-name', { name: 'New Project Name', path: 'new-project-patth' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param options [Hash] A customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about the edited project. + # + # source://gitlab//lib/gitlab/client/projects.rb#475 + def edit_project(id, options = T.unsafe(nil)); end + + # Updates a project hook URL. + # + # @example + # Gitlab.edit_project_hook(42, 1, 'https://api.example.net/v1/webhooks/ci') + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of the hook. + # @param url [String] The hook URL. + # @param options [Hash] A customizable set of options. + # @param option [Boolean] :push_events Trigger hook on push events (0 = false, 1 = true) + # @param option [Boolean] :issues_events Trigger hook on issues events (0 = false, 1 = true) + # @param option [Boolean] :merge_requests_events Trigger hook on merge_requests events (0 = false, 1 = true) + # @param option [Boolean] :tag_push_events Trigger hook on push_tag events (0 = false, 1 = true) + # @return [Gitlab::ObjectifiedHash] Information about updated hook. + # + # source://gitlab//lib/gitlab/client/projects.rb#243 + def edit_project_hook(project, id, url, options = T.unsafe(nil)); end + + # Updates a project push rule. + # + # @example + # Gitlab.edit_push_rule(42, { deny_delete_tag: false, commit_message_regex: '\\b[A-Z]{3}-[0-9]+\\b' }) + # @param id [Integer] The ID of a project. + # @param options [Hash] A customizable set of options. + # @param option [Boolean] :deny_delete_tag Do not allow users to remove git tags with git push (0 = false, 1 = true) + # @param option [String] :commit_message_regex Commit message regex + # @return [Gitlab::ObjectifiedHash] Information about updated push rule. + # @see https://docs.gitlab.com/ee/api/projects.html#edit-project-push-rule + # + # source://gitlab//lib/gitlab/client/projects.rb#298 + def edit_push_rule(id, options = T.unsafe(nil)); end + + # Updates a team member's project access level. + # + # @example + # Gitlab.edit_team_member('gitlab', 3, 20) + # Gitlab.edit_team_member('gitlab', 3, 20, { expires_at: "2018-12-31"}) + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a user. + # @param access_level [Integer] The access level to project. + # @param options [Hash] A customizable set of options. + # @return [Array] Information about updated team member. + # + # source://gitlab//lib/gitlab/client/projects.rb#165 + def edit_team_member(project, id, access_level, options = T.unsafe(nil)); end + + # Enables a deploy key at the project. + # + # @example + # Gitlab.enable_deploy_key(42, 66) + # @param project [Integer, String] The ID or path of a project. + # @param key [Integer] The ID of a deploy key. + # @return [Gitlab::ObjectifiedHash] Information about the enabled deploy key. + # + # source://gitlab//lib/gitlab/client/projects.rb#386 + def enable_deploy_key(project, key); end + + # Mark this project as forked from the other + # + # @example + # Gitlab.make_forked(42, 24) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of the project it is forked from. + # @return [Gitlab::ObjectifiedHash] Information about the forked project. + # + # source://gitlab//lib/gitlab/client/projects.rb#322 + def make_forked_from(project, id); end + + # Gets information about a project. + # + # @example + # Gitlab.project(3) + # Gitlab.project('gitlab') + # @param id [Integer, String] The ID or path of a project. + # @param options [string] :license Include project license data + # @param options [string] :statistics Include project statistics. + # @param options [string] :with_custom_attributes Include custom attributes in response. (admins only) + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#51 + def project(id, options = T.unsafe(nil)); end + + # Gets single project custom_attribute. + # + # @example + # Gitlab.project_custom_attribute(key, 2) + # @param key [String] The custom_attributes key + # @param project_id [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#666 + def project_custom_attribute(key, project_id); end + + # Gets project custom_attributes. + # + # @example + # Gitlab.project_custom_attributes(2) + # @param project_id [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#654 + def project_custom_attributes(project_id); end + + # List project deploy tokens + # + # @example + # Gitlab.project_deploy_tokens(42) + # @option options + # @param id [Integer, String] The ID or path of a project. + # @param options [Hash] a customizable set of options + # + # source://gitlab//lib/gitlab/client/projects.rb#704 + def project_deploy_tokens(project, options = T.unsafe(nil)); end + + # Get a list of all visible projects across GitLab for the authenticated user. + # When accessed without authentication, only public projects are returned. + # + # Note: This feature was introduced in GitLab 10.1 + # + # @example + # Gitlab.project_forks(42) + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#456 + def project_forks(id, options = T.unsafe(nil)); end + + # Gets a project hook. + # + # @example + # Gitlab.project_hook(42, 5) + # Gitlab.project_hook('gitlab', 5) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a hook. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#207 + def project_hook(project, id); end + + # Gets a list of project hooks. + # + # @example + # Gitlab.project_hooks(42) + # Gitlab.project_hooks('gitlab') + # @option options + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#194 + def project_hooks(project, options = T.unsafe(nil)); end + + # Search for projects by name. + # + # @example + # Gitlab.project_search('gitlab') + # Gitlab.project_search('gitlab', { order_by: 'last_activity_at' }) + # Gitlab.search_projects('gitlab', { order_by: 'name', sort: 'asc' }) + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#35 + def project_search(query, options = T.unsafe(nil)); end + + # Get one project template of a particular type + # + # @example + # Gitlab.project_template(1, 'dockerfiles', 'dockey') + # Gitlab.project_template(1, 'licenses', 'gpl', { project: 'some project', fullname: 'Holder Holding' }) + # @option options + # @option options + # @param project [Integer, String] The ID or URL-encoded path of the project. + # @param type [String] The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses) of the template + # @param key [String] The key of the template, as obtained from the collection endpoint + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ce/api/project_templates.html + # + # source://gitlab//lib/gitlab/client/projects.rb#621 + def project_template(project, type, key, options = T.unsafe(nil)); end + + # Get all project templates of a particular type + # + # @example + # Gitlab.project_templates(1, 'dockerfiles') + # Gitlab.project_templates(1, 'licenses') + # @param id [Integer, String] The ID or URL-encoded path of the project. + # @param type [String] The type (dockerfiles|gitignores|gitlab_ci_ymls|licenses) of the template + # @return [Array] + # @see https://docs.gitlab.com/ce/api/project_templates.html + # + # source://gitlab//lib/gitlab/client/projects.rb#603 + def project_templates(project, type); end + + # Gets a list of projects owned by the authenticated user. + # + # (Any provided options will be passed to Gitlab. See {https://docs.gitlab.com/ce/api/projects.html#list-all-projects Gitlab docs} for all valid options) + # + # @example + # Gitlab.projects + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#18 + def projects(options = T.unsafe(nil)); end + + # Gets a project push rule. + # + # @example + # Gitlab.push_rule(42) + # @param id [Integer] The ID of a project. + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ee/api/projects.html#show-project-push-rules + # + # source://gitlab//lib/gitlab/client/projects.rb#268 + def push_rule(id); end + + # Remove a forked_from relationship for a project. + # + # @example + # Gitlab.remove_forked(42) + # @param project [Integer, String] The ID or path of a project. + # @param project [Integer] The ID of the project it is forked from + # @return [Gitlab::ObjectifiedHash] Information about the forked project. + # + # source://gitlab//lib/gitlab/client/projects.rb#334 + def remove_forked(project); end + + # Removes a user from project team. + # + # @example + # Gitlab.remove_team_member('gitlab', 2) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a user. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about removed team member. + # + # source://gitlab//lib/gitlab/client/projects.rb#179 + def remove_team_member(project, id); end + + # Search for projects by name. + # + # @example + # Gitlab.project_search('gitlab') + # Gitlab.project_search('gitlab', { order_by: 'last_activity_at' }) + # Gitlab.search_projects('gitlab', { order_by: 'name', sort: 'asc' }) + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#35 + def search_projects(query, options = T.unsafe(nil)); end + + # Share project with group. + # + # @example + # Gitlab.share_project_with_group('gitlab', 2, 40) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a group. + # @param group_access [Integer] The access level to project. + # + # source://gitlab//lib/gitlab/client/projects.rb#487 + def share_project_with_group(project, id, group_access); end + + # Stars a project. + # + # @example + # Gitlab.star_project(42) + # Gitlab.star_project('gitlab-org/gitlab-ce') + # @param id [Integer, String] The ID or path of a project. + # @return [Gitlab::ObjectifiedHash] Information about starred project. + # @see https://docs.gitlab.com/ce/api/projects.html#star-a-project + # + # source://gitlab//lib/gitlab/client/projects.rb#524 + def star_project(id); end + + # Gets a project team member. + # + # @example + # Gitlab.team_member('gitlab', 2) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a project team member. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/projects.rb#132 + def team_member(project, id); end + + # Gets a list of project team members. + # + # @example + # Gitlab.team_members(42) + # Gitlab.team_members('gitlab') + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or path of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/projects.rb#104 + def team_members(project, options = T.unsafe(nil)); end + + # Transfer a project to a new namespace. + # + # @example + # Gitlab.transfer_project(42, 'yolo') + # @param project [Integer, String] The ID or path of a project + # @param namespace [Integer, String] The ID or path of the namespace to transfer to project to + # @return [Gitlab::ObjectifiedHash] Information about transfered project. + # + # source://gitlab//lib/gitlab/client/projects.rb#511 + def transfer_project(project, namespace); end + + # Unarchives a project. + # + # @example + # Gitlab.unarchive_project(4) + # @param id [Integer, String] The ID or path of a project. + # @return [Gitlab::ObjectifiedHash] Information about unarchived project. + # + # source://gitlab//lib/gitlab/client/projects.rb#643 + def unarchive_project(id); end + + # Unshare project with group. + # + # @example + # Gitlab.unshare_project_with_group('gitlab', 2) + # @param project [Integer, String] The ID or path of a project. + # @param id [Integer] The ID of a group. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/projects.rb#499 + def unshare_project_with_group(project, id); end + + # Unstars a project. + # + # @example + # Gitlab.unstar_project(42) + # Gitlab.unstar_project('gitlab-org/gitlab-ce') + # @param id [Integer, String] The ID or path of a project. + # @return [Gitlab::ObjectifiedHash] Information about unstarred project. + # @see https://docs.gitlab.com/ce/api/projects.html#unstar-a-project + # + # source://gitlab//lib/gitlab/client/projects.rb#537 + def unstar_project(id); end + + # Uploads a file to the specified project to be used in an issue or + # merge request description, or a comment. + # + # @example + # Gitlab.upload_file(1, '/full/path/to/avatar.jpg') + # @param id [Integer, String] The ID or path of a project. + # @param file_fullpath [String] The fullpath of the file you are interested to upload. + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ee/api/projects.html#upload-a-file + # + # source://gitlab//lib/gitlab/client/projects.rb#589 + def upload_file(id, file_fullpath); end + + # Get a list of visible projects for the given user. + # + # @example + # Gitlab.user_projects(1) + # Gitlab.user_projects(1, { order_by: 'last_activity_at' }) + # Gitlab.user_projects('username', { order_by: 'name', sort: 'asc' }) + # @option options + # @option options + # @option options + # @option options + # @param user_id [Integer, String] The ID or username of the user. + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ee/api/projects.html#list-user-projects + # + # source://gitlab//lib/gitlab/client/projects.rb#575 + def user_projects(user_id, options = T.unsafe(nil)); end + + # Get a list of visible projects that the given user has starred. + # + # @example + # Gitlab.user_starred_projects(1) + # Gitlab.user_starred_projects(1, { order_by: 'last_activity_at' }) + # Gitlab.user_starred_projects('username', { order_by: 'name', sort: 'asc' }) + # @option options + # @option options + # @option options + # @option options + # @param user_id [Integer, String] The ID or username of the user. + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ee/api/projects.html#list-projects-starred-by-a-user + # + # source://gitlab//lib/gitlab/client/projects.rb#556 + def user_starred_projects(user_id, options = T.unsafe(nil)); end +end + +# Defines methods related to Protected Tags. +# +# @see https://docs.gitlab.com/ce/api/protected_tags.html +# +# source://gitlab//lib/gitlab/client/protected_tags.rb#6 +module Gitlab::Client::ProtectedTags + # Protects a single repository tag or several project repository tags using a wildcard protected tag. + # + # @example + # Gitlab.protect_repository_tag(1, 'release-1-0') + # Gitlab.protect_repository_tag(1, 'release-1-0', create_access_level: 30) + # @option options + # @param project(required) [Integer, String] The ID or name of a project. + # @param name(required) [String] The name of the tag or wildcard + # @param options [Hash] a customizable set of options + # @return [Gitlab::ObjectifiedHash] Information about the protected repository tag + # + # source://gitlab//lib/gitlab/client/protected_tags.rb#42 + def protect_repository_tag(project, name, options = T.unsafe(nil)); end + + # Gets a single protected tag or wildcard protected tag. + # + # @example + # Gitlab.protected_tag(1, 'release-1-0') + # @param project(required) [Integer, String] The ID or name of a project. + # @param name(required) [String] The name of the tag or wildcard + # @return [Gitlab::ObjectifiedHash] Information about the requested protected tag + # + # source://gitlab//lib/gitlab/client/protected_tags.rb#28 + def protected_tag(project, name); end + + # Gets a list of protected tags from a project + # + # @example + # Gitlab.protected_tags(1) + # @option options + # @option options + # @param project(required) [Integer, String] The ID or name of a project. + # @param options [Hash] a customizable set of options + # @return [Array] List of all protected tags requested + # + # source://gitlab//lib/gitlab/client/protected_tags.rb#16 + def protected_tags(project, options = T.unsafe(nil)); end + + # Unprotects the given protected tag or wildcard protected tag. + # + # @example + # Gitlab.unprotect_repository_tag(1, 'release-1-0') + # @param project(required) [Integer, String] The ID or name of a project. + # @param name(required) [String] The name of the tag or wildcard + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/protected_tags.rb#55 + def unprotect_repository_tag(project, name); end +end + +# Defines methods related to remote mirrors. +# +# @see https://docs.gitlab.com/ee/api/remote_mirrors.html +# +# source://gitlab//lib/gitlab/client/remote_mirrors.rb#6 +module Gitlab::Client::RemoteMirrors + # Create a remote mirror + # + # @example + # Gitlab.create_remote_mirror(42, 'https://mirror-bot@gitlab.com/gitlab-org/gitlab.git', enabled: true) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param url [String] The full URL of the remote repository. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/remote_mirrors.rb#31 + def create_remote_mirror(project, url, options = T.unsafe(nil)); end + + # Update a remote mirror's attributes + # + # @example + # Gitlab.edit_remote_mirror(42, 66, only_protected_branches: true) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of the remote mirror. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/remote_mirrors.rb#47 + def edit_remote_mirror(project, id, options = T.unsafe(nil)); end + + # List a project's remote mirrors + # + # @example + # Gitlab.remote_mirrors(42) + # Gitlab.remote_mirrors('gitlab-org/gitlab') + # @param project [Integer, String] The ID or name of a project. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/remote_mirrors.rb#15 + def remote_mirrors(project); end +end + +# Defines methods related to repositories. +# +# @see https://docs.gitlab.com/ce/api/repositories.html +# +# source://gitlab//lib/gitlab/client/repositories.rb#6 +module Gitlab::Client::Repositories + # Compares branches, tags or commits. + # + # @example + # Gitlab.compare(42, 'master', 'feature/branch') + # Gitlab.repo_compare(42, 'master', 'feature/branch') + # @param project [Integer] The ID of a project. + # @param from [String] The commit SHA or branch name of from branch. + # @param to [String] The commit SHA or branch name of to branch. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repositories.rb#58 + def compare(project, from, to); end + + # Get project repository contributors. + # + # @example + # Gitlab.contributors(42) + # Gitlab.contributors(42, { order: 'name' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/repositories.rb#87 + def contributors(project, options = T.unsafe(nil)); end + + # Generate changelog data + # + # @example + # Gitlab.generate_changelog(42, 'v1.0.0') + # Gitlab.generate_changelog(42, 'v1.0.0', branch: 'main') + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project + # @param version [String] The version to generate the changelog for + # @param options [Hash] A customizable set of options + # @return [bool] + # + # source://gitlab//lib/gitlab/client/repositories.rb#109 + def generate_changelog(project, version, options = T.unsafe(nil)); end + + # Get changelog data + # + # @example + # Gitlab.get_changelog(42, 'v1.0.0') + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project + # @param version [String] The version to generate the changelog for + # @param options [Hash] A customizable set of options + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repositories.rb#126 + def get_changelog(project, version, options = T.unsafe(nil)); end + + # Get the common ancestor for 2 refs (commit SHAs, branch names or tags). + # + # @example + # Gitlab.merge_base(42, ['master', 'feature/branch']) + # Gitlab.merge_base(42, ['master', 'feature/branch']) + # @param project [Integer, String] The ID or URL-encoded path of the project. + # @param refs [Array] Array containing 2 commit SHAs, branch names, or tags. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repositories.rb#72 + def merge_base(project, refs); end + + # Get project repository archive + # + # @example + # Gitlab.repo_archive(42) + # Gitlab.repo_archive(42, 'deadbeef') + # @param project [Integer, String] The ID or name of a project. + # @param ref [String] The commit sha, branch, or tag to download. + # @param format [String] The archive format. Options are: tar.gz (default), tar.bz2, tbz, tbz2, tb2, bz2, tar, and zip + # @return [Gitlab::FileResponse] + # + # source://gitlab//lib/gitlab/client/repositories.rb#34 + def repo_archive(project, ref = T.unsafe(nil), format = T.unsafe(nil)); end + + # Compares branches, tags or commits. + # + # @example + # Gitlab.compare(42, 'master', 'feature/branch') + # Gitlab.repo_compare(42, 'master', 'feature/branch') + # @param project [Integer] The ID of a project. + # @param from [String] The commit SHA or branch name of from branch. + # @param to [String] The commit SHA or branch name of to branch. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repositories.rb#58 + def repo_compare(project, from, to); end + + # Get project repository contributors. + # + # @example + # Gitlab.contributors(42) + # Gitlab.contributors(42, { order: 'name' }) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/repositories.rb#87 + def repo_contributors(project, options = T.unsafe(nil)); end + + # Get file tree project (root level). + # + # @example + # Gitlab.tree(42) + # Gitlab.tree(42, { path: 'Gemfile' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repositories.rb#19 + def repo_tree(project, options = T.unsafe(nil)); end + + # Get file tree project (root level). + # + # @example + # Gitlab.tree(42) + # Gitlab.tree(42, { path: 'Gemfile' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repositories.rb#19 + def tree(project, options = T.unsafe(nil)); end +end + +# Defines methods related to repository files. +# +# @see https://docs.gitlab.com/ce/api/repository_files.html +# +# source://gitlab//lib/gitlab/client/repository_files.rb#8 +module Gitlab::Client::RepositoryFiles + # Creates a new repository file. + # + # @example + # Gitlab.create_file(42, "path", "branch", "content", "commit message") + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param path [String] full path to new file. + # @param branch [String] the name of the branch. + # @param content [String] file content. + # @param commit_message [String] ...commit message. + # @param options [Hash] Optional additional details for commit + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#73 + def create_file(project, path, branch, content, commit_message, options = T.unsafe(nil)); end + + # Edits an existing repository file. + # + # @example + # Gitlab.edit_file(42, "path", "branch", "content", "commit message") + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param path [String] full path of file to update. + # @param branch [String] the name of the branch to commit changes to. + # @param content [String] new file content. + # @param commit_message [String] ...commit message. + # @param options [Hash] Optional additional details for commit + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#94 + def edit_file(project, path, branch, content, commit_message, options = T.unsafe(nil)); end + + # Get the contents of a file + # + # @example + # Gitlab.file_contents(42, 'Gemfile') + # Gitlab.repo_file_contents(3, 'Gemfile', 'ed899a2f4b50b4370feeea94676502b42383c746') + # @param project [Integer, String] The ID or name of a project. + # @param filepath [String] The relative path of the file in the repository + # @param ref [String] The name of a repository branch or tag or if not given the default branch. + # @return [String] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#19 + def file_contents(project, filepath, ref = T.unsafe(nil)); end + + # Gets a repository file. + # + # @example + # Gitlab.get_file(42, "README.md", "master") + # @param project [Integer, String] The ID or name of a project. + # @param file_path [String] The full path of the file. + # @param ref [String] The name of branch, tag or commit. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#53 + def get_file(project, file_path, ref); end + + # Get file blame from repository + # + # @example + # Gitlab.get_file_blame(42, "README.md", "master") + # @param project [Integer, String] The ID or name of a project. + # @param file_path [String] The full path of the file. + # @param ref [String] The name of branch, tag or commit. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#38 + def get_file_blame(project, file_path, ref); end + + # Removes an existing repository file. + # + # @example + # Gitlab.remove_file(42, "path", "branch", "commit message") + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param path [String] full path of file to delete. + # @param branch [String] the name of the branch to commit the deletion to. + # @param commit_message [String] ...a commit message ;) + # @param options [Hash] Optional additional details for commit + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#114 + def remove_file(project, path, branch, commit_message, options = T.unsafe(nil)); end + + # Get the contents of a file + # + # @example + # Gitlab.file_contents(42, 'Gemfile') + # Gitlab.repo_file_contents(3, 'Gemfile', 'ed899a2f4b50b4370feeea94676502b42383c746') + # @param project [Integer, String] The ID or name of a project. + # @param filepath [String] The relative path of the file in the repository + # @param ref [String] The name of a repository branch or tag or if not given the default branch. + # @return [String] + # + # source://gitlab//lib/gitlab/client/repository_files.rb#19 + def repo_file_contents(project, filepath, ref = T.unsafe(nil)); end + + private + + # source://gitlab//lib/gitlab/client/repository_files.rb#124 + def encoded_content_attributes(content); end +end + +# Defines methods related to repository submodules. +# +# @see https://docs.gitlab.com/ce/api/repository_submodules.html +# +# source://gitlab//lib/gitlab/client/repository_submodules.rb#6 +module Gitlab::Client::RepositorySubmodules + # Edits an existing repository submodule. + # + # @example + # Gitlab.edit_file(42, "submodule", { + # branch: "branch", + # commit_sha: "3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88", + # commit_message: "commit message" + # }) + # @param project [Integer, String] The ID or name of a project. + # @param submodule [String] full path of submodule to update. + # @param options [Hash] A customizable set of options. + # @param options [String] :branch the name of the branch to commit changes to. + # @param options [String] :commit_sha commit SHA to update the submodule to. + # @param options [String] :commit_message commit message text. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/repository_submodules.rb#23 + def edit_submodule(project, submodule, options = T.unsafe(nil)); end +end + +# Defines methods related to resource label events. +# +# @see https://docs.gitlab.com/ee/api/resource_label_events.html +# +# source://gitlab//lib/gitlab/client/resource_label_events.rb#6 +module Gitlab::Client::ResourceLabelEvents + # Returns a single label event for a specific group epic + # + # @example + # Gitlab.epic_label_event(5, 42, 1) + # @param group [Integer, String] The ID or name of a group. + # @param epic_id [Integer] The ID of an epic. + # @param id [Integer] The ID of a label event. + # @return Gitlab::ObjectifiedHash + # + # source://gitlab//lib/gitlab/client/resource_label_events.rb#53 + def epic_label_event(group, epic_id, id); end + + # Gets a list of all label events for a single epic. + # + # @example + # Gitlab.epic_label_events(5, 42) + # @param group [Integer, String] The ID or name of a group. + # @param epic_id [Integer] The ID of an epic. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/resource_label_events.rb#40 + def epic_label_events(group, epic_id); end + + # Returns a single label event for a specific project issue + # + # @example + # Gitlab.issue_label_event(5, 42, 1) + # @param project [Integer, String] The ID or name of a project. + # @param issue_iid [Integer] The IID of an issue. + # @param id [Integer] The ID of a label event. + # @return Gitlab::ObjectifiedHash + # + # source://gitlab//lib/gitlab/client/resource_label_events.rb#28 + def issue_label_event(project, issue_iid, id); end + + # Gets a list of all label events for a single issue. + # + # @example + # Gitlab.issue_label_events(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param issue_iid [Integer] The IID of an issue. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/resource_label_events.rb#15 + def issue_label_events(project, issue_iid); end + + # Returns a single label event for a specific project merge request + # + # @example + # Gitlab.merge_request_label_event(5, 42, 1) + # @param project [Integer, String] The ID or name of a project. + # @param merge_request_iid [Integer] The IID of an merge request. + # @param id [Integer] The ID of a label event. + # @return Gitlab::ObjectifiedHash + # + # source://gitlab//lib/gitlab/client/resource_label_events.rb#78 + def merge_request_label_event(project, merge_request_iid, id); end + + # Gets a list of all label events for a single merge request. + # + # @example + # Gitlab.merge_request_label_events(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param merge_request_iid [Integer] The IID of a merge request. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/resource_label_events.rb#65 + def merge_request_label_events(project, merge_request_iid); end +end + +# Defines methods related to resource state events. +# +# @see https://docs.gitlab.com/ee/api/resource_state_events.html +# +# source://gitlab//lib/gitlab/client/resource_state_events.rb#6 +module Gitlab::Client::ResourceStateEvents + # Returns a single state event for a specific project issue + # + # @example + # Gitlab.issue_state_event(5, 42, 1) + # @param project [Integer, String] The ID or name of a project. + # @param issue_iid [Integer] The IID of an issue. + # @param id [Integer] The ID of a resource event. + # @return Gitlab::ObjectifiedHash + # + # source://gitlab//lib/gitlab/client/resource_state_events.rb#28 + def issue_state_event(project, issue_iid, id); end + + # Gets a list of all state events for a single issue. + # + # @example + # Gitlab.issue_state_events(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param issue_iid [Integer] The IID of an issue. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/resource_state_events.rb#15 + def issue_state_events(project, issue_iid); end + + # Returns a single state event for a specific project merge request + # + # @example + # Gitlab.merge_request_state_event(5, 42, 1) + # @param project [Integer, String] The ID or name of a project. + # @param merge_request_iid [Integer] The IID of an merge request. + # @param id [Integer] The ID of a state event. + # @return Gitlab::ObjectifiedHash + # + # source://gitlab//lib/gitlab/client/resource_state_events.rb#53 + def merge_request_state_event(project, merge_request_iid, id); end + + # Gets a list of all state events for a single merge request. + # + # @example + # Gitlab.merge_request_state_events(5, 42) + # @param project [Integer, String] The ID or name of a project. + # @param merge_request_iid [Integer] The IID of a merge request. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/resource_state_events.rb#40 + def merge_request_state_events(project, merge_request_iid); end +end + +# Defines methods related to runners. +# +# @see https://docs.gitlab.com/ce/api/runners.html +# +# source://gitlab//lib/gitlab/client/runners.rb#6 +module Gitlab::Client::Runners + # Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with admin privileges. + # + # @example + # Gitlab.all_runners + # Gitlab.all_runners(type: 'instance_type', status: 'active') + # Gitlab.all_runners(tag_list: 'tag1,tag2') + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ce/api/runners.html#list-all-runners + # + # source://gitlab//lib/gitlab/client/runners.rb#37 + def all_runners(options = T.unsafe(nil)); end + + # Deletes a registed Runner. + # + # @example + # Gitlab.delete_registered_runner('9142c16ea169eaaea3d752313a434a6e') + # @param token [String] Runner authentication token. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/runners.rb#194 + def delete_registered_runner(token); end + + # Remove a runner. + # + # @example + # Gitlab.delete_runner(42) + # @param id [Integer, String] The ID of a runner + # @return [nil] This API call returns an empty response body. + # @see https://docs.gitlab.com/ce/api/runners.html#remove-a-runner + # + # source://gitlab//lib/gitlab/client/runners.rb#82 + def delete_runner(id); end + + # List all runners (specific and shared) available in the group as well its ancestor groups. Shared runners are listed if at least one shared runner is defined. + # + # @example + # Gitlab.group_runners(9) + # Gitlab.group_runners(9, type: 'instance_type', status: 'active') + # Gitlab.group_runners(9, tag_list: 'tag1,tag2') + # @option options + # @option options + # @option options + # @param id [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ee/api/runners.html#list-groups-runners + # + # source://gitlab//lib/gitlab/client/runners.rb#162 + def group_runners(group, options = T.unsafe(nil)); end + + # Disable a specific runner from the project. It works only if the project isn't the only project associated with the specified runner. + # + # @example + # Gitlab.project_disable_runner(2, 42) + # @param id [Integer, String] The ID or name of a project. + # @param runner_id [Integer, String] The ID of a runner. + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ce/api/runners.html#disable-a-runner-from-project + # + # source://gitlab//lib/gitlab/client/runners.rb#144 + def project_disable_runner(id, runner_id); end + + # Enable an available specific runner in the project. + # + # @example + # Gitlab.project_enable_runner(2, 42) + # @param id [Integer, String] The ID or name of a project. + # @param id [Integer, String] The ID of a runner. + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ce/api/runners.html#enable-a-runner-in-project + # + # source://gitlab//lib/gitlab/client/runners.rb#130 + def project_enable_runner(project_id, id); end + + # List all runners (specific and shared) available in the project. Shared runners are listed if at least one shared runner is defined and shared runners usage is enabled in the project's settings. + # + # @example + # Gitlab.project_runners(42) + # Gitlab.project_runners(42, type: 'instance_type', status: 'active') + # Gitlab.project_runners(42, tag_list: 'tag1,tag2') + # @option options + # @option options + # @option options + # @param id [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ce/api/runners.html#list-projects-runners + # + # source://gitlab//lib/gitlab/client/runners.rb#117 + def project_runners(project_id, options = T.unsafe(nil)); end + + # Register a new Runner for the instance. + # + # @example + # Gitlab.register_runner('9142c16ea169eaaea3d752313a434a6e') + # Gitlab.register_runner('9142c16ea169eaaea3d752313a434a6e', description: 'Some Description', active: true, locked: false) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param token(required) [String] Registration token. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Response against runner registration + # + # source://gitlab//lib/gitlab/client/runners.rb#182 + def register_runner(token, options = T.unsafe(nil)); end + + # Get details of a runner.. + # + # @example + # Gitlab.runner(42) + # @param id [Integer, String] The ID of a runner + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ce/api/runners.html#get-runners-details + # + # source://gitlab//lib/gitlab/client/runners.rb#49 + def runner(id); end + + # List jobs that are being processed or were processed by specified runner. + # + # @example + # Gitlab.runner_jobs(1) + # Gitlab.runner_jobs(1, status: 'success') + # Gitlab.runner_jobs(1, sort: 'desc') + # @option options + # @option options + # @option options + # @param id [Integer] The ID of a runner. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/runners.rb#99 + def runner_jobs(runner_id, options = T.unsafe(nil)); end + + # Get a list of specific runners available to the user. + # + # @example + # Gitlab.runners + # Gitlab.runners(type: 'instance_type', status: 'active') + # Gitlab.runners(tag_list: 'tag1,tag2') + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # @see https://docs.gitlab.com/ce/api/runners.html#list-owned-runners + # + # source://gitlab//lib/gitlab/client/runners.rb#20 + def runners(options = T.unsafe(nil)); end + + # Update details of a runner. + # + # @example + # Gitlab.update_runner(42, { description: 'Awesome runner' }) + # Gitlab.update_runner(42, { active: false }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param id [Integer, String] The ID of a runner + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # @see https://docs.gitlab.com/ce/api/runners.html#update-runners-details + # + # source://gitlab//lib/gitlab/client/runners.rb#70 + def update_runner(id, options = T.unsafe(nil)); end + + # Validates authentication credentials for a registered Runner. + # + # @example + # Gitlab.verify_auth_registered_runner('9142c16ea169eaaea3d752313a434a6e') + # @param token [String] Runner authentication token. + # @return [nil] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/runners.rb#206 + def verify_auth_registered_runner(token); end +end + +# Defines methods related to global searches, searching in projects and searching in groups. +# +# @see https://docs.gitlab.com/ce/api/search.html +# +# source://gitlab//lib/gitlab/client/search.rb#6 +module Gitlab::Client::Search + # Search globally across the GitLab instance. + # + # @example + # Gitlab.search_globally('projects', 'gitlab') + # Gitlab.search_globally('issues', 'gitlab') + # Gitlab.search_globally('merge_requests', 'gitlab') + # Gitlab.search_globally('milestones', 'gitlab') + # Gitlab.search_globally('snippet_titles', 'gitlab') + # Gitlab.search_globally('snippet_blobs', 'gitlab') + # @param scope [String] The scope to search in. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs. + # @param search [String] The search query. + # @return [Array] Returns a list of responses depending on the requested scope. + # + # source://gitlab//lib/gitlab/client/search.rb#20 + def search_globally(scope, search); end + + # Search within the specified group. + # + # @example + # Gitlab.search_in_group(1, 'projects', 'gitlab') + # Gitlab.search_in_group(1, 'issues', 'gitlab') + # Gitlab.search_in_group(1, 'merge_requests', 'gitlab') + # Gitlab.search_in_group(1, 'milestones', 'gitlab') + # @param group [Integer, String] The ID or name of a group. + # @param scope [String] The scope to search in. Currently these scopes are supported: projects, issues, merge_requests, milestones. + # @param search [String] The search query. + # @return [Array] Returns a list of responses depending on the requested scope. + # + # source://gitlab//lib/gitlab/client/search.rb#37 + def search_in_group(group, scope, search); end + + # Search within the specified project. + # + # @example + # Gitlab.search_in_project(1, 'issues', 'gitlab') + # Gitlab.search_in_project(1, 'merge_requests', 'gitlab') + # Gitlab.search_in_project(1, 'milestones', 'gitlab') + # Gitlab.search_in_project(1, 'notes', 'gitlab') + # Gitlab.search_in_project(1, 'wiki_blobs', 'gitlab') + # Gitlab.search_in_project(1, 'commits', 'gitlab') + # Gitlab.search_in_project(1, 'blobs', 'gitlab') + # @param project [Integer, String] The ID or name of a project. + # @param scope [String] The scope to search in. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs. + # @param search [String] The search query. + # @return [Array] Returns a list of responses depending on the requested scope. + # + # source://gitlab//lib/gitlab/client/search.rb#57 + def search_in_project(project, scope, search, ref = T.unsafe(nil)); end +end + +# Third party services connected to a project. +# +# @see https://docs.gitlab.com/ce/api/services.html +# +# source://gitlab//lib/gitlab/client/services.rb#6 +module Gitlab::Client::Services + # Create/Edit service + # Full service params documentation: https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/services.md + # + # @example + # Gitlab.change_service(42, :redmine, { new_issue_url: 'https://example.com/projects/test_project/issues/new', + # project_url: 'https://example.com/projects/test_project/issues', + # issues_url: 'https://example.com/issues/:id' }) + # @param project [Integer, String] The ID or name of a project. + # @param service [String] A service code name. + # @param params [Hash] A service parameters. + # @return [Boolean] + # + # source://gitlab//lib/gitlab/client/services.rb#19 + def change_service(project, service, params); end + + # Delete service + # + # @example + # Gitlab.delete_service(42, :redmine) + # @param project [Integer, String] The ID or name of a project. + # @param service [String] A service code name. + # @return [Boolean] + # + # source://gitlab//lib/gitlab/client/services.rb#31 + def delete_service(project, service); end + + # Get service + # + # @example + # Gitlab.service(42, :redmine) + # @param project [Integer, String] The ID or name of a project. + # @param service [String] A service code name. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/services.rb#43 + def service(project, service); end + + private + + # source://gitlab//lib/gitlab/client/services.rb#49 + def correct_service_name(service); end +end + +# Defines methods related to sidekiq metrics. +# +# @see https://docs.gitlab.com/ce/api/sidekiq_metrics.html +# +# source://gitlab//lib/gitlab/client/sidekiq.rb#6 +module Gitlab::Client::Sidekiq + # Get a compound response of all the previously mentioned metrics + # + # @example + # Gitlab.sidekiq_compound_metrics + # + # source://gitlab//lib/gitlab/client/sidekiq.rb#35 + def sidekiq_compound_metrics; end + + # Get the current Job Statistics + # + # @example + # Gitlab.sidekiq_job_stats + # + # source://gitlab//lib/gitlab/client/sidekiq.rb#27 + def sidekiq_job_stats; end + + # Get the current Process Metrics + # + # @example + # Gitlab.sidekiq_process_metrics + # + # source://gitlab//lib/gitlab/client/sidekiq.rb#19 + def sidekiq_process_metrics; end + + # Get the current Queue Metrics + # + # @example + # Gitlab.sidekiq_queue_metrics + # + # source://gitlab//lib/gitlab/client/sidekiq.rb#11 + def sidekiq_queue_metrics; end +end + +# Defines methods related to snippets. +# +# @see https://docs.gitlab.com/ce/api/project_snippets.html +# +# source://gitlab//lib/gitlab/client/snippets.rb#6 +module Gitlab::Client::Snippets + # Creates a new snippet. + # + # @example + # Gitlab.create_snippet(42, { title: 'REST', file_name: 'api.rb', code: 'some code', visibility: 'public'}) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created snippet. + # + # source://gitlab//lib/gitlab/client/snippets.rb#46 + def create_snippet(project, options = T.unsafe(nil)); end + + # Deletes a snippet. + # + # @example + # Gitlab.delete_snippet(2, 14) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a snippet. + # @return [Gitlab::ObjectifiedHash] Information about deleted snippet. + # + # source://gitlab//lib/gitlab/client/snippets.rb#76 + def delete_snippet(project, id); end + + # Updates a snippet. + # + # @example + # Gitlab.edit_snippet(42, 34, { file_name: 'README.txt' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a snippet. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated snippet. + # + # source://gitlab//lib/gitlab/client/snippets.rb#64 + def edit_snippet(project, id, options = T.unsafe(nil)); end + + # Gets information about a snippet. + # + # @example + # Gitlab.snippet(2, 14) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a snippet. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/snippets.rb#29 + def snippet(project, id); end + + # Returns raw project snippet content as plain text. + # + # @example + # Gitlab.snippet_content(2, 14) + # @param project [Integer, String] The ID or name of a project. + # @param id [Integer] The ID of a snippet. + # @return [Gitlab::ObjectifiedHash] Information about deleted snippet. + # + # source://gitlab//lib/gitlab/client/snippets.rb#88 + def snippet_content(project, id); end + + # Gets a list of project's snippets. + # + # @example + # Gitlab.snippets(42) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/snippets.rb#17 + def snippets(project, options = T.unsafe(nil)); end +end + +# Defines methods related to system hooks. +# +# @see https://docs.gitlab.com/ce/api/system_hooks.html +# +# source://gitlab//lib/gitlab/client/system_hooks.rb#6 +module Gitlab::Client::SystemHooks + # Adds a new system hook. + # + # @example + # Gitlab.add_hook('http://example.com/hook') + # Gitlab.add_system_hook('https://api.example.net/v1/hook') + # @option options + # @option options + # @param url [String] The hook URL. + # @param options [Hash] Additional options, as allowed by Gitlab API, including but not limited to: + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#33 + def add_hook(url, options = T.unsafe(nil)); end + + # Adds a new system hook. + # + # @example + # Gitlab.add_hook('http://example.com/hook') + # Gitlab.add_system_hook('https://api.example.net/v1/hook') + # @option options + # @option options + # @param url [String] The hook URL. + # @param options [Hash] Additional options, as allowed by Gitlab API, including but not limited to: + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#33 + def add_system_hook(url, options = T.unsafe(nil)); end + + # Deletes a new system hook. + # + # @example + # Gitlab.delete_hook(3) + # Gitlab.delete_system_hook(12) + # @param id [Integer] The ID of a system hook. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#59 + def delete_hook(id); end + + # Deletes a new system hook. + # + # @example + # Gitlab.delete_hook(3) + # Gitlab.delete_system_hook(12) + # @param id [Integer] The ID of a system hook. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#59 + def delete_system_hook(id); end + + # Tests a system hook. + # + # @example + # Gitlab.hook(3) + # Gitlab.system_hook(12) + # @param id [Integer] The ID of a system hook. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#46 + def hook(id); end + + # Gets a list of system hooks. + # + # @example + # Gitlab.hooks + # Gitlab.system_hooks + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#17 + def hooks(options = T.unsafe(nil)); end + + # Tests a system hook. + # + # @example + # Gitlab.hook(3) + # Gitlab.system_hook(12) + # @param id [Integer] The ID of a system hook. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#46 + def system_hook(id); end + + # Gets a list of system hooks. + # + # @example + # Gitlab.hooks + # Gitlab.system_hooks + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/system_hooks.rb#17 + def system_hooks(options = T.unsafe(nil)); end +end + +# Defines methods related to tags. +# +# @see https://docs.gitlab.com/ce/api/tags.html +# +# source://gitlab//lib/gitlab/client/tags.rb#6 +module Gitlab::Client::Tags + # Adds release notes to an existing repository tag. Requires Gitlab >= 8.2.0 + # + # @example + # Gitlab.create_release(3, '1.0.0', 'This is ready for production') + # Gitlab.repo_create_release(5, '1.0.0', 'This is ready for production') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the new tag. + # @param description [String] Release notes with markdown support + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#77 + def create_release(project, tag, description); end + + # Creates a new project repository tag. + # + # @example + # Gitlab.create_tag(42, 'new_tag', 'master') + # Gitlab.create_tag(42, 'v1.0', 'master', 'Release 1.0') + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The name of the new tag. + # @param ref [String] The ref (commit sha, branch name, or another tag) the tag will point to. + # @param message [String] Optional message for tag, creates annotated tag if specified. + # @param description [String] Optional release notes for tag. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#34 + def create_tag(project, tag_name, ref, message = T.unsafe(nil), description = T.unsafe(nil)); end + + # Deletes a repository tag. Requires Gitlab >= 6.8.x + # + # @example + # Gitlab.delete_tag(3, 'api') + # Gitlab.repo_delete_tag(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the tag to delete + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#62 + def delete_tag(project, tag); end + + # Adds release notes to an existing repository tag. Requires Gitlab >= 8.2.0 + # + # @example + # Gitlab.create_release(3, '1.0.0', 'This is ready for production') + # Gitlab.repo_create_release(5, '1.0.0', 'This is ready for production') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the new tag. + # @param description [String] Release notes with markdown support + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#77 + def repo_create_release(project, tag, description); end + + # Creates a new project repository tag. + # + # @example + # Gitlab.create_tag(42, 'new_tag', 'master') + # Gitlab.create_tag(42, 'v1.0', 'master', 'Release 1.0') + # @param project [Integer, String] The ID or name of a project. + # @param tag_name [String] The name of the new tag. + # @param ref [String] The ref (commit sha, branch name, or another tag) the tag will point to. + # @param message [String] Optional message for tag, creates annotated tag if specified. + # @param description [String] Optional release notes for tag. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#34 + def repo_create_tag(project, tag_name, ref, message = T.unsafe(nil), description = T.unsafe(nil)); end + + # Deletes a repository tag. Requires Gitlab >= 6.8.x + # + # @example + # Gitlab.delete_tag(3, 'api') + # Gitlab.repo_delete_tag(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the tag to delete + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#62 + def repo_delete_tag(project, tag); end + + # Gets information about a repository tag. + # + # @example + # Gitlab.tag(3, 'api') + # Gitlab.repo_tag(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the tag. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#48 + def repo_tag(project, tag); end + + # Gets a list of project repository tags. + # + # @example + # Gitlab.tags(42) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/tags.rb#17 + def repo_tags(project, options = T.unsafe(nil)); end + + # Updates the release notes of a given release. Requires Gitlab >= 8.2.0 + # + # @example + # Gitlab.update_release(3, '1.0.0', 'This is even more ready for production') + # Gitlab.repo_update_release(5, '1.0.0', 'This is even more ready for production') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the new tag. + # @param description [String] Release notes with markdown support + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#92 + def repo_update_release(project, tag, description); end + + # Gets information about a repository tag. + # + # @example + # Gitlab.tag(3, 'api') + # Gitlab.repo_tag(5, 'master') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the tag. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#48 + def tag(project, tag); end + + # Gets a list of project repository tags. + # + # @example + # Gitlab.tags(42) + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/tags.rb#17 + def tags(project, options = T.unsafe(nil)); end + + # Updates the release notes of a given release. Requires Gitlab >= 8.2.0 + # + # @example + # Gitlab.update_release(3, '1.0.0', 'This is even more ready for production') + # Gitlab.repo_update_release(5, '1.0.0', 'This is even more ready for production') + # @param project [Integer, String] The ID or name of a project. + # @param tag [String] The name of the new tag. + # @param description [String] Release notes with markdown support + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/tags.rb#92 + def update_release(project, tag, description); end +end + +# Defines methods related to templates. +# +# @see https://docs.gitlab.com/ce/api/templates/dockerfiles.html +# @see https://docs.gitlab.com/ce/api/templates/gitignores.html +# @see https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html +# @see https://docs.gitlab.com/ce/api/templates/licenses.html +# +# source://gitlab//lib/gitlab/client/templates.rb#9 +module Gitlab::Client::Templates + # Get a single Dockerfile template. + # + # @example + # Gitlab.dockerfile_template('Binary') + # @param key [String] The key of the Dockerfile template + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/templates.rb#27 + def dockerfile_template(key); end + + # Get all Dockerfile templates. + # + # @example + # Gitlab.dockerfile_templates + # @return [Array] + # + # source://gitlab//lib/gitlab/client/templates.rb#16 + def dockerfile_templates; end + + # Get a single gitignore template. + # + # @example + # Gitlab.gitignore_template('Ruby') + # @param key [String] The key of the gitignore template + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/templates.rb#48 + def gitignore_template(key); end + + # Get all gitignore templates. + # + # @example + # Gitlab.gitignore_templates + # @return [Array] + # + # source://gitlab//lib/gitlab/client/templates.rb#37 + def gitignore_templates; end + + # Get a single `gitlab_ci.yml` template. + # + # @example + # Gitlab.gitlab_ci_yml_template('Ruby') + # @param key [String] The key of the gitlab_ci_yml template + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/templates.rb#69 + def gitlab_ci_yml_template(key); end + + # Get all `gitlab_ci.yml` templates. + # + # @example + # Gitlab.gitlab_ci_yml_templates + # @return [Array] + # + # source://gitlab//lib/gitlab/client/templates.rb#58 + def gitlab_ci_yml_templates; end + + # source://gitlab//lib/gitlab/client/templates.rb#96 + def license_template(key, options = T.unsafe(nil)); end + + # source://gitlab//lib/gitlab/client/templates.rb#82 + def license_templates(options = T.unsafe(nil)); end +end + +# Defines methods related to todos +# +# @see https://docs.gitlab.com/ce/api/todos.html +# +# source://gitlab//lib/gitlab/client/todos.rb#6 +module Gitlab::Client::Todos + # Marks all todos for the current user as done + # + # @example + # Gitlab.mark_all_todos_as_done + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/todos.rb#42 + def mark_all_todos_as_done; end + + # Marks a single pending todo for the current user as done. + # + # @example + # Gitlab.mark_todo_as_done(42) + # @param id [Integer] The ID of the todo. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/todos.rb#32 + def mark_todo_as_done(id); end + + # Gets a list of todos. + # + # @example + # Gitlab.todos + # Gitlab.todos({ action: 'assigned' }) + # Gitlab.todos({ state: 'pending' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/todos.rb#21 + def todos(options = T.unsafe(nil)); end +end + +# Defines methods related to user snippets. +# +# @see https://docs.gitlab.com/ce/api/snippets.html +# +# source://gitlab//lib/gitlab/client/user_snippets.rb#6 +module Gitlab::Client::UserSnippets + # Create a new snippet. + # + # @example + # Gitlab.create_user_snippet({ title: 'REST', file_name: 'api.rb', content: 'some code', description: 'Hello World snippet', visibility: 'public'}) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created snippet. + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#54 + def create_user_snippet(options = T.unsafe(nil)); end + + # Delete an existing snippet. + # + # @example + # Gitlab.delete_user_snippet(14) + # @param id [Integer] ID of snippet to delete. + # @return [void] This API call returns an empty response body. + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#83 + def delete_user_snippet(id); end + + # Update an existing snippet. + # + # @example + # Gitlab.edit_user_snippet(34, { file_name: 'README.txt' }) + # Gitlab.edit_user_snippet(34, { file_name: 'README.txt', title: 'New title' }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @param id [Integer] ID of snippet to update. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated snippet. + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#72 + def edit_user_snippet(id, options = T.unsafe(nil)); end + + # List all public snippets. + # + # @example + # Gitlab.public_snippets + # Gitlab.public_snippets(per_page: 2, page: 1) + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] List of all public snippets + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#98 + def public_snippets(options = T.unsafe(nil)); end + + # Get user agent details for a snippet. + # + # @example + # Gitlab.snippet_user_agent_details(1) + # @param id [Integer] ID of snippet to delete. + # @return [Array] Details of the user agent + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#110 + def snippet_user_agent_details(id); end + + # Get a single snippet. + # + # @example + # Gitlab.user_snippet(1) + # @param id [Integer] ID of snippet to retrieve. + # @return [Gitlab::ObjectifiedHash] Information about the user snippet + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#24 + def user_snippet(id); end + + # Get raw contents of a single snippet. + # + # @example + # Gitlab.user_snippet_raw(1) + # @param id [Integer] ID of snippet to retrieve. + # @return [String] User snippet text + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#35 + def user_snippet_raw(id); end + + # Get a list of the snippets of the current user. + # + # @example + # Gitlab.user_snippets + # @return [Array] List of snippets of current user + # + # source://gitlab//lib/gitlab/client/user_snippets.rb#13 + def user_snippets; end +end + +# Defines methods related to users. +# +# @see https://docs.gitlab.com/ce/api/users.html +# @see https://docs.gitlab.com/ce/api/session.html +# +# source://gitlab//lib/gitlab/client/users.rb#7 +module Gitlab::Client::Users + # Gets a list of user activities (for admin access only). + # + # @example + # Gitlab.activities + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/users.rb#147 + def activities(options = T.unsafe(nil)); end + + # Creates a new email + # Will create a new email an authorized user if no user ID passed. + # + # @example + # Gitlab.add_email('email@example.com') + # Gitlab.add_email('email@example.com', 2) + # @param email [String] Email address + # @param user_id [Integer] The ID of a user. + # @param skip_confirmation [Boolean] Skip confirmation and assume e-mail is verified + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#255 + def add_email(email, user_id = T.unsafe(nil), skip_confirmation = T.unsafe(nil)); end + + # Creates a new custom_attribute + # + # @example + # Gitlab.add_custom_attribute('some_new_key', 'some_new_value', 2) + # @param key [String] The custom_attributes key + # @param value [String] The custom_attributes value + # @param user_id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#326 + def add_user_custom_attribute(key, value, user_id); end + + # Approves the specified user. Available only for admin. + # + # @example + # Gitlab.approve_user(15) + # @param user_id [Integer] The Id of user + # @return [Boolean] success or not + # + # source://gitlab//lib/gitlab/client/users.rb#120 + def approve_user(user_id); end + + # Blocks the specified user. Available only for admin. + # + # @example + # Gitlab.block_user(15) + # @param user_id [Integer] The Id of user + # @return [Boolean] success or not + # + # source://gitlab//lib/gitlab/client/users.rb#98 + def block_user(user_id); end + + # Creates a new SSH key. + # + # @example + # Gitlab.create_ssh_key('key title', 'key body') + # @option options + # @param title [String] The title of an SSH key. + # @param key [String] The SSH key body. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created SSH key. + # + # source://gitlab//lib/gitlab/client/users.rb#192 + def create_ssh_key(title, key, options = T.unsafe(nil)); end + + # Creates a new user. + # Requires authentication from an admin account. + # + # @example + # Gitlab.create_user('joe@foo.org', 'secret', 'joe', { name: 'Joe Smith' }) + # or + # Gitlab.create_user('joe@foo.org', 'secret', 'joe') + # @option options + # @option options + # @option options + # @option options + # @option options + # @param email(required) [String] The email of a user. + # @param password(required) [String] The password of a user. + # @param username(required) [String] The username of a user. + # @param options [Hash] A customizable set of options. + # @raise [ArgumentError] + # @return [Gitlab::ObjectifiedHash] Information about created user. + # + # source://gitlab//lib/gitlab/client/users.rb#52 + def create_user(*args); end + + # Create impersonation token + # + # @example + # Gitlab.create_user_impersonation_token(2, "token", ["api", "read_user"]) + # Gitlab.create_user_impersonation_token(2, "token", ["api", "read_user"], "1970-01-01") + # @param user_id [Integer] The ID of the user. + # @param name [String] Name for impersonation token. + # @param scopes [Array] Array of scopes for the impersonation token + # @param expires_at [String] Date for impersonation token expiration in ISO format. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#379 + def create_user_impersonation_token(user_id, name, scopes, expires_at = T.unsafe(nil)); end + + # Delete email + # Will delete a email an authorized user if no user ID passed. + # + # @example + # Gitlab.delete_email(2) + # Gitlab.delete_email(3, 2) + # @param id [Integer] Email address ID + # @param user_id [Integer] The ID of a user. + # @return [Boolean] + # + # source://gitlab//lib/gitlab/client/users.rb#274 + def delete_email(id, user_id = T.unsafe(nil)); end + + # Deletes an SSH key. + # + # @example + # Gitlab.delete_ssh_key(1) + # @option options + # @param id [Integer] The ID of a user's SSH key. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about deleted SSH key. + # + # source://gitlab//lib/gitlab/client/users.rb#210 + def delete_ssh_key(id, options = T.unsafe(nil)); end + + # Deletes a user. + # + # @example + # Gitlab.delete_user(1) + # @param id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] Information about deleted user. + # + # source://gitlab//lib/gitlab/client/users.rb#87 + def delete_user(user_id); end + + # Delete custom_attribute + # Will delete a custom_attribute + # + # @example + # Gitlab.delete_user_custom_attribute('somekey', 2) + # @param key [String] The custom_attribute key to delete + # @param user_id [Integer] The ID of a user. + # @return [Boolean] + # + # source://gitlab//lib/gitlab/client/users.rb#340 + def delete_user_custom_attribute(key, user_id); end + + # Updates a user. + # + # @example + # Gitlab.edit_user(15, { email: 'joe.smith@foo.org', projects_limit: 20 }) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param id [Integer] The ID of a user. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created user. + # + # source://gitlab//lib/gitlab/client/users.rb#76 + def edit_user(user_id, options = T.unsafe(nil)); end + + # Get a single email. + # + # @example + # Gitlab.email(3) + # @param id [Integer] The ID of a email. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#240 + def email(id); end + + # Gets user emails. + # Will return emails an authorized user if no user ID passed. + # + # @example + # Gitlab.emails + # Gitlab.emails(2) + # @param user_id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#228 + def emails(user_id = T.unsafe(nil)); end + + # Revoke an impersonation token + # + # @example + # Gitlab.revoke_user_impersonation_token(1, 1) + # @param user_id [Integer] The ID of the user. + # @param impersonation_token_id [Integer] ID of the impersonation token. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#393 + def revoke_user_impersonation_token(user_id, impersonation_token_id); end + + # Creates a new user session. + # + # @example + # Gitlab.session('jack@example.com', 'secret12345') + # @note This method doesn't require private_token to be set. + # @param email [String] The email of a user. + # @param password [String] The password of a user. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#133 + def session(email, password); end + + # Gets information about SSH key. + # + # @example + # Gitlab.ssh_key(1) + # @param id [Integer] The ID of a user's SSH key. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#178 + def ssh_key(id); end + + # Gets a list of user's SSH keys. + # + # @example + # Gitlab.ssh_keys + # Gitlab.ssh_keys({ user_id: 2 }) + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/users.rb#162 + def ssh_keys(options = T.unsafe(nil)); end + + # Unblocks the specified user. Available only for admin. + # + # @example + # Gitlab.unblock_user(15) + # @param user_id [Integer] The Id of user + # @return [Boolean] success or not + # + # source://gitlab//lib/gitlab/client/users.rb#109 + def unblock_user(user_id); end + + # Gets information about a user. + # Will return information about an authorized user if no ID passed. + # + # @example + # Gitlab.user + # Gitlab.user(2) + # @param id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#30 + def user(id = T.unsafe(nil)); end + + # Gets single user custom_attribute. + # + # @example + # Gitlab.user_custom_attribute(key, 2) + # @param key [String] The custom_attributes key + # @param user_id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#313 + def user_custom_attribute(key, user_id); end + + # Gets user custom_attributes. + # + # @example + # Gitlab.user_custom_attributes(2) + # @param user_id [Integer] The ID of a user. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#301 + def user_custom_attributes(user_id); end + + # Get impersonation token information + # + # @example + # Gitlab.user_impersonation_token(1, 1) + # @param user_id [Integer] The ID of the user. + # @param impersonation_token_id [Integer] ID of the impersonation token. + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/users.rb#364 + def user_impersonation_token(user_id, impersonation_token_id); end + + # Get all impersonation tokens for a user + # + # @example + # Gitlab.user_impersonation_tokens(1) + # @param user_id [Integer] The ID of the user. + # @param state [String] Filter impersonation tokens by state {} + # @return [Array] + # + # source://gitlab//lib/gitlab/client/users.rb#352 + def user_impersonation_tokens(user_id); end + + # Search for groups by name + # + # @example + # Gitlab.user_search('gitlab') + # @option options + # @option options + # @param search [String] A string to search for in user names and paths. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/users.rb#289 + def user_search(search, options = T.unsafe(nil)); end + + # Gets a list of users. + # + # @example + # Gitlab.users + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/users.rb#17 + def users(options = T.unsafe(nil)); end +end + +# Defines methods related to version +# +# @see https://docs.gitlab.com/ce/api/version.html +# +# source://gitlab//lib/gitlab/client/versions.rb#6 +module Gitlab::Client::Versions + # Returns server version. + # + # @example + # Gitlab.version + # @return [Array] + # @see https://docs.gitlab.com/ce/api/version.html + # + # source://gitlab//lib/gitlab/client/versions.rb#14 + def version; end +end + +# Defines methods related to wikis. +# +# @see https://docs.gitlab.com/ce/api/wikis.html +# +# source://gitlab//lib/gitlab/client/wikis.rb#6 +module Gitlab::Client::Wikis + # Creates a new wiki page for the given repository with the given title, slug, and content. + # + # @example + # Gitlab.create_wiki(3, 'Some Title', 'Some Content') + # Gitlab.create_wiki(3, 'Some Title', 'Some Content', { format: 'rdoc' }) + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param content [String] The content of the wiki page. + # @param title [String] The title of the wiki page. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about created wiki page. + # + # source://gitlab//lib/gitlab/client/wikis.rb#45 + def create_wiki(project, title, content, options = T.unsafe(nil)); end + + # Deletes a wiki page with a given slug. + # + # @example + # Gitlab.delete_wiki(42, 'foo') + # @param project [Integer, String] The ID or name of a project. + # @param slug [String] The slug (a unique string) of the wiki page. + # @return [Gitlab::ObjectifiedHash] An empty objectified hash + # + # source://gitlab//lib/gitlab/client/wikis.rb#75 + def delete_wiki(project, slug); end + + # Updates an existing wiki page. At least one parameter is required to update the wiki page. + # + # @example + # Gitlab.update_wiki(6, 'home', { title: 'New title' }) + # Gitlab.update_wiki(6, 'home', { title: 'New title', content: 'New Message', format: 'rdoc' }) + # @option options + # @option options + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param slug [String] The slug (a unique string) of the wiki page. + # @param options [Hash] A customizable set of options. + # @return [Gitlab::ObjectifiedHash] Information about updated wiki page. + # + # source://gitlab//lib/gitlab/client/wikis.rb#63 + def update_wiki(project, slug, options = T.unsafe(nil)); end + + # Get a wiki page for a given project. + # + # @example + # Gitlab.wiki(3, 'home') + # @param project [Integer, String] The ID or name of a project. + # @param slug [String] The slug (a unique string) of the wiki page + # @return [Gitlab::ObjectifiedHash] + # + # source://gitlab//lib/gitlab/client/wikis.rb#29 + def wiki(project, slug); end + + # Get all wiki pages for a given project. + # + # @example + # Gitlab.wikis(3) + # Gitlab.wikis(3, {with_content: 'Some wiki content'}) + # @option options + # @param project [Integer, String] The ID or name of a project. + # @param options [Hash] A customizable set of options. + # @return [Array] + # + # source://gitlab//lib/gitlab/client/wikis.rb#17 + def wikis(project, options = T.unsafe(nil)); end +end + +# Defines constants and methods related to configuration. +# +# source://gitlab//lib/gitlab/configuration.rb#6 +module Gitlab::Configuration + # @private + def auth_token=(_arg0); end + + # Convenience method to allow configuration options to be set in a block. + # + # @yield [_self] + # @yieldparam _self [Gitlab::Configuration] the object that the method was called on + # + # source://gitlab//lib/gitlab/configuration.rb#25 + def configure; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def endpoint; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def endpoint=(_arg0); end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def httparty; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def httparty=(_arg0); end + + # Creates a hash of options and their values. + # + # source://gitlab//lib/gitlab/configuration.rb#30 + def options; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def private_token; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def private_token=(_arg0); end + + # Resets all configuration options to the defaults. + # + # source://gitlab//lib/gitlab/configuration.rb#37 + def reset; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def sudo; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def sudo=(_arg0); end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def user_agent; end + + # source://gitlab//lib/gitlab/configuration.rb#14 + def user_agent=(_arg0); end + + private + + # Allows HTTParty config to be specified in ENV using YAML hash. + # + # @raise [ArgumentError] + # + # source://gitlab//lib/gitlab/configuration.rb#48 + def get_httparty_config(options); end + + class << self + # Sets all configuration options to their default values + # when this module is extended. + # + # source://gitlab//lib/gitlab/configuration.rb#20 + def extended(base); end + end +end + +# The user agent that will be sent to the API endpoint if none is set. +# +# source://gitlab//lib/gitlab/configuration.rb#11 +Gitlab::Configuration::DEFAULT_USER_AGENT = T.let(T.unsafe(nil), String) + +# An array of valid keys in the options hash when configuring a Gitlab::API. +# +# source://gitlab//lib/gitlab/configuration.rb#8 +Gitlab::Configuration::VALID_OPTIONS_KEYS = T.let(T.unsafe(nil), Array) + +# source://gitlab//lib/gitlab/error.rb#4 +module Gitlab::Error + class << self + # Returns error class that should be raised for this response. Returns nil + # if the response status code is not 4xx or 5xx. + # + # @param response [HTTParty::Response] The response object. + # @return [Class, nil] + # + # source://gitlab//lib/gitlab/error.rb#163 + def klass(response); end + end +end + +# Raised when API endpoint returns the HTTP status code 502. +# +# source://gitlab//lib/gitlab/error.rb#133 +class Gitlab::Error::BadGateway < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 400. +# +# source://gitlab//lib/gitlab/error.rb#103 +class Gitlab::Error::BadRequest < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 409. +# +# source://gitlab//lib/gitlab/error.rb#121 +class Gitlab::Error::Conflict < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 522. +# +# source://gitlab//lib/gitlab/error.rb#139 +class Gitlab::Error::ConnectionTimedOut < ::Gitlab::Error::ResponseError; end + +# Custom error class for rescuing from all Gitlab errors. +# +# source://gitlab//lib/gitlab/error.rb#6 +class Gitlab::Error::Error < ::StandardError; end + +# Raised when API endpoint returns the HTTP status code 403. +# +# source://gitlab//lib/gitlab/error.rb#109 +class Gitlab::Error::Forbidden < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 500. +# +# source://gitlab//lib/gitlab/error.rb#130 +class Gitlab::Error::InternalServerError < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 405. +# +# source://gitlab//lib/gitlab/error.rb#115 +class Gitlab::Error::MethodNotAllowed < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint credentials not configured. +# +# source://gitlab//lib/gitlab/error.rb#9 +class Gitlab::Error::MissingCredentials < ::Gitlab::Error::Error; end + +# Raised when API endpoint returns the HTTP status code 406. +# +# source://gitlab//lib/gitlab/error.rb#118 +class Gitlab::Error::NotAcceptable < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 404. +# +# source://gitlab//lib/gitlab/error.rb#112 +class Gitlab::Error::NotFound < ::Gitlab::Error::ResponseError; end + +# Raised when impossible to parse response body. +# +# source://gitlab//lib/gitlab/error.rb#12 +class Gitlab::Error::Parsing < ::Gitlab::Error::Error; end + +# Custom error class for rescuing from HTTP response errors. +# +# source://gitlab//lib/gitlab/error.rb#15 +class Gitlab::Error::ResponseError < ::Gitlab::Error::Error + # @return [ResponseError] a new instance of ResponseError + # + # source://gitlab//lib/gitlab/error.rb#18 + def initialize(response); end + + # Additional error context returned by some API endpoints + # + # @return [String] + # + # source://gitlab//lib/gitlab/error.rb#40 + def error_code; end + + # Body content returned in the HTTP response + # + # @return [String] + # + # source://gitlab//lib/gitlab/error.rb#33 + def response_message; end + + # Status code returned in the HTTP response. + # + # @return [Integer] + # + # source://gitlab//lib/gitlab/error.rb#26 + def response_status; end + + private + + # Human friendly message. + # + # @return [String] + # + # source://gitlab//lib/gitlab/error.rb#53 + def build_error_message; end + + # Error keys vary across the API, find the first key that the parsed_response + # object responds to and return that, otherwise return the original. + # + # source://gitlab//lib/gitlab/error.rb#63 + def check_error_keys(resp); end + + # Parse the body based on the classification of the body content type + # + # @return parsed response + # + # source://gitlab//lib/gitlab/error.rb#71 + def classified_response; end + + # Handle error response message in case of nested hashes + # + # source://gitlab//lib/gitlab/error.rb#88 + def handle_message(message); end +end + +# source://gitlab//lib/gitlab/error.rb#16 +Gitlab::Error::ResponseError::POSSIBLE_MESSAGE_KEYS = T.let(T.unsafe(nil), Array) + +# HTTP status codes mapped to error classes. +# +# source://gitlab//lib/gitlab/error.rb#142 +Gitlab::Error::STATUS_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# Raised when API endpoint returns the HTTP status code 503. +# +# source://gitlab//lib/gitlab/error.rb#136 +class Gitlab::Error::ServiceUnavailable < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 429. +# +# source://gitlab//lib/gitlab/error.rb#127 +class Gitlab::Error::TooManyRequests < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 401. +# +# source://gitlab//lib/gitlab/error.rb#106 +class Gitlab::Error::Unauthorized < ::Gitlab::Error::ResponseError; end + +# Raised when API endpoint returns the HTTP status code 422. +# +# source://gitlab//lib/gitlab/error.rb#124 +class Gitlab::Error::Unprocessable < ::Gitlab::Error::ResponseError; end + +# Wrapper class of file response. +# +# source://gitlab//lib/gitlab/file_response.rb#5 +class Gitlab::FileResponse + # @return [FileResponse] a new instance of FileResponse + # + # source://gitlab//lib/gitlab/file_response.rb#10 + def initialize(file); end + + # @return [bool] Always false + # + # source://gitlab//lib/gitlab/file_response.rb#15 + def empty?; end + + # Returns the value of attribute filename. + # + # source://gitlab//lib/gitlab/file_response.rb#8 + def filename; end + + # @return [String] Formatted string with the class name, object id and filename. + # + # source://gitlab//lib/gitlab/file_response.rb#26 + def inspect; end + + # source://gitlab//lib/gitlab/file_response.rb#30 + def method_missing(name, *args, &block); end + + # Parse filename from the 'Content Disposition' header. + # + # source://gitlab//lib/gitlab/file_response.rb#43 + def parse_headers!(headers); end + + # @return [Hash] A hash consisting of filename and io object + # + # source://gitlab//lib/gitlab/file_response.rb#20 + def to_h; end + + # @return [Hash] A hash consisting of filename and io object + # + # source://gitlab//lib/gitlab/file_response.rb#20 + def to_hash; end + + private + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/file_response.rb#38 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# source://gitlab//lib/gitlab/file_response.rb#6 +Gitlab::FileResponse::HEADER_CONTENT_DISPOSITION = T.let(T.unsafe(nil), String) + +# Converts hashes to the objects. +# +# source://gitlab//lib/gitlab/objectified_hash.rb#5 +class Gitlab::ObjectifiedHash + # Creates a new ObjectifiedHash object. + # + # @return [ObjectifiedHash] a new instance of ObjectifiedHash + # + # source://gitlab//lib/gitlab/objectified_hash.rb#7 + def initialize(hash); end + + # source://gitlab//lib/gitlab/objectified_hash.rb#27 + def [](key); end + + # @return [String] Formatted string with the class name, object id and original hash. + # + # source://gitlab//lib/gitlab/objectified_hash.rb#23 + def inspect; end + + # @return [Hash] The original hash. + # + # source://gitlab//lib/gitlab/objectified_hash.rb#17 + def to_h; end + + # @return [Hash] The original hash. + # + # source://gitlab//lib/gitlab/objectified_hash.rb#17 + def to_hash; end + + private + + # Returns the value of attribute data. + # + # source://gitlab//lib/gitlab/objectified_hash.rb#33 + def data; end + + # Returns the value of attribute hash. + # + # source://gitlab//lib/gitlab/objectified_hash.rb#33 + def hash; end + + # Respond to messages for which `self.data` has a key + # + # source://gitlab//lib/gitlab/objectified_hash.rb#36 + def method_missing(method_name, *args, &block); end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/objectified_hash.rb#47 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# Parses link header. +# +# @private +# +# source://gitlab//lib/gitlab/page_links.rb#7 +class Gitlab::PageLinks + # @return [PageLinks] a new instance of PageLinks + # + # source://gitlab//lib/gitlab/page_links.rb#15 + def initialize(headers); end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def first; end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def first=(_arg0); end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def last; end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def last=(_arg0); end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def next; end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def next=(_arg0); end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def prev; end + + # source://gitlab//lib/gitlab/page_links.rb#13 + def prev=(_arg0); end + + private + + # source://gitlab//lib/gitlab/page_links.rb#23 + def extract_links(header); end +end + +# source://gitlab//lib/gitlab/page_links.rb#9 +Gitlab::PageLinks::DELIM_LINKS = T.let(T.unsafe(nil), String) + +# source://gitlab//lib/gitlab/page_links.rb#8 +Gitlab::PageLinks::HEADER_LINK = T.let(T.unsafe(nil), String) + +# source://gitlab//lib/gitlab/page_links.rb#10 +Gitlab::PageLinks::LINK_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://gitlab//lib/gitlab/page_links.rb#11 +Gitlab::PageLinks::METAS = T.let(T.unsafe(nil), Array) + +# Wrapper class of paginated response. +# +# source://gitlab//lib/gitlab/paginated_response.rb#5 +class Gitlab::PaginatedResponse + # @return [PaginatedResponse] a new instance of PaginatedResponse + # + # source://gitlab//lib/gitlab/paginated_response.rb#8 + def initialize(array); end + + # source://gitlab//lib/gitlab/paginated_response.rb#12 + def ==(other); end + + # source://gitlab//lib/gitlab/paginated_response.rb#49 + def auto_paginate(&block); end + + # Returns the value of attribute client. + # + # source://gitlab//lib/gitlab/paginated_response.rb#6 + def client; end + + # Sets the attribute client + # + # @param value the value to set the attribute client to. + # + # source://gitlab//lib/gitlab/paginated_response.rb#6 + def client=(_arg0); end + + # source://gitlab//lib/gitlab/paginated_response.rb#105 + def client_relative_path(link); end + + # @yield [current] + # + # source://gitlab//lib/gitlab/paginated_response.rb#36 + def each_page; end + + # source://gitlab//lib/gitlab/paginated_response.rb#77 + def first_page; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#72 + def first_page?; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#72 + def has_first_page?; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#61 + def has_last_page?; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#83 + def has_next_page?; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#94 + def has_prev_page?; end + + # source://gitlab//lib/gitlab/paginated_response.rb#16 + def inspect; end + + # source://gitlab//lib/gitlab/paginated_response.rb#66 + def last_page; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#61 + def last_page?; end + + # source://gitlab//lib/gitlab/paginated_response.rb#45 + def lazy_paginate; end + + # source://gitlab//lib/gitlab/paginated_response.rb#20 + def method_missing(name, *args, &block); end + + # source://gitlab//lib/gitlab/paginated_response.rb#88 + def next_page; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#83 + def next_page?; end + + # source://gitlab//lib/gitlab/paginated_response.rb#55 + def paginate_with_limit(limit, &block); end + + # source://gitlab//lib/gitlab/paginated_response.rb#32 + def parse_headers!(headers); end + + # source://gitlab//lib/gitlab/paginated_response.rb#99 + def prev_page; end + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#94 + def prev_page?; end + + private + + # @return [Boolean] + # + # source://gitlab//lib/gitlab/paginated_response.rb#28 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# @private +# +# source://gitlab//lib/gitlab/request.rb#8 +class Gitlab::Request + include ::HTTParty + include ::HTTParty::ModuleInheritableAttributes + extend ::HTTParty::ClassMethods + extend ::HTTParty::ModuleInheritableAttributes::ClassMethods + + # source://gitlab//lib/gitlab/request.rb#42 + def delete(path, options = T.unsafe(nil)); end + + # Returns the value of attribute endpoint. + # + # source://gitlab//lib/gitlab/request.rb#15 + def endpoint; end + + # Sets the attribute endpoint + # + # @param value the value to set the attribute endpoint to. + # + # source://gitlab//lib/gitlab/request.rb#15 + def endpoint=(_arg0); end + + # source://gitlab//lib/gitlab/request.rb#42 + def get(path, options = T.unsafe(nil)); end + + # source://gitlab//lib/gitlab/request.rb#42 + def post(path, options = T.unsafe(nil)); end + + # Returns the value of attribute private_token. + # + # source://gitlab//lib/gitlab/request.rb#15 + def private_token; end + + # Sets the attribute private_token + # + # @param value the value to set the attribute private_token to. + # + # source://gitlab//lib/gitlab/request.rb#15 + def private_token=(_arg0); end + + # source://gitlab//lib/gitlab/request.rb#42 + def put(path, options = T.unsafe(nil)); end + + # Sets a base_uri and default_params for requests. + # + # @raise [Error::MissingCredentials] if endpoint not set. + # + # source://gitlab//lib/gitlab/request.rb#81 + def request_defaults(sudo = T.unsafe(nil)); end + + # Checks the response code for common errors. + # Returns parsed response for successful requests. + # + # @raise [error_klass] + # + # source://gitlab//lib/gitlab/request.rb#69 + def validate(response); end + + private + + # Returns an Authorization header hash + # + # @raise [Error::MissingCredentials] if private_token and auth_token are not set. + # + # source://gitlab//lib/gitlab/request.rb#93 + def authorization_header; end + + # Set HTTParty configuration + # + # @see https://github.com/jnunemaker/httparty + # + # source://gitlab//lib/gitlab/request.rb#105 + def httparty_config(options); end + + class << self + # Decodes a JSON response into Ruby object. + # + # source://gitlab//lib/gitlab/request.rb#35 + def decode(response); end + + def default_cookies; end + def default_cookies=(_arg0); end + def default_options; end + def default_options=(_arg0); end + + # Converts the response body to an ObjectifiedHash. + # + # source://gitlab//lib/gitlab/request.rb#18 + def parse(body); end + end +end + +# source://gitlab//lib/gitlab/version.rb#4 +Gitlab::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/gpgme@2.0.22.rbi b/sorbet/rbi/gems/gpgme@2.0.22.rbi new file mode 100644 index 0000000000..7341f4a923 --- /dev/null +++ b/sorbet/rbi/gems/gpgme@2.0.22.rbi @@ -0,0 +1,2929 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `gpgme` gem. +# Please instead update this file by running `bin/tapioca gem gpgme`. + +# TODO: Find why is this needed. I guess the name compat means it's just +# backwards compatibility. Consider removing? +# +# source://gpgme//lib/gpgme/constants.rb#1 +module GPGME + private + + def gpgme_check_version(_arg0); end + def gpgme_ctx_get_engine_info(_arg0, _arg1); end + def gpgme_ctx_set_engine_info(_arg0, _arg1, _arg2, _arg3); end + def gpgme_data_get_encoding(_arg0); end + def gpgme_data_get_file_name(_arg0); end + def gpgme_data_new(_arg0); end + def gpgme_data_new_from_cbs(_arg0, _arg1, _arg2); end + def gpgme_data_new_from_fd(_arg0, _arg1); end + def gpgme_data_new_from_mem(_arg0, _arg1, _arg2); end + def gpgme_data_read(_arg0, _arg1); end + def gpgme_data_seek(_arg0, _arg1, _arg2); end + def gpgme_data_set_encoding(_arg0, _arg1); end + def gpgme_data_set_file_name(_arg0, _arg1); end + def gpgme_data_write(_arg0, _arg1, _arg2); end + def gpgme_engine_check_version(_arg0); end + def gpgme_err_code(_arg0); end + def gpgme_err_source(_arg0); end + def gpgme_get_armor(_arg0); end + def gpgme_get_dirinfo(_arg0); end + def gpgme_get_engine_info(_arg0); end + def gpgme_get_include_certs(_arg0); end + def gpgme_get_key(_arg0, _arg1, _arg2, _arg3); end + def gpgme_get_keylist_mode(_arg0); end + def gpgme_get_offline(_arg0); end + def gpgme_get_passphrase_cb(_arg0, _arg1, _arg2); end + def gpgme_get_pinentry_mode(_arg0); end + def gpgme_get_progress_cb(_arg0, _arg1, _arg2); end + def gpgme_get_protocol(_arg0); end + def gpgme_get_status_cb(_arg0, _arg1, _arg2); end + def gpgme_get_textmode(_arg0); end + def gpgme_hash_algo_name(_arg0); end + def gpgme_new(_arg0); end + def gpgme_op_card_edit(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_card_edit_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_decrypt(_arg0, _arg1, _arg2); end + def gpgme_op_decrypt_result(_arg0); end + def gpgme_op_decrypt_start(_arg0, _arg1, _arg2); end + def gpgme_op_decrypt_verify(_arg0, _arg1, _arg2); end + def gpgme_op_decrypt_verify_start(_arg0, _arg1, _arg2); end + def gpgme_op_delete(_arg0, _arg1, _arg2); end + def gpgme_op_delete_start(_arg0, _arg1, _arg2); end + def gpgme_op_edit(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_edit_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt_result(_arg0); end + def gpgme_op_encrypt_sign(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt_sign_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_export(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_ext(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_ext_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_keys(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_keys_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_genkey(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_genkey_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_import(_arg0, _arg1); end + def gpgme_op_import_keys(_arg0, _arg1); end + def gpgme_op_import_keys_start(_arg0, _arg1); end + def gpgme_op_import_result(_arg0); end + def gpgme_op_import_start(_arg0, _arg1); end + def gpgme_op_keylist_end(_arg0); end + def gpgme_op_keylist_ext_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_keylist_next(_arg0, _arg1); end + def gpgme_op_keylist_start(_arg0, _arg1, _arg2); end + def gpgme_op_sign(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_sign_result(_arg0); end + def gpgme_op_sign_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_spawn(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); end + def gpgme_op_spawn_start(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); end + def gpgme_op_trustlist_end(_arg0); end + def gpgme_op_trustlist_next(_arg0, _arg1); end + def gpgme_op_trustlist_start(_arg0, _arg1, _arg2); end + def gpgme_op_verify(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_verify_result(_arg0); end + def gpgme_op_verify_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_pubkey_algo_name(_arg0); end + def gpgme_release(_arg0); end + def gpgme_set_armor(_arg0, _arg1); end + def gpgme_set_engine_info(_arg0, _arg1, _arg2); end + def gpgme_set_include_certs(_arg0, _arg1); end + def gpgme_set_keylist_mode(_arg0, _arg1); end + def gpgme_set_locale(_arg0, _arg1, _arg2); end + def gpgme_set_offline(_arg0, _arg1); end + def gpgme_set_passphrase_cb(_arg0, _arg1, _arg2); end + def gpgme_set_pinentry_mode(_arg0, _arg1); end + def gpgme_set_progress_cb(_arg0, _arg1, _arg2); end + def gpgme_set_protocol(_arg0, _arg1); end + def gpgme_set_status_cb(_arg0, _arg1, _arg2); end + def gpgme_set_textmode(_arg0, _arg1); end + def gpgme_signers_add(_arg0, _arg1); end + def gpgme_signers_clear(_arg0); end + def gpgme_signers_enum(_arg0, _arg1); end + def gpgme_strerror(_arg0); end + def gpgme_wait(_arg0, _arg1, _arg2); end + + class << self + # TODO find out what it does, can't seem to find a proper parameter that + # returns something other than nil. + # + # source://gpgme//lib/gpgme.rb#95 + def check_version(options = T.unsafe(nil)); end + + # Auxiliary method used by all the library to generate exceptions + # from error codes returned by the C extension. + # + # source://gpgme//lib/gpgme.rb#33 + def error_to_exception(err); end + + def gpgme_check_version(_arg0); end + def gpgme_ctx_get_engine_info(_arg0, _arg1); end + def gpgme_ctx_set_engine_info(_arg0, _arg1, _arg2, _arg3); end + def gpgme_data_get_encoding(_arg0); end + def gpgme_data_get_file_name(_arg0); end + def gpgme_data_new(_arg0); end + def gpgme_data_new_from_cbs(_arg0, _arg1, _arg2); end + def gpgme_data_new_from_fd(_arg0, _arg1); end + def gpgme_data_new_from_mem(_arg0, _arg1, _arg2); end + def gpgme_data_read(_arg0, _arg1); end + def gpgme_data_seek(_arg0, _arg1, _arg2); end + def gpgme_data_set_encoding(_arg0, _arg1); end + def gpgme_data_set_file_name(_arg0, _arg1); end + def gpgme_data_write(_arg0, _arg1, _arg2); end + def gpgme_engine_check_version(_arg0); end + def gpgme_err_code(_arg0); end + def gpgme_err_source(_arg0); end + def gpgme_get_armor(_arg0); end + def gpgme_get_dirinfo(_arg0); end + def gpgme_get_engine_info(_arg0); end + def gpgme_get_include_certs(_arg0); end + def gpgme_get_key(_arg0, _arg1, _arg2, _arg3); end + def gpgme_get_keylist_mode(_arg0); end + def gpgme_get_offline(_arg0); end + def gpgme_get_passphrase_cb(_arg0, _arg1, _arg2); end + def gpgme_get_pinentry_mode(_arg0); end + def gpgme_get_progress_cb(_arg0, _arg1, _arg2); end + def gpgme_get_protocol(_arg0); end + def gpgme_get_status_cb(_arg0, _arg1, _arg2); end + def gpgme_get_textmode(_arg0); end + def gpgme_hash_algo_name(_arg0); end + def gpgme_new(_arg0); end + def gpgme_op_card_edit(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_card_edit_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_decrypt(_arg0, _arg1, _arg2); end + def gpgme_op_decrypt_result(_arg0); end + def gpgme_op_decrypt_start(_arg0, _arg1, _arg2); end + def gpgme_op_decrypt_verify(_arg0, _arg1, _arg2); end + def gpgme_op_decrypt_verify_start(_arg0, _arg1, _arg2); end + def gpgme_op_delete(_arg0, _arg1, _arg2); end + def gpgme_op_delete_start(_arg0, _arg1, _arg2); end + def gpgme_op_edit(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_edit_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt_result(_arg0); end + def gpgme_op_encrypt_sign(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt_sign_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_encrypt_start(_arg0, _arg1, _arg2, _arg3, _arg4); end + def gpgme_op_export(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_ext(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_ext_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_keys(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_keys_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_export_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_genkey(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_genkey_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_import(_arg0, _arg1); end + def gpgme_op_import_keys(_arg0, _arg1); end + def gpgme_op_import_keys_start(_arg0, _arg1); end + def gpgme_op_import_result(_arg0); end + def gpgme_op_import_start(_arg0, _arg1); end + def gpgme_op_keylist_end(_arg0); end + def gpgme_op_keylist_ext_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_keylist_next(_arg0, _arg1); end + def gpgme_op_keylist_start(_arg0, _arg1, _arg2); end + def gpgme_op_sign(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_sign_result(_arg0); end + def gpgme_op_sign_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_spawn(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); end + def gpgme_op_spawn_start(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); end + def gpgme_op_trustlist_end(_arg0); end + def gpgme_op_trustlist_next(_arg0, _arg1); end + def gpgme_op_trustlist_start(_arg0, _arg1, _arg2); end + def gpgme_op_verify(_arg0, _arg1, _arg2, _arg3); end + def gpgme_op_verify_result(_arg0); end + def gpgme_op_verify_start(_arg0, _arg1, _arg2, _arg3); end + def gpgme_pubkey_algo_name(_arg0); end + def gpgme_release(_arg0); end + def gpgme_set_armor(_arg0, _arg1); end + def gpgme_set_engine_info(_arg0, _arg1, _arg2); end + def gpgme_set_include_certs(_arg0, _arg1); end + def gpgme_set_keylist_mode(_arg0, _arg1); end + def gpgme_set_locale(_arg0, _arg1, _arg2); end + def gpgme_set_offline(_arg0, _arg1); end + def gpgme_set_passphrase_cb(_arg0, _arg1, _arg2); end + def gpgme_set_pinentry_mode(_arg0, _arg1); end + def gpgme_set_progress_cb(_arg0, _arg1, _arg2); end + def gpgme_set_protocol(_arg0, _arg1); end + def gpgme_set_status_cb(_arg0, _arg1, _arg2); end + def gpgme_set_textmode(_arg0, _arg1); end + def gpgme_signers_add(_arg0, _arg1); end + def gpgme_signers_clear(_arg0); end + def gpgme_signers_enum(_arg0, _arg1); end + def gpgme_strerror(_arg0); end + def gpgme_wait(_arg0, _arg1, _arg2); end + def hash_algo_name(_arg0); end + + # From the c extension + def pubkey_algo_name(_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#3 +GPGME::ATTR_ALGO = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#4 +GPGME::ATTR_CAN_CERTIFY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#5 +GPGME::ATTR_CAN_ENCRYPT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#6 +GPGME::ATTR_CAN_SIGN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#7 +GPGME::ATTR_CHAINID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#8 +GPGME::ATTR_COMMENT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#9 +GPGME::ATTR_CREATED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#10 +GPGME::ATTR_EMAIL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#11 +GPGME::ATTR_ERRTOK = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#12 +GPGME::ATTR_EXPIRE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#13 +GPGME::ATTR_FPR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#14 +GPGME::ATTR_ISSUER = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#15 +GPGME::ATTR_IS_SECRET = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#16 +GPGME::ATTR_KEYID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#17 +GPGME::ATTR_KEY_CAPS = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#18 +GPGME::ATTR_KEY_DISABLED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#19 +GPGME::ATTR_KEY_EXPIRED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#20 +GPGME::ATTR_KEY_INVALID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#21 +GPGME::ATTR_KEY_REVOKED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#22 +GPGME::ATTR_LEN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#23 +GPGME::ATTR_LEVEL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#24 +GPGME::ATTR_NAME = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#25 +GPGME::ATTR_OTRUST = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#26 +GPGME::ATTR_SERIAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#27 +GPGME::ATTR_SIG_STATUS = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#28 +GPGME::ATTR_SIG_SUMMARY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#29 +GPGME::ATTR_TYPE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#30 +GPGME::ATTR_UID_INVALID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#31 +GPGME::ATTR_UID_REVOKED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#32 +GPGME::ATTR_USERID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#33 +GPGME::ATTR_VALIDITY = T.let(T.unsafe(nil), Integer) + +# Different, independent methods providing the simplest possible API to +# execute crypto operations via GPG. All methods accept as options the same +# common options as {GPGME::Ctx.new}. Read the documentation for that class to +# know how to customize things further (like output stuff in ASCII armored +# format, for example). +# +# @example +# crypto = GPGME::Crypto.new :armor => true +# encrypted = crypto.encrypt 'Plain text' +# +# source://gpgme//lib/gpgme/crypto.rb#14 +class GPGME::Crypto + # @return [Crypto] a new instance of Crypto + # + # source://gpgme//lib/gpgme/crypto.rb#18 + def initialize(options = T.unsafe(nil)); end + + # Clearsigns an element + # + # crypto.clearsign text, options + # + # Same functionality of {.sign} only doing clearsigns by default. + # + # source://gpgme//lib/gpgme/crypto.rb#330 + def clearsign(text, options = T.unsafe(nil)); end + + # Decrypts a previously encrypted element + # + # crypto.decrypt cipher, options, &block + # + # Must have the appropiate key to be able to decrypt, of course. Returns + # a {GPGME::Data} object which can then be read. + # + # @example Simple decrypt + # crypto.decrypt encrypted_data + # @example symmetric encryption, or passwored key + # crypto.decrypt encrypted_data, :password => "gpgme" + # @example Output to file + # file = File.open("decrypted.txt", "w+") + # crypto.decrypt encrypted_data, :output => file + # @example Verifying signatures + # crypto.decrypt encrypted_data do |signature| + # raise "Signature could not be verified" unless signature.valid? + # end + # @param cipher Must be something that can be converted into a {GPGME::Data} object, + # or a {GPGME::Data} object itself. It is the element that will be + # decrypted. + # @param options [Hash] The optional parameters: + # * +:output+ if specified, it will write the output into it. It will + # me converted to a {GPGME::Data} object, so it can also be a file, + # for example. + # * If the file was encrypted with symmetric encryption, must provide + # a :password option. + # * Any other option accepted by {GPGME::Ctx.new} + # @param &block In the block all the signatures are yielded, so one could verify them. + # See examples. + # @raise [GPGME::Error::UnsupportedAlgorithm] when the cipher was encrypted + # using an algorithm that's not supported currently. + # @raise [GPGME::Error::WrongKeyUsage] TODO Don't know when + # @raise [GPGME::Error::DecryptFailed] when the cipher was encrypted + # for a key that's not available currently. + # @return [GPGME::Data] a {GPGME::Data} that can be read. + # + # source://gpgme//lib/gpgme/crypto.rb#164 + def decrypt(cipher, options = T.unsafe(nil)); end + + # Returns the value of attribute default_options. + # + # source://gpgme//lib/gpgme/crypto.rb#16 + def default_options; end + + # Creates a detached signature of an element + # + # crypto.detach_sign text, options + # + # Same functionality of {.sign} only doing detached signs by default. + # + # source://gpgme//lib/gpgme/crypto.rb#340 + def detach_sign(text, options = T.unsafe(nil)); end + + # Encrypts an element + # + # crypto.encrypt something, options + # + # Will return a {GPGME::Data} element which can then be read. + # + # Must have some key imported, look for {GPGME::Key.import} to know how + # to import one, or the gpg documentation to know how to create one + # + # @example returns a {GPGME::Data} that can be later encrypted + # encrypted = crypto.encrypt "Hello world!" + # encrypted.read # => Encrypted stuff + # @example to be decrypted by someone@example.com. + # crypto.encrypt "Hello", :recipients => "someone@example.com" + # @example If I didn't trust any of my keys by default + # crypto.encrypt "Hello" # => GPGME::Error::General + # crypto.encrypt "Hello", :always_trust => true # => Will work fine + # @example encrypted string that can be decrypted and/or *verified* + # crypto.encrypt "Hello", :sign => true + # @example multiple signers + # crypto.encrypt "Hello", :sign => true, :signers => "extra@example.com" + # @example writing to a file instead + # file = File.open("signed.sec","w+") + # crypto.encrypt "Hello", :output => file # output written to signed.sec + # @param plain Must be something that can be converted into a {GPGME::Data} object, or + # a {GPGME::Data} object itself. + # @param options [Hash] The optional parameters are as follows: + # * +:recipients+ for which recipient do you want to encrypt this file. It + # will pick the first one available if none specified. Can be an array of + # identifiers or just one (a string). + # * +:symmetric+ if set to true, will ignore +:recipients+, and will perform + # a symmetric encryption. Must provide a password via the +:password+ + # option. + # * +:always_trust+ if set to true specifies all the recipients to be + # trusted, thus not requiring confirmation. + # * +:sign+ if set to true, performs a combined sign and encrypt operation. + # * +:signers+ if +:sign+ specified to true, a list of additional possible + # signers. Must be an array of sign identifiers. + # * +:output+ if specified, it will write the output into it. It will be + # converted to a {GPGME::Data} object, so it could be a file for example. + # * Any other option accepted by {GPGME::Ctx.new} + # @raise [GPGME::Error::General] when trying to encrypt with a key that is + # not trusted, and +:always_trust+ wasn't specified + # @return [GPGME::Data] a {GPGME::Data} object that can be read. + # + # source://gpgme//lib/gpgme/crypto.rb#79 + def encrypt(plain, options = T.unsafe(nil)); end + + # Creates a signature of a text + # + # crypto.sign text, options + # + # Must have the appropiate key to be able to decrypt, of course. Returns + # a {GPGME::Data} object which can then be read. + # + # @example normal sign + # crypto.sign "Hi there" + # @example outputing to a file + # file = File.open("text.sign", "w+") + # crypto.sign "Hi there", :options => file + # @example doing a detached signature + # crypto.sign "Hi there", :mode => GPGME::SIG_MODE_DETACH + # @example specifying the signer + # crypto.sign "Hi there", :signer => "mrsimo@example.com" + # @param text The object that will be signed. Must be something that can be converted + # to {GPGME::Data}. + # @param options [Hash] Optional parameters. + # * +:signer+ sign identifier to sign the text with. Will use the first + # key it finds if none specified. + # * +:output+ if specified, it will write the output into it. It will be + # converted to a {GPGME::Data} object, so it could be a file for example. + # * +:mode+ Desired type of signature. Options are: + # - +GPGME::SIG_MODE_NORMAL+ for a normal signature. The default one if + # not specified. + # - +GPGME::SIG_MODE_DETACH+ for a detached signature + # - +GPGME::SIG_MODE_CLEAR+ for a cleartext signature + # * Any other option accepted by {GPGME::Ctx.new} + # @raise [GPGME::Error::UnusableSecretKey] TODO don't know when + # @return [GPGME::Data] a {GPGME::Data} that can be read. + # + # source://gpgme//lib/gpgme/crypto.rb#235 + def sign(text, options = T.unsafe(nil)); end + + # Verifies a previously signed element + # + # crypto.verify sig, options, &block + # + # Must have the proper keys available. + # + # @example simple verification + # sign = crypto.sign("Hi there") + # data = crypto.verify(sign) { |signature| signature.valid? } + # data.read # => "Hi there" + # @example saving output to file + # sign = crypto.sign("Hi there") + # out = File.open("test.asc", "w+") + # crypto.verify(sign, :output => out) {|signature| signature.valid?} + # out.read # => "Hi there" + # @example verifying a detached signature + # sign = crypto.detach_sign("Hi there") + # # Will fail + # crypto.verify(sign) { |signature| signature.valid? } + # # Will succeed + # crypto.verify(sign, :signed_text => "hi there") do |signature| + # signature.valid? + # end + # @param sig The signature itself. Must be possible to convert into a {GPGME::Data} + # object, so can be a file. + # @param options [Hash] * +:signed_text+ if the sign is detached, then must be the plain text + # for which the signature was created. + # * +:output+ where to store the result of the signature. Will be + # converted to a {GPGME::Data} object. + # * Any other option accepted by {GPGME::Ctx.new} + # @param &block In the block all the signatures are yielded, so one could verify them. + # See examples. + # @return [GPGME::Data] unless the sign is detached, the {GPGME::Data} + # object with the plain text. If the sign is detached, will return nil. + # + # source://gpgme//lib/gpgme/crypto.rb#304 + def verify(sig, options = T.unsafe(nil)); end + + class << self + # Allows calling of methods directly in the module without the need to + # create a new instance. + # + # source://gpgme//lib/gpgme/crypto.rb#347 + def method_missing(method, *args, &block); end + end +end + +# A context within which all cryptographic operations are performed. +# +# More operations can be done which are not available in the higher level +# API. Note how to create a new instance of this class in {GPGME::Ctx.new}. +# +# source://gpgme//lib/gpgme/ctx.rb#9 +class GPGME::Ctx + # Add _keys_ to the list of signers. + # + # source://gpgme//lib/gpgme/ctx.rb#461 + def add_signer(*keys); end + + # Return true if the output is ASCII armored. + # + # source://gpgme//lib/gpgme/ctx.rb#127 + def armor; end + + # Tell whether the output should be ASCII armored. + # + # source://gpgme//lib/gpgme/ctx.rb#121 + def armor=(yes); end + + # Edit attributes of the key on the card. + # + # source://gpgme//lib/gpgme/ctx.rb#412 + def card_edit(key, editfunc, hook_value = T.unsafe(nil), out = T.unsafe(nil)); end + + # Remove the list of signers from this object. + # + # source://gpgme//lib/gpgme/ctx.rb#456 + def clear_signers; end + + # Decrypt the ciphertext and return the plaintext. + # + # source://gpgme//lib/gpgme/ctx.rb#425 + def decrypt(cipher, plain = T.unsafe(nil)); end + + # source://gpgme//lib/gpgme/ctx.rb#439 + def decrypt_result; end + + # source://gpgme//lib/gpgme/ctx.rb#432 + def decrypt_verify(cipher, plain = T.unsafe(nil)); end + + # Delete the key from the key ring. + # If allow_secret is false, only public keys are deleted, + # otherwise secret keys are deleted as well. + # + # source://gpgme//lib/gpgme/ctx.rb#396 + def delete(key, allow_secret = T.unsafe(nil)); end + + # Delete the key from the key ring. + # If allow_secret is false, only public keys are deleted, + # otherwise secret keys are deleted as well. + # + # source://gpgme//lib/gpgme/ctx.rb#396 + def delete_key(key, allow_secret = T.unsafe(nil)); end + + # Convenient method to iterate over keys. + # + # If +pattern+ is +nil+, all available keys are returned. If +secret_only+ + # is +true+, only secret keys are returned. + # + # See {GPGME::Key.find} for an example of how to use, or for an easier way + # to use. + # + # source://gpgme//lib/gpgme/ctx.rb#305 + def each_key(pattern = T.unsafe(nil), secret_only = T.unsafe(nil), &block); end + + # Convenient method to iterate over keys. + # + # If +pattern+ is +nil+, all available keys are returned. If +secret_only+ + # is +true+, only secret keys are returned. + # + # See {GPGME::Key.find} for an example of how to use, or for an easier way + # to use. + # + # source://gpgme//lib/gpgme/ctx.rb#305 + def each_keys(pattern = T.unsafe(nil), secret_only = T.unsafe(nil), &block); end + + # Edit attributes of the key in the local key ring. + # + # source://gpgme//lib/gpgme/ctx.rb#404 + def edit(key, editfunc, hook_value = T.unsafe(nil), out = T.unsafe(nil)); end + + # Edit attributes of the key on the card. + # + # source://gpgme//lib/gpgme/ctx.rb#412 + def edit_card(key, editfunc, hook_value = T.unsafe(nil), out = T.unsafe(nil)); end + + # Edit attributes of the key on the card. + # + # source://gpgme//lib/gpgme/ctx.rb#412 + def edit_card_key(key, editfunc, hook_value = T.unsafe(nil), out = T.unsafe(nil)); end + + # Edit attributes of the key in the local key ring. + # + # source://gpgme//lib/gpgme/ctx.rb#404 + def edit_key(key, editfunc, hook_value = T.unsafe(nil), out = T.unsafe(nil)); end + + # Encrypt the plaintext in the data object for the recipients and + # return the ciphertext. + # + # source://gpgme//lib/gpgme/ctx.rb#485 + def encrypt(recp, plain, cipher = T.unsafe(nil), flags = T.unsafe(nil)); end + + # source://gpgme//lib/gpgme/ctx.rb#492 + def encrypt_result; end + + # source://gpgme//lib/gpgme/ctx.rb#496 + def encrypt_sign(recp, plain, cipher = T.unsafe(nil), flags = T.unsafe(nil)); end + + # Extract the public keys that match the +recipients+. Returns a + # {GPGME::Data} object which is not rewinded (should do +seek(0)+ + # before reading). + # + # Private keys cannot be exported due to GPGME restrictions. + # + # If passed, the key will be exported to +keydata+, which must be + # a {GPGME::Data} object. + # + # source://gpgme//lib/gpgme/ctx.rb#373 + def export(recipients, keydata = T.unsafe(nil), mode = T.unsafe(nil)); end + + # Extract the public keys that match the +recipients+. Returns a + # {GPGME::Data} object which is not rewinded (should do +seek(0)+ + # before reading). + # + # Private keys cannot be exported due to GPGME restrictions. + # + # If passed, the key will be exported to +keydata+, which must be + # a {GPGME::Data} object. + # + # source://gpgme//lib/gpgme/ctx.rb#373 + def export_keys(recipients, keydata = T.unsafe(nil), mode = T.unsafe(nil)); end + + # Generate a new key pair. + # +parms+ is a string which looks like + # + # + # Key-Type: DSA + # Key-Length: 1024 + # Subkey-Type: ELG-E + # Subkey-Length: 1024 + # Name-Real: Joe Tester + # Name-Comment: with stupid passphrase + # Name-Email: joe@foo.bar + # Expire-Date: 0 + # Passphrase: abc + # + # + # If +pubkey+ and +seckey+ are both set to +nil+, it stores the generated + # key pair into your key ring. + # + # source://gpgme//lib/gpgme/ctx.rb#358 + def generate_key(parms, pubkey = T.unsafe(nil), seckey = T.unsafe(nil)); end + + # Generate a new key pair. + # +parms+ is a string which looks like + # + # + # Key-Type: DSA + # Key-Length: 1024 + # Subkey-Type: ELG-E + # Subkey-Length: 1024 + # Name-Real: Joe Tester + # Name-Comment: with stupid passphrase + # Name-Email: joe@foo.bar + # Expire-Date: 0 + # Passphrase: abc + # + # + # If +pubkey+ and +seckey+ are both set to +nil+, it stores the generated + # key pair into your key ring. + # + # source://gpgme//lib/gpgme/ctx.rb#358 + def genkey(parms, pubkey = T.unsafe(nil), seckey = T.unsafe(nil)); end + + # Get the key with the +fingerprint+. + # If +secret+ is +true+, secret key is returned. + # + # source://gpgme//lib/gpgme/ctx.rb#329 + def get_key(fingerprint, secret = T.unsafe(nil)); end + + # Add the keys in the data buffer to the key ring. + # + # source://gpgme//lib/gpgme/ctx.rb#382 + def import(keydata); end + + # Add the keys in the data buffer to the key ring. + # + # source://gpgme//lib/gpgme/ctx.rb#382 + def import_keys(keydata); end + + # source://gpgme//lib/gpgme/ctx.rb#389 + def import_result; end + + # source://gpgme//lib/gpgme/ctx.rb#510 + def inspect; end + + # End a pending key list operation. + # + # Used by {GPGME::Ctx#each_key} + # + # source://gpgme//lib/gpgme/ctx.rb#292 + def keylist_end; end + + # Return the current key listing mode. + # + # source://gpgme//lib/gpgme/ctx.rb#149 + def keylist_mode; end + + # Change the default behaviour of the key listing functions. + # + # source://gpgme//lib/gpgme/ctx.rb#143 + def keylist_mode=(mode); end + + # Advance to the next key in the key listing operation. + # + # Used by {GPGME::Ctx#each_key} + # + # source://gpgme//lib/gpgme/ctx.rb#281 + def keylist_next; end + + # Initiate a key listing operation for given pattern. If +pattern+ is + # +nil+, all available keys are returned. If +secret_only<+ is +true+, + # only secret keys are returned. + # + # Used by {GPGME::Ctx#each_key} + # + # source://gpgme//lib/gpgme/ctx.rb#272 + def keylist_start(pattern = T.unsafe(nil), secret_only = T.unsafe(nil)); end + + # Returns the keys that match the +pattern+, or all if +pattern+ is nil. + # Returns only secret keys if +secret_only+ is true. + # + # source://gpgme//lib/gpgme/ctx.rb#319 + def keys(pattern = T.unsafe(nil), secret_only = T.unsafe(nil)); end + + # Return the current offline mode. + # + # source://gpgme//lib/gpgme/ctx.rb#172 + def offline; end + + # Change the default behaviour of the dirmngr that might require + # connections to external services. + # + # source://gpgme//lib/gpgme/ctx.rb#166 + def offline=(mode); end + + # Return the current pinentry mode. + # + # source://gpgme//lib/gpgme/ctx.rb#160 + def pinentry_mode; end + + # Change the default behaviour of the pinentry invocation. + # + # source://gpgme//lib/gpgme/ctx.rb#154 + def pinentry_mode=(mode); end + + # Return the +protocol+ used within this context. + # + # source://gpgme//lib/gpgme/ctx.rb#116 + def protocol; end + + # Set the +protocol+ used within this context. See {GPGME::Ctx.new} for + # possible values. + # + # source://gpgme//lib/gpgme/ctx.rb#108 + def protocol=(proto); end + + # Releases the Ctx instance. Must be called if it was initialized without + # a block. + # + # @example + # ctx = GPGME::Ctx.new + # # operate on ctx + # ctx.release + # + # source://gpgme//lib/gpgme/ctx.rb#98 + def release; end + + # Set the passphrase callback with given hook value. + # +passfunc+ should respond to +call+ with 5 arguments. + # + # * +obj+ the parameter +:passphrase_callback_value+ passed when creating + # the {GPGME::Ctx} object. + # * +uid_hint+ hint as to what key are we asking the password for. Ex: + # + # +CFB3294A50C2CFD7 Albert Llop + + # + # * +passphrase_info+ + # * +prev_was_bad+ 0 if it's the first time the password is being asked, + # 1 otherwise. + # * +fd+ file descriptor where the password must be written too. + # + # Expects a Method object which can be obtained by the +method+ method + # (really..). + # + # ctx.set_passphrase_callback(MyModule.method(:passfunc)) + # + # Note that this function doesn't work with GnuPG 2.0. You can + # use either GnuPG 1.x, which can be installed in parallel with + # GnuPG 2.0, or GnuPG 2.1, which has loopback pinentry feature (see + # {#pinentry_mode}). + # + # @example this method will simply return +maria+ as password. + # def pass_function(obj, uid_hint, passphrase_info, prev_was_bad, fd) + # io = IO.for_fd(fd, 'w') + # io.puts "maria" + # io.flush + # end + # @example this will interactively ask for the password + # def passfunc(obj, uid_hint, passphrase_info, prev_was_bad, fd) + # $stderr.write("Passphrase for #{uid_hint}: ") + # $stderr.flush + # begin + # system('stty -echo') + # io = IO.for_fd(fd, 'w') + # io.puts(gets) + # io.flush + # ensure + # (0 ... $_.length).each do |i| $_[i] = ?0 end if $_ + # system('stty echo') + # end + # $stderr.puts + # end + # + # source://gpgme//lib/gpgme/ctx.rb#226 + def set_passphrase_callback(passfunc, hook_value = T.unsafe(nil)); end + + # Set the passphrase callback with given hook value. + # +passfunc+ should respond to +call+ with 5 arguments. + # + # * +obj+ the parameter +:passphrase_callback_value+ passed when creating + # the {GPGME::Ctx} object. + # * +uid_hint+ hint as to what key are we asking the password for. Ex: + # + # +CFB3294A50C2CFD7 Albert Llop + + # + # * +passphrase_info+ + # * +prev_was_bad+ 0 if it's the first time the password is being asked, + # 1 otherwise. + # * +fd+ file descriptor where the password must be written too. + # + # Expects a Method object which can be obtained by the +method+ method + # (really..). + # + # ctx.set_passphrase_callback(MyModule.method(:passfunc)) + # + # Note that this function doesn't work with GnuPG 2.0. You can + # use either GnuPG 1.x, which can be installed in parallel with + # GnuPG 2.0, or GnuPG 2.1, which has loopback pinentry feature (see + # {#pinentry_mode}). + # + # @example this method will simply return +maria+ as password. + # def pass_function(obj, uid_hint, passphrase_info, prev_was_bad, fd) + # io = IO.for_fd(fd, 'w') + # io.puts "maria" + # io.flush + # end + # @example this will interactively ask for the password + # def passfunc(obj, uid_hint, passphrase_info, prev_was_bad, fd) + # $stderr.write("Passphrase for #{uid_hint}: ") + # $stderr.flush + # begin + # system('stty -echo') + # io = IO.for_fd(fd, 'w') + # io.puts(gets) + # io.flush + # ensure + # (0 ... $_.length).each do |i| $_[i] = ?0 end if $_ + # system('stty echo') + # end + # $stderr.puts + # end + # + # source://gpgme//lib/gpgme/ctx.rb#226 + def set_passphrase_cb(passfunc, hook_value = T.unsafe(nil)); end + + # Set the progress callback with given hook value. + # progfunc should respond to call with 5 arguments. + # + # def progfunc(hook, what, type, current, total) + # $stderr.write("#{what}: #{current}/#{total}\r") + # $stderr.flush + # end + # + # ctx.set_progress_callback(method(:progfunc)) + # + # source://gpgme//lib/gpgme/ctx.rb#241 + def set_progress_callback(progfunc, hook_value = T.unsafe(nil)); end + + # Set the progress callback with given hook value. + # progfunc should respond to call with 5 arguments. + # + # def progfunc(hook, what, type, current, total) + # $stderr.write("#{what}: #{current}/#{total}\r") + # $stderr.flush + # end + # + # ctx.set_progress_callback(method(:progfunc)) + # + # source://gpgme//lib/gpgme/ctx.rb#241 + def set_progress_cb(progfunc, hook_value = T.unsafe(nil)); end + + # Set the status callback with given hook value. + # +statusfunc+ should respond to +call+ with 3 arguments. + # + # * +obj+ the parameter +:status_callback_value+ passed when creating + # the {GPGME::Ctx} object. + # * +keyword+ the name of the status message + # * +args+ any arguments for the status message + # + # def status_function(obj, keyword, args) + # $stderr.puts("#{keyword} #{args}") + # return 0 + # end + # + # source://gpgme//lib/gpgme/ctx.rb#258 + def set_status_callback(statusfunc, hook_value = T.unsafe(nil)); end + + # Set the status callback with given hook value. + # +statusfunc+ should respond to +call+ with 3 arguments. + # + # * +obj+ the parameter +:status_callback_value+ passed when creating + # the {GPGME::Ctx} object. + # * +keyword+ the name of the status message + # * +args+ any arguments for the status message + # + # def status_function(obj, keyword, args) + # $stderr.puts("#{keyword} #{args}") + # return 0 + # end + # + # source://gpgme//lib/gpgme/ctx.rb#258 + def set_status_cb(statusfunc, hook_value = T.unsafe(nil)); end + + # Create a signature for the text. + # +plain+ is a data object which contains the text. + # +sig+ is a data object where the generated signature is stored. + # + # source://gpgme//lib/gpgme/ctx.rb#472 + def sign(plain, sig = T.unsafe(nil), mode = T.unsafe(nil)); end + + # source://gpgme//lib/gpgme/ctx.rb#479 + def sign_result; end + + # source://gpgme//lib/gpgme/ctx.rb#503 + def spawn(file, argv, datain, dataout, dataerr, flags = T.unsafe(nil)); end + + # Return true if canonical text mode is enabled. + # + # source://gpgme//lib/gpgme/ctx.rb#138 + def textmode; end + + # Tell whether canonical text mode should be used. + # + # source://gpgme//lib/gpgme/ctx.rb#132 + def textmode=(yes); end + + # Verify that the signature in the data object is a valid signature. + # + # source://gpgme//lib/gpgme/ctx.rb#444 + def verify(sig, signed_text = T.unsafe(nil), plain = T.unsafe(nil)); end + + # source://gpgme//lib/gpgme/ctx.rb#451 + def verify_result; end + + class << self + # Create a new instance from the given +options+. Must be released either + # executing the operations inside a block, or executing {GPGME::Ctx#release} + # afterwards. + # + # @example + # ctx = GPGME::Ctx.new + # # operate on ctx + # ctx.release + # @example + # GPGME::Ctx.new do |ctx| + # # operate on ctx + # end + # @param options [Hash] The optional parameters are as follows: + # * +:protocol+ Either +PROTOCOL_OpenPGP+ or +PROTOCOL_CMS+. + # * +:armor+ will return ASCII armored outputs if specified true. + # * +:textmode+ if +true+, inform the recipient that the input is text. + # * +:keylist_mode+ One of: +KEYLIST_MODE_LOCAL+, +KEYLIST_MODE_EXTERN+, + # +KEYLIST_MODE_SIGS+ or +KEYLIST_MODE_VALIDATE+. + # * +:pinentry_mode+ One of: +PINENTRY_MODE_DEFAULT+, + # +PINENTRY_MODE_ASK+, +PINENTRY_MODE_CANCEL+, + # +PINENTRY_MODE_ERROR+, or +PINENTRY_MODE_LOOPBACK+. + # * +:offline+ if set to true, dirmngr will not contact external services + # * +:password+ password of the passphrased password being used. + # * +:passphrase_callback+ A callback function. See {#set_passphrase_callback}. + # * +:passphrase_callback_value+ An object passed to passphrase_callback. + # * +:progress_callback+ A callback function. See {#set_progress_callback}. + # * +:progress_callback_value+ An object passed to progress_callback. + # * +:status_callback+ A callback function. See {#set_status_callback}. + # * +:status_callback_value+ An object passed to status_callback. + # + # source://gpgme//lib/gpgme/ctx.rb#45 + def new(options = T.unsafe(nil)); end + + # source://gpgme//lib/gpgme/ctx.rb#518 + def pass_function(pass, uid_hint, passphrase_info, prev_was_bad, fd); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#34 +GPGME::DATA_ENCODING_ARMOR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#35 +GPGME::DATA_ENCODING_BASE64 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#36 +GPGME::DATA_ENCODING_BINARY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#37 +GPGME::DATA_ENCODING_NONE = T.let(T.unsafe(nil), Integer) + +# A class whose purpose is to unify the way we work with the data (both input +# and output). Most of the calls expect instances of this class, or will try +# to create one from your parameters. +# +# Read the {#read}, {#write} and {#seek} methods for the most commonly used +# methods. +# +# source://gpgme//lib/gpgme/data.rb#10 +class GPGME::Data + # Return the encoding of the underlying data. + # + # source://gpgme//lib/gpgme/data.rb#163 + def encoding; end + + # Sets the encoding for this buffer. Accepts only integer values 0 to 7: + # + # 0 = GPGME_DATA_ENCODING_NONE (Not specified) + # 1 = GPGME_DATA_ENCODING_BINARY + # 2 = GPGME_DATA_ENCODING_BASE64 + # 3 = GPGME_DATA_ENCODING_ARMOR (Either PEM or OpenPGP Armor) + # 4 = GPGME_DATA_ENCODING_URL (LF delimited URL list) + # 5 = GPGME_DATA_ENCODING_URLESC (Ditto, but percent escaped) + # 6 = GPGME_DATA_ENCODING_URL0 (Nul delimited URL list) + # 7 = GPGME_DATA_ENCODING_MIME (Data is a MIME part) + # + # @raise [GPGME::Error::InvalidValue] if the value isn't accepted. + # + # source://gpgme//lib/gpgme/data.rb#180 + def encoding=(encoding); end + + # Return the file name of the underlying data. + # + # source://gpgme//lib/gpgme/data.rb#189 + def file_name; end + + # Sets the file name for this buffer. + # + # @raise [GPGME::Error::InvalidValue] if the value isn't accepted. + # + # source://gpgme//lib/gpgme/data.rb#197 + def file_name=(file_name); end + + # Read at most +length+ bytes from the data object, or to the end + # of file if +length+ is omitted or is +nil+. + # + # @example + # data = GPGME::Data.new("From a string") + # data.read # => "From a string" + # @example + # data = GPGME::Data.new("From a string") + # data.read(4) # => "From" + # + # source://gpgme//lib/gpgme/data.rb#112 + def read(length = T.unsafe(nil)); end + + # Seek to a given +offset+ in the data object according to the + # value of +whence+. + # + # @example going to the beginning of the buffer after writing something + # data = GPGME::Data.new("Some data") + # data.read # => "Some data" + # data.read # => "" + # data.seek 0 + # data.read # => "Some data" + # + # source://gpgme//lib/gpgme/data.rb#137 + def seek(offset, whence = T.unsafe(nil)); end + + # Return the entire content of the data object as string. + # + # source://gpgme//lib/gpgme/data.rb#206 + def to_s; end + + # Writes +length+ bytes from +buffer+ into the data object. + # Writes the full buffer if no length passed. + # + # @example + # data = GPGME::Data.new + # data.write "hola" + # data.seek 0 + # data.read # => "hola" + # @example + # data = GPGME::Data.new + # data.write "hola", 2 + # data.seek 0 + # data.read # => "ho" + # + # source://gpgme//lib/gpgme/data.rb#157 + def write(buffer, length = T.unsafe(nil)); end + + class << self + # Create a new instance with an empty buffer. + # + # source://gpgme//lib/gpgme/data.rb#60 + def empty!; end + + # Create a new instance from the specified callbacks. + # + # source://gpgme//lib/gpgme/data.rb#92 + def from_callbacks(callbacks, hook_value = T.unsafe(nil)); end + + # Create a new instance from the specified file descriptor. + # + # source://gpgme//lib/gpgme/data.rb#83 + def from_fd(fd); end + + # Create a new instance associated with a given IO. + # + # source://gpgme//lib/gpgme/data.rb#78 + def from_io(io); end + + # Create a new instance with internal buffer. + # + # source://gpgme//lib/gpgme/data.rb#69 + def from_str(string); end + + # We implement +self.new+ instead of initialize because objects are actually + # instantiated through the C API with stuff like +gpgme_data_new+. + # + # We try to create a {GPGME::Data} smartly depending on the object passed, and if + # another {GPGME::Data} object is passed, it just returns it, so when in + # doubt, you can always pass a {GPGME::Data} object. + # + # @example empty + # data = GPGME::Data.new + # data.write("stuff") + # @example from a string + # data = GPGME::Data.new("From a string") + # @example from a file + # data = GPGME::Data.new(File.open("secure.pass")) + # @example from a file descriptor + # data = GPGME::Data.new(0) # Standard input + # data = GPGME::Data.new(1) # Standard output + # + # file = File.open("secure.pass") + # data = GPGME::Data.new(file.fileno) # file descriptor + # + # source://gpgme//lib/gpgme/data.rb#41 + def new(object = T.unsafe(nil)); end + end +end + +# source://gpgme//lib/gpgme/data.rb#12 +GPGME::Data::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/misc.rb#21 +class GPGME::DecryptResult + # Returns the value of attribute file_name. + # + # source://gpgme//lib/gpgme/misc.rb#25 + def file_name; end + + # Returns the value of attribute recipients. + # + # source://gpgme//lib/gpgme/misc.rb#25 + def recipients; end + + # Returns the value of attribute unsupported_algorithm. + # + # source://gpgme//lib/gpgme/misc.rb#24 + def unsupported_algorithm; end + + # Returns the value of attribute wrong_key_usage. + # + # source://gpgme//lib/gpgme/misc.rb#24 + def wrong_key_usage; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#38 +GPGME::ENCRYPT_ALWAYS_TRUST = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#240 +GPGME::EXPORT_MODE_EXTERN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#244 +GPGME::EXPORT_MODE_MINIMAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#250 +GPGME::EXPORT_MODE_PKCS12 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#249 +GPGME::EXPORT_MODE_RAW = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#248 +GPGME::EXPORT_MODE_SECRET = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/misc.rb#34 +class GPGME::EncryptResult + # Returns the value of attribute invalid_recipients. + # + # source://gpgme//lib/gpgme/misc.rb#37 + def invalid_recipients; end + + class << self + private + + def new(*_arg0); end + end +end + +# Convenience methods to check different aspects of the gpg system +# installation. +# +# source://gpgme//lib/gpgme/engine.rb#6 +module GPGME::Engine + class << self + # Verify that the engine implementing the protocol +proto+ is installed in + # the system. Can be one of +PROTOCOL_OpenPGP+ or +PROTOCOL_CMS+. + # + # @example + # GPGME::Engine.check_version(GPGME::PROTOCOL_OpenPGP) # => true + # @return [Boolean] true if the engine is installed. + # + # source://gpgme//lib/gpgme/engine.rb#18 + def check_version(proto); end + + # Return the default configuration. + # + # @example + # GPGME::Engine.dirinfo('homedir') + # # => '/home/user/.gnupg" + # + # source://gpgme//lib/gpgme/engine.rb#82 + def dirinfo(what); end + + # Sets the home dir for the configuration options. This way one could, + # for example, load the keys from a customized keychain. + # + # @example + # GPGME::Engine.home_dir = '/tmp' + # + # source://gpgme//lib/gpgme/engine.rb#70 + def home_dir=(home_dir); end + + # Return an array of {GPGME::EngineInfo} structures of enabled engines. + # + # @example + # GPGME::Engine.info.first + # # => # + # + # source://gpgme//lib/gpgme/engine.rb#35 + def info; end + + # Change the default configuration of the crypto engine implementing + # protocol +proto+. + # + # @example + # GPGME::Engine.set_info(GPGME::PROTOCOL_OpenPGP, '/usr/local/bin/gpg', home_dir) + # @param proto Can be one of +PROTOCOL_OpenPGP+ or +PROTOCOL_CMS+. + # @param file_name The file name of the executable program implementing the protocol. + # @param home_dir The directory name of the configuration directory. + # + # source://gpgme//lib/gpgme/engine.rb#57 + def set_info(proto, file_name, home_dir); end + end +end + +# source://gpgme//lib/gpgme/misc.rb#2 +class GPGME::EngineInfo + # Returns the value of attribute file_name. + # + # source://gpgme//lib/gpgme/misc.rb#5 + def file_name; end + + # Returns the value of attribute home_dir. + # + # source://gpgme//lib/gpgme/misc.rb#5 + def home_dir; end + + # Returns the value of attribute protocol. + # + # source://gpgme//lib/gpgme/misc.rb#5 + def protocol; end + + # Returns the value of attribute req_version. + # + # source://gpgme//lib/gpgme/misc.rb#5 + def req_version; end + + # Returns the value of attribute req_version. + # + # source://gpgme//lib/gpgme/misc.rb#5 + def required_version; end + + # Returns the value of attribute version. + # + # source://gpgme//lib/gpgme/misc.rb#5 + def version; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/error.rb#2 +class GPGME::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://gpgme//lib/gpgme/error.rb#3 + def initialize(error); end + + # Return the error code. + # + # The error code indicates the type of an error, or the reason why + # an operation failed. + # + # source://gpgme//lib/gpgme/error.rb#12 + def code; end + + # Returns the value of attribute error. + # + # source://gpgme//lib/gpgme/error.rb#6 + def error; end + + # Return a description of the error code. + # + # source://gpgme//lib/gpgme/error.rb#29 + def message; end + + # Return the error source. + # + # The error source has not a precisely defined meaning. Sometimes + # it is the place where the error happened, sometimes it is the + # place where an error was encoded into an error value. Usually + # the error source will give an indication to where to look for + # the problem. This is not always true, but it is attempted to + # achieve this goal. + # + # source://gpgme//lib/gpgme/error.rb#24 + def source; end +end + +# source://gpgme//lib/gpgme/error.rb#48 +class GPGME::Error::AmbiguousName < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#58 +class GPGME::Error::BadCertificateChain < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#45 +class GPGME::Error::BadPassphrase < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#62 +class GPGME::Error::BadSignature < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#46 +class GPGME::Error::Canceled < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#53 +class GPGME::Error::CertificateExpired < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#52 +class GPGME::Error::CertificateRevoked < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#42 +class GPGME::Error::Conflict < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#44 +class GPGME::Error::DecryptFailed < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#33 +class GPGME::Error::General < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#47 +class GPGME::Error::InvalidEngine < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#34 +class GPGME::Error::InvalidValue < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#64 +class GPGME::Error::InvalidVersion < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#57 +class GPGME::Error::MissingCertificate < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#54 +class GPGME::Error::NoCRLKnown < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#41 +class GPGME::Error::NoData < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#55 +class GPGME::Error::NoPolicyMatch < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#63 +class GPGME::Error::NoPublicKey < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#56 +class GPGME::Error::NoSecretKey < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#43 +class GPGME::Error::NotImplemented < ::GPGME::Error; end + +# source://gpgme//lib/gpgme/error.rb#59 +class GPGME::Error::UnsupportedAlgorithm < ::GPGME::Error + # Returns the value of attribute algorithm. + # + # source://gpgme//lib/gpgme/error.rb#60 + def algorithm; end + + # Sets the attribute algorithm + # + # @param value the value to set the attribute algorithm to. + # + # source://gpgme//lib/gpgme/error.rb#60 + def algorithm=(_arg0); end +end + +# source://gpgme//lib/gpgme/error.rb#35 +class GPGME::Error::UnusablePublicKey < ::GPGME::Error + # Returns the value of attribute keys. + # + # source://gpgme//lib/gpgme/error.rb#36 + def keys; end + + # Sets the attribute keys + # + # @param value the value to set the attribute keys to. + # + # source://gpgme//lib/gpgme/error.rb#36 + def keys=(_arg0); end +end + +# source://gpgme//lib/gpgme/error.rb#38 +class GPGME::Error::UnusableSecretKey < ::GPGME::Error + # Returns the value of attribute keys. + # + # source://gpgme//lib/gpgme/error.rb#39 + def keys; end + + # Sets the attribute keys + # + # @param value the value to set the attribute keys to. + # + # source://gpgme//lib/gpgme/error.rb#39 + def keys=(_arg0); end +end + +# source://gpgme//lib/gpgme/error.rb#49 +class GPGME::Error::WrongKeyUsage < ::GPGME::Error + # Returns the value of attribute key_usage. + # + # source://gpgme//lib/gpgme/error.rb#50 + def key_usage; end + + # Sets the attribute key_usage + # + # @param value the value to set the attribute key_usage to. + # + # source://gpgme//lib/gpgme/error.rb#50 + def key_usage=(_arg0); end +end + +GPGME::GPGME_ATTR_ALGO = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_CAN_CERTIFY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_CAN_ENCRYPT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_CAN_SIGN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_CHAINID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_COMMENT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_CREATED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_EMAIL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_ERRTOK = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_EXPIRE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_FPR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_ISSUER = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_IS_SECRET = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_KEYID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_KEY_CAPS = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_KEY_DISABLED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_KEY_EXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_KEY_INVALID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_KEY_REVOKED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_LEN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_LEVEL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_NAME = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_OTRUST = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_SERIAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_SIG_STATUS = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_SIG_SUMMARY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_TYPE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_UID_INVALID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_UID_REVOKED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_USERID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ATTR_VALIDITY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_DATA_ENCODING_ARMOR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_DATA_ENCODING_BASE64 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_DATA_ENCODING_BINARY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_DATA_ENCODING_NONE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_ENCRYPT_ALWAYS_TRUST = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_EXPORT_MODE_EXTERN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_EXPORT_MODE_MINIMAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_EXPORT_MODE_PKCS12 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_EXPORT_MODE_RAW = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_EXPORT_MODE_SECRET = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_IMPORT_NEW = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_IMPORT_SECRET = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_IMPORT_SIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_IMPORT_SUBKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_IMPORT_UID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_EPHEMERAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_EXTERN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_LOCAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_SIGS = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_SIG_NOTATIONS = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_VALIDATE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_KEYLIST_MODE_WITH_SECRET = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_CRC24_RFC2440 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_CRC32 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_CRC32_RFC1510 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_HAVAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_MD2 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_MD4 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_MD5 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_RMD160 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_SHA1 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_SHA256 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_SHA384 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_SHA512 = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_MD_TIGER = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PINENTRY_MODE_ASK = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PINENTRY_MODE_CANCEL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PINENTRY_MODE_DEFAULT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PINENTRY_MODE_ERROR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PINENTRY_MODE_LOOPBACK = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PK_DSA = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PK_ELG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PK_ELG_E = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PK_RSA = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PROTOCOL_CMS = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_PROTOCOL_OpenPGP = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_BAD_POLICY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_CRL_MISSING = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_CRL_TOO_OLD = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_GREEN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_KEY_EXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_KEY_MISSING = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_KEY_REVOKED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_RED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_SIG_EXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_SYS_ERROR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIGSUM_VALID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_MODE_CLEAR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_MODE_DETACH = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_MODE_NORMAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_BAD = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_DIFF = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_ERROR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_GOOD = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_GOOD_EXP = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_GOOD_EXPKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_NOKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_NONE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SIG_STAT_NOSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SPAWN_ALLOW_SET_FG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_SPAWN_DETACHED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ABORT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ALREADY_SIGNED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ATTRIBUTE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BADARMOR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BADMDC = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BADSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BAD_PASSPHRASE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BEGIN_DECRYPTION = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BEGIN_ENCRYPTION = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BEGIN_SIGNING = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_BEGIN_STREAM = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_DECRYPTION_FAILED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_DECRYPTION_OKAY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_DELETE_PROBLEM = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ENC_TO = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_END_DECRYPTION = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_END_ENCRYPTION = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_END_STREAM = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ENTER = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_EOF = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ERRMDC = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ERROR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_ERRSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_EXPKEYSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_EXPSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_FILE_DONE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_FILE_ERROR = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_FILE_START = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GET_BOOL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GET_HIDDEN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GET_LINE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GOODMDC = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GOODSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GOOD_PASSPHRASE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_GOT_IT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_IMPORTED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_IMPORT_RES = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_INV_RECP = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_KEYEXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_KEYREVOKED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_KEY_CREATED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_KEY_NOT_CREATED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_LEAVE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_MISSING_PASSPHRASE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_MOUNTPOINT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NEED_PASSPHRASE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NEED_PASSPHRASE_SYM = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NODATA = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NOTATION_DATA = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NOTATION_NAME = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NO_PUBKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NO_RECP = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_NO_SECKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_PINENTRY_LAUNCHED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_PLAINTEXT_LENGTH = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_POLICY_URL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_PROGRESS = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_RSA_OR_IDEA = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SESSION_KEY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SHM_GET = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SHM_GET_BOOL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SHM_GET_HIDDEN = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SHM_INFO = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SIGEXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SIG_CREATED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_SIG_ID = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_TRUNCATED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_TRUST_FULLY = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_TRUST_MARGINAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_TRUST_NEVER = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_TRUST_ULTIMATE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_TRUST_UNDEFINED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_UNEXPECTED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_USERID_HINT = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_STATUS_VALIDSIG = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_VALIDITY_FULL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_VALIDITY_MARGINAL = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_VALIDITY_NEVER = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_VALIDITY_ULTIMATE = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_VALIDITY_UNDEFINED = T.let(T.unsafe(nil), Integer) +GPGME::GPGME_VALIDITY_UNKNOWN = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_AMBIGUOUS_NAME = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_BAD_CERT_CHAIN = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_BAD_PASSPHRASE = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_BAD_SIGNATURE = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_CANCELED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_CERT_EXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_CERT_REVOKED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_CONFLICT = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_DECRYPT_FAILED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_ENOMEM = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_EOF = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_GENERAL = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_INV_ENGINE = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_INV_VALUE = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_KEY_EXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_MISSING_CERT = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NOT_IMPLEMENTED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NO_CRL_KNOWN = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NO_DATA = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NO_ERROR = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NO_POLICY_MATCH = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NO_PUBKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_NO_SECKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SIG_EXPIRED = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_GCRYPT = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_GPG = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_GPGAGENT = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_GPGME = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_GPGSM = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_KEYBOX = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_PINENTRY = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_SCD = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_UNKNOWN = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_USER_1 = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_USER_2 = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_USER_3 = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_SOURCE_USER_4 = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_UNSUPPORTED_ALGORITHM = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_UNUSABLE_PUBKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_UNUSABLE_SECKEY = T.let(T.unsafe(nil), Integer) +GPGME::GPG_ERR_WRONG_KEY_USAGE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#42 +GPGME::IMPORT_NEW = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#43 +GPGME::IMPORT_SECRET = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#44 +GPGME::IMPORT_SIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#45 +GPGME::IMPORT_SUBKEY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#46 +GPGME::IMPORT_UID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/io_callbacks.rb#2 +class GPGME::IOCallbacks + # @return [IOCallbacks] a new instance of IOCallbacks + # + # source://gpgme//lib/gpgme/io_callbacks.rb#3 + def initialize(io); end + + # source://gpgme//lib/gpgme/io_callbacks.rb#7 + def read(hook, length); end + + # source://gpgme//lib/gpgme/io_callbacks.rb#15 + def seek(hook, offset, whence); end + + # source://gpgme//lib/gpgme/io_callbacks.rb#11 + def write(hook, buffer, length); end +end + +# source://gpgme//lib/gpgme/misc.rb#65 +class GPGME::ImportResult + # Returns the value of attribute considered. + # + # source://gpgme//lib/gpgme/misc.rb#68 + def considered; end + + # Returns the value of attribute imported. + # + # source://gpgme//lib/gpgme/misc.rb#68 + def imported; end + + # Returns the value of attribute imported_rsa. + # + # source://gpgme//lib/gpgme/misc.rb#68 + def imported_rsa; end + + # Returns the value of attribute imports. + # + # source://gpgme//lib/gpgme/misc.rb#71 + def imports; end + + # Returns the value of attribute new_revocations. + # + # source://gpgme//lib/gpgme/misc.rb#69 + def new_revocations; end + + # Returns the value of attribute new_signatures. + # + # source://gpgme//lib/gpgme/misc.rb#69 + def new_signatures; end + + # Returns the value of attribute new_sub_keys. + # + # source://gpgme//lib/gpgme/misc.rb#69 + def new_sub_keys; end + + # Returns the value of attribute new_user_ids. + # + # source://gpgme//lib/gpgme/misc.rb#69 + def new_user_ids; end + + # Returns the value of attribute no_user_id. + # + # source://gpgme//lib/gpgme/misc.rb#68 + def no_user_id; end + + # Returns the value of attribute not_imported. + # + # source://gpgme//lib/gpgme/misc.rb#71 + def not_imported; end + + # Returns the value of attribute secret_imported. + # + # source://gpgme//lib/gpgme/misc.rb#70 + def secret_imported; end + + # Returns the value of attribute secret_read. + # + # source://gpgme//lib/gpgme/misc.rb#70 + def secret_read; end + + # Returns the value of attribute secret_unchanged. + # + # source://gpgme//lib/gpgme/misc.rb#70 + def secret_unchanged; end + + # Returns the value of attribute unchanged. + # + # source://gpgme//lib/gpgme/misc.rb#68 + def unchanged; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/misc.rb#58 +class GPGME::ImportStatus + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/misc.rb#61 + def fingerprint; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/misc.rb#61 + def fpr; end + + # Returns the value of attribute result. + # + # source://gpgme//lib/gpgme/misc.rb#61 + def result; end + + # Returns the value of attribute status. + # + # source://gpgme//lib/gpgme/misc.rb#61 + def status; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/misc.rb#40 +class GPGME::InvalidKey + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/misc.rb#43 + def fingerprint; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/misc.rb#43 + def fpr; end + + # Returns the value of attribute reason. + # + # source://gpgme//lib/gpgme/misc.rb#43 + def reason; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#55 +GPGME::KEYLIST_MODE_EPHEMERAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#47 +GPGME::KEYLIST_MODE_EXTERN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#48 +GPGME::KEYLIST_MODE_LOCAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#253 +GPGME::KEYLIST_MODE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://gpgme//lib/gpgme/constants.rb#49 +GPGME::KEYLIST_MODE_SIGS = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#52 +GPGME::KEYLIST_MODE_SIG_NOTATIONS = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#50 +GPGME::KEYLIST_MODE_VALIDATE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#58 +GPGME::KEYLIST_MODE_WITH_SECRET = T.let(T.unsafe(nil), Integer) + +# A ruby representation of a public or a secret key. +# +# Every key has two instances of {GPGME::SubKey}, accessible through +# {.subkeys}, and with a {.primary_subkey} where most attributes are +# derived from, like the +fingerprint+. +# +# Also, every key has at least a {GPGME::UserID}, accessible through +# {.uids}, with a {.primary_uid}, where other attributes are derived from, +# like +email+ or +name+ +# +# source://gpgme//lib/gpgme/key.rb#13 +class GPGME::Key + include ::GPGME::KeyCommon + + # source://gpgme//lib/gpgme/key.rb#224 + def ==(another_key); end + + # Returns the value of attribute chain_id. + # + # source://gpgme//lib/gpgme/key.rb#17 + def chain_id; end + + # Returns the issuer comment for this key. + # + # source://gpgme//lib/gpgme/key.rb#220 + def comment; end + + # Delete this key. If it's public, and has a secret one it will fail unless + # +allow_secret+ is specified as true. + # + # source://gpgme//lib/gpgme/key.rb#160 + def delete!(allow_secret = T.unsafe(nil)); end + + # Returns the email for this key. + # + # source://gpgme//lib/gpgme/key.rb#208 + def email; end + + # Returns true if the key is expired + # + # source://gpgme//lib/gpgme/key.rb#180 + def expired; end + + # Returns the expiry date for this key + # + # source://gpgme//lib/gpgme/key.rb#174 + def expires; end + + # Returns true if the key has an expiry date else false + # + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key.rb#168 + def expires?; end + + # Exports this key. Accepts the same options as {GPGME::Ctx.new}, and + # +options[:output]+, where you can specify something that can become a + # {GPGME::Data}, where the output will go. + # + # @example + # key.export(:armor => true) + # # => GPGME::Data you can read with ASCII armored format + # @example + # file = File.open("key.asc", "w+") + # key.export(:output => file) + # # => the key will be written to the file. + # + # source://gpgme//lib/gpgme/key.rb#153 + def export(options = T.unsafe(nil)); end + + # Longer descriptive value. Can be used to identify the key. + # + # source://gpgme//lib/gpgme/key.rb#196 + def fingerprint; end + + # source://gpgme//lib/gpgme/key.rb#228 + def inspect; end + + # Returns the value of attribute issuer_name. + # + # source://gpgme//lib/gpgme/key.rb#17 + def issuer_name; end + + # Returns the value of attribute issuer_serial. + # + # source://gpgme//lib/gpgme/key.rb#17 + def issuer_serial; end + + # Returns the value of attribute keylist_mode. + # + # source://gpgme//lib/gpgme/key.rb#16 + def keylist_mode; end + + # Returns the issuer name for this key. + # + # source://gpgme//lib/gpgme/key.rb#214 + def name; end + + # Returns the value of attribute owner_trust. + # + # source://gpgme//lib/gpgme/key.rb#16 + def owner_trust; end + + # source://gpgme//lib/gpgme/key.rb#184 + def primary_subkey; end + + # Returns the main {GPGME::UserID} for this key. + # + # source://gpgme//lib/gpgme/key.rb#202 + def primary_uid; end + + # Returns the value of attribute protocol. + # + # source://gpgme//lib/gpgme/key.rb#16 + def protocol; end + + # Short descriptive value. Can be used to identify the key. + # + # source://gpgme//lib/gpgme/key.rb#190 + def sha; end + + # Returns the value of attribute subkeys. + # + # source://gpgme//lib/gpgme/key.rb#18 + def subkeys; end + + # source://gpgme//lib/gpgme/key.rb#243 + def to_s; end + + # Returns the value of attribute uids. + # + # source://gpgme//lib/gpgme/key.rb#18 + def uids; end + + class << self + # Exports public keys + # + # GPGME::Key.export pattern, options + # + # Private keys cannot be exported due to GPGME restrictions. + # + # @example + # key = GPGME::Key.export "mrsimo@example.com" + # @example writing to a file + # out = File.open("my.key", "w+") + # GPGME::Key.export "mrsimo@example.com", :output => out + # @param pattern Identifier of the key to export. + # @param options [Hash] * +:output+ specify where to write the key to. It will be converted to + # a {GPGME::Data}, so it could be a file, for example. + # * +:minimal+ set to true to let the export mode be 'minimal'. + # * Any other option accepted by {GPGME::Ctx.new} + # @return [GPGME::Data] the exported key. + # + # source://gpgme//lib/gpgme/key.rb#96 + def export(pattern, options = T.unsafe(nil)); end + + # Returns an array of {GPGME::Key} objects that match the parameters. + # * +secret+ set to +:secret+ to get only secret keys, or to +:public+ to + # get only public keys. + # * +keys_or_names+ an array or an item that can be either {GPGME::Key} + # elements, or string identifiers like the email or the sha. Leave + # blank to get all. + # * +purposes+ get only keys that are usable for any of these purposes. + # See {GPGME::Key} for a list of possible key capabilities. + # + # @example + # GPGME::Key.find :secret # => first secret key found + # @example + # GPGME::Key.find(:public, "mrsimo@example.com") + # # => return only public keys that match mrsimo@example.com + # @example + # GPGME::Key.find(:public, "mrsimo@example.com", :sign) + # # => return the public keys that match mrsimo@example.com and are + # # capable of signing + # + # source://gpgme//lib/gpgme/key.rb#45 + def find(secret, keys_or_names = T.unsafe(nil), purposes = T.unsafe(nil)); end + + # source://gpgme//lib/gpgme/key.rb#66 + def get(fingerprint); end + + # Imports a key + # + # GPGME::Key.import keydata, options + # + # @example + # GPGME::Key.import(File.open("my.key")) + # @param keydata The key to import. It will be converted to a {GPGME::Data} object, + # so could be a file, for example. + # @param options Any other option accepted by {GPGME::Ctx.new} + # + # source://gpgme//lib/gpgme/key.rb#125 + def import(keydata, options = T.unsafe(nil)); end + + # Checks if a key is valid + # + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key.rb#133 + def valid?(key); end + + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/key_common.rb#2 +module GPGME::KeyCommon + # Array of capabilities for this key. It can contain any combination of + # +:encrypt+, +:sign+, +:certify+ or +:authenticate+ + # + # source://gpgme//lib/gpgme/key_common.rb#17 + def capability; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key_common.rb#39 + def secret?; end + + # Returns nil if the trust is valid. + # Returns one of +:revoked+, +:expired+, +:disabled+, +:invalid+ + # + # source://gpgme//lib/gpgme/key_common.rb#7 + def trust; end + + # Checks if the key is capable of all of these actions. If empty array + # is passed then will return true. + # + # Returns false if the keys trust has been invalidated. + # + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key_common.rb#31 + def usable_for?(purposes); end +end + +# source://gpgme//lib/gpgme/key_sig.rb#2 +class GPGME::KeySig + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key_sig.rb#11 + def expired?; end + + # source://gpgme//lib/gpgme/key_sig.rb#27 + def expires; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key_sig.rb#19 + def exportable?; end + + # source://gpgme//lib/gpgme/key_sig.rb#31 + def inspect; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key_sig.rb#15 + def invalid?; end + + # Returns the value of attribute keyid. + # + # source://gpgme//lib/gpgme/key_sig.rb#5 + def keyid; end + + # Returns the value of attribute pubkey_algo. + # + # source://gpgme//lib/gpgme/key_sig.rb#5 + def pubkey_algo; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/key_sig.rb#7 + def revoked?; end + + # source://gpgme//lib/gpgme/key_sig.rb#23 + def timestamp; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#60 +GPGME::MD_CRC24_RFC2440 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#61 +GPGME::MD_CRC32 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#62 +GPGME::MD_CRC32_RFC1510 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#63 +GPGME::MD_HAVAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#64 +GPGME::MD_MD2 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#65 +GPGME::MD_MD4 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#66 +GPGME::MD_MD5 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#67 +GPGME::MD_RMD160 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#68 +GPGME::MD_SHA1 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#69 +GPGME::MD_SHA256 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#73 +GPGME::MD_SHA384 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#74 +GPGME::MD_SHA512 = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#75 +GPGME::MD_TIGER = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/misc.rb#47 +class GPGME::NewSignature + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/misc.rb#50 + def fingerprint; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/misc.rb#50 + def fpr; end + + # Returns the value of attribute hash_algo. + # + # source://gpgme//lib/gpgme/misc.rb#50 + def hash_algo; end + + # Returns the value of attribute pubkey_algo. + # + # source://gpgme//lib/gpgme/misc.rb#50 + def pubkey_algo; end + + # Returns the value of attribute sig_class. + # + # source://gpgme//lib/gpgme/misc.rb#50 + def sig_class; end + + # source://gpgme//lib/gpgme/misc.rb#53 + def timestamp; end + + # Returns the value of attribute type. + # + # source://gpgme//lib/gpgme/misc.rb#50 + def type; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#78 +GPGME::PINENTRY_MODE_ASK = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#79 +GPGME::PINENTRY_MODE_CANCEL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#77 +GPGME::PINENTRY_MODE_DEFAULT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#80 +GPGME::PINENTRY_MODE_ERROR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#81 +GPGME::PINENTRY_MODE_LOOPBACK = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#82 +GPGME::PINENTRY_MODE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://gpgme//lib/gpgme/constants.rb#90 +GPGME::PK_DSA = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#91 +GPGME::PK_ELG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#92 +GPGME::PK_ELG_E = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#93 +GPGME::PK_RSA = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#97 +GPGME::PROTOCOL_CMS = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#222 +GPGME::PROTOCOL_NAMES = T.let(T.unsafe(nil), Hash) + +# source://gpgme//lib/gpgme/constants.rb#98 +GPGME::PROTOCOL_OpenPGP = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/misc.rb#15 +class GPGME::Recipient + # Returns the value of attribute keyid. + # + # source://gpgme//lib/gpgme/misc.rb#18 + def keyid; end + + # Returns the value of attribute pubkey_algo. + # + # source://gpgme//lib/gpgme/misc.rb#18 + def pubkey_algo; end + + # Returns the value of attribute status. + # + # source://gpgme//lib/gpgme/misc.rb#18 + def status; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#99 +GPGME::SIGSUM_BAD_POLICY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#100 +GPGME::SIGSUM_CRL_MISSING = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#101 +GPGME::SIGSUM_CRL_TOO_OLD = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#102 +GPGME::SIGSUM_GREEN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#103 +GPGME::SIGSUM_KEY_EXPIRED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#104 +GPGME::SIGSUM_KEY_MISSING = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#105 +GPGME::SIGSUM_KEY_REVOKED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#106 +GPGME::SIGSUM_RED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#107 +GPGME::SIGSUM_SIG_EXPIRED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#108 +GPGME::SIGSUM_SYS_ERROR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#109 +GPGME::SIGSUM_VALID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#110 +GPGME::SIG_MODE_CLEAR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#111 +GPGME::SIG_MODE_DETACH = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#112 +GPGME::SIG_MODE_NORMAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#113 +GPGME::SIG_STAT_BAD = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#114 +GPGME::SIG_STAT_DIFF = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#115 +GPGME::SIG_STAT_ERROR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#116 +GPGME::SIG_STAT_GOOD = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#117 +GPGME::SIG_STAT_GOOD_EXP = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#118 +GPGME::SIG_STAT_GOOD_EXPKEY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#119 +GPGME::SIG_STAT_NOKEY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#120 +GPGME::SIG_STAT_NONE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#121 +GPGME::SIG_STAT_NOSIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#122 +GPGME::STATUS_ABORT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#123 +GPGME::STATUS_ALREADY_SIGNED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#187 +GPGME::STATUS_ATTRIBUTE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#124 +GPGME::STATUS_BADARMOR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#125 +GPGME::STATUS_BADMDC = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#126 +GPGME::STATUS_BADSIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#127 +GPGME::STATUS_BAD_PASSPHRASE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#128 +GPGME::STATUS_BEGIN_DECRYPTION = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#129 +GPGME::STATUS_BEGIN_ENCRYPTION = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#190 +GPGME::STATUS_BEGIN_SIGNING = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#130 +GPGME::STATUS_BEGIN_STREAM = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#131 +GPGME::STATUS_DECRYPTION_FAILED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#132 +GPGME::STATUS_DECRYPTION_OKAY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#133 +GPGME::STATUS_DELETE_PROBLEM = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#134 +GPGME::STATUS_ENC_TO = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#135 +GPGME::STATUS_END_DECRYPTION = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#136 +GPGME::STATUS_END_ENCRYPTION = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#137 +GPGME::STATUS_END_STREAM = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#138 +GPGME::STATUS_ENTER = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#139 +GPGME::STATUS_EOF = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#140 +GPGME::STATUS_ERRMDC = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#141 +GPGME::STATUS_ERROR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#142 +GPGME::STATUS_ERRSIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#143 +GPGME::STATUS_EXPKEYSIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#144 +GPGME::STATUS_EXPSIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#145 +GPGME::STATUS_FILE_DONE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#146 +GPGME::STATUS_FILE_ERROR = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#147 +GPGME::STATUS_FILE_START = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#148 +GPGME::STATUS_GET_BOOL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#149 +GPGME::STATUS_GET_HIDDEN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#150 +GPGME::STATUS_GET_LINE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#151 +GPGME::STATUS_GOODMDC = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#152 +GPGME::STATUS_GOODSIG = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#153 +GPGME::STATUS_GOOD_PASSPHRASE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#154 +GPGME::STATUS_GOT_IT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#155 +GPGME::STATUS_IMPORTED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#156 +GPGME::STATUS_IMPORT_RES = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#157 +GPGME::STATUS_INV_RECP = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#158 +GPGME::STATUS_KEYEXPIRED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#159 +GPGME::STATUS_KEYREVOKED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#160 +GPGME::STATUS_KEY_CREATED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#193 +GPGME::STATUS_KEY_NOT_CREATED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#161 +GPGME::STATUS_LEAVE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#162 +GPGME::STATUS_MISSING_PASSPHRASE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#181 +GPGME::STATUS_MOUNTPOINT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#163 +GPGME::STATUS_NEED_PASSPHRASE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#164 +GPGME::STATUS_NEED_PASSPHRASE_SYM = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#165 +GPGME::STATUS_NODATA = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#166 +GPGME::STATUS_NOTATION_DATA = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#167 +GPGME::STATUS_NOTATION_NAME = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#168 +GPGME::STATUS_NO_PUBKEY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#169 +GPGME::STATUS_NO_RECP = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#170 +GPGME::STATUS_NO_SECKEY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#184 +GPGME::STATUS_PINENTRY_LAUNCHED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#178 +GPGME::STATUS_PLAINTEXT_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#195 +GPGME::STATUS_POLICY_URL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#196 +GPGME::STATUS_PROGRESS = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#197 +GPGME::STATUS_RSA_OR_IDEA = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#198 +GPGME::STATUS_SESSION_KEY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#199 +GPGME::STATUS_SHM_GET = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#200 +GPGME::STATUS_SHM_GET_BOOL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#201 +GPGME::STATUS_SHM_GET_HIDDEN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#202 +GPGME::STATUS_SHM_INFO = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#203 +GPGME::STATUS_SIGEXPIRED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#204 +GPGME::STATUS_SIG_CREATED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#205 +GPGME::STATUS_SIG_ID = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#206 +GPGME::STATUS_TRUNCATED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#207 +GPGME::STATUS_TRUST_FULLY = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#208 +GPGME::STATUS_TRUST_MARGINAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#209 +GPGME::STATUS_TRUST_NEVER = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#210 +GPGME::STATUS_TRUST_ULTIMATE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#211 +GPGME::STATUS_TRUST_UNDEFINED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#212 +GPGME::STATUS_UNEXPECTED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#213 +GPGME::STATUS_USERID_HINT = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#214 +GPGME::STATUS_VALIDSIG = T.let(T.unsafe(nil), Integer) + +class GPGME::SigNotation; end + +# source://gpgme//lib/gpgme/misc.rb#28 +class GPGME::SignResult + # Returns the value of attribute invalid_signers. + # + # source://gpgme//lib/gpgme/misc.rb#31 + def invalid_signers; end + + # Returns the value of attribute signatures. + # + # source://gpgme//lib/gpgme/misc.rb#31 + def signatures; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/signature.rb#2 +class GPGME::Signature + # @return [Boolean] + # + # source://gpgme//lib/gpgme/signature.rb#28 + def bad?; end + + # source://gpgme//lib/gpgme/signature.rb#64 + def exp_timestamp; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/signature.rb#20 + def expired_key?; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/signature.rb#16 + def expired_signature?; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/signature.rb#5 + def fingerprint; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/signature.rb#5 + def fpr; end + + # source://gpgme//lib/gpgme/signature.rb#40 + def from; end + + # source://gpgme//lib/gpgme/signature.rb#52 + def key; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/signature.rb#32 + def no_key?; end + + # Returns the value of attribute notations. + # + # source://gpgme//lib/gpgme/signature.rb#5 + def notations; end + + # Returns the value of attribute pka_address. + # + # source://gpgme//lib/gpgme/signature.rb#7 + def pka_address; end + + # Returns the value of attribute pka_trust. + # + # source://gpgme//lib/gpgme/signature.rb#7 + def pka_trust; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/signature.rb#24 + def revoked_key?; end + + # Returns the value of attribute status. + # + # source://gpgme//lib/gpgme/signature.rb#5 + def status; end + + # source://gpgme//lib/gpgme/signature.rb#36 + def status_code; end + + # Returns the value of attribute summary. + # + # source://gpgme//lib/gpgme/signature.rb#5 + def summary; end + + # source://gpgme//lib/gpgme/signature.rb#60 + def timestamp; end + + # source://gpgme//lib/gpgme/signature.rb#68 + def to_s; end + + # Returns true if the signature is correct + # + # @return [Boolean] + # + # source://gpgme//lib/gpgme/signature.rb#12 + def valid?; end + + # Returns the value of attribute validity. + # + # source://gpgme//lib/gpgme/signature.rb#6 + def validity; end + + # Returns the value of attribute validity_reason. + # + # source://gpgme//lib/gpgme/signature.rb#6 + def validity_reason; end + + # Returns the value of attribute wrong_key_usage. + # + # source://gpgme//lib/gpgme/signature.rb#5 + def wrong_key_usage; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/sub_key.rb#2 +class GPGME::SubKey + include ::GPGME::KeyCommon + + # source://gpgme//lib/gpgme/sub_key.rb#28 + def expired; end + + # source://gpgme//lib/gpgme/sub_key.rb#24 + def expires; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/sub_key.rb#20 + def expires?; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/sub_key.rb#5 + def fingerprint; end + + # Returns the value of attribute fpr. + # + # source://gpgme//lib/gpgme/sub_key.rb#5 + def fpr; end + + # source://gpgme//lib/gpgme/sub_key.rb#47 + def inspect; end + + # Returns the value of attribute keyid. + # + # source://gpgme//lib/gpgme/sub_key.rb#5 + def keyid; end + + # Returns the value of attribute length. + # + # source://gpgme//lib/gpgme/sub_key.rb#5 + def length; end + + # Returns the value of attribute pubkey_algo. + # + # source://gpgme//lib/gpgme/sub_key.rb#5 + def pubkey_algo; end + + # source://gpgme//lib/gpgme/sub_key.rb#43 + def pubkey_algo_letter; end + + # source://gpgme//lib/gpgme/sub_key.rb#32 + def sha; end + + # source://gpgme//lib/gpgme/sub_key.rb#10 + def timestamp; end + + # source://gpgme//lib/gpgme/sub_key.rb#58 + def to_s; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/sub_key.rb#36 +GPGME::SubKey::PUBKEY_ALGO_LETTERS = T.let(T.unsafe(nil), Hash) + +class GPGME::TrustItem; end + +# source://gpgme//lib/gpgme/user_id.rb#2 +class GPGME::UserID + # Returns the value of attribute comment. + # + # source://gpgme//lib/gpgme/user_id.rb#5 + def comment; end + + # Returns the value of attribute email. + # + # source://gpgme//lib/gpgme/user_id.rb#5 + def email; end + + # source://gpgme//lib/gpgme/user_id.rb#15 + def inspect; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/user_id.rb#11 + def invalid?; end + + # Returns the value of attribute name. + # + # source://gpgme//lib/gpgme/user_id.rb#5 + def name; end + + # @return [Boolean] + # + # source://gpgme//lib/gpgme/user_id.rb#7 + def revoked?; end + + # Returns the value of attribute signatures. + # + # source://gpgme//lib/gpgme/user_id.rb#5 + def signatures; end + + # Returns the value of attribute uid. + # + # source://gpgme//lib/gpgme/user_id.rb#5 + def uid; end + + # Returns the value of attribute validity. + # + # source://gpgme//lib/gpgme/user_id.rb#5 + def validity; end + + class << self + private + + def new(*_arg0); end + end +end + +# source://gpgme//lib/gpgme/constants.rb#215 +GPGME::VALIDITY_FULL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#216 +GPGME::VALIDITY_MARGINAL = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#260 +GPGME::VALIDITY_NAMES = T.let(T.unsafe(nil), Hash) + +# source://gpgme//lib/gpgme/constants.rb#217 +GPGME::VALIDITY_NEVER = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#218 +GPGME::VALIDITY_ULTIMATE = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#219 +GPGME::VALIDITY_UNDEFINED = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/constants.rb#220 +GPGME::VALIDITY_UNKNOWN = T.let(T.unsafe(nil), Integer) + +# source://gpgme//lib/gpgme/misc.rb#9 +class GPGME::VerifyResult + # Returns the value of attribute signatures. + # + # source://gpgme//lib/gpgme/misc.rb#12 + def signatures; end + + class << self + private + + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/hashdiff@1.0.1.rbi b/sorbet/rbi/gems/hashdiff@1.0.1.rbi new file mode 100644 index 0000000000..dd7e6df978 --- /dev/null +++ b/sorbet/rbi/gems/hashdiff@1.0.1.rbi @@ -0,0 +1,350 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `hashdiff` gem. +# Please instead update this file by running `bin/tapioca gem hashdiff`. + +# This module provides methods to diff two hash, patch and unpatch hash +# +# source://hashdiff//lib/hashdiff/util.rb#3 +module Hashdiff + class << self + # Best diff two objects, which tries to generate the smallest change set using different similarity values. + # + # Hashdiff.best_diff is useful in case of comparing two objects which include similar hashes in arrays. + # + # @example + # a = {'x' => [{'a' => 1, 'c' => 3, 'e' => 5}, {'y' => 3}]} + # b = {'x' => [{'a' => 1, 'b' => 2, 'e' => 5}] } + # diff = Hashdiff.best_diff(a, b) + # diff.should == [['-', 'x[0].c', 3], ['+', 'x[0].b', 2], ['-', 'x[1].y', 3], ['-', 'x[1]', {}]] + # @param obj1 [Array, Hash] + # @param obj2 [Array, Hash] + # @param options [Hash] the options to use when comparing + # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other + # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1}) + # * :delimiter (String) ['.'] the delimiter used when returning nested key references + # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value. + # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing + # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys. + # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower. + # @return [Array] an array of changes. + # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']] + # @since 0.0.1 + # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison. + # + # source://hashdiff//lib/hashdiff/diff.rb#31 + def best_diff(obj1, obj2, options = T.unsafe(nil), &block); end + + # check if objects are comparable + # + # @private + # @return [Boolean] + # + # source://hashdiff//lib/hashdiff/util.rb#108 + def comparable?(obj1, obj2, strict = T.unsafe(nil)); end + + # check for equality or "closeness" within given tolerance + # + # @private + # + # source://hashdiff//lib/hashdiff/util.rb#86 + def compare_values(obj1, obj2, options = T.unsafe(nil)); end + + # count node differences + # + # @private + # + # source://hashdiff//lib/hashdiff/util.rb#25 + def count_diff(diffs); end + + # count total nodes for an object + # + # @private + # + # source://hashdiff//lib/hashdiff/util.rb#36 + def count_nodes(obj); end + + # try custom comparison + # + # @private + # + # source://hashdiff//lib/hashdiff/util.rb#119 + def custom_compare(method, key, obj1, obj2); end + + # decode property path into an array + # e.g. "a.b[3].c" => ['a', 'b', 3, 'c'] + # + # @param path [String] Property-string + # @param delimiter [String] Property-string delimiter + # @private + # + # source://hashdiff//lib/hashdiff/util.rb#58 + def decode_property_path(path, delimiter = T.unsafe(nil)); end + + # Compute the diff of two hashes or arrays + # + # @example + # a = {"a" => 1, "b" => {"b1" => 1, "b2" =>2}} + # b = {"a" => 1, "b" => {}} + # + # diff = Hashdiff.diff(a, b) + # diff.should == [['-', 'b.b1', 1], ['-', 'b.b2', 2]] + # @param obj1 [Array, Hash] + # @param obj2 [Array, Hash] + # @param options [Hash] the options to use when comparing + # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other + # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1}) + # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}. + # * :delimiter (String) ['.'] the delimiter used when returning nested key references + # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value. + # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing + # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys. + # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower. + # @return [Array] an array of changes. + # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']] + # @since 0.0.1 + # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison. + # + # source://hashdiff//lib/hashdiff/diff.rb#78 + def diff(obj1, obj2, options = T.unsafe(nil), &block); end + + # diff array using LCS algorithm + # + # @private + # @yield [links] + # + # source://hashdiff//lib/hashdiff/diff.rb#119 + def diff_array_lcs(arraya, arrayb, options = T.unsafe(nil)); end + + # caculate array difference using LCS algorithm + # http://en.wikipedia.org/wiki/Longest_common_subsequence_problem + # + # @private + # + # source://hashdiff//lib/hashdiff/lcs.rb#8 + def lcs(arraya, arrayb, options = T.unsafe(nil)); end + + # get the node of hash by given path parts + # + # @private + # + # source://hashdiff//lib/hashdiff/util.rb#75 + def node(hash, parts); end + + # Apply patch to object + # + # @param obj [Hash, Array] the object to be patched, can be an Array or a Hash + # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']] + # @param options [Hash] supports following keys: + # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array + # @return the object after patch + # @since 0.0.1 + # + # source://hashdiff//lib/hashdiff/patch.rb#17 + def patch!(obj, changes, options = T.unsafe(nil)); end + + # source://hashdiff//lib/hashdiff/util.rb#137 + def prefix_append_array_index(prefix, array_index, opts); end + + # source://hashdiff//lib/hashdiff/util.rb#129 + def prefix_append_key(prefix, key, opts); end + + # judge whether two objects are similar + # + # @private + # @return [Boolean] + # + # source://hashdiff//lib/hashdiff/util.rb#7 + def similar?(obja, objb, options = T.unsafe(nil)); end + + # Unpatch an object + # + # @param obj [Hash, Array] the object to be unpatched, can be an Array or a Hash + # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']] + # @param options [Hash] supports following keys: + # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array + # @return the object after unpatch + # @since 0.0.1 + # + # source://hashdiff//lib/hashdiff/patch.rb#58 + def unpatch!(obj, changes, options = T.unsafe(nil)); end + + private + + # checks if both objects are Arrays or Hashes + # + # @private + # @return [Boolean] + # + # source://hashdiff//lib/hashdiff/util.rb#151 + def any_hash_or_array?(obja, objb); end + end +end + +# Used to compare hashes +# +# @private +# +# source://hashdiff//lib/hashdiff/compare_hashes.rb#6 +class Hashdiff::CompareHashes + class << self + # source://hashdiff//lib/hashdiff/compare_hashes.rb#8 + def call(obj1, obj2, opts = T.unsafe(nil)); end + end +end + +# Used to compare arrays using the lcs algorithm +# +# @private +# +# source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#6 +class Hashdiff::LcsCompareArrays + class << self + # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#8 + def call(obj1, obj2, opts = T.unsafe(nil)); end + end +end + +# Used to compare arrays in a linear complexity, which produces longer diffs +# than using the lcs algorithm but is considerably faster +# +# @private +# +# source://hashdiff//lib/hashdiff/linear_compare_array.rb#8 +class Hashdiff::LinearCompareArray + # @return [LinearCompareArray] a new instance of LinearCompareArray + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#45 + def initialize(old_array, new_array, options); end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#14 + def call; end + + private + + # Returns the value of attribute additions. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42 + def additions; end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#139 + def append_addition(item, index); end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#123 + def append_addititions_before_match(match_index); end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#144 + def append_deletion(item, index); end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#131 + def append_deletions_before_match(match_index); end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#149 + def append_differences(difference); end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#153 + def changes; end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#67 + def compare_at_index; end + + # Returns the value of attribute deletions. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42 + def deletions; end + + # Returns the value of attribute differences. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42 + def differences; end + + # Returns the value of attribute expected_additions. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43 + def expected_additions; end + + # Sets the attribute expected_additions + # + # @param value the value to set the attribute expected_additions to. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43 + def expected_additions=(_arg0); end + + # @return [Boolean] + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#59 + def extra_items_in_new_array?; end + + # @return [Boolean] + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#55 + def extra_items_in_old_array?; end + + # look ahead in the new array to see if the current item appears later + # thereby having new items added + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#89 + def index_of_match_after_additions; end + + # look ahead in the old array to see if the current item appears later + # thereby having items removed + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#107 + def index_of_match_after_deletions; end + + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#82 + def item_difference(old_item, new_item, item_index); end + + # @return [Boolean] + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#63 + def iterated_through_both_arrays?; end + + # Returns the value of attribute new_array. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42 + def new_array; end + + # Returns the value of attribute new_index. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43 + def new_index; end + + # Sets the attribute new_index + # + # @param value the value to set the attribute new_index to. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43 + def new_index=(_arg0); end + + # Returns the value of attribute old_array. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42 + def old_array; end + + # Returns the value of attribute old_index. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43 + def old_index; end + + # Sets the attribute old_index + # + # @param value the value to set the attribute old_index to. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43 + def old_index=(_arg0); end + + # Returns the value of attribute options. + # + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42 + def options; end + + class << self + # source://hashdiff//lib/hashdiff/linear_compare_array.rb#9 + def call(old_array, new_array, options = T.unsafe(nil)); end + end +end + +# source://hashdiff//lib/hashdiff/version.rb#4 +Hashdiff::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/http-accept@1.7.0.rbi b/sorbet/rbi/gems/http-accept@1.7.0.rbi new file mode 100644 index 0000000000..9e19d3fb19 --- /dev/null +++ b/sorbet/rbi/gems/http-accept@1.7.0.rbi @@ -0,0 +1,378 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `http-accept` gem. +# Please instead update this file by running `bin/tapioca gem http-accept`. + +# source://http-accept//lib/http/accept/version.rb#21 +module HTTP; end + +# source://http-accept//lib/http/accept/version.rb#22 +module HTTP::Accept; end + +# A content type is different from a media range, in that a content type should not have any wild cards. +# +# source://http-accept//lib/http/accept/content_type.rb#27 +class HTTP::Accept::ContentType < ::HTTP::Accept::MediaTypes::MediaRange + # @raise [ArgumentError] + # @return [ContentType] a new instance of ContentType + # + # source://http-accept//lib/http/accept/content_type.rb#28 + def initialize(mime_type, parameters = T.unsafe(nil)); end +end + +# source://http-accept//lib/http/accept/encodings.rb#29 +module HTTP::Accept::Encodings + class << self + # Parse the list of browser preferred content codings and return ordered by priority. If no + # `Accept-Encoding:` header is specified, the behaviour is the same as if + # `Accept-Encoding: *` was provided, and if a blank `Accept-Encoding:` header value is + # specified, the behaviour is the same as if `Accept-Encoding: identity` was provided + # (according to RFC). + # + # source://http-accept//lib/http/accept/encodings.rb#74 + def browser_preferred_content_codings(env); end + + # source://http-accept//lib/http/accept/encodings.rb#57 + def parse(text); end + end +end + +# source://http-accept//lib/http/accept/encodings.rb#36 +HTTP::Accept::Encodings::CODINGS = T.let(T.unsafe(nil), Regexp) + +# https://tools.ietf.org/html/rfc7231#section-5.3.4 +# +# source://http-accept//lib/http/accept/encodings.rb#31 +HTTP::Accept::Encodings::CONTENT_CODING = T.let(T.unsafe(nil), Regexp) + +# source://http-accept//lib/http/accept/encodings.rb#38 +class HTTP::Accept::Encodings::ContentCoding < ::Struct + # Returns the value of attribute encoding + # + # @return [Object] the current value of encoding + def encoding; end + + # Sets the attribute encoding + # + # @param value [Object] the value to set the attribute encoding to. + # @return [Object] the newly set value + def encoding=(_); end + + # Returns the value of attribute q + # + # @return [Object] the current value of q + def q; end + + # Sets the attribute q + # + # @param value [Object] the value to set the attribute q to. + # @return [Object] the newly set value + def q=(_); end + + # source://http-accept//lib/http/accept/encodings.rb#39 + def quality_factor; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + + # @raise [ParseError] + # + # source://http-accept//lib/http/accept/encodings.rb#43 + def parse(scanner); end + end +end + +# source://http-accept//lib/http/accept/encodings.rb#65 +HTTP::Accept::Encodings::HTTP_ACCEPT_ENCODING = T.let(T.unsafe(nil), String) + +# source://http-accept//lib/http/accept/encodings.rb#67 +HTTP::Accept::Encodings::IDENTITY_CONTENT_CODING = T.let(T.unsafe(nil), HTTP::Accept::Encodings::ContentCoding) + +# https://tools.ietf.org/html/rfc7231#section-5.3.1 +# +# source://http-accept//lib/http/accept/encodings.rb#34 +HTTP::Accept::Encodings::QVALUE = T.let(T.unsafe(nil), Regexp) + +# source://http-accept//lib/http/accept/encodings.rb#66 +HTTP::Accept::Encodings::WILDCARD_CONTENT_CODING = T.let(T.unsafe(nil), HTTP::Accept::Encodings::ContentCoding) + +# source://http-accept//lib/http/accept/languages.rb#28 +module HTTP::Accept::Languages + class << self + # source://http-accept//lib/http/accept/languages.rb#118 + def parse(text); end + end +end + +# https://greenbytes.de/tech/webdav/rfc7231.html#quality.values +# +# source://http-accept//lib/http/accept/languages.rb#36 +HTTP::Accept::Languages::LANGUAGE_RANGE = T.let(T.unsafe(nil), Regexp) + +# https://tools.ietf.org/html/rfc3066#section-2.1 +# +# source://http-accept//lib/http/accept/languages.rb#30 +HTTP::Accept::Languages::LOCALE = T.let(T.unsafe(nil), Regexp) + +# source://http-accept//lib/http/accept/languages.rb#99 +class HTTP::Accept::Languages::LanguageRange < ::Struct + # Returns the value of attribute locale + # + # @return [Object] the current value of locale + def locale; end + + # Sets the attribute locale + # + # @param value [Object] the value to set the attribute locale to. + # @return [Object] the newly set value + def locale=(_); end + + # Returns the value of attribute q + # + # @return [Object] the current value of q + def q; end + + # Sets the attribute q + # + # @param value [Object] the value to set the attribute q to. + # @return [Object] the newly set value + def q=(_); end + + # source://http-accept//lib/http/accept/languages.rb#100 + def quality_factor; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + + # @raise [ParseError] + # + # source://http-accept//lib/http/accept/languages.rb#104 + def parse(scanner); end + end +end + +# Provides an efficient data-structure for matching the Accept-Languages header to set of available locales according to https://tools.ietf.org/html/rfc7231#section-5.3.5 and https://tools.ietf.org/html/rfc4647#section-2.3 +# +# source://http-accept//lib/http/accept/languages.rb#39 +class HTTP::Accept::Languages::Locales + # @return [Locales] a new instance of Locales + # + # source://http-accept//lib/http/accept/languages.rb#52 + def initialize(names); end + + # Returns the intersection of others retaining order. + # + # source://http-accept//lib/http/accept/languages.rb#78 + def &(languages); end + + # source://http-accept//lib/http/accept/languages.rb#90 + def +(others); end + + # source://http-accept//lib/http/accept/languages.rb#68 + def each(&block); end + + # source://http-accept//lib/http/accept/languages.rb#61 + def freeze; end + + # @return [Boolean] + # + # source://http-accept//lib/http/accept/languages.rb#82 + def include?(locale_name); end + + # source://http-accept//lib/http/accept/languages.rb#86 + def join(*args); end + + # Returns the value of attribute names. + # + # source://http-accept//lib/http/accept/languages.rb#74 + def names; end + + # Returns the value of attribute patterns. + # + # source://http-accept//lib/http/accept/languages.rb#75 + def patterns; end + + # source://http-accept//lib/http/accept/languages.rb#94 + def to_a; end + + class << self + # source://http-accept//lib/http/accept/languages.rb#40 + def expand(locale, into); end + end +end + +# https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.9 +# +# source://http-accept//lib/http/accept/languages.rb#33 +HTTP::Accept::Languages::QVALUE = T.let(T.unsafe(nil), Regexp) + +# Parse and process the HTTP Accept: header. +# +# source://http-accept//lib/http/accept/media_types/map.rb#23 +module HTTP::Accept::MediaTypes + class << self + # Parse the list of browser preferred content types and return ordered by priority. If no `Accept:` header is specified, the behaviour is the same as if `Accept: */*` was provided (according to RFC). + # + # source://http-accept//lib/http/accept/media_types.rb#114 + def browser_preferred_media_types(env); end + + # source://http-accept//lib/http/accept/media_types.rb#102 + def parse(text, normalize_whitespace = T.unsafe(nil)); end + end +end + +# source://http-accept//lib/http/accept/media_types.rb#110 +HTTP::Accept::MediaTypes::HTTP_ACCEPT = T.let(T.unsafe(nil), String) + +# According to https://tools.ietf.org/html/rfc7231#section-5.3.2 +# +# source://http-accept//lib/http/accept/media_types.rb#34 +HTTP::Accept::MediaTypes::MIME_TYPE = T.let(T.unsafe(nil), Regexp) + +# Map a set of mime types to objects. +# +# source://http-accept//lib/http/accept/media_types/map.rb#25 +class HTTP::Accept::MediaTypes::Map + # @return [Map] a new instance of Map + # + # source://http-accept//lib/http/accept/media_types/map.rb#28 + def initialize; end + + # Add a converter to the collection. A converter can be anything that responds to #content_type. Objects will be considered in the order they are added, subsequent objects cannot override previously defined media types. `object` must respond to #split('/', 2) which should give the type and subtype. + # + # source://http-accept//lib/http/accept/media_types/map.rb#66 + def <<(object); end + + # source://http-accept//lib/http/accept/media_types/map.rb#61 + def [](media_range); end + + # source://http-accept//lib/http/accept/media_types/map.rb#57 + def []=(media_range, object); end + + # Given a list of content types (e.g. from browser_preferred_content_types), return the best converter. Media types can be an array of MediaRange or String values. + # + # source://http-accept//lib/http/accept/media_types/map.rb#42 + def for(media_types); end + + # source://http-accept//lib/http/accept/media_types/map.rb#32 + def freeze; end +end + +# source://http-accept//lib/http/accept/media_types/map.rb#26 +HTTP::Accept::MediaTypes::Map::WILDCARD = T.let(T.unsafe(nil), String) + +# A single entry in the Accept: header, which includes a mime type and associated parameters. +# +# source://http-accept//lib/http/accept/media_types.rb#38 +class HTTP::Accept::MediaTypes::MediaRange < ::Struct + # source://http-accept//lib/http/accept/media_types.rb#47 + def ===(other); end + + # Returns the value of attribute mime_type + # + # @return [Object] the current value of mime_type + def mime_type; end + + # Sets the attribute mime_type + # + # @param value [Object] the value to set the attribute mime_type to. + # @return [Object] the newly set value + def mime_type=(_); end + + # Returns the value of attribute parameters + # + # @return [Object] the current value of parameters + def parameters; end + + # Sets the attribute parameters + # + # @param value [Object] the value to set the attribute parameters to. + # @return [Object] the newly set value + def parameters=(_); end + + # source://http-accept//lib/http/accept/media_types.rb#39 + def parameters_string; end + + # source://http-accept//lib/http/accept/media_types.rb#61 + def quality_factor; end + + # source://http-accept//lib/http/accept/media_types.rb#65 + def split(on = T.unsafe(nil), count = T.unsafe(nil)); end + + # source://http-accept//lib/http/accept/media_types.rb#55 + def to_s; end + + # source://http-accept//lib/http/accept/media_types.rb#55 + def to_str; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + + # @raise [ParseError] + # + # source://http-accept//lib/http/accept/media_types.rb#86 + def parse(scanner, normalize_whitespace = T.unsafe(nil)); end + + # source://http-accept//lib/http/accept/media_types.rb#69 + def parse_parameters(scanner, normalize_whitespace); end + end +end + +# source://http-accept//lib/http/accept/media_types.rb#35 +HTTP::Accept::MediaTypes::PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://http-accept//lib/http/accept/media_types.rb#111 +HTTP::Accept::MediaTypes::WILDCARD_MEDIA_RANGE = T.let(T.unsafe(nil), HTTP::Accept::MediaTypes::MediaRange) + +# source://http-accept//lib/http/accept/parse_error.rb#23 +class HTTP::Accept::ParseError < ::ArgumentError; end + +# source://http-accept//lib/http/accept/quoted_string.rb#25 +HTTP::Accept::QUOTED_STRING = T.let(T.unsafe(nil), Regexp) + +# source://http-accept//lib/http/accept/quoted_string.rb#27 +module HTTP::Accept::QuotedString + class << self + # Quote a string if required. Doesn't handle newlines correctly currently. + # + # source://http-accept//lib/http/accept/quoted_string.rb#44 + def quote(value, force = T.unsafe(nil)); end + + # Unquote a "quoted-string" value according to https://tools.ietf.org/html/rfc7230#section-3.2.6 + # It should already match the QUOTED_STRING pattern above by the parser. + # + # source://http-accept//lib/http/accept/quoted_string.rb#30 + def unquote(value, normalize_whitespace = T.unsafe(nil)); end + end +end + +# source://http-accept//lib/http/accept/sort.rb#23 +module HTTP::Accept::Sort + class << self + # This sorts items with higher priority first, and keeps items with the same priority in the same relative order. + # + # source://http-accept//lib/http/accept/sort.rb#25 + def by_quality_factor(items); end + end +end + +# According to https://tools.ietf.org/html/rfc7231#appendix-C +# +# source://http-accept//lib/http/accept/quoted_string.rb#24 +HTTP::Accept::TOKEN = T.let(T.unsafe(nil), Regexp) + +# source://http-accept//lib/http/accept/version.rb#23 +HTTP::Accept::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/http-cookie@1.0.5.rbi b/sorbet/rbi/gems/http-cookie@1.0.5.rbi new file mode 100644 index 0000000000..5864845015 --- /dev/null +++ b/sorbet/rbi/gems/http-cookie@1.0.5.rbi @@ -0,0 +1,993 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `http-cookie` gem. +# Please instead update this file by running `bin/tapioca gem http-cookie`. + +# source://http-cookie//lib/http/cookie/version.rb#1 +module HTTP; end + +# This class is used to represent an HTTP Cookie. +# +# source://http-cookie//lib/http/cookie/version.rb#2 +class HTTP::Cookie + include ::Comparable + + # :call-seq: + # new(name, value = nil) + # new(name, value = nil, **attr_hash) + # new(**attr_hash) + # + # Creates a cookie object. For each key of `attr_hash`, the setter + # is called if defined and any error (typically ArgumentError or + # TypeError) that is raised will be passed through. Each key can be + # either a downcased symbol or a string that may be mixed case. + # Support for the latter may, however, be obsoleted in future when + # Ruby 2.0's keyword syntax is adopted. + # + # If `value` is omitted or it is nil, an expiration cookie is + # created unless `max_age` or `expires` (`expires_at`) is given. + # + # e.g. + # + # new("uid", "a12345") + # new("uid", "a12345", :domain => 'example.org', + # :for_domain => true, :expired => Time.now + 7*86400) + # new("name" => "uid", "value" => "a12345", "Domain" => 'www.example.org') + # + # @return [Cookie] a new instance of Cookie + # + # source://http-cookie//lib/http/cookie.rb#130 + def initialize(*args); end + + # Compares the cookie with another. When there are many cookies with + # the same name for a URL, the value of the smallest must be used. + # + # source://http-cookie//lib/http/cookie.rb#643 + def <=>(other); end + + # Tests if it is OK to accept this cookie considering its origin. + # If either domain or path is missing, raises ArgumentError. If + # origin is missing, returns true. + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie.rb#569 + def acceptable?; end + + # Tests if it is OK to accept this cookie if it is sent from a given + # URI/URL, `uri`. + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie.rb#550 + def acceptable_from_uri?(uri); end + + # The time this cookie was last accessed at. + # + # source://http-cookie//lib/http/cookie.rb#546 + def accessed_at; end + + # The time this cookie was last accessed at. + # + # source://http-cookie//lib/http/cookie.rb#546 + def accessed_at=(_arg0); end + + # Returns a string for use in the Cookie header, i.e. `name=value` + # or `name="value"`. + # + # source://http-cookie//lib/http/cookie.rb#596 + def cookie_value; end + + # The time this cookie was created at. This value is used as a base + # date for interpreting the Max-Age attribute value. See #expires. + # + # source://http-cookie//lib/http/cookie.rb#543 + def created_at; end + + # The time this cookie was created at. This value is used as a base + # date for interpreting the Max-Age attribute value. See #expires. + # + # source://http-cookie//lib/http/cookie.rb#543 + def created_at=(_arg0); end + + # Returns the value of attribute domain. + # + # source://http-cookie//lib/http/cookie.rb#383 + def domain; end + + # See #domain. + # + # source://http-cookie//lib/http/cookie.rb#386 + def domain=(domain); end + + # Returns the domain attribute value as a DomainName object. + # + # source://http-cookie//lib/http/cookie.rb#431 + def domain_name; end + + # Returns the domain, with a dot prefixed only if the domain flag is + # on. + # + # source://http-cookie//lib/http/cookie.rb#426 + def dot_domain; end + + # YAML serialization helper for Psych. + # + # source://http-cookie//lib/http/cookie.rb#659 + def encode_with(coder); end + + # Expires this cookie by setting the expires attribute value to a + # past date. + # + # source://http-cookie//lib/http/cookie.rb#536 + def expire!; end + + # Tests if this cookie is expired by now, or by a given time. + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie.rb#526 + def expired?(time = T.unsafe(nil)); end + + # source://http-cookie//lib/http/cookie.rb#485 + def expires; end + + # See #expires. + # + # source://http-cookie//lib/http/cookie.rb#490 + def expires=(t); end + + # source://http-cookie//lib/http/cookie.rb#485 + def expires_at; end + + # See #expires. + # + # source://http-cookie//lib/http/cookie.rb#490 + def expires_at=(t); end + + # The domain flag. (the opposite of host-only-flag) + # + # If this flag is true, this cookie will be sent to any host in the + # \#domain, including the host domain itself. If it is false, this + # cookie will be sent only to the host indicated by the #domain. + # + # source://http-cookie//lib/http/cookie.rb#438 + def for_domain; end + + # The domain flag. (the opposite of host-only-flag) + # + # If this flag is true, this cookie will be sent to any host in the + # \#domain, including the host domain itself. If it is false, this + # cookie will be sent only to the host indicated by the #domain. + # + # source://http-cookie//lib/http/cookie.rb#438 + def for_domain=(_arg0); end + + # The domain flag. (the opposite of host-only-flag) + # + # If this flag is true, this cookie will be sent to any host in the + # \#domain, including the host domain itself. If it is false, this + # cookie will be sent only to the host indicated by the #domain. + # + # source://http-cookie//lib/http/cookie.rb#438 + def for_domain?; end + + # The HttpOnly flag. (http-only-flag) + # + # A cookie with this flag on should be hidden from a client script. + # + # source://http-cookie//lib/http/cookie.rb#476 + def httponly; end + + # The HttpOnly flag. (http-only-flag) + # + # A cookie with this flag on should be hidden from a client script. + # + # source://http-cookie//lib/http/cookie.rb#476 + def httponly=(_arg0); end + + # The HttpOnly flag. (http-only-flag) + # + # A cookie with this flag on should be hidden from a client script. + # + # source://http-cookie//lib/http/cookie.rb#476 + def httponly?; end + + # YAML deserialization helper for Syck. + # + # source://http-cookie//lib/http/cookie.rb#666 + def init_with(coder); end + + # source://http-cookie//lib/http/cookie.rb#635 + def inspect; end + + # Returns the value of attribute max_age. + # + # source://http-cookie//lib/http/cookie.rb#504 + def max_age; end + + # See #max_age. + # + # source://http-cookie//lib/http/cookie.rb#507 + def max_age=(sec); end + + # Returns the value of attribute name. + # + # source://http-cookie//lib/http/cookie.rb#347 + def name; end + + # See #name. + # + # source://http-cookie//lib/http/cookie.rb#350 + def name=(name); end + + # Returns the value of attribute origin. + # + # source://http-cookie//lib/http/cookie.rb#450 + def origin; end + + # See #origin. + # + # source://http-cookie//lib/http/cookie.rb#453 + def origin=(origin); end + + # Returns the value of attribute path. + # + # source://http-cookie//lib/http/cookie.rb#441 + def path; end + + # See #path. + # + # source://http-cookie//lib/http/cookie.rb#444 + def path=(path); end + + # The secure flag. (secure-only-flag) + # + # A cookie with this flag on should only be sent via a secure + # protocol like HTTPS. + # + # source://http-cookie//lib/http/cookie.rb#470 + def secure; end + + # The secure flag. (secure-only-flag) + # + # A cookie with this flag on should only be sent via a secure + # protocol like HTTPS. + # + # source://http-cookie//lib/http/cookie.rb#470 + def secure=(_arg0); end + + # The secure flag. (secure-only-flag) + # + # A cookie with this flag on should only be sent via a secure + # protocol like HTTPS. + # + # source://http-cookie//lib/http/cookie.rb#470 + def secure?; end + + # The session flag. (the opposite of persistent-flag) + # + # A cookie with this flag on should be hidden from a client script. + # + # source://http-cookie//lib/http/cookie.rb#482 + def session; end + + # The session flag. (the opposite of persistent-flag) + # + # A cookie with this flag on should be hidden from a client script. + # + # source://http-cookie//lib/http/cookie.rb#482 + def session?; end + + # Returns a string for use in the Set-Cookie header. If necessary + # information like a path or domain (when `for_domain` is set) is + # missing, RuntimeError is raised. It is always the best to set an + # origin before calling this method. + # + # source://http-cookie//lib/http/cookie.rb#605 + def set_cookie_value; end + + # Returns a string for use in the Cookie header, i.e. `name=value` + # or `name="value"`. + # + # source://http-cookie//lib/http/cookie.rb#596 + def to_s; end + + # YAML serialization helper for Syck. + # + # source://http-cookie//lib/http/cookie.rb#654 + def to_yaml_properties; end + + # Tests if it is OK to send this cookie to a given `uri`. A + # RuntimeError is raised if the cookie's domain is unknown. + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie.rb#584 + def valid_for_uri?(uri); end + + # Returns the value of attribute value. + # + # source://http-cookie//lib/http/cookie.rb#364 + def value; end + + # See #value. + # + # source://http-cookie//lib/http/cookie.rb#367 + def value=(value); end + + # YAML deserialization helper for Psych. + # + # source://http-cookie//lib/http/cookie.rb#671 + def yaml_initialize(tag, map); end + + class << self + # Takes an array of cookies and returns a string for use in the + # Cookie header, like "name1=value2; name2=value2". + # + # source://http-cookie//lib/http/cookie.rb#331 + def cookie_value(cookies); end + + # Parses a Cookie header value into a hash of name-value string + # pairs. The first appearance takes precedence if multiple pairs + # with the same name occur. + # + # source://http-cookie//lib/http/cookie.rb#338 + def cookie_value_to_hash(cookie_value); end + + # Parses a Set-Cookie header value `set_cookie` assuming that it + # is sent from a source URI/URL `origin`, and returns an array of + # Cookie objects. Parts (separated by commas) that are malformed + # or considered unacceptable are silently ignored. + # + # If a block is given, each cookie object is passed to the block. + # + # Available option keywords are below: + # + # :created_at + # : The creation time of the cookies parsed. + # + # :logger + # : Logger object useful for debugging + # + # ### Compatibility Note for Mechanize::Cookie users + # + # * Order of parameters changed in HTTP::Cookie.parse: + # + # Mechanize::Cookie.parse(uri, set_cookie[, log]) + # + # HTTP::Cookie.parse(set_cookie, uri[, :logger => # log]) + # + # * HTTP::Cookie.parse does not accept nil for `set_cookie`. + # + # * HTTP::Cookie.parse does not yield nil nor include nil in an + # returned array. It simply ignores unparsable parts. + # + # * HTTP::Cookie.parse is made to follow RFC 6265 to the extent + # not terribly breaking interoperability with broken + # implementations. In particular, it is capable of parsing + # cookie definitions containing double-quotes just as naturally + # expected. + # + # source://http-cookie//lib/http/cookie.rb#273 + def parse(set_cookie, origin, options = T.unsafe(nil), &block); end + + # Tests if +target_path+ is under +base_path+ as described in RFC + # 6265 5.1.4. +base_path+ must be an absolute path. + # +target_path+ may be empty, in which case it is treated as the + # root path. + # + # e.g. + # + # path_match?('/admin/', '/admin/index') == true + # path_match?('/admin/', '/Admin/index') == false + # path_match?('/admin/', '/admin/') == true + # path_match?('/admin/', '/admin') == false + # + # path_match?('/admin', '/admin') == true + # path_match?('/admin', '/Admin') == false + # path_match?('/admin', '/admins') == false + # path_match?('/admin', '/admin/') == true + # path_match?('/admin', '/admin/index') == true + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie.rb#229 + def path_match?(base_path, target_path); end + end +end + +# Maximum number of cookies per domain (RFC 6265 6.1 requires 50 at +# least) +# +# source://http-cookie//lib/http/cookie.rb#19 +HTTP::Cookie::MAX_COOKIES_PER_DOMAIN = T.let(T.unsafe(nil), Integer) + +# Maximum number of cookies total (RFC 6265 6.1 requires 3000 at +# least) +# +# source://http-cookie//lib/http/cookie.rb#22 +HTTP::Cookie::MAX_COOKIES_TOTAL = T.let(T.unsafe(nil), Integer) + +# Maximum number of bytes per cookie (RFC 6265 6.1 requires 4096 at +# least) +# +# source://http-cookie//lib/http/cookie.rb#16 +HTTP::Cookie::MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://http-cookie//lib/http/cookie.rb#27 +HTTP::Cookie::PERSISTENT_PROPERTIES = T.let(T.unsafe(nil), Array) + +# source://http-cookie//lib/http/cookie/scanner.rb#6 +class HTTP::Cookie::Scanner < ::StringScanner + # @return [Scanner] a new instance of Scanner + # + # source://http-cookie//lib/http/cookie/scanner.rb#18 + def initialize(string, logger = T.unsafe(nil)); end + + # source://http-cookie//lib/http/cookie/scanner.rb#104 + def parse_cookie_date(s); end + + # source://http-cookie//lib/http/cookie/scanner.rb#218 + def scan_cookie; end + + # source://http-cookie//lib/http/cookie/scanner.rb#34 + def scan_dquoted; end + + # source://http-cookie//lib/http/cookie/scanner.rb#47 + def scan_name; end + + # source://http-cookie//lib/http/cookie/scanner.rb#73 + def scan_name_value(comma_as_separator = T.unsafe(nil)); end + + # source://http-cookie//lib/http/cookie/scanner.rb#156 + def scan_set_cookie; end + + # source://http-cookie//lib/http/cookie/scanner.rb#53 + def scan_value(comma_as_separator = T.unsafe(nil)); end + + # source://http-cookie//lib/http/cookie/scanner.rb#30 + def skip_wsp; end + + private + + # source://http-cookie//lib/http/cookie/scanner.rb#85 + def tuple_to_time(day_of_month, month, year, time); end + + class << self + # source://http-cookie//lib/http/cookie/scanner.rb#24 + def quote(s); end + end +end + +# source://http-cookie//lib/http/cookie/scanner.rb#13 +HTTP::Cookie::Scanner::RE_BAD_CHAR = T.let(T.unsafe(nil), Regexp) + +# A pattern that matches the comma in a (typically date) value. +# +# source://http-cookie//lib/http/cookie/scanner.rb#16 +HTTP::Cookie::Scanner::RE_COOKIE_COMMA = T.let(T.unsafe(nil), Regexp) + +# A pattern that matches a cookie name or attribute name which may +# be empty, capturing trailing whitespace. +# +# source://http-cookie//lib/http/cookie/scanner.rb#11 +HTTP::Cookie::Scanner::RE_NAME = T.let(T.unsafe(nil), Regexp) + +# Whitespace. +# +# source://http-cookie//lib/http/cookie/scanner.rb#7 +HTTP::Cookie::Scanner::RE_WSP = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://http-cookie//lib/http/cookie.rb#25 +HTTP::Cookie::UNIX_EPOCH = T.let(T.unsafe(nil), Time) + +# source://http-cookie//lib/http/cookie/version.rb#3 +HTTP::Cookie::VERSION = T.let(T.unsafe(nil), String) + +# This class is used to manage the Cookies that have been returned from +# any particular website. +# +# source://http-cookie//lib/http/cookie_jar.rb#8 +class HTTP::CookieJar + include ::Enumerable + + # Generates a new cookie jar. + # + # Available option keywords are as below: + # + # :store + # : The store class that backs this jar. (default: `:hash`) + # A symbol addressing a store class, a store class, or an instance + # of a store class is accepted. Symbols are mapped to store + # classes, like `:hash` to HTTP::CookieJar::HashStore and `:mozilla` + # to HTTP::CookieJar::MozillaStore. + # + # Any options given are passed through to the initializer of the + # specified store class. For example, the `:mozilla` + # (HTTP::CookieJar::MozillaStore) store class requires a `:filename` + # option. See individual store classes for details. + # + # @return [CookieJar] a new instance of CookieJar + # + # source://http-cookie//lib/http/cookie_jar.rb#69 + def initialize(options = T.unsafe(nil)); end + + # Adds a cookie to the jar if it is acceptable, and returns self in + # any case. A given cookie must have domain and path attributes + # set, or ArgumentError is raised. + # + # Whether a cookie with the `for_domain` flag on overwrites another + # with the flag off or vice versa depends on the store used. See + # individual store classes for that matter. + # + # ### Compatibility Note for Mechanize::Cookie users + # + # In HTTP::Cookie, each cookie object can store its origin URI + # (cf. #origin). While the origin URI of a cookie can be set + # manually by #origin=, one is typically given in its generation. + # To be more specific, HTTP::Cookie.new takes an `:origin` option + # and HTTP::Cookie.parse takes one via the second argument. + # + # # Mechanize::Cookie + # jar.add(origin, cookie) + # jar.add!(cookie) # no acceptance check is performed + # + # # HTTP::Cookie + # jar.origin = origin + # jar.add(cookie) # acceptance check is performed + # + # source://http-cookie//lib/http/cookie_jar.rb#105 + def <<(cookie); end + + # Adds a cookie to the jar if it is acceptable, and returns self in + # any case. A given cookie must have domain and path attributes + # set, or ArgumentError is raised. + # + # Whether a cookie with the `for_domain` flag on overwrites another + # with the flag off or vice versa depends on the store used. See + # individual store classes for that matter. + # + # ### Compatibility Note for Mechanize::Cookie users + # + # In HTTP::Cookie, each cookie object can store its origin URI + # (cf. #origin). While the origin URI of a cookie can be set + # manually by #origin=, one is typically given in its generation. + # To be more specific, HTTP::Cookie.new takes an `:origin` option + # and HTTP::Cookie.parse takes one via the second argument. + # + # # Mechanize::Cookie + # jar.add(origin, cookie) + # jar.add!(cookie) # no acceptance check is performed + # + # # HTTP::Cookie + # jar.origin = origin + # jar.add(cookie) # acceptance check is performed + # + # source://http-cookie//lib/http/cookie_jar.rb#105 + def add(cookie); end + + # Removes expired cookies and returns self. If `session` is true, + # all session cookies are removed as well. + # + # source://http-cookie//lib/http/cookie_jar.rb#340 + def cleanup(session = T.unsafe(nil)); end + + # Clears the cookie jar and returns self. + # + # source://http-cookie//lib/http/cookie_jar.rb#333 + def clear; end + + # Gets an array of cookies sorted by the path and creation time. If + # `url` is given, only ones that should be sent to the URL/URI are + # selected, with the access time of each of them updated. + # + # source://http-cookie//lib/http/cookie_jar.rb#130 + def cookies(url = T.unsafe(nil)); end + + # Deletes a cookie that has the same name, domain and path as a + # given cookie from the jar and returns self. + # + # How the `for_domain` flag value affects the set of deleted cookies + # depends on the store used. See individual store classes for that + # matter. + # + # source://http-cookie//lib/http/cookie_jar.rb#122 + def delete(cookie); end + + # Iterates over all cookies that are not expired in no particular + # order. + # + # An optional argument `uri` specifies a URI/URL indicating the + # destination of the cookies being selected. Every cookie yielded + # should be good to send to the given URI, + # i.e. cookie.valid_for_uri?(uri) evaluates to true. + # + # If (and only if) the `uri` option is given, last access time of + # each cookie is updated to the current time. + # + # source://http-cookie//lib/http/cookie_jar.rb#155 + def each(uri = T.unsafe(nil), &block); end + + # Tests if the jar is empty. If `url` is given, tests if there is + # no cookie for the URL. + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie_jar.rb#136 + def empty?(url = T.unsafe(nil)); end + + # call-seq: + # jar.load(filename_or_io, **options) + # jar.load(filename_or_io, format = :yaml, **options) + # + # Loads cookies recorded in a file or an IO in the format specified + # into the jar and returns self. If a given object responds to + # \#read it is taken as an IO, or taken as a filename otherwise. + # + # Available option keywords are below: + # + # * `:format` + # + # Specifies the format for loading. A saver class, a symbol + # addressing a saver class, or a pre-generated instance of a + # saver class is accepted. + # + #
+ #
:yaml
+ #
YAML structure (default)
+ #
:cookiestxt
+ #
Mozilla's cookies.txt format
+ #
+ # + # All options given are passed through to the underlying cookie + # saver module's constructor. + # + # source://http-cookie//lib/http/cookie_jar.rb#294 + def load(readable, *options); end + + # Parses a Set-Cookie field value `set_cookie` assuming that it is + # sent from a source URL/URI `origin`, and adds the cookies parsed + # as valid and considered acceptable to the jar. Returns an array + # of cookies that have been added. + # + # If a block is given, it is called for each cookie and the cookie + # is added only if the block returns a true value. + # + # `jar.parse(set_cookie, origin)` is a shorthand for this: + # + # HTTP::Cookie.parse(set_cookie, origin) { |cookie| + # jar.add(cookie) + # } + # + # See HTTP::Cookie.parse for available options. + # + # source://http-cookie//lib/http/cookie_jar.rb#183 + def parse(set_cookie, origin, options = T.unsafe(nil)); end + + # call-seq: + # jar.save(filename_or_io, **options) + # jar.save(filename_or_io, format = :yaml, **options) + # + # Saves the cookie jar into a file or an IO in the format specified + # and returns self. If a given object responds to #write it is + # taken as an IO, or taken as a filename otherwise. + # + # Available option keywords are below: + # + # * `:format` + # + # Specifies the format for saving. A saver class, a symbol + # addressing a saver class, or a pre-generated instance of a + # saver class is accepted. + # + #
+ #
:yaml
+ #
YAML structure (default)
+ #
:cookiestxt
+ #
Mozilla's cookies.txt format
+ #
+ # + # * `:session` + # + #
+ #
true
+ #
Save session cookies as well.
+ #
false
+ #
Do not save session cookies. (default)
+ #
+ # + # All options given are passed through to the underlying cookie + # saver module's constructor. + # + # source://http-cookie//lib/http/cookie_jar.rb#231 + def save(writable, *options); end + + # Returns the value of attribute store. + # + # source://http-cookie//lib/http/cookie_jar.rb#30 + def store; end + + private + + # source://http-cookie//lib/http/cookie_jar.rb#32 + def get_impl(base, value, *args); end + + # The copy constructor. Not all backend store classes support cloning. + # + # source://http-cookie//lib/http/cookie_jar.rb#78 + def initialize_copy(other); end + + class << self + # source://http-cookie//lib/http/cookie_jar.rb#10 + def const_missing(name); end + end +end + +# An abstract superclass for all saver classes. +# +# source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#4 +class HTTP::CookieJar::AbstractSaver + # :call-seq: + # new(**options) + # + # Called by the constructor of each subclass using super(). + # + # @return [AbstractSaver] a new instance of AbstractSaver + # + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#41 + def initialize(options = T.unsafe(nil)); end + + # Implements HTTP::CookieJar#load(). + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#62 + def load(io, jar); end + + # Implements HTTP::CookieJar#save(). + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#55 + def save(io, jar); end + + private + + # Defines options and their default values. + # + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#32 + def default_options; end + + class << self + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#26 + def class_to_symbol(klass); end + + # Gets an implementation class by the name, optionally trying to + # load "http/cookie_jar/*_saver" if not found. If loading fails, + # IndexError is raised. + # + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#11 + def implementation(symbol); end + + # source://http-cookie//lib/http/cookie_jar/abstract_saver.rb#22 + def inherited(subclass); end + end +end + +# An abstract superclass for all store classes. +# +# source://http-cookie//lib/http/cookie_jar/abstract_store.rb#5 +class HTTP::CookieJar::AbstractStore + include ::MonitorMixin + include ::Enumerable + + # :call-seq: + # new(**options) + # + # Called by the constructor of each subclass using super(). + # + # @return [AbstractStore] a new instance of AbstractStore + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#44 + def initialize(options = T.unsafe(nil)); end + + # Implements HTTP::CookieJar#add(). + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#63 + def add(cookie); end + + # Implements HTTP::CookieJar#cleanup(). + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#113 + def cleanup(session = T.unsafe(nil)); end + + # Implements HTTP::CookieJar#clear(). + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#106 + def clear; end + + # Implements HTTP::CookieJar#delete(). + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#70 + def delete(cookie); end + + # Iterates over all cookies that are not expired. + # + # An optional argument +uri+ specifies a URI object indicating the + # destination of the cookies being selected. Every cookie yielded + # should be good to send to the given URI, + # i.e. cookie.valid_for_uri?(uri) evaluates to true. + # + # If (and only if) the +uri+ option is given, last access time of + # each cookie is updated to the current time. + # + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#85 + def each(uri = T.unsafe(nil), &block); end + + # Implements HTTP::CookieJar#empty?(). + # + # @return [Boolean] + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#98 + def empty?; end + + private + + # Defines options and their default values. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#35 + def default_options; end + + # This is an abstract method that each subclass must override. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#56 + def initialize_copy(other); end + + class << self + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#29 + def class_to_symbol(klass); end + + # Gets an implementation class by the name, optionally trying to + # load "http/cookie_jar/*_store" if not found. If loading fails, + # IndexError is raised. + # + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#14 + def implementation(symbol); end + + # source://http-cookie//lib/http/cookie_jar/abstract_store.rb#25 + def inherited(subclass); end + end +end + +# CookiestxtSaver saves and loads cookies in the cookies.txt format. +# +# source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#20 +class HTTP::CookieJar::CookiestxtSaver < ::HTTP::CookieJar::AbstractSaver + # source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#32 + def load(io, jar); end + + # source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#24 + def save(io, jar); end + + private + + # Serializes the cookie into a cookies.txt line. + # + # source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#56 + def cookie_to_record(cookie); end + + # source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#40 + def default_options; end + + # Parses a line from cookies.txt and returns a cookie object if the + # line represents a cookie record or returns nil otherwise. + # + # source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#72 + def parse_record(line); end +end + +# source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#49 +HTTP::CookieJar::CookiestxtSaver::False = T.let(T.unsafe(nil), String) + +# source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#51 +HTTP::CookieJar::CookiestxtSaver::HTTPONLY_PREFIX = T.let(T.unsafe(nil), String) + +# source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#52 +HTTP::CookieJar::CookiestxtSaver::RE_HTTPONLY_PREFIX = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://http-cookie//lib/http/cookie_jar/cookiestxt_saver.rb#48 +HTTP::CookieJar::CookiestxtSaver::True = T.let(T.unsafe(nil), String) + +# A store class that uses a hash-based cookie store. +# +# In this store, cookies that share the same name, domain and path +# will overwrite each other regardless of the `for_domain` flag +# value. This store is built after the storage model described in +# RFC 6265 5.3 where there is no mention of how the host-only-flag +# affects in storing cookies. On the other hand, in MozillaStore +# two cookies with the same name, domain and path coexist as long as +# they differ in the `for_domain` flag value, which means they need +# to be expired individually. +# +# source://http-cookie//lib/http/cookie_jar/hash_store.rb#15 +class HTTP::CookieJar::HashStore < ::HTTP::CookieJar::AbstractStore + # :call-seq: + # new(**options) + # + # Generates a hash based cookie store. + # + # Available option keywords are as below: + # + # :gc_threshold + # : GC threshold; A GC happens when this many times cookies have + # been stored (default: `HTTP::Cookie::MAX_COOKIES_TOTAL / 20`) + # + # @return [HashStore] a new instance of HashStore + # + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#32 + def initialize(options = T.unsafe(nil)); end + + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#54 + def add(cookie); end + + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#111 + def cleanup(session = T.unsafe(nil)); end + + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#106 + def clear; end + + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#16 + def default_options; end + + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#61 + def delete(cookie); end + + # :yield: cookie + # + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#67 + def each(uri = T.unsafe(nil)); end + + private + + # The copy constructor. This store class supports cloning. + # + # source://http-cookie//lib/http/cookie_jar/hash_store.rb#50 + def initialize_copy(other); end +end + +# YAMLSaver saves and loads cookies in the YAML format. It can load a +# YAML file saved by Mechanize, but the saving format is not +# compatible with older versions of Mechanize (< 2.7). +# +# source://http-cookie//lib/http/cookie_jar/yaml_saver.rb#14 +class HTTP::CookieJar::YAMLSaver < ::HTTP::CookieJar::AbstractSaver + # source://http-cookie//lib/http/cookie_jar/yaml_saver.rb#22 + def load(io, jar); end + + # source://http-cookie//lib/http/cookie_jar/yaml_saver.rb#18 + def save(io, jar); end + + private + + # source://http-cookie//lib/http/cookie_jar/yaml_saver.rb#73 + def default_options; end + + # source://http-cookie//lib/http/cookie_jar/yaml_saver.rb#78 + def load_yaml(yaml); end +end diff --git a/sorbet/rbi/gems/httparty@0.21.0.rbi b/sorbet/rbi/gems/httparty@0.21.0.rbi new file mode 100644 index 0000000000..372db94295 --- /dev/null +++ b/sorbet/rbi/gems/httparty@0.21.0.rbi @@ -0,0 +1,2094 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `httparty` gem. +# Please instead update this file by running `bin/tapioca gem httparty`. + +# @see HTTParty::ClassMethods +# +# source://httparty//lib/httparty/module_inheritable_attributes.rb#3 +module HTTParty + include ::HTTParty::ModuleInheritableAttributes + + mixes_in_class_methods ::HTTParty::ClassMethods + mixes_in_class_methods ::HTTParty::ModuleInheritableAttributes::ClassMethods + + class << self + # source://httparty//lib/httparty.rb#668 + def copy(*args, &block); end + + # source://httparty//lib/httparty.rb#660 + def delete(*args, &block); end + + # source://httparty//lib/httparty.rb#644 + def get(*args, &block); end + + # source://httparty//lib/httparty.rb#672 + def head(*args, &block); end + + # @private + # + # source://httparty//lib/httparty.rb#26 + def included(base); end + + # source://httparty//lib/httparty.rb#664 + def move(*args, &block); end + + # source://httparty//lib/httparty.rb#629 + def normalize_base_uri(url); end + + # source://httparty//lib/httparty.rb#676 + def options(*args, &block); end + + # source://httparty//lib/httparty.rb#652 + def patch(*args, &block); end + + # source://httparty//lib/httparty.rb#648 + def post(*args, &block); end + + # source://httparty//lib/httparty.rb#656 + def put(*args, &block); end + end +end + +# source://httparty//lib/httparty.rb#640 +class HTTParty::Basement + include ::HTTParty + include ::HTTParty::ModuleInheritableAttributes + extend ::HTTParty::ClassMethods + extend ::HTTParty::ModuleInheritableAttributes::ClassMethods + + class << self + def default_cookies; end + def default_cookies=(_arg0); end + def default_options; end + def default_options=(_arg0); end + end +end + +# == Common Request Options +# Request methods (get, post, patch, put, delete, head, options) all take a common set of options. These are: +# +# [:+body+:] Body of the request. If passed an object that responds to #to_hash, will try to normalize it first, by default passing it to ActiveSupport::to_params. Any other kind of object will get used as-is. +# [:+http_proxyaddr+:] Address of proxy server to use. +# [:+http_proxyport+:] Port of proxy server to use. +# [:+http_proxyuser+:] User for proxy server authentication. +# [:+http_proxypass+:] Password for proxy server authentication. +# [:+limit+:] Maximum number of redirects to follow. Takes precedences over :+no_follow+. +# [:+query+:] Query string, or an object that responds to #to_hash representing it. Normalized according to the same rules as :+body+. If you specify this on a POST, you must use an object which responds to #to_hash. See also HTTParty::ClassMethods.default_params. +# [:+timeout+:] Timeout for opening connection and reading data. +# [:+local_host+:] Local address to bind to before connecting. +# [:+local_port+:] Local port to bind to before connecting. +# [:+body_stream+:] Allow streaming to a REST server to specify a body_stream. +# [:+stream_body+:] Allow for streaming large files without loading them into memory. +# [:+multipart+:] Force content-type to be multipart +# +# There are also another set of options with names corresponding to various class methods. The methods in question are those that let you set a class-wide default, and the options override the defaults on a request-by-request basis. Those options are: +# * :+base_uri+: see HTTParty::ClassMethods.base_uri. +# * :+basic_auth+: see HTTParty::ClassMethods.basic_auth. Only one of :+basic_auth+ and :+digest_auth+ can be used at a time; if you try using both, you'll get an ArgumentError. +# * :+debug_output+: see HTTParty::ClassMethods.debug_output. +# * :+digest_auth+: see HTTParty::ClassMethods.digest_auth. Only one of :+basic_auth+ and :+digest_auth+ can be used at a time; if you try using both, you'll get an ArgumentError. +# * :+format+: see HTTParty::ClassMethods.format. +# * :+headers+: see HTTParty::ClassMethods.headers. Must be a an object which responds to #to_hash. +# * :+maintain_method_across_redirects+: see HTTParty::ClassMethods.maintain_method_across_redirects. +# * :+no_follow+: see HTTParty::ClassMethods.no_follow. +# * :+parser+: see HTTParty::ClassMethods.parser. +# * :+uri_adapter+: see HTTParty::ClassMethods.uri_adapter +# * :+connection_adapter+: see HTTParty::ClassMethods.connection_adapter. +# * :+pem+: see HTTParty::ClassMethods.pem. +# * :+query_string_normalizer+: see HTTParty::ClassMethods.query_string_normalizer +# * :+ssl_ca_file+: see HTTParty::ClassMethods.ssl_ca_file. +# * :+ssl_ca_path+: see HTTParty::ClassMethods.ssl_ca_path. +# +# source://httparty//lib/httparty.rb#69 +module HTTParty::ClassMethods + # Allows setting a base uri to be used for each request. + # Will normalize uri to include http, etc. + # + # class Foo + # include HTTParty + # base_uri 'twitter.com' + # end + # + # source://httparty//lib/httparty.rb#112 + def base_uri(uri = T.unsafe(nil)); end + + # Allows setting basic authentication username and password. + # + # class Foo + # include HTTParty + # basic_auth 'username', 'password' + # end + # + # source://httparty//lib/httparty.rb#123 + def basic_auth(u, p); end + + # Allows setting of SSL ciphers to use. This only works in Ruby 1.9+. + # You can get a list of valid specific ciphers from OpenSSL::Cipher.ciphers. + # You also can specify a cipher suite here, listed here at openssl.org: + # http://www.openssl.org/docs/apps/ciphers.html#CIPHER_SUITE_NAMES + # + # class Foo + # include HTTParty + # ciphers "RC4-SHA" + # end + # + # source://httparty//lib/httparty.rb#429 + def ciphers(cipher_names); end + + # Allows setting a custom connection_adapter for the http connections + # + # @example + # class Foo + # include HTTParty + # connection_adapter Proc.new {|uri, options| ... } + # end + # @example provide optional configuration for your connection_adapter + # class Foo + # include HTTParty + # connection_adapter Proc.new {|uri, options| ... }, {foo: :bar} + # end + # @see HTTParty::ConnectionAdapter + # + # source://httparty//lib/httparty.rb#504 + def connection_adapter(custom_adapter = T.unsafe(nil), options = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://httparty//lib/httparty.rb#246 + def cookies(h = T.unsafe(nil)); end + + # Perform a COPY request to a path + # + # source://httparty//lib/httparty.rb#566 + def copy(path, options = T.unsafe(nil), &block); end + + # Set an output stream for debugging, defaults to $stderr. + # The output stream is passed on to Net::HTTP#set_debug_output. + # + # class Foo + # include HTTParty + # debug_output $stderr + # end + # + # source://httparty//lib/httparty.rb#226 + def debug_output(stream = T.unsafe(nil)); end + + # Returns the value of attribute default_options. + # + # source://httparty//lib/httparty.rb#594 + def default_options; end + + # Allows setting default parameters to be appended to each request. + # Great for api keys and such. + # + # class Foo + # include HTTParty + # default_params api_key: 'secret', another: 'foo' + # end + # + # @raise [ArgumentError] + # + # source://httparty//lib/httparty.rb#166 + def default_params(h = T.unsafe(nil)); end + + # Allows setting a default timeout for all HTTP calls + # Timeout is specified in seconds. + # + # class Foo + # include HTTParty + # default_timeout 10 + # end + # + # source://httparty//lib/httparty.rb#179 + def default_timeout(value); end + + # Perform a DELETE request to a path + # + # source://httparty//lib/httparty.rb#556 + def delete(path, options = T.unsafe(nil), &block); end + + # Allows setting digest authentication username and password. + # + # class Foo + # include HTTParty + # digest_auth 'username', 'password' + # end + # + # source://httparty//lib/httparty.rb#133 + def digest_auth(u, p); end + + # Do not send rails style query strings. + # Specifically, don't use bracket notation when sending an array + # + # For a query: + # get '/', query: {selected_ids: [1,2,3]} + # + # The default query string looks like this: + # /?selected_ids[]=1&selected_ids[]=2&selected_ids[]=3 + # + # Call `disable_rails_query_string_format` to transform the query string + # into: + # /?selected_ids=1&selected_ids=2&selected_ids=3 + # + # @example + # class Foo + # include HTTParty + # disable_rails_query_string_format + # end + # + # source://httparty//lib/httparty.rb#155 + def disable_rails_query_string_format; end + + # Proceed to the location header when an HTTP response dictates a redirect. + # Redirects are always followed by default. + # + # @example + # class Foo + # include HTTParty + # base_uri 'http://google.com' + # follow_redirects true + # end + # + # source://httparty//lib/httparty.rb#260 + def follow_redirects(value = T.unsafe(nil)); end + + # Allows setting the format with which to parse. + # Must be one of the allowed formats ie: json, xml + # + # class Foo + # include HTTParty + # format :json + # end + # + # source://httparty//lib/httparty.rb#271 + def format(f = T.unsafe(nil)); end + + # Allows making a get request to a url. + # + # class Foo + # include HTTParty + # end + # + # # Simple get with full url + # Foo.get('http://foo.com/resource.json') + # + # # Simple get with full url and query parameters + # # ie: http://foo.com/resource.json?limit=10 + # Foo.get('http://foo.com/resource.json', query: {limit: 10}) + # + # source://httparty//lib/httparty.rb#525 + def get(path, options = T.unsafe(nil), &block); end + + # Perform a HEAD request to a path + # + # source://httparty//lib/httparty.rb#571 + def head(path, options = T.unsafe(nil), &block); end + + # Allows setting HTTP headers to be used for each request. + # + # class Foo + # include HTTParty + # headers 'Accept' => 'text/html' + # end + # + # source://httparty//lib/httparty.rb#236 + def headers(h = T.unsafe(nil)); end + + # Allows setting http proxy information to be used + # + # class Foo + # include HTTParty + # http_proxy 'http://foo.com', 80, 'user', 'pass' + # end + # + # source://httparty//lib/httparty.rb#98 + def http_proxy(addr = T.unsafe(nil), port = T.unsafe(nil), user = T.unsafe(nil), pass = T.unsafe(nil)); end + + # source://httparty//lib/httparty.rb#586 + def lock(path, options = T.unsafe(nil), &block); end + + # Turns on logging + # + # class Foo + # include HTTParty + # logger Logger.new('http_logger'), :info, :apache + # end + # + # source://httparty//lib/httparty.rb#76 + def logger(logger, level = T.unsafe(nil), format = T.unsafe(nil)); end + + # Declare that you wish to maintain the chosen HTTP method across redirects. + # The default behavior is to follow redirects via the GET method, except + # if you are making a HEAD request, in which case the default is to + # follow all redirects with HEAD requests. + # If you wish to maintain the original method, you can set this option to true. + # + # @example + # class Foo + # include HTTParty + # base_uri 'http://google.com' + # maintain_method_across_redirects true + # end + # + # source://httparty//lib/httparty.rb#317 + def maintain_method_across_redirects(value = T.unsafe(nil)); end + + # Perform a MKCOL request to a path + # + # source://httparty//lib/httparty.rb#582 + def mkcol(path, options = T.unsafe(nil), &block); end + + # Perform a MOVE request to a path + # + # source://httparty//lib/httparty.rb#561 + def move(path, options = T.unsafe(nil), &block); end + + # Declare whether or not to follow redirects. When true, an + # {HTTParty::RedirectionTooDeep} error will raise upon encountering a + # redirect. You can then gain access to the response object via + # HTTParty::RedirectionTooDeep#response. + # + # @example + # class Foo + # include HTTParty + # base_uri 'http://google.com' + # no_follow true + # end + # + # begin + # Foo.get('/') + # rescue HTTParty::RedirectionTooDeep => e + # puts e.response.body + # end + # @see HTTParty::ResponseError#response + # + # source://httparty//lib/httparty.rb#300 + def no_follow(value = T.unsafe(nil)); end + + # Allows setting a default open_timeout for all HTTP calls in seconds + # + # class Foo + # include HTTParty + # open_timeout 10 + # end + # + # source://httparty//lib/httparty.rb#190 + def open_timeout(value); end + + # Perform an OPTIONS request to a path + # + # source://httparty//lib/httparty.rb#577 + def options(path, options = T.unsafe(nil), &block); end + + # Allows setting a custom parser for the response. + # + # class Foo + # include HTTParty + # parser Proc.new {|data| ...} + # end + # + # source://httparty//lib/httparty.rb#469 + def parser(custom_parser = T.unsafe(nil)); end + + # Perform a PATCH request to a path + # + # source://httparty//lib/httparty.rb#546 + def patch(path, options = T.unsafe(nil), &block); end + + # Allows setting a PEM file to be used + # + # class Foo + # include HTTParty + # pem File.read('/home/user/my.pem'), "optional password" + # end + # + # source://httparty//lib/httparty.rb#345 + def pem(pem_contents, password = T.unsafe(nil)); end + + # Allows setting a PKCS12 file to be used + # + # class Foo + # include HTTParty + # pkcs12 File.read('/home/user/my.p12'), "password" + # end + # + # source://httparty//lib/httparty.rb#356 + def pkcs12(p12_contents, password); end + + # Allows making a post request to a url. + # + # class Foo + # include HTTParty + # end + # + # # Simple post with full url and setting the body + # Foo.post('http://foo.com/resources', body: {bar: 'baz'}) + # + # # Simple post with full url using :query option, + # # which appends the parameters to the URI. + # Foo.post('http://foo.com/resources', query: {bar: 'baz'}) + # + # source://httparty//lib/httparty.rb#541 + def post(path, options = T.unsafe(nil), &block); end + + # Perform a PUT request to a path + # + # source://httparty//lib/httparty.rb#551 + def put(path, options = T.unsafe(nil), &block); end + + # Override the way query strings are normalized. + # Helpful for overriding the default rails normalization of Array queries. + # + # For a query: + # get '/', query: {selected_ids: [1,2,3]} + # + # The default query string normalizer returns: + # /?selected_ids[]=1&selected_ids[]=2&selected_ids[]=3 + # + # Let's change it to this: + # /?selected_ids=1&selected_ids=2&selected_ids=3 + # + # Pass a Proc to the query normalizer which accepts the yielded query. + # + # @example Modifying Array query strings + # class ServiceWrapper + # include HTTParty + # + # query_string_normalizer proc { |query| + # query.map do |key, value| + # value.map {|v| "#{key}=#{v}"} + # end.join('&') + # } + # end + # @param normalizer [Proc] custom query string normalizer. + # @yield [Hash, String] query string + # @yieldreturn [Array] an array that will later be joined with '&' + # + # source://httparty//lib/httparty.rb#389 + def query_string_normalizer(normalizer); end + + # Raises HTTParty::ResponseError if response's code matches this statuses + # + # class Foo + # include HTTParty + # raise_on [404, 500] + # end + # + # source://httparty//lib/httparty.rb#88 + def raise_on(codes = T.unsafe(nil)); end + + # Allows setting a default read_timeout for all HTTP calls in seconds + # + # class Foo + # include HTTParty + # read_timeout 10 + # end + # + # source://httparty//lib/httparty.rb#201 + def read_timeout(value); end + + # Declare that you wish to resend the full HTTP request across redirects, + # even on redirects that should logically become GET requests. + # A 303 redirect in HTTP signifies that the redirected url should normally + # retrieved using a GET request, for instance, it is the output of a previous + # POST. maintain_method_across_redirects respects this behavior, but you + # can force HTTParty to resend_on_redirect even on 303 responses. + # + # @example + # class Foo + # include HTTParty + # base_uri 'http://google.com' + # resend_on_redirect + # end + # + # source://httparty//lib/httparty.rb#335 + def resend_on_redirect(value = T.unsafe(nil)); end + + # Deactivate automatic decompression of the response body. + # This will require you to explicitly handle body decompression + # by inspecting the Content-Encoding response header. + # + # Refer to docs/README.md "HTTP Compression" section for + # further details. + # + # @example + # class Foo + # include HTTParty + # skip_decompression + # end + # + # source://httparty//lib/httparty.rb#416 + def skip_decompression(value = T.unsafe(nil)); end + + # Allows setting an OpenSSL certificate authority file. The file + # should contain one or more certificates in PEM format. + # + # Setting this option enables certificate verification. All + # certificates along a chain must be available in ssl_ca_file or + # ssl_ca_path for verification to succeed. + # + # + # class Foo + # include HTTParty + # ssl_ca_file '/etc/ssl/certs/ca-certificates.crt' + # end + # + # source://httparty//lib/httparty.rb#445 + def ssl_ca_file(path); end + + # Allows setting an OpenSSL certificate authority path (directory). + # + # Setting this option enables certificate verification. All + # certificates along a chain must be available in ssl_ca_file or + # ssl_ca_path for verification to succeed. + # + # class Foo + # include HTTParty + # ssl_ca_path '/etc/ssl/certs/' + # end + # + # source://httparty//lib/httparty.rb#459 + def ssl_ca_path(path); end + + # Allows setting of SSL version to use. This only works in Ruby 1.9+. + # You can get a list of valid versions from OpenSSL::SSL::SSLContext::METHODS. + # + # class Foo + # include HTTParty + # ssl_version :SSLv3 + # end + # + # source://httparty//lib/httparty.rb#400 + def ssl_version(version); end + + # source://httparty//lib/httparty.rb#590 + def unlock(path, options = T.unsafe(nil), &block); end + + # Allows setting a custom URI adapter. + # + # class Foo + # include HTTParty + # uri_adapter Addressable::URI + # end + # + # @raise [ArgumentError] + # + # source://httparty//lib/httparty.rb#484 + def uri_adapter(uri_adapter); end + + # Allows setting a default write_timeout for all HTTP calls in seconds + # Supported by Ruby > 2.6.0 + # + # class Foo + # include HTTParty + # write_timeout 10 + # end + # + # source://httparty//lib/httparty.rb#213 + def write_timeout(value); end + + private + + # source://httparty//lib/httparty.rb#602 + def ensure_method_maintained_across_redirects(options); end + + # source://httparty//lib/httparty.rb#608 + def perform_request(http_method, path, options, &block); end + + # source://httparty//lib/httparty.rb#615 + def process_cookies(options); end + + # source://httparty//lib/httparty.rb#621 + def validate_format; end + + # @raise [ArgumentError] + # + # source://httparty//lib/httparty.rb#598 + def validate_timeout_argument(timeout_type, value); end +end + +# Default connection adapter that returns a new Net::HTTP each time +# +# == Custom Connection Factories +# +# If you like to implement your own connection adapter, subclassing +# HTTParty::ConnectionAdapter will make it easier. Just override +# the #connection method. The uri and options attributes will have +# all the info you need to construct your http connection. Whatever +# you return from your connection method needs to adhere to the +# Net::HTTP interface as this is what HTTParty expects. +# +# === Configuration +# There is lots of configuration data available for your connection adapter +# in the #options attribute. It is up to you to interpret them within your +# connection adapter. Take a look at the implementation of +# HTTParty::ConnectionAdapter#connection for examples of how they are used. +# The keys used in options are +# * :+timeout+: timeout in seconds +# * :+open_timeout+: http connection open_timeout in seconds, overrides timeout if set +# * :+read_timeout+: http connection read_timeout in seconds, overrides timeout if set +# * :+write_timeout+: http connection write_timeout in seconds, overrides timeout if set (Ruby >= 2.6.0 required) +# * :+debug_output+: see HTTParty::ClassMethods.debug_output. +# * :+cert_store+: contains certificate data. see method 'attach_ssl_certificates' +# * :+pem+: contains pem client certificate data. see method 'attach_ssl_certificates' +# * :+p12+: contains PKCS12 client client certificate data. see method 'attach_ssl_certificates' +# * :+verify+: verify the server’s certificate against the ca certificate. +# * :+verify_peer+: set to false to turn off server verification but still send client certificate +# * :+ssl_ca_file+: see HTTParty::ClassMethods.ssl_ca_file. +# * :+ssl_ca_path+: see HTTParty::ClassMethods.ssl_ca_path. +# * :+ssl_version+: SSL versions to allow. see method 'attach_ssl_certificates' +# * :+ciphers+: The list of SSL ciphers to support +# * :+connection_adapter_options+: contains the hash you passed to HTTParty.connection_adapter when you configured your connection adapter +# * :+local_host+: The local address to bind to +# * :+local_port+: The local port to bind to +# * :+http_proxyaddr+: HTTP Proxy address +# * :+http_proxyport+: HTTP Proxy port +# * :+http_proxyuser+: HTTP Proxy user +# * :+http_proxypass+: HTTP Proxy password +# +# === Inherited methods +# * :+clean_host+: Method used to sanitize host names +# +# @example log the uri and options +# class LoggingConnectionAdapter < HTTParty::ConnectionAdapter +# def connection +# puts uri +# puts options +# Net::HTTP.new(uri) +# end +# end +# @example count number of http calls +# class CountingConnectionAdapter < HTTParty::ConnectionAdapter +# @@count = 0 +# +# self.count +# @@count +# end +# +# def connection +# self.count += 1 +# super +# end +# end +# +# source://httparty//lib/httparty/connection_adapter.rb#69 +class HTTParty::ConnectionAdapter + # @raise [ArgumentError] + # @return [ConnectionAdapter] a new instance of ConnectionAdapter + # + # source://httparty//lib/httparty/connection_adapter.rb#91 + def initialize(uri, options = T.unsafe(nil)); end + + # source://httparty//lib/httparty/connection_adapter.rb#99 + def connection; end + + # Returns the value of attribute options. + # + # source://httparty//lib/httparty/connection_adapter.rb#89 + def options; end + + # Returns the value of attribute uri. + # + # source://httparty//lib/httparty/connection_adapter.rb#89 + def uri; end + + private + + # @return [Boolean] + # + # source://httparty//lib/httparty/connection_adapter.rb#188 + def add_max_retries?(max_retries); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/connection_adapter.rb#184 + def add_timeout?(timeout); end + + # source://httparty//lib/httparty/connection_adapter.rb#208 + def attach_ssl_certificates(http, options); end + + # source://httparty//lib/httparty/connection_adapter.rb#192 + def clean_host(host); end + + # source://httparty//lib/httparty/connection_adapter.rb#176 + def from_ruby_version(ruby_version, option: T.unsafe(nil), warn: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/connection_adapter.rb#200 + def ssl_implied?(uri); end + + # source://httparty//lib/httparty/connection_adapter.rb#196 + def strip_ipv6_brackets(host); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/connection_adapter.rb#204 + def verify_ssl_certificate?; end + + class << self + # Public + # + # source://httparty//lib/httparty/connection_adapter.rb#79 + def call(uri, options); end + + # source://httparty//lib/httparty/connection_adapter.rb#83 + def default_cert_store; end + end +end + +# source://httparty//lib/httparty/connection_adapter.rb#73 +HTTParty::ConnectionAdapter::OPTION_DEFAULTS = T.let(T.unsafe(nil), Hash) + +# Private: Regex used to strip brackets from IPv6 URIs. +# +# source://httparty//lib/httparty/connection_adapter.rb#71 +HTTParty::ConnectionAdapter::StripIpv6BracketsRegex = T.let(T.unsafe(nil), Regexp) + +# source://httparty//lib/httparty/cookie_hash.rb#3 +class HTTParty::CookieHash < ::Hash + # source://httparty//lib/httparty/cookie_hash.rb#6 + def add_cookies(data); end + + # source://httparty//lib/httparty/cookie_hash.rb#20 + def to_cookie_string; end +end + +# source://httparty//lib/httparty/cookie_hash.rb#4 +HTTParty::CookieHash::CLIENT_COOKIES = T.let(T.unsafe(nil), Array) + +# Decompresses the response body based on the Content-Encoding header. +# +# Net::HTTP automatically decompresses Content-Encoding values "gzip" and "deflate". +# This class will handle "br" (Brotli) and "compress" (LZW) if the requisite +# gems are installed. Otherwise, it returns nil if the body data cannot be +# decompressed. +# +# @abstract Read the HTTP Compression section for more information. +# +# source://httparty//lib/httparty/decompressor.rb#12 +class HTTParty::Decompressor + # @param body [String] - the response body of the request + # @param encoding [Symbol] - the Content-Encoding algorithm used to encode the body + # @return [Decompressor] a new instance of Decompressor + # + # source://httparty//lib/httparty/decompressor.rb#34 + def initialize(body, encoding); end + + # The response body of the request + # + # @return [String] + # + # source://httparty//lib/httparty/decompressor.rb#26 + def body; end + + # Perform decompression on the response body + # + # @return [String] the decompressed body + # @return [nil] when the response body is nil or cannot decompressed + # + # source://httparty//lib/httparty/decompressor.rb#42 + def decompress; end + + # The Content-Encoding algorithm used to encode the body + # + # @return [Symbol] e.g. :gzip + # + # source://httparty//lib/httparty/decompressor.rb#30 + def encoding; end + + protected + + # source://httparty//lib/httparty/decompressor.rb#72 + def brotli; end + + # source://httparty//lib/httparty/decompressor.rb#59 + def decompress_supported_encoding; end + + # source://httparty//lib/httparty/decompressor.rb#81 + def lzw; end + + # source://httparty//lib/httparty/decompressor.rb#68 + def none; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/decompressor.rb#55 + def supports_encoding?; end + + # source://httparty//lib/httparty/decompressor.rb#93 + def zstd; end +end + +# "gzip" and "deflate" are handled by Net::HTTP +# hence they do not need to be handled by HTTParty +# +# source://httparty//lib/httparty/decompressor.rb#16 +HTTParty::Decompressor::SupportedEncodings = T.let(T.unsafe(nil), Hash) + +# Exception that is raised when request redirects and location header is present more than once +# +# source://httparty//lib/httparty/exceptions.rb#34 +class HTTParty::DuplicateLocationHeader < ::HTTParty::ResponseError; end + +# @abstract Exceptions raised by HTTParty inherit from Error +# +# source://httparty//lib/httparty/exceptions.rb#5 +class HTTParty::Error < ::StandardError; end + +# source://httparty//lib/httparty/hash_conversions.rb#6 +module HTTParty::HashConversions + class << self + # source://httparty//lib/httparty/hash_conversions.rb#36 + def normalize_keys(key, value); end + + # @example normalize_param(:name, "Bob Jones") #=> "name=Bob%20Jones&" + # @param key [Object] The key for the param. + # @param value [Object] The value for the param. + # @return [String] This key value pair as a param + # + # source://httparty//lib/httparty/hash_conversions.rb#28 + def normalize_param(key, value); end + + # @example + # { name: "Bob", + # address: { + # street: '111 Ruby Ave.', + # city: 'Ruby Central', + # phones: ['111-111-1111', '222-222-2222'] + # } + # }.to_params + # #=> "name=Bob&address[city]=Ruby Central&address[phones][]=111-111-1111&address[phones][]=222-222-2222&address[street]=111 Ruby Ave." + # @return [String] This hash as a query string + # + # source://httparty//lib/httparty/hash_conversions.rb#18 + def to_params(hash); end + end +end + +# source://httparty//lib/httparty/headers_processor.rb#4 +class HTTParty::HeadersProcessor + # @return [HeadersProcessor] a new instance of HeadersProcessor + # + # source://httparty//lib/httparty/headers_processor.rb#7 + def initialize(headers, options); end + + # source://httparty//lib/httparty/headers_processor.rb#12 + def call; end + + # Returns the value of attribute headers. + # + # source://httparty//lib/httparty/headers_processor.rb#5 + def headers; end + + # Returns the value of attribute options. + # + # source://httparty//lib/httparty/headers_processor.rb#5 + def options; end + + private + + # source://httparty//lib/httparty/headers_processor.rb#21 + def process_dynamic_headers; end +end + +# source://httparty//lib/httparty/logger/apache_formatter.rb#4 +module HTTParty::Logger + class << self + # @raise [HTTParty::Error] + # + # source://httparty//lib/httparty/logger/logger.rb#17 + def add_formatter(name, formatter); end + + # source://httparty//lib/httparty/logger/logger.rb#22 + def build(logger, level, formatter); end + + # source://httparty//lib/httparty/logger/logger.rb#9 + def formatters; end + end +end + +# source://httparty//lib/httparty/logger/apache_formatter.rb#5 +class HTTParty::Logger::ApacheFormatter + # @return [ApacheFormatter] a new instance of ApacheFormatter + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#10 + def initialize(logger, level); end + + # source://httparty//lib/httparty/logger/apache_formatter.rb#15 + def format(request, response); end + + # Returns the value of attribute level. + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#8 + def level; end + + # Sets the attribute level + # + # @param value the value to set the attribute level to. + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#8 + def level=(_arg0); end + + # Returns the value of attribute logger. + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#8 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#8 + def logger=(_arg0); end + + private + + # source://httparty//lib/httparty/logger/apache_formatter.rb#42 + def content_length; end + + # source://httparty//lib/httparty/logger/apache_formatter.rb#30 + def current_time; end + + # source://httparty//lib/httparty/logger/apache_formatter.rb#34 + def http_method; end + + # source://httparty//lib/httparty/logger/apache_formatter.rb#26 + def message; end + + # source://httparty//lib/httparty/logger/apache_formatter.rb#38 + def path; end + + # Returns the value of attribute request. + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#24 + def request; end + + # Returns the value of attribute response. + # + # source://httparty//lib/httparty/logger/apache_formatter.rb#24 + def response; end +end + +# source://httparty//lib/httparty/logger/apache_formatter.rb#6 +HTTParty::Logger::ApacheFormatter::TAG_NAME = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/logger/curl_formatter.rb#5 +class HTTParty::Logger::CurlFormatter + # @return [CurlFormatter] a new instance of CurlFormatter + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#12 + def initialize(logger, level); end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#18 + def format(request, response); end + + # Returns the value of attribute level. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#10 + def level; end + + # Sets the attribute level + # + # @param value the value to set the attribute level to. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#10 + def level=(_arg0); end + + # Returns the value of attribute logger. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#10 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#10 + def logger=(_arg0); end + + private + + # source://httparty//lib/httparty/logger/curl_formatter.rb#88 + def current_time; end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#84 + def log(direction, line = T.unsafe(nil)); end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#80 + def log_hash(hash); end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#59 + def log_headers; end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#66 + def log_query; end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#33 + def log_request; end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#41 + def log_response; end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#73 + def log_response_headers; end + + # source://httparty//lib/httparty/logger/curl_formatter.rb#48 + def log_url; end + + # Returns the value of attribute messages. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#31 + def messages; end + + # Sets the attribute messages + # + # @param value the value to set the attribute messages to. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#31 + def messages=(_arg0); end + + # Returns the value of attribute request. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#30 + def request; end + + # Returns the value of attribute response. + # + # source://httparty//lib/httparty/logger/curl_formatter.rb#30 + def response; end +end + +# source://httparty//lib/httparty/logger/curl_formatter.rb#8 +HTTParty::Logger::CurlFormatter::IN = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/logger/curl_formatter.rb#7 +HTTParty::Logger::CurlFormatter::OUT = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/logger/curl_formatter.rb#6 +HTTParty::Logger::CurlFormatter::TAG_NAME = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/logger/logstash_formatter.rb#5 +class HTTParty::Logger::LogstashFormatter + # @return [LogstashFormatter] a new instance of LogstashFormatter + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#10 + def initialize(logger, level); end + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#15 + def format(request, response); end + + # Returns the value of attribute level. + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#8 + def level; end + + # Sets the attribute level + # + # @param value the value to set the attribute level to. + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#8 + def level=(_arg0); end + + # Returns the value of attribute logger. + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#8 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#8 + def logger=(_arg0); end + + private + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#56 + def content_length; end + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#44 + def current_time; end + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#48 + def http_method; end + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#26 + def logstash_message; end + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#40 + def message; end + + # source://httparty//lib/httparty/logger/logstash_formatter.rb#52 + def path; end + + # Returns the value of attribute request. + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#24 + def request; end + + # Returns the value of attribute response. + # + # source://httparty//lib/httparty/logger/logstash_formatter.rb#24 + def response; end +end + +# source://httparty//lib/httparty/logger/logstash_formatter.rb#6 +HTTParty::Logger::LogstashFormatter::TAG_NAME = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/module_inheritable_attributes.rb#4 +module HTTParty::ModuleInheritableAttributes + mixes_in_class_methods ::HTTParty::ModuleInheritableAttributes::ClassMethods + + class << self + # borrowed from Rails 3.2 ActiveSupport + # + # source://httparty//lib/httparty/module_inheritable_attributes.rb#10 + def hash_deep_dup(hash); end + + # @private + # + # source://httparty//lib/httparty/module_inheritable_attributes.rb#5 + def included(base); end + end +end + +# source://httparty//lib/httparty/module_inheritable_attributes.rb#26 +module HTTParty::ModuleInheritableAttributes::ClassMethods + # source://httparty//lib/httparty/module_inheritable_attributes.rb#38 + def inherited(subclass); end + + # source://httparty//lib/httparty/module_inheritable_attributes.rb#27 + def mattr_inheritable(*args); end +end + +# The default parser used by HTTParty, supports xml, json, html, csv and +# plain text. +# +# == Custom Parsers +# +# If you'd like to do your own custom parsing, subclassing HTTParty::Parser +# will make that process much easier. There are a few different ways you can +# utilize HTTParty::Parser as a superclass. +# +# @abstract Read the Custom Parsers section for more information. +# @example Intercept the parsing for all formats +# class SimpleParser < HTTParty::Parser +# def parse +# perform_parsing +# end +# end +# @example Add the atom format and parsing method to the default parser +# class AtomParsingIncluded < HTTParty::Parser +# SupportedFormats.merge!( +# {"application/atom+xml" => :atom} +# ) +# +# def atom +# perform_atom_parsing +# end +# end +# @example Only support the atom format +# class ParseOnlyAtom < HTTParty::Parser +# SupportedFormats = {"application/atom+xml" => :atom} +# +# def atom +# perform_atom_parsing +# end +# end +# +# source://httparty//lib/httparty/parser.rb#41 +class HTTParty::Parser + # @return [Parser] a new instance of Parser + # + # source://httparty//lib/httparty/parser.rb#97 + def initialize(body, format); end + + # The response body of the request + # + # @return [String] + # + # source://httparty//lib/httparty/parser.rb#60 + def body; end + + # The intended parsing format for the request + # + # @return [Symbol] e.g. :json + # + # source://httparty//lib/httparty/parser.rb#64 + def format; end + + # @return [Object] the parsed body + # @return [nil] when the response body is nil, an empty string, spaces only or "null" + # + # source://httparty//lib/httparty/parser.rb#104 + def parse; end + + protected + + # source://httparty//lib/httparty/parser.rb#130 + def csv; end + + # source://httparty//lib/httparty/parser.rb#134 + def html; end + + # source://httparty//lib/httparty/parser.rb#126 + def json; end + + # source://httparty//lib/httparty/parser.rb#146 + def parse_supported_format; end + + # source://httparty//lib/httparty/parser.rb#138 + def plain; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/parser.rb#142 + def supports_format?; end + + # source://httparty//lib/httparty/parser.rb#120 + def xml; end + + class << self + # Instantiate the parser and call {#parse}. + # + # @param body [String] the response body + # @param format [Symbol] the response format + # @return parsed response + # + # source://httparty//lib/httparty/parser.rb#70 + def call(body, format); end + + # @param mimetype [String] response MIME type + # @return [Symbol] + # @return [nil] mime type not supported + # + # source://httparty//lib/httparty/parser.rb#82 + def format_from_mimetype(mimetype); end + + # @return [Hash] the SupportedFormats hash + # + # source://httparty//lib/httparty/parser.rb#75 + def formats; end + + # @return [Array] list of supported formats + # + # source://httparty//lib/httparty/parser.rb#87 + def supported_formats; end + + # @param format [Symbol] e.g. :json, :xml + # @return [Boolean] + # + # source://httparty//lib/httparty/parser.rb#93 + def supports_format?(format); end + end +end + +# source://httparty//lib/httparty/parser.rb#42 +HTTParty::Parser::SupportedFormats = T.let(T.unsafe(nil), Hash) + +# source://httparty//lib/httparty/parser.rb#124 +HTTParty::Parser::UTF8_BOM = T.let(T.unsafe(nil), String) + +# Exception that is raised when request has redirected too many times. +# Calling {#response} returns the Net:HTTP response object. +# +# source://httparty//lib/httparty/exceptions.rb#31 +class HTTParty::RedirectionTooDeep < ::HTTParty::ResponseError; end + +# source://httparty//lib/httparty/request/multipart_boundary.rb#6 +class HTTParty::Request + # @return [Request] a new instance of Request + # + # source://httparty//lib/httparty/request.rb#61 + def initialize(http_method, path, o = T.unsafe(nil)); end + + # source://httparty//lib/httparty/request.rb#187 + def _dump(_level); end + + # source://httparty//lib/httparty/request.rb#128 + def base_uri; end + + # source://httparty//lib/httparty/request.rb#146 + def connection_adapter; end + + # source://httparty//lib/httparty/request.rb#138 + def format; end + + # source://httparty//lib/httparty/request.rb#176 + def handle_unauthorized(&block); end + + # Returns the value of attribute http_method. + # + # source://httparty//lib/httparty/request.rb#58 + def http_method; end + + # Sets the attribute http_method + # + # @param value the value to set the attribute http_method to. + # + # source://httparty//lib/httparty/request.rb#58 + def http_method=(_arg0); end + + # Returns the value of attribute last_response. + # + # source://httparty//lib/httparty/request.rb#58 + def last_response; end + + # Sets the attribute last_response + # + # @param value the value to set the attribute last_response to. + # + # source://httparty//lib/httparty/request.rb#58 + def last_response=(_arg0); end + + # Returns the value of attribute last_uri. + # + # source://httparty//lib/httparty/request.rb#58 + def last_uri; end + + # Sets the attribute last_uri + # + # @param value the value to set the attribute last_uri to. + # + # source://httparty//lib/httparty/request.rb#58 + def last_uri=(_arg0); end + + # Returns the value of attribute options. + # + # source://httparty//lib/httparty/request.rb#58 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://httparty//lib/httparty/request.rb#58 + def options=(_arg0); end + + # source://httparty//lib/httparty/request.rb#142 + def parser; end + + # Returns the value of attribute path. + # + # source://httparty//lib/httparty/request.rb#59 + def path; end + + # source://httparty//lib/httparty/request.rb#79 + def path=(uri); end + + # source://httparty//lib/httparty/request.rb#150 + def perform(&block); end + + # source://httparty//lib/httparty/request.rb#183 + def raw_body; end + + # Returns the value of attribute redirect. + # + # source://httparty//lib/httparty/request.rb#58 + def redirect; end + + # Sets the attribute redirect + # + # @param value the value to set the attribute redirect to. + # + # source://httparty//lib/httparty/request.rb#58 + def redirect=(_arg0); end + + # source://httparty//lib/httparty/request.rb#92 + def request_uri(uri); end + + # source://httparty//lib/httparty/request.rb#100 + def uri; end + + private + + # source://httparty//lib/httparty/request.rb#292 + def assume_utf16_is_big_endian; end + + # source://httparty//lib/httparty/request.rb#365 + def capture_cookies(response); end + + # source://httparty//lib/httparty/request.rb#341 + def check_duplicate_location_header; end + + # source://httparty//lib/httparty/request.rb#200 + def credentials; end + + # source://httparty//lib/httparty/request.rb#406 + def decompress(body, encoding); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#261 + def decompress_content?; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#257 + def digest_auth?; end + + # source://httparty//lib/httparty/request.rb#410 + def encode_text(text, content_type); end + + # Uses the HTTP Content-Type header to determine the format of the + # response It compares the MIME type returned to the types stored in the + # SupportedFormats hash + # + # source://httparty//lib/httparty/request.rb#378 + def format_from_mimetype(mimetype); end + + # source://httparty//lib/httparty/request.rb#334 + def handle_host_redirection; end + + # source://httparty//lib/httparty/request.rb#296 + def handle_response(raw_body, &block); end + + # source://httparty//lib/httparty/request.rb#196 + def http; end + + # source://httparty//lib/httparty/request.rb#212 + def normalize_query(query); end + + # source://httparty//lib/httparty/request.rb#361 + def parse_response(body); end + + # source://httparty//lib/httparty/request.rb#208 + def password; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#394 + def post?; end + + # source://httparty//lib/httparty/request.rb#277 + def query_string(uri); end + + # source://httparty//lib/httparty/request.rb#220 + def query_string_normalizer; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#269 + def response_has_digest_auth_challenge?; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#352 + def response_redirects?; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#265 + def response_unauthorized?; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request.rb#348 + def send_authorization_header?; end + + # source://httparty//lib/httparty/request.rb#398 + def set_basic_auth_from_uri; end + + # source://httparty//lib/httparty/request.rb#273 + def setup_digest_auth; end + + # source://httparty//lib/httparty/request.rb#224 + def setup_raw_request; end + + # source://httparty//lib/httparty/request.rb#204 + def username; end + + # @raise [HTTParty::RedirectionTooDeep.new(last_response)] + # + # source://httparty//lib/httparty/request.rb#384 + def validate; end + + class << self + # source://httparty//lib/httparty/request.rb#49 + def _load(data); end + end +end + +# source://httparty//lib/httparty/request/body.rb#7 +class HTTParty::Request::Body + # @return [Body] a new instance of Body + # + # source://httparty//lib/httparty/request/body.rb#11 + def initialize(params, query_string_normalizer: T.unsafe(nil), force_multipart: T.unsafe(nil)); end + + # source://httparty//lib/httparty/request/body.rb#25 + def boundary; end + + # source://httparty//lib/httparty/request/body.rb#17 + def call; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request/body.rb#29 + def multipart?; end + + private + + # source://httparty//lib/httparty/request/body.rb#83 + def content_body(object); end + + # source://httparty//lib/httparty/request/body.rb#92 + def content_type(object); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request/body.rb#71 + def file?(object); end + + # source://httparty//lib/httparty/request/body.rb#98 + def file_name(object); end + + # Returns the value of attribute force_multipart. + # + # source://httparty//lib/httparty/request/body.rb#102 + def force_multipart; end + + # source://httparty//lib/httparty/request/body.rb#42 + def generate_multipart; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/request/body.rb#61 + def has_file?(value); end + + # source://httparty//lib/httparty/request/body.rb#75 + def normalize_query(query); end + + # Returns the value of attribute params. + # + # source://httparty//lib/httparty/request/body.rb#102 + def params; end + + # Returns the value of attribute query_string_normalizer. + # + # source://httparty//lib/httparty/request/body.rb#102 + def query_string_normalizer; end +end + +# https://html.spec.whatwg.org/#multipart-form-data +# +# source://httparty//lib/httparty/request/body.rb#36 +HTTParty::Request::Body::MULTIPART_FORM_DATA_REPLACEMENT_TABLE = T.let(T.unsafe(nil), Hash) + +# source://httparty//lib/httparty/request/body.rb#8 +HTTParty::Request::Body::NEWLINE = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/request.rb#36 +HTTParty::Request::JSON_API_QUERY_STRING_NORMALIZER = T.let(T.unsafe(nil), Proc) + +# source://httparty//lib/httparty/request/multipart_boundary.rb#7 +class HTTParty::Request::MultipartBoundary + class << self + # source://httparty//lib/httparty/request/multipart_boundary.rb#8 + def generate; end + end +end + +# source://httparty//lib/httparty/request.rb#24 +HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER = T.let(T.unsafe(nil), Proc) + +# source://httparty//lib/httparty/request.rb#7 +HTTParty::Request::SupportedHTTPMethods = T.let(T.unsafe(nil), Array) + +# source://httparty//lib/httparty/request.rb#22 +HTTParty::Request::SupportedURISchemes = T.let(T.unsafe(nil), Array) + +# source://httparty//lib/httparty/response.rb#4 +class HTTParty::Response + # @return [Response] a new instance of Response + # + # source://httparty//lib/httparty/response.rb#17 + def initialize(request, response, parsed_block, options = T.unsafe(nil)); end + + # source://httparty//lib/httparty/response.rb#119 + def _dump(_level); end + + # source://httparty//lib/httparty/response.rb#64 + def accepted?; end + + # source://httparty//lib/httparty/response.rb#64 + def already_reported?; end + + # source://httparty//lib/httparty/response.rb#64 + def bad_gateway?; end + + # source://httparty//lib/httparty/response.rb#64 + def bad_request?; end + + # Returns the value of attribute body. + # + # source://httparty//lib/httparty/response.rb#15 + def body; end + + # source://httparty//lib/httparty/response.rb#64 + def client_error?; end + + # source://httparty//lib/httparty/response.rb#40 + def code; end + + # source://httparty//lib/httparty/response.rb#64 + def conflict?; end + + # source://httparty//lib/httparty/response.rb#64 + def continue?; end + + # source://httparty//lib/httparty/response.rb#64 + def created?; end + + # source://httparty//lib/httparty/response.rb#104 + def display(port = T.unsafe(nil)); end + + # source://httparty//lib/httparty/response.rb#64 + def early_hints?; end + + # source://httparty//lib/httparty/response.rb#64 + def expectation_failed?; end + + # source://httparty//lib/httparty/response.rb#64 + def failed_dependency?; end + + # source://httparty//lib/httparty/response.rb#64 + def forbidden?; end + + # source://httparty//lib/httparty/response.rb#64 + def found?; end + + # source://httparty//lib/httparty/response.rb#64 + def gateway_time_out?; end + + # source://httparty//lib/httparty/response.rb#64 + def gateway_timeout?; end + + # source://httparty//lib/httparty/response.rb#64 + def gone?; end + + # Returns the value of attribute headers. + # + # source://httparty//lib/httparty/response.rb#15 + def headers; end + + # source://httparty//lib/httparty/response.rb#44 + def http_version; end + + # source://httparty//lib/httparty/response.rb#64 + def im_used?; end + + # source://httparty//lib/httparty/response.rb#64 + def information?; end + + # source://httparty//lib/httparty/response.rb#53 + def inspect; end + + # source://httparty//lib/httparty/response.rb#64 + def insufficient_storage?; end + + # source://httparty//lib/httparty/response.rb#64 + def internal_server_error?; end + + # source://httparty//lib/httparty/response.rb#64 + def length_required?; end + + # source://httparty//lib/httparty/response.rb#64 + def locked?; end + + # source://httparty//lib/httparty/response.rb#64 + def loop_detected?; end + + # source://httparty//lib/httparty/response.rb#64 + def method_not_allowed?; end + + # source://httparty//lib/httparty/response.rb#64 + def misdirected_request?; end + + # source://httparty//lib/httparty/response.rb#64 + def moved_permanently?; end + + # source://httparty//lib/httparty/response.rb#64 + def multi_status?; end + + # source://httparty//lib/httparty/response.rb#64 + def multiple_choice?; end + + # source://httparty//lib/httparty/response.rb#64 + def multiple_choices?; end + + # source://httparty//lib/httparty/response.rb#64 + def network_authentication_required?; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/response.rb#83 + def nil?; end + + # source://httparty//lib/httparty/response.rb#64 + def no_content?; end + + # source://httparty//lib/httparty/response.rb#64 + def non_authoritative_information?; end + + # source://httparty//lib/httparty/response.rb#64 + def not_acceptable?; end + + # source://httparty//lib/httparty/response.rb#64 + def not_extended?; end + + # source://httparty//lib/httparty/response.rb#64 + def not_found?; end + + # source://httparty//lib/httparty/response.rb#64 + def not_implemented?; end + + # source://httparty//lib/httparty/response.rb#64 + def not_modified?; end + + # source://httparty//lib/httparty/response.rb#64 + def ok?; end + + # source://httparty//lib/httparty/response.rb#36 + def parsed_response; end + + # source://httparty//lib/httparty/response.rb#64 + def partial_content?; end + + # source://httparty//lib/httparty/response.rb#64 + def payload_too_large?; end + + # source://httparty//lib/httparty/response.rb#64 + def payment_required?; end + + # source://httparty//lib/httparty/response.rb#64 + def permanent_redirect?; end + + # source://httparty//lib/httparty/response.rb#64 + def precondition_failed?; end + + # source://httparty//lib/httparty/response.rb#64 + def precondition_required?; end + + # source://httparty//lib/httparty/response.rb#96 + def pretty_print(pp); end + + # source://httparty//lib/httparty/response.rb#64 + def processing?; end + + # source://httparty//lib/httparty/response.rb#64 + def proxy_authentication_required?; end + + # source://httparty//lib/httparty/response.rb#64 + def range_not_satisfiable?; end + + # source://httparty//lib/httparty/response.rb#64 + def redirection?; end + + # Returns the value of attribute request. + # + # source://httparty//lib/httparty/response.rb#15 + def request; end + + # source://httparty//lib/httparty/response.rb#64 + def request_entity_too_large?; end + + # source://httparty//lib/httparty/response.rb#64 + def request_header_fields_too_large?; end + + # source://httparty//lib/httparty/response.rb#64 + def request_time_out?; end + + # source://httparty//lib/httparty/response.rb#64 + def request_timeout?; end + + # source://httparty//lib/httparty/response.rb#64 + def request_uri_too_long?; end + + # source://httparty//lib/httparty/response.rb#64 + def requested_range_not_satisfiable?; end + + # source://httparty//lib/httparty/response.rb#64 + def reset_content?; end + + # Returns the value of attribute response. + # + # source://httparty//lib/httparty/response.rb#15 + def response; end + + # source://httparty//lib/httparty/response.rb#64 + def see_other?; end + + # source://httparty//lib/httparty/response.rb#64 + def server_error?; end + + # source://httparty//lib/httparty/response.rb#64 + def service_unavailable?; end + + # source://httparty//lib/httparty/response.rb#64 + def success?; end + + # source://httparty//lib/httparty/response.rb#64 + def switch_protocol?; end + + # @yield [_self] + # @yieldparam _self [HTTParty::Response] the object that the method was called on + # + # source://httparty//lib/httparty/response.rb#48 + def tap; end + + # source://httparty//lib/httparty/response.rb#64 + def temporary_redirect?; end + + # source://httparty//lib/httparty/response.rb#88 + def to_s; end + + # source://httparty//lib/httparty/response.rb#64 + def too_many_requests?; end + + # source://httparty//lib/httparty/response.rb#64 + def unauthorized?; end + + # source://httparty//lib/httparty/response.rb#64 + def unavailable_for_legal_reasons?; end + + # source://httparty//lib/httparty/response.rb#64 + def unprocessable_entity?; end + + # source://httparty//lib/httparty/response.rb#64 + def unsupported_media_type?; end + + # source://httparty//lib/httparty/response.rb#64 + def upgrade_required?; end + + # source://httparty//lib/httparty/response.rb#64 + def uri_too_long?; end + + # source://httparty//lib/httparty/response.rb#64 + def use_proxy?; end + + # source://httparty//lib/httparty/response.rb#64 + def variant_also_negotiates?; end + + # source://httparty//lib/httparty/response.rb#64 + def version_not_supported?; end + + protected + + # source://httparty//lib/httparty/response.rb#125 + def method_missing(name, *args, &block); end + + # source://httparty//lib/httparty/response.rb#135 + def throw_exception; end + + private + + # @return [Boolean] + # + # source://httparty//lib/httparty/response.rb#114 + def respond_to_missing?(name, *args); end + + # source://httparty//lib/httparty/response.rb#143 + def warn_about_nil_deprecation; end + + class << self + # source://httparty//lib/httparty/response.rb#9 + def _load(data); end + + # source://httparty//lib/httparty/response.rb#5 + def underscore(string); end + end +end + +# source://httparty//lib/httparty/response.rb#58 +HTTParty::Response::CODES_TO_OBJ = T.let(T.unsafe(nil), Hash) + +# source://httparty//lib/httparty/response/headers.rb#7 +class HTTParty::Response::Headers < ::SimpleDelegator + include ::Net::HTTPHeader + + # @return [Headers] a new instance of Headers + # + # source://httparty//lib/httparty/response/headers.rb#10 + def initialize(header_values = T.unsafe(nil)); end + + # source://httparty//lib/httparty/response/headers.rb#26 + def ==(other); end +end + +# response object accessible via the {#response} method. +# +# @abstract Exceptions which inherit from ResponseError contain the Net::HTTP +# +# source://httparty//lib/httparty/exceptions.rb#18 +class HTTParty::ResponseError < ::HTTParty::Error + # Instantiate an instance of ResponseError with a Net::HTTPResponse object + # + # @param [Net::HTTPResponse] + # @return [ResponseError] a new instance of ResponseError + # + # source://httparty//lib/httparty/exceptions.rb#23 + def initialize(response); end + + # Returns the response of the last request + # Net::HTTPOK + # + # @return [Net::HTTPResponse] A subclass of Net::HTTPResponse, e.g. + # + # source://httparty//lib/httparty/exceptions.rb#19 + def response; end +end + +# Allow access to http_response and code by delegation on fragment +# +# source://httparty//lib/httparty/response_fragment.rb#7 +class HTTParty::ResponseFragment < ::SimpleDelegator + # @return [ResponseFragment] a new instance of ResponseFragment + # + # source://httparty//lib/httparty/response_fragment.rb#14 + def initialize(fragment, http_response, connection); end + + # source://httparty//lib/httparty/response_fragment.rb#10 + def code; end + + # Returns the value of attribute connection. + # + # source://httparty//lib/httparty/response_fragment.rb#8 + def connection; end + + # Returns the value of attribute http_response. + # + # source://httparty//lib/httparty/response_fragment.rb#8 + def http_response; end +end + +# source://httparty//lib/httparty/text_encoder.rb#4 +class HTTParty::TextEncoder + # @return [TextEncoder] a new instance of TextEncoder + # + # source://httparty//lib/httparty/text_encoder.rb#7 + def initialize(text, assume_utf16_is_big_endian: T.unsafe(nil), content_type: T.unsafe(nil)); end + + # Returns the value of attribute assume_utf16_is_big_endian. + # + # source://httparty//lib/httparty/text_encoder.rb#5 + def assume_utf16_is_big_endian; end + + # source://httparty//lib/httparty/text_encoder.rb#13 + def call; end + + # Returns the value of attribute content_type. + # + # source://httparty//lib/httparty/text_encoder.rb#5 + def content_type; end + + # Returns the value of attribute text. + # + # source://httparty//lib/httparty/text_encoder.rb#5 + def text; end + + private + + # @return [Boolean] + # + # source://httparty//lib/httparty/text_encoder.rb#23 + def can_encode?; end + + # source://httparty//lib/httparty/text_encoder.rb#60 + def charset; end + + # source://httparty//lib/httparty/text_encoder.rb#35 + def encode_utf_16; end + + # source://httparty//lib/httparty/text_encoder.rb#51 + def encode_with_ruby_encoding; end + + # source://httparty//lib/httparty/text_encoder.rb#27 + def encoded_text; end +end + +# Exception raised when you attempt to set a non-existent format +# +# source://httparty//lib/httparty/exceptions.rb#8 +class HTTParty::UnsupportedFormat < ::HTTParty::Error; end + +# Exception raised when using a URI scheme other than HTTP or HTTPS +# +# source://httparty//lib/httparty/exceptions.rb#11 +class HTTParty::UnsupportedURIScheme < ::HTTParty::Error; end + +# source://httparty//lib/httparty/utils.rb#4 +module HTTParty::Utils + class << self + # source://httparty//lib/httparty/utils.rb#5 + def stringify_keys(hash); end + end +end + +# source://httparty//lib/httparty/version.rb#4 +HTTParty::VERSION = T.let(T.unsafe(nil), String) + +# source://httparty//lib/httparty/net_digest_auth.rb#7 +module Net::HTTPHeader + # source://httparty//lib/httparty/net_digest_auth.rb#8 + def digest_auth(username, password, response); end +end + +# source://httparty//lib/httparty/net_digest_auth.rb#26 +class Net::HTTPHeader::DigestAuthenticator + # @return [DigestAuthenticator] a new instance of DigestAuthenticator + # + # source://httparty//lib/httparty/net_digest_auth.rb#27 + def initialize(username, password, method, path, response_header); end + + # source://httparty//lib/httparty/net_digest_auth.rb#36 + def authorization_header; end + + # source://httparty//lib/httparty/net_digest_auth.rb#58 + def cookie_header; end + + private + + # source://httparty//lib/httparty/net_digest_auth.rb#121 + def a1; end + + # source://httparty//lib/httparty/net_digest_auth.rb#130 + def a2; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/net_digest_auth.rb#113 + def algorithm_present?; end + + # source://httparty//lib/httparty/net_digest_auth.rb#109 + def md5(str); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/net_digest_auth.rb#91 + def opaque_present?; end + + # source://httparty//lib/httparty/net_digest_auth.rb#64 + def parse(response_header); end + + # source://httparty//lib/httparty/net_digest_auth.rb#78 + def parse_cookies(response_header); end + + # @return [Boolean] + # + # source://httparty//lib/httparty/net_digest_auth.rb#95 + def qop_present?; end + + # source://httparty//lib/httparty/net_digest_auth.rb#99 + def random; end + + # source://httparty//lib/httparty/net_digest_auth.rb#103 + def request_digest; end + + # @return [Boolean] + # + # source://httparty//lib/httparty/net_digest_auth.rb#117 + def use_md5_sess?; end +end diff --git a/sorbet/rbi/gems/io-console@0.6.0.rbi b/sorbet/rbi/gems/io-console@0.6.0.rbi new file mode 100644 index 0000000000..ffc1f7aa92 --- /dev/null +++ b/sorbet/rbi/gems/io-console@0.6.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/irb@1.8.1.rbi b/sorbet/rbi/gems/irb@1.8.1.rbi new file mode 100644 index 0000000000..c4c6a22f43 --- /dev/null +++ b/sorbet/rbi/gems/irb@1.8.1.rbi @@ -0,0 +1,342 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `irb` gem. +# Please instead update this file by running `bin/tapioca gem irb`. + +# An output formatter used internally by the lexer. +# +# source://irb//lib/irb/notifier.rb#11 +module IRB::Notifier + private + + # Define a new Notifier output source, returning a new CompositeNotifier + # with the given +prefix+ and +output_method+. + # + # The optional +prefix+ will be appended to all objects being inspected + # during output, using the given +output_method+ as the output source. If + # no +output_method+ is given, StdioOutputMethod will be used, and all + # expressions will be sent directly to STDOUT without any additional + # formatting. + # + # source://irb//lib/irb/notifier.rb#31 + def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end + + class << self + # Define a new Notifier output source, returning a new CompositeNotifier + # with the given +prefix+ and +output_method+. + # + # The optional +prefix+ will be appended to all objects being inspected + # during output, using the given +output_method+ as the output source. If + # no +output_method+ is given, StdioOutputMethod will be used, and all + # expressions will be sent directly to STDOUT without any additional + # formatting. + # + # source://irb//lib/irb/notifier.rb#31 + def def_notifier(prefix = T.unsafe(nil), output_method = T.unsafe(nil)); end + end +end + +# An abstract class, or superclass, for CompositeNotifier and +# LeveledNotifier to inherit. It provides several wrapper methods for the +# OutputMethod object used by the Notifier. +# +# source://irb//lib/irb/notifier.rb#39 +class IRB::Notifier::AbstractNotifier + # Creates a new Notifier object + # + # @return [AbstractNotifier] a new instance of AbstractNotifier + # + # source://irb//lib/irb/notifier.rb#41 + def initialize(prefix, base_notifier); end + + # Execute the given block if notifications are enabled. + # + # @yield [@base_notifier] + # + # source://irb//lib/irb/notifier.rb#99 + def exec_if; end + + # A wrapper method used to determine whether notifications are enabled. + # + # Defaults to +true+. + # + # @return [Boolean] + # + # source://irb//lib/irb/notifier.rb#53 + def notify?; end + + # Same as #ppx, except it uses the #prefix given during object + # initialization. + # See OutputMethod#ppx for more detail. + # + # source://irb//lib/irb/notifier.rb#82 + def pp(*objs); end + + # Same as #pp, except it concatenates the given +prefix+ with the #prefix + # given during object initialization. + # + # See OutputMethod#ppx for more detail. + # + # source://irb//lib/irb/notifier.rb#92 + def ppx(prefix, *objs); end + + # The +prefix+ for this Notifier, which is appended to all objects being + # inspected during output. + # + # source://irb//lib/irb/notifier.rb#48 + def prefix; end + + # See OutputMethod#print for more detail. + # + # source://irb//lib/irb/notifier.rb#58 + def print(*opts); end + + # See OutputMethod#printf for more detail. + # + # source://irb//lib/irb/notifier.rb#68 + def printf(format, *opts); end + + # See OutputMethod#printn for more detail. + # + # source://irb//lib/irb/notifier.rb#63 + def printn(*opts); end + + # See OutputMethod#puts for more detail. + # + # source://irb//lib/irb/notifier.rb#73 + def puts(*objs); end +end + +# A class that can be used to create a group of notifier objects with the +# intent of representing a leveled notification system for irb. +# +# This class will allow you to generate other notifiers, and assign them +# the appropriate level for output. +# +# The Notifier class provides a class-method Notifier.def_notifier to +# create a new composite notifier. Using the first composite notifier +# object you create, sibling notifiers can be initialized with +# #def_notifier. +# +# source://irb//lib/irb/notifier.rb#116 +class IRB::Notifier::CompositeNotifier < ::IRB::Notifier::AbstractNotifier + # Create a new composite notifier object with the given +prefix+, and + # +base_notifier+ to use for output. + # + # @return [CompositeNotifier] a new instance of CompositeNotifier + # + # source://irb//lib/irb/notifier.rb#117 + def initialize(prefix, base_notifier); end + + # Creates a new LeveledNotifier in the composite #notifiers group. + # + # The given +prefix+ will be assigned to the notifier, and +level+ will + # be used as the index of the #notifiers Array. + # + # This method returns the newly created instance. + # + # source://irb//lib/irb/notifier.rb#133 + def def_notifier(level, prefix = T.unsafe(nil)); end + + # Returns the leveled notifier for this object + # + # source://irb//lib/irb/notifier.rb#140 + def level; end + + # Sets the leveled notifier for this object. + # + # When the given +value+ is an instance of AbstractNotifier, + # #level_notifier is set to the given object. + # + # When an Integer is given, #level_notifier is set to the notifier at the + # index +value+ in the #notifiers Array. + # + # If no notifier exists at the index +value+ in the #notifiers Array, an + # ErrUndefinedNotifier exception is raised. + # + # An ErrUnrecognizedLevel exception is raised if the given +value+ is not + # found in the existing #notifiers Array, or an instance of + # AbstractNotifier + # + # source://irb//lib/irb/notifier.rb#157 + def level=(value); end + + # Returns the leveled notifier for this object + # + # source://irb//lib/irb/notifier.rb#140 + def level_notifier; end + + # Sets the leveled notifier for this object. + # + # When the given +value+ is an instance of AbstractNotifier, + # #level_notifier is set to the given object. + # + # When an Integer is given, #level_notifier is set to the notifier at the + # index +value+ in the #notifiers Array. + # + # If no notifier exists at the index +value+ in the #notifiers Array, an + # ErrUndefinedNotifier exception is raised. + # + # An ErrUnrecognizedLevel exception is raised if the given +value+ is not + # found in the existing #notifiers Array, or an instance of + # AbstractNotifier + # + # source://irb//lib/irb/notifier.rb#157 + def level_notifier=(value); end + + # List of notifiers in the group + # + # source://irb//lib/irb/notifier.rb#125 + def notifiers; end +end + +# source://irb//lib/irb/notifier.rb#12 +class IRB::Notifier::ErrUndefinedNotifier < ::StandardError + # @return [ErrUndefinedNotifier] a new instance of ErrUndefinedNotifier + # + # source://irb//lib/irb/notifier.rb#13 + def initialize(val); end +end + +# source://irb//lib/irb/notifier.rb#17 +class IRB::Notifier::ErrUnrecognizedLevel < ::StandardError + # @return [ErrUnrecognizedLevel] a new instance of ErrUnrecognizedLevel + # + # source://irb//lib/irb/notifier.rb#18 + def initialize(val); end +end + +# A leveled notifier is comparable to the composite group from +# CompositeNotifier#notifiers. +# +# source://irb//lib/irb/notifier.rb#175 +class IRB::Notifier::LeveledNotifier < ::IRB::Notifier::AbstractNotifier + include ::Comparable + + # Create a new leveled notifier with the given +base+, and +prefix+ to + # send to AbstractNotifier.new + # + # The given +level+ is used to compare other leveled notifiers in the + # CompositeNotifier group to determine whether or not to output + # notifications. + # + # @return [LeveledNotifier] a new instance of LeveledNotifier + # + # source://irb//lib/irb/notifier.rb#184 + def initialize(base, level, prefix); end + + # Compares the level of this notifier object with the given +other+ + # notifier. + # + # See the Comparable module for more information. + # + # source://irb//lib/irb/notifier.rb#197 + def <=>(other); end + + # The current level of this notifier object + # + # source://irb//lib/irb/notifier.rb#191 + def level; end + + # Whether to output messages to the output method, depending on the level + # of this notifier object. + # + # @return [Boolean] + # + # source://irb//lib/irb/notifier.rb#203 + def notify?; end +end + +# NoMsgNotifier is a LeveledNotifier that's used as the default notifier +# when creating a new CompositeNotifier. +# +# This notifier is used as the +zero+ index, or level +0+, for +# CompositeNotifier#notifiers, and will not output messages of any sort. +# +# source://irb//lib/irb/notifier.rb#214 +class IRB::Notifier::NoMsgNotifier < ::IRB::Notifier::LeveledNotifier + # Creates a new notifier that should not be used to output messages. + # + # @return [NoMsgNotifier] a new instance of NoMsgNotifier + # + # source://irb//lib/irb/notifier.rb#215 + def initialize; end + + # Ensures notifications are ignored, see AbstractNotifier#notify? for + # more information. + # + # @return [Boolean] + # + # source://irb//lib/irb/notifier.rb#223 + def notify?; end +end + +# An abstract output class for IO in irb. This is mainly used internally by +# IRB::Notifier. You can define your own output method to use with Irb.new, +# or Context.new +# +# source://irb//lib/irb/output-method.rb#11 +class IRB::OutputMethod + # Returns an array of the given +format+ and +opts+ to be used by + # Kernel#sprintf, if there was a successful Regexp match in the given + # +format+ from #printf + # + # % + # [#0- +] + # (\*|\*[1-9][0-9]*\$|[1-9][0-9]*) + # .(\*|\*[1-9][0-9]*\$|[1-9][0-9]*|)? + # #(hh|h|l|ll|L|q|j|z|t) + # [diouxXeEfgGcsb%] + # + # source://irb//lib/irb/output-method.rb#48 + def parse_printf_format(format, opts); end + + # Prints the given +objs+ calling Object#inspect on each. + # + # See #puts for more detail. + # + # source://irb//lib/irb/output-method.rb#64 + def pp(*objs); end + + # Prints the given +objs+ calling Object#inspect on each and appending the + # given +prefix+. + # + # See #puts for more detail. + # + # source://irb//lib/irb/output-method.rb#72 + def ppx(prefix, *objs); end + + # Open this method to implement your own output method, raises a + # NotImplementedError if you don't define #print in your own class. + # + # @raise [NotImplementedError] + # + # source://irb//lib/irb/output-method.rb#20 + def print(*opts); end + + # Extends IO#printf to format the given +opts+ for Kernel#sprintf using + # #parse_printf_format + # + # source://irb//lib/irb/output-method.rb#31 + def printf(format, *opts); end + + # Prints the given +opts+, with a newline delimiter. + # + # source://irb//lib/irb/output-method.rb#25 + def printn(*opts); end + + # Calls #print on each element in the given +objs+, followed by a newline + # character. + # + # source://irb//lib/irb/output-method.rb#54 + def puts(*objs); end +end + +# source://irb//lib/irb/output-method.rb#12 +class IRB::OutputMethod::NotImplementedError < ::StandardError + # @return [NotImplementedError] a new instance of NotImplementedError + # + # source://irb//lib/irb/output-method.rb#13 + def initialize(val); end +end diff --git a/sorbet/rbi/gems/jaro_winkler@1.5.6.rbi b/sorbet/rbi/gems/jaro_winkler@1.5.6.rbi new file mode 100644 index 0000000000..97aee8cff5 --- /dev/null +++ b/sorbet/rbi/gems/jaro_winkler@1.5.6.rbi @@ -0,0 +1,19 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `jaro_winkler` gem. +# Please instead update this file by running `bin/tapioca gem jaro_winkler`. + +# source://jaro_winkler//lib/jaro_winkler/version.rb#3 +module JaroWinkler + class << self + def distance(*_arg0); end + def jaro_distance(*_arg0); end + end +end + +class JaroWinkler::Error < ::RuntimeError; end +class JaroWinkler::InvalidWeightError < ::JaroWinkler::Error; end + +# source://jaro_winkler//lib/jaro_winkler/version.rb#4 +JaroWinkler::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/jmespath@1.6.2.rbi b/sorbet/rbi/gems/jmespath@1.6.2.rbi new file mode 100644 index 0000000000..15fd32ae6a --- /dev/null +++ b/sorbet/rbi/gems/jmespath@1.6.2.rbi @@ -0,0 +1,1920 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `jmespath` gem. +# Please instead update this file by running `bin/tapioca gem jmespath`. + +# source://jmespath//lib/jmespath.rb#6 +module JMESPath + class << self + # @api private + # + # source://jmespath//lib/jmespath.rb#35 + def load_json(path); end + + # @param expression [String] A valid + # [JMESPath](https://github.com/boto/jmespath) expression. + # @param data [Hash] + # @return [Mixed, nil] Returns the matched values. Returns `nil` if the + # expression does not resolve inside `data`. + # + # source://jmespath//lib/jmespath.rb#24 + def search(expression, data, runtime_options = T.unsafe(nil)); end + end +end + +# source://jmespath//lib/jmespath/caching_parser.rb#5 +class JMESPath::CachingParser + # @return [CachingParser] a new instance of CachingParser + # + # source://jmespath//lib/jmespath/caching_parser.rb#6 + def initialize(options = T.unsafe(nil)); end + + # source://jmespath//lib/jmespath/caching_parser.rb#12 + def parse(expression); end + + private + + # source://jmespath//lib/jmespath/caching_parser.rb#22 + def cache_expression(expression); end +end + +# source://jmespath//lib/jmespath/errors.rb#4 +module JMESPath::Errors; end + +# source://jmespath//lib/jmespath/errors.rb#5 +class JMESPath::Errors::Error < ::StandardError; end + +# source://jmespath//lib/jmespath/errors.rb#15 +class JMESPath::Errors::InvalidArityError < ::JMESPath::Errors::Error; end + +# source://jmespath//lib/jmespath/errors.rb#11 +class JMESPath::Errors::InvalidTypeError < ::JMESPath::Errors::Error; end + +# source://jmespath//lib/jmespath/errors.rb#13 +class JMESPath::Errors::InvalidValueError < ::JMESPath::Errors::Error; end + +# source://jmespath//lib/jmespath/errors.rb#7 +class JMESPath::Errors::RuntimeError < ::JMESPath::Errors::Error; end + +# source://jmespath//lib/jmespath/errors.rb#9 +class JMESPath::Errors::SyntaxError < ::JMESPath::Errors::Error; end + +# source://jmespath//lib/jmespath/errors.rb#17 +class JMESPath::Errors::UnknownFunctionError < ::JMESPath::Errors::Error; end + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#7 +class JMESPath::Lexer + # @api private + # @param expression [String] + # @return [Array] + # + # source://jmespath//lib/jmespath/lexer.rb#163 + def tokenize(expression); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/lexer.rb#277 + def inside(chars, delim, type); end + + # @api private + # + # source://jmespath//lib/jmespath/lexer.rb#268 + def match_or(chars, current, expected, type, or_type); end + + # @api private + # + # source://jmespath//lib/jmespath/lexer.rb#346 + def parse_json(token, quoted = T.unsafe(nil)); end + + class << self + # Certain versions of Ruby and of the pure_json gem not support loading + # scalar JSON values, such a numbers, booleans, strings, etc. These + # simple values must be first wrapped inside a JSON object before calling + # `JSON.parse`. + # + # # works in most JSON versions, raises in some versions + # JSON.parse("true") + # JSON.parse("123") + # JSON.parse("\"abc\"") + # + # This is an known issue for: + # + # * Ruby 1.9.3 bundled v1.5.5 of json; Ruby 1.9.3 defaults to bundled + # version despite newer versions being available. + # + # * json_pure v2.0.0+ + # + # It is not possible to change the version of JSON loaded in the + # user's application. Adding an explicit dependency on json gem + # causes issues in environments that cannot compile the gem. We previously + # had a direct dependency on `json_pure`, but this broke with the v2 update. + # + # This method allows us to detect how the `JSON.parse` behaves so we know + # if we have to wrap scalar JSON values to parse them or not. + # + # @api private + # @return [Boolean] + # + # source://jmespath//lib/jmespath/lexer.rb#322 + def requires_wrapping?; end + end +end + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#364 +class JMESPath::Lexer::CharacterStream + # @api private + # @return [CharacterStream] a new instance of CharacterStream + # + # source://jmespath//lib/jmespath/lexer.rb#365 + def initialize(chars); end + + # @api private + # + # source://jmespath//lib/jmespath/lexer.rb#370 + def current; end + + # @api private + # + # source://jmespath//lib/jmespath/lexer.rb#374 + def next; end + + # @api private + # + # source://jmespath//lib/jmespath/lexer.rb#379 + def position; end +end + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#146 +JMESPath::Lexer::NUMBERS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#148 +JMESPath::Lexer::SIMPLE_TOKENS = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#47 +JMESPath::Lexer::STATE_AND = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#45 +JMESPath::Lexer::STATE_EQ = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#44 +JMESPath::Lexer::STATE_GT = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#34 +JMESPath::Lexer::STATE_IDENTIFIER = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#40 +JMESPath::Lexer::STATE_JSON_LITERAL = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#41 +JMESPath::Lexer::STATE_LBRACKET = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#43 +JMESPath::Lexer::STATE_LT = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#46 +JMESPath::Lexer::STATE_NOT = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#35 +JMESPath::Lexer::STATE_NUMBER = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#42 +JMESPath::Lexer::STATE_PIPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#39 +JMESPath::Lexer::STATE_QUOTED_STRING = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#36 +JMESPath::Lexer::STATE_SINGLE_CHAR = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#38 +JMESPath::Lexer::STATE_STRING_LITERAL = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#37 +JMESPath::Lexer::STATE_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#49 +JMESPath::Lexer::TRANSLATION_TABLE = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#27 +JMESPath::Lexer::T_AND = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#11 +JMESPath::Lexer::T_COLON = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#10 +JMESPath::Lexer::T_COMMA = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#32 +JMESPath::Lexer::T_COMPARATOR = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#12 +JMESPath::Lexer::T_CURRENT = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#8 +JMESPath::Lexer::T_DOT = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#31 +JMESPath::Lexer::T_EOF = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#13 +JMESPath::Lexer::T_EXPREF = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#29 +JMESPath::Lexer::T_FILTER = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#20 +JMESPath::Lexer::T_FLATTEN = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#21 +JMESPath::Lexer::T_IDENTIFIER = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#16 +JMESPath::Lexer::T_LBRACE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#18 +JMESPath::Lexer::T_LBRACKET = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#30 +JMESPath::Lexer::T_LITERAL = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#14 +JMESPath::Lexer::T_LPAREN = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#28 +JMESPath::Lexer::T_NOT = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#22 +JMESPath::Lexer::T_NUMBER = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#26 +JMESPath::Lexer::T_OR = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#25 +JMESPath::Lexer::T_PIPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#23 +JMESPath::Lexer::T_QUOTED_IDENTIFIER = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#17 +JMESPath::Lexer::T_RBRACE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#19 +JMESPath::Lexer::T_RBRACKET = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#15 +JMESPath::Lexer::T_RPAREN = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#9 +JMESPath::Lexer::T_STAR = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#24 +JMESPath::Lexer::T_UNKNOWN = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://jmespath//lib/jmespath/lexer.rb#140 +JMESPath::Lexer::VALID_IDENTIFIERS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://jmespath//lib/jmespath/nodes.rb#4 +module JMESPath::Nodes; end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#87 +class JMESPath::Nodes::AbsFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#90 + def call(args); end +end + +# source://jmespath//lib/jmespath/nodes/and.rb#4 +class JMESPath::Nodes::And < ::JMESPath::Nodes::Node + # @return [And] a new instance of And + # + # source://jmespath//lib/jmespath/nodes/and.rb#5 + def initialize(left, right); end + + # source://jmespath//lib/jmespath/nodes/and.rb#19 + def optimize; end + + # source://jmespath//lib/jmespath/nodes/and.rb#10 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/projection.rb#45 +class JMESPath::Nodes::ArrayProjection < ::JMESPath::Nodes::Projection + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#46 + def extract_targets(target); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#50 + def fast_instance; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#104 +class JMESPath::Nodes::AvgFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#107 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#129 +class JMESPath::Nodes::CeilFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#132 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/subexpression.rb#38 +class JMESPath::Nodes::Chain + # @api private + # @return [Chain] a new instance of Chain + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#39 + def initialize(children); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#49 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#43 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/field.rb#41 +class JMESPath::Nodes::ChainedField < ::JMESPath::Nodes::Field + # @api private + # @return [ChainedField] a new instance of ChainedField + # + # source://jmespath//lib/jmespath/nodes/field.rb#42 + def initialize(keys); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/field.rb#66 + def chain(other); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/field.rb#49 + def visit(obj); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/nodes/field.rb#72 + def keys; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#5 +class JMESPath::Nodes::Comparator < ::JMESPath::Nodes::Node + # @api private + # @return [Comparator] a new instance of Comparator + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#10 + def initialize(left, right); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#8 + def left; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#33 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#8 + def right; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#29 + def visit(value); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#39 + def check(_left_value, _right_value); end + + # @api private + # @return [Boolean] + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#43 + def comparable?(left_value, right_value); end + + class << self + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#15 + def create(relation, left, right); end + end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#6 +JMESPath::Nodes::Comparator::COMPARABLE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#29 +class JMESPath::Nodes::ComparatorCondition < ::JMESPath::Nodes::Node + # @api private + # @return [ComparatorCondition] a new instance of ComparatorCondition + # + # source://jmespath//lib/jmespath/nodes/condition.rb#33 + def initialize(left, right, child); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#39 + def visit(_value); end + + private + + # @api private + # @return [Boolean] + # + # source://jmespath//lib/jmespath/nodes/condition.rb#45 + def comparable?(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#31 +JMESPath::Nodes::ComparatorCondition::COMPARABLE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#30 +JMESPath::Nodes::ComparatorCondition::COMPARATOR_TO_CONDITION = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#50 +module JMESPath::Nodes::Comparators; end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#51 +class JMESPath::Nodes::Comparators::Eq < ::JMESPath::Nodes::Comparator + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#52 + def check(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#63 +class JMESPath::Nodes::Comparators::Gt < ::JMESPath::Nodes::Comparator + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#64 + def check(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#69 +class JMESPath::Nodes::Comparators::Gte < ::JMESPath::Nodes::Comparator + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#70 + def check(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#75 +class JMESPath::Nodes::Comparators::Lt < ::JMESPath::Nodes::Comparator + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#76 + def check(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#81 +class JMESPath::Nodes::Comparators::Lte < ::JMESPath::Nodes::Comparator + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#82 + def check(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/comparator.rb#57 +class JMESPath::Nodes::Comparators::Neq < ::JMESPath::Nodes::Comparator + # @api private + # + # source://jmespath//lib/jmespath/nodes/comparator.rb#58 + def check(left_value, right_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#503 +module JMESPath::Nodes::CompareBy + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#506 + def compare_by(mode, *args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#5 +class JMESPath::Nodes::Condition < ::JMESPath::Nodes::Node + # @api private + # @return [Condition] a new instance of Condition + # + # source://jmespath//lib/jmespath/nodes/condition.rb#6 + def initialize(test, child); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#19 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#11 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#146 +class JMESPath::Nodes::ContainsFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#149 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/current.rb#5 +class JMESPath::Nodes::Current < ::JMESPath::Nodes::Node + # @api private + # + # source://jmespath//lib/jmespath/nodes/current.rb#6 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#558 +class JMESPath::Nodes::EndsWithFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#563 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#52 +class JMESPath::Nodes::EqCondition < ::JMESPath::Nodes::ComparatorCondition + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#59 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#55 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/expression.rb#5 +class JMESPath::Nodes::Expression < ::JMESPath::Nodes::Node + # @api private + # @return [Expression] a new instance of Expression + # + # source://jmespath//lib/jmespath/nodes/expression.rb#8 + def initialize(expression); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/expression.rb#16 + def eval(value); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/expression.rb#6 + def expression; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/expression.rb#20 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/expression.rb#12 + def visit(_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/projection.rb#55 +class JMESPath::Nodes::FastArrayProjection < ::JMESPath::Nodes::ArrayProjection + include ::JMESPath::Nodes::FastProjector +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/projection.rb#73 +class JMESPath::Nodes::FastObjectProjection < ::JMESPath::Nodes::ObjectProjection + include ::JMESPath::Nodes::FastProjector +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/projection.rb#37 +module JMESPath::Nodes::FastProjector + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#38 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/field.rb#5 +class JMESPath::Nodes::Field < ::JMESPath::Nodes::Node + # @api private + # @return [Field] a new instance of Field + # + # source://jmespath//lib/jmespath/nodes/field.rb#6 + def initialize(key); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/field.rb#30 + def chain(other); end + + # @api private + # @return [Boolean] + # + # source://jmespath//lib/jmespath/nodes/field.rb#26 + def chains_with?(other); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/field.rb#11 + def visit(value); end + + protected + + # @api private + # + # source://jmespath//lib/jmespath/nodes/field.rb#36 + def keys; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/flatten.rb#5 +class JMESPath::Nodes::Flatten < ::JMESPath::Nodes::Node + # @api private + # @return [Flatten] a new instance of Flatten + # + # source://jmespath//lib/jmespath/nodes/flatten.rb#6 + def initialize(child); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/flatten.rb#23 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/flatten.rb#10 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#166 +class JMESPath::Nodes::FloorFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#169 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#5 +class JMESPath::Nodes::Function < ::JMESPath::Nodes::Node + # @api private + # @return [Function] a new instance of Function + # + # source://jmespath//lib/jmespath/nodes/function.rb#8 + def initialize(children, options = T.unsafe(nil)); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#26 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#22 + def visit(value); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#44 + def call(_args); end + + # @api private + # @raise [error_type] + # + # source://jmespath//lib/jmespath/nodes/function.rb#40 + def maybe_raise(error_type, message); end + + class << self + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#14 + def create(name, children, options = T.unsafe(nil)); end + end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#6 +JMESPath::Nodes::Function::FUNCTIONS = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#30 +class JMESPath::Nodes::Function::FunctionName + # @api private + # @return [FunctionName] a new instance of FunctionName + # + # source://jmespath//lib/jmespath/nodes/function.rb#33 + def initialize(name); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#31 + def name; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#106 +class JMESPath::Nodes::GtCondition < ::JMESPath::Nodes::ComparatorCondition + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#109 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#116 +class JMESPath::Nodes::GteCondition < ::JMESPath::Nodes::ComparatorCondition + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#119 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/index.rb#5 +JMESPath::Nodes::Index = JMESPath::Nodes::Field + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#351 +class JMESPath::Nodes::JoinFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#354 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#311 +class JMESPath::Nodes::KeysFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#314 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#183 +class JMESPath::Nodes::LengthFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#186 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/literal.rb#5 +class JMESPath::Nodes::Literal < ::JMESPath::Nodes::Node + # @api private + # @return [Literal] a new instance of Literal + # + # source://jmespath//lib/jmespath/nodes/literal.rb#8 + def initialize(value); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/literal.rb#6 + def value; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/literal.rb#12 + def visit(_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#68 +class JMESPath::Nodes::LiteralRightEqCondition < ::JMESPath::Nodes::EqCondition + # @api private + # @return [LiteralRightEqCondition] a new instance of LiteralRightEqCondition + # + # source://jmespath//lib/jmespath/nodes/condition.rb#69 + def initialize(left, right, child); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#74 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#95 +class JMESPath::Nodes::LiteralRightNeqCondition < ::JMESPath::Nodes::NeqCondition + # @api private + # @return [LiteralRightNeqCondition] a new instance of LiteralRightNeqCondition + # + # source://jmespath//lib/jmespath/nodes/condition.rb#96 + def initialize(left, right, child); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#101 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#126 +class JMESPath::Nodes::LtCondition < ::JMESPath::Nodes::ComparatorCondition + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#129 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#136 +class JMESPath::Nodes::LteCondition < ::JMESPath::Nodes::ComparatorCondition + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#139 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#204 +class JMESPath::Nodes::Map < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#207 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#538 +class JMESPath::Nodes::MaxByFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + include ::JMESPath::Nodes::CompareBy + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#543 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#225 +class JMESPath::Nodes::MaxFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#230 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#610 +class JMESPath::Nodes::MergeFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#613 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#548 +class JMESPath::Nodes::MinByFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + include ::JMESPath::Nodes::CompareBy + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#553 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#261 +class JMESPath::Nodes::MinFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#266 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#5 +class JMESPath::Nodes::MultiSelectHash < ::JMESPath::Nodes::Node + # @api private + # @return [MultiSelectHash] a new instance of MultiSelectHash + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#6 + def initialize(kv_pairs); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#20 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#10 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#24 +class JMESPath::Nodes::MultiSelectHash::KeyValuePair + # @api private + # @return [KeyValuePair] a new instance of KeyValuePair + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#27 + def initialize(key, value); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#25 + def key; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#32 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_hash.rb#25 + def value; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/multi_select_list.rb#5 +class JMESPath::Nodes::MultiSelectList < ::JMESPath::Nodes::Node + # @api private + # @return [MultiSelectList] a new instance of MultiSelectList + # + # source://jmespath//lib/jmespath/nodes/multi_select_list.rb#6 + def initialize(children); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_list.rb#18 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/multi_select_list.rb#10 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/condition.rb#79 +class JMESPath::Nodes::NeqCondition < ::JMESPath::Nodes::ComparatorCondition + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#86 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/condition.rb#82 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes.rb#5 +class JMESPath::Nodes::Node + # @api private + # @return [Boolean] + # + # source://jmespath//lib/jmespath/nodes.rb#13 + def chains_with?(_other); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes.rb#9 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes.rb#6 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/not.rb#4 +class JMESPath::Nodes::Not < ::JMESPath::Nodes::Node + # @api private + # @return [Not] a new instance of Not + # + # source://jmespath//lib/jmespath/nodes/not.rb#5 + def initialize(expression); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/not.rb#13 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/not.rb#9 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#419 +class JMESPath::Nodes::NotNullFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#422 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/projection.rb#59 +class JMESPath::Nodes::ObjectProjection < ::JMESPath::Nodes::Projection + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#60 + def extract_targets(target); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#68 + def fast_instance; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/or.rb#5 +class JMESPath::Nodes::Or < ::JMESPath::Nodes::Node + # @api private + # @return [Or] a new instance of Or + # + # source://jmespath//lib/jmespath/nodes/or.rb#6 + def initialize(left, right); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/or.rb#20 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/or.rb#11 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/pipe.rb#5 +JMESPath::Nodes::Pipe = JMESPath::Nodes::Subexpression + +# @api private +# +# source://jmespath//lib/jmespath/nodes/projection.rb#5 +class JMESPath::Nodes::Projection < ::JMESPath::Nodes::Node + # @api private + # @return [Projection] a new instance of Projection + # + # source://jmespath//lib/jmespath/nodes/projection.rb#6 + def initialize(target, projection); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#22 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#11 + def visit(value); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/nodes/projection.rb#32 + def extract_targets(_left_value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#624 +class JMESPath::Nodes::ReverseFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#627 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/slice.rb#74 +class JMESPath::Nodes::SimpleSlice < ::JMESPath::Nodes::Slice + # @api private + # @return [SimpleSlice] a new instance of SimpleSlice + # + # source://jmespath//lib/jmespath/nodes/slice.rb#75 + def initialize(start, stop); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/slice.rb#79 + def visit(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/slice.rb#5 +class JMESPath::Nodes::Slice < ::JMESPath::Nodes::Node + # @api private + # @raise [Errors::InvalidValueError] + # @return [Slice] a new instance of Slice + # + # source://jmespath//lib/jmespath/nodes/slice.rb#6 + def initialize(start, stop, step); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/slice.rb#34 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/slice.rb#13 + def visit(value); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/nodes/slice.rb#61 + def adjust_endpoint(length, endpoint, step); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/slice.rb#44 + def adjust_slice(length, start, stop, step); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#467 +class JMESPath::Nodes::SortByFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#472 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#431 +class JMESPath::Nodes::SortFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#436 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#584 +class JMESPath::Nodes::StartsWithFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#589 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/subexpression.rb#5 +class JMESPath::Nodes::Subexpression < ::JMESPath::Nodes::Node + # @api private + # @return [Subexpression] a new instance of Subexpression + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#6 + def initialize(left, right); end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#15 + def optimize; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#11 + def visit(value); end + + protected + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#23 + def flatten; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#21 + def left; end + + # @api private + # + # source://jmespath//lib/jmespath/nodes/subexpression.rb#21 + def right; end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#401 +class JMESPath::Nodes::SumFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#404 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#644 +class JMESPath::Nodes::ToArrayFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#647 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#384 +class JMESPath::Nodes::ToNumberFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#387 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#371 +class JMESPath::Nodes::ToStringFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#374 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#49 +module JMESPath::Nodes::TypeChecker + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#50 + def get_type(value); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#68 +JMESPath::Nodes::TypeChecker::ARRAY_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#69 +JMESPath::Nodes::TypeChecker::BOOLEAN_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#70 +JMESPath::Nodes::TypeChecker::EXPRESSION_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#71 +JMESPath::Nodes::TypeChecker::NULL_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#72 +JMESPath::Nodes::TypeChecker::NUMBER_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#73 +JMESPath::Nodes::TypeChecker::OBJECT_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#74 +JMESPath::Nodes::TypeChecker::STRING_TYPE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#76 +JMESPath::Nodes::TypeChecker::TYPE_NAMES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#297 +class JMESPath::Nodes::TypeFunction < ::JMESPath::Nodes::Function + include ::JMESPath::Nodes::TypeChecker + + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#302 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/nodes/function.rb#330 +class JMESPath::Nodes::ValuesFunction < ::JMESPath::Nodes::Function + # @api private + # + # source://jmespath//lib/jmespath/nodes/function.rb#333 + def call(args); end +end + +# @api private +# +# source://jmespath//lib/jmespath/parser.rb#6 +class JMESPath::Parser + # @api private + # @option options + # @param options [Hash] a customizable set of options + # @return [Parser] a new instance of Parser + # + # source://jmespath//lib/jmespath/parser.rb#30 + def initialize(options = T.unsafe(nil)); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#48 + def method_missing(method_name, *args); end + + # @api private + # @param expression [String] + # + # source://jmespath//lib/jmespath/parser.rb#36 + def parse(expression); end + + private + + # @api private + # @param stream [TokenStream] + # @param rbp [Integer] Right binding power + # + # source://jmespath//lib/jmespath/parser.rb#60 + def expr(stream, rbp = T.unsafe(nil)); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#230 + def led_and(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#160 + def led_comparator(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#167 + def led_dot(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#177 + def led_filter(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#190 + def led_flatten(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#197 + def led_lbracket(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#208 + def led_lparen(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#224 + def led_or(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#236 + def led_pipe(stream, left); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#68 + def nud_current(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#73 + def nud_expref(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#93 + def nud_filter(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#97 + def nud_flatten(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#101 + def nud_identifier(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#111 + def nud_lbrace(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#123 + def nud_lbracket(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#135 + def nud_literal(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#83 + def nud_lparen(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#78 + def nud_not(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#141 + def nud_quoted_identifier(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#152 + def nud_star(stream); end + + # @api private + # @raise [Errors::SyntaxError] + # + # source://jmespath//lib/jmespath/parser.rb#156 + def nud_unknown(stream); end + + # parse array index expressions, for example [0], [1:2:3], etc. + # + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#243 + def parse_array_index_expression(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#274 + def parse_dot(stream, binding_power); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#283 + def parse_key_value_pair(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#290 + def parse_multi_select_list(stream); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#305 + def parse_projection(stream, binding_power); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#319 + def parse_wildcard_array(stream, left = T.unsafe(nil)); end + + # @api private + # + # source://jmespath//lib/jmespath/parser.rb#327 + def parse_wildcard_object(stream, left = T.unsafe(nil)); end +end + +# @api private +# +# source://jmespath//lib/jmespath/parser.rb#7 +JMESPath::Parser::AFTER_DOT = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://jmespath//lib/jmespath/parser.rb#22 +JMESPath::Parser::COLON_RBRACKET = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://jmespath//lib/jmespath/parser.rb#27 +JMESPath::Parser::CURRENT_NODE = T.let(T.unsafe(nil), JMESPath::Nodes::Current) + +# @api private +# +# source://jmespath//lib/jmespath/parser.rb#16 +JMESPath::Parser::NUM_COLON_RBRACKET = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://jmespath//lib/jmespath/runtime.rb#4 +class JMESPath::Runtime + # Constructs a new runtime object for evaluating JMESPath expressions. + # + # runtime = JMESPath::Runtime.new + # runtime.search(expression, data) + # #=> ... + # + # ## Caching + # + # When constructing a {Runtime}, the default parser caches expressions. + # This significantly speeds up calls to {#search} multiple times + # with the same expression but different data. To disable caching, pass + # `:cache_expressions => false` to the constructor or pass a custom + # `:parser`. + # + # @api private + # @example Re-use a Runtime, caching enabled by default + # + # runtime = JMESPath::Runtime.new + # runtime.parser + # #=> # + # @example Disable caching + # + # runtime = JMESPath::Runtime.new(cache_expressions: false) + # runtime.parser + # #=> # + # @option options + # @option options + # @option options + # @param options [Hash] a customizable set of options + # @return [Runtime] a new instance of Runtime + # + # source://jmespath//lib/jmespath/runtime.rb#45 + def initialize(options = T.unsafe(nil)); end + + # @api private + # @return [Parser, CachingParser] + # + # source://jmespath//lib/jmespath/runtime.rb#50 + def parser; end + + # @api private + # @param expression [String] + # @param data [Hash] + # @return [Mixed, nil] + # + # source://jmespath//lib/jmespath/runtime.rb#55 + def search(expression, data); end + + private + + # @api private + # + # source://jmespath//lib/jmespath/runtime.rb#62 + def default_parser(options); end +end + +# @api private +# +# source://jmespath//lib/jmespath/runtime.rb#6 +JMESPath::Runtime::DEFAULT_PARSER = JMESPath::CachingParser + +# @api private +# +# source://jmespath//lib/jmespath/token.rb#4 +class JMESPath::Token < ::Struct + # @api private + # @param type [Symbol] + # @param value [Mixed] + # @param position [Integer] + # @return [Token] a new instance of Token + # + # source://jmespath//lib/jmespath/token.rb#37 + def initialize(type, value, position); end +end + +# @api private +# +# source://jmespath//lib/jmespath/token.rb#7 +JMESPath::Token::BINDING_POWER = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://jmespath//lib/jmespath/token.rb#5 +JMESPath::Token::NULL_TOKEN = T.let(T.unsafe(nil), JMESPath::Token) + +# @api private +# +# source://jmespath//lib/jmespath/token_stream.rb#4 +class JMESPath::TokenStream + # @api private + # @param expression [String] + # @param tokens [Array] + # @return [TokenStream] a new instance of TokenStream + # + # source://jmespath//lib/jmespath/token_stream.rb#7 + def initialize(expression, tokens); end + + # @api private + # @return [String] + # + # source://jmespath//lib/jmespath/token_stream.rb#16 + def expression; end + + # @api private + # + # source://jmespath//lib/jmespath/token_stream.rb#35 + def inspect; end + + # @api private + # + # source://jmespath//lib/jmespath/token_stream.rb#30 + def lookahead(count); end + + # @api private + # @option options + # @param options [Hash] a customizable set of options + # + # source://jmespath//lib/jmespath/token_stream.rb#26 + def next(options = T.unsafe(nil)); end + + # @api private + # @return [Integer] + # + # source://jmespath//lib/jmespath/token_stream.rb#22 + def position; end + + # @api private + # @return [Token] + # + # source://jmespath//lib/jmespath/token_stream.rb#19 + def token; end + + private + + # @api private + # + # source://jmespath//lib/jmespath/token_stream.rb#46 + def _next; end + + # @api private + # + # source://jmespath//lib/jmespath/token_stream.rb#51 + def validate_match(token, match); end +end + +# @api private +# +# source://jmespath//lib/jmespath/util.rb#4 +module JMESPath::Util + class << self + # @api private + # + # source://jmespath//lib/jmespath/util.rb#19 + def as_json(value); end + + # Determines if a value is false as defined by JMESPath: + # + # https://github.com/jmespath/jmespath.site/blob/master/docs/proposals/improved-filters.rst#and-expressions-1 + # + # @api private + # @return [Boolean] + # + # source://jmespath//lib/jmespath/util.rb#10 + def falsey?(value); end + end +end + +# source://jmespath//lib/jmespath/version.rb#3 +JMESPath::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.6.3.rbi new file mode 100644 index 0000000000..b379bc4b7a --- /dev/null +++ b/sorbet/rbi/gems/json@2.6.3.rbi @@ -0,0 +1,1541 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json` gem. +# Please instead update this file by running `bin/tapioca gem json`. + +# Extends any Class to include _json_creatable?_ method. +# +# source://json//lib/json/common.rb#695 +class Class < ::Module + # Returns true if this class can be used to create an instance + # from a serialised JSON string. The class has to implement a class + # method _json_create_ that expects a hash as first parameter. The hash + # should include the required data. + # + # @return [Boolean] + # + # source://json//lib/json/common.rb#700 + def json_creatable?; end +end + +# = JavaScript \Object Notation (\JSON) +# +# \JSON is a lightweight data-interchange format. +# +# A \JSON value is one of the following: +# - Double-quoted text: "foo". +# - Number: +1+, +1.0+, +2.0e2+. +# - Boolean: +true+, +false+. +# - Null: +null+. +# - \Array: an ordered list of values, enclosed by square brackets: +# ["foo", 1, 1.0, 2.0e2, true, false, null] +# +# - \Object: a collection of name/value pairs, enclosed by curly braces; +# each name is double-quoted text; +# the values may be any \JSON values: +# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} +# +# A \JSON array or object may contain nested arrays, objects, and scalars +# to any depth: +# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} +# [{"foo": 0, "bar": 1}, ["baz", 2]] +# +# == Using \Module \JSON +# +# To make module \JSON available in your code, begin with: +# require 'json' +# +# All examples here assume that this has been done. +# +# === Parsing \JSON +# +# You can parse a \String containing \JSON data using +# either of two methods: +# - JSON.parse(source, opts) +# - JSON.parse!(source, opts) +# +# where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# The difference between the two methods +# is that JSON.parse! omits some checks +# and may not be safe for some +source+ data; +# use it only for data from trusted sources. +# Use the safer method JSON.parse for less trusted sources. +# +# ==== Parsing \JSON Arrays +# +# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: +# json = '["foo", 1, 1.0, 2.0e2, true, false, null]' +# ruby = JSON.parse(json) +# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] +# ruby.class # => Array +# +# The \JSON array may contain nested arrays, objects, and scalars +# to any depth: +# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' +# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] +# +# ==== Parsing \JSON \Objects +# +# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: +# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' +# ruby = JSON.parse(json) +# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} +# ruby.class # => Hash +# +# The \JSON object may contain nested arrays, objects, and scalars +# to any depth: +# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' +# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} +# +# ==== Parsing \JSON Scalars +# +# When the source is a \JSON scalar (not an array or object), +# JSON.parse returns a Ruby scalar. +# +# \String: +# ruby = JSON.parse('"foo"') +# ruby # => 'foo' +# ruby.class # => String +# \Integer: +# ruby = JSON.parse('1') +# ruby # => 1 +# ruby.class # => Integer +# \Float: +# ruby = JSON.parse('1.0') +# ruby # => 1.0 +# ruby.class # => Float +# ruby = JSON.parse('2.0e2') +# ruby # => 200 +# ruby.class # => Float +# Boolean: +# ruby = JSON.parse('true') +# ruby # => true +# ruby.class # => TrueClass +# ruby = JSON.parse('false') +# ruby # => false +# ruby.class # => FalseClass +# Null: +# ruby = JSON.parse('null') +# ruby # => nil +# ruby.class # => NilClass +# +# ==== Parsing Options +# +# ====== Input Options +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; +# defaults to +100+; specify +false+ to disable depth checking. +# +# With the default, +false+: +# source = '[0, [1, [2, [3]]]]' +# ruby = JSON.parse(source) +# ruby # => [0, [1, [2, [3]]]] +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.parse(source, {max_nesting: 1}) +# Bad value: +# # Raises TypeError (wrong argument type Symbol (expected Fixnum)): +# JSON.parse(source, {max_nesting: :foo}) +# +# --- +# +# Option +allow_nan+ (boolean) specifies whether to allow +# NaN, Infinity, and MinusInfinity in +source+; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::ParserError (225: unexpected token at '[NaN]'): +# JSON.parse('[NaN]') +# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): +# JSON.parse('[Infinity]') +# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): +# JSON.parse('[-Infinity]') +# Allow: +# source = '[NaN, Infinity, -Infinity]' +# ruby = JSON.parse(source, {allow_nan: true}) +# ruby # => [NaN, Infinity, -Infinity] +# +# ====== Output Options +# +# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys +# should be Symbols; +# defaults to +false+ (use Strings). +# +# With the default, +false+: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} +# Use Symbols: +# ruby = JSON.parse(source, {symbolize_names: true}) +# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} +# +# --- +# +# Option +object_class+ (\Class) specifies the Ruby class to be used +# for each \JSON object; +# defaults to \Hash. +# +# With the default, \Hash: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby.class # => Hash +# Use class \OpenStruct: +# ruby = JSON.parse(source, {object_class: OpenStruct}) +# ruby # => # +# +# --- +# +# Option +array_class+ (\Class) specifies the Ruby class to be used +# for each \JSON array; +# defaults to \Array. +# +# With the default, \Array: +# source = '["foo", 1.0, true, false, null]' +# ruby = JSON.parse(source) +# ruby.class # => Array +# Use class \Set: +# ruby = JSON.parse(source, {array_class: Set}) +# ruby # => # +# +# --- +# +# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. +# See {\JSON Additions}[#module-JSON-label-JSON+Additions]. +# +# === Generating \JSON +# +# To generate a Ruby \String containing \JSON data, +# use method JSON.generate(source, opts), where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# ==== Generating \JSON from Arrays +# +# When the source is a Ruby \Array, JSON.generate returns +# a \String containing a \JSON array: +# ruby = [0, 's', :foo] +# json = JSON.generate(ruby) +# json # => '[0,"s","foo"]' +# +# The Ruby \Array array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = [0, [1, 2], {foo: 3, bar: 4}] +# json = JSON.generate(ruby) +# json # => '[0,[1,2],{"foo":3,"bar":4}]' +# +# ==== Generating \JSON from Hashes +# +# When the source is a Ruby \Hash, JSON.generate returns +# a \String containing a \JSON object: +# ruby = {foo: 0, bar: 's', baz: :bat} +# json = JSON.generate(ruby) +# json # => '{"foo":0,"bar":"s","baz":"bat"}' +# +# The Ruby \Hash array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} +# json = JSON.generate(ruby) +# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' +# +# ==== Generating \JSON from Other Objects +# +# When the source is neither an \Array nor a \Hash, +# the generated \JSON data depends on the class of the source. +# +# When the source is a Ruby \Integer or \Float, JSON.generate returns +# a \String containing a \JSON number: +# JSON.generate(42) # => '42' +# JSON.generate(0.42) # => '0.42' +# +# When the source is a Ruby \String, JSON.generate returns +# a \String containing a \JSON string (with double-quotes): +# JSON.generate('A string') # => '"A string"' +# +# When the source is +true+, +false+ or +nil+, JSON.generate returns +# a \String containing the corresponding \JSON token: +# JSON.generate(true) # => 'true' +# JSON.generate(false) # => 'false' +# JSON.generate(nil) # => 'null' +# +# When the source is none of the above, JSON.generate returns +# a \String containing a \JSON string representation of the source: +# JSON.generate(:foo) # => '"foo"' +# JSON.generate(Complex(0, 0)) # => '"0+0i"' +# JSON.generate(Dir.new('.')) # => '"#
"' +# +# ==== Generating Options +# +# ====== Input Options +# +# Option +allow_nan+ (boolean) specifies whether +# +NaN+, +Infinity+, and -Infinity may be generated; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::GeneratorError (920: NaN not allowed in JSON): +# JSON.generate(JSON::NaN) +# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): +# JSON.generate(JSON::Infinity) +# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): +# JSON.generate(JSON::MinusInfinity) +# +# Allow: +# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# +# --- +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth +# in +obj+; defaults to +100+. +# +# With the default, +100+: +# obj = [[[[[[0]]]]]] +# JSON.generate(obj) # => '[[[[[[0]]]]]]' +# +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.generate(obj, max_nesting: 2) +# +# ====== Output Options +# +# The default formatting options generate the most compact +# \JSON data, all on one line and with no whitespace. +# +# You can use these formatting options to generate +# \JSON data in a more open format, using whitespace. +# See also JSON.pretty_generate. +# +# - Option +array_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON array; defaults to the empty \String, ''. +# - Option +object_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON object; defaults to the empty \String, ''. +# - Option +indent+ (\String) specifies the string (usually spaces) to be +# used for indentation; defaults to the empty \String, ''; +# defaults to the empty \String, ''; +# has no effect unless options +array_nl+ or +object_nl+ specify newlines. +# - Option +space+ (\String) specifies a string (usually a space) to be +# inserted after the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# - Option +space_before+ (\String) specifies a string (usually a space) to be +# inserted before the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# +# In this example, +obj+ is used first to generate the shortest +# \JSON data (no whitespace), then again with all formatting options +# specified: +# +# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} +# json = JSON.generate(obj) +# puts 'Compact:', json +# opts = { +# array_nl: "\n", +# object_nl: "\n", +# indent: ' ', +# space_before: ' ', +# space: ' ' +# } +# puts 'Open:', JSON.generate(obj, opts) +# +# Output: +# Compact: +# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} +# Open: +# { +# "foo" : [ +# "bar", +# "baz" +# ], +# "bat" : { +# "bam" : 0, +# "bad" : 1 +# } +# } +# +# == \JSON Additions +# +# When you "round trip" a non-\String object from Ruby to \JSON and back, +# you have a new \String, instead of the object you began with: +# ruby0 = Range.new(0, 2) +# json = JSON.generate(ruby0) +# json # => '0..2"' +# ruby1 = JSON.parse(json) +# ruby1 # => '0..2' +# ruby1.class # => String +# +# You can use \JSON _additions_ to preserve the original object. +# The addition is an extension of a ruby class, so that: +# - \JSON.generate stores more information in the \JSON string. +# - \JSON.parse, called with option +create_additions+, +# uses that information to create a proper Ruby object. +# +# This example shows a \Range being generated into \JSON +# and parsed back into Ruby, both without and with +# the addition for \Range: +# ruby = Range.new(0, 2) +# # This passage does not use the addition for Range. +# json0 = JSON.generate(ruby) +# ruby0 = JSON.parse(json0) +# # This passage uses the addition for Range. +# require 'json/add/range' +# json1 = JSON.generate(ruby) +# ruby1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <require 'json/add/bigdecimal' +# - Complex: require 'json/add/complex' +# - Date: require 'json/add/date' +# - DateTime: require 'json/add/date_time' +# - Exception: require 'json/add/exception' +# - OpenStruct: require 'json/add/ostruct' +# - Range: require 'json/add/range' +# - Rational: require 'json/add/rational' +# - Regexp: require 'json/add/regexp' +# - Set: require 'json/add/set' +# - Struct: require 'json/add/struct' +# - Symbol: require 'json/add/symbol' +# - Time: require 'json/add/time' +# +# To reduce punctuation clutter, the examples below +# show the generated \JSON via +puts+, rather than the usual +inspect+, +# +# \BigDecimal: +# require 'json/add/bigdecimal' +# ruby0 = BigDecimal(0) # 0.0 +# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} +# ruby1 = JSON.parse(json, create_additions: true) # 0.0 +# ruby1.class # => BigDecimal +# +# \Complex: +# require 'json/add/complex' +# ruby0 = Complex(1+0i) # 1+0i +# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} +# ruby1 = JSON.parse(json, create_additions: true) # 1+0i +# ruby1.class # Complex +# +# \Date: +# require 'json/add/date' +# ruby0 = Date.today # 2020-05-02 +# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 +# ruby1.class # Date +# +# \DateTime: +# require 'json/add/date_time' +# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 +# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 +# ruby1.class # DateTime +# +# \Exception (and its subclasses including \RuntimeError): +# require 'json/add/exception' +# ruby0 = Exception.new('A message') # A message +# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # A message +# ruby1.class # Exception +# ruby0 = RuntimeError.new('Another message') # Another message +# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # Another message +# ruby1.class # RuntimeError +# +# \OpenStruct: +# require 'json/add/ostruct' +# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # +# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # OpenStruct +# +# \Range: +# require 'json/add/range' +# ruby0 = Range.new(0, 2) # 0..2 +# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} +# ruby1 = JSON.parse(json, create_additions: true) # 0..2 +# ruby1.class # Range +# +# \Rational: +# require 'json/add/rational' +# ruby0 = Rational(1, 3) # 1/3 +# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} +# ruby1 = JSON.parse(json, create_additions: true) # 1/3 +# ruby1.class # Rational +# +# \Regexp: +# require 'json/add/regexp' +# ruby0 = Regexp.new('foo') # (?-mix:foo) +# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) +# ruby1.class # Regexp +# +# \Set: +# require 'json/add/set' +# ruby0 = Set.new([0, 1, 2]) # # +# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Set +# +# \Struct: +# require 'json/add/struct' +# Customer = Struct.new(:name, :address) # Customer +# ruby0 = Customer.new("Dave", "123 Main") # # +# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Customer +# +# \Symbol: +# require 'json/add/symbol' +# ruby0 = :foo # foo +# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # foo +# ruby1.class # Symbol +# +# \Time: +# require 'json/add/time' +# ruby0 = Time.now # 2020-05-02 11:28:26 -0500 +# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 +# ruby1.class # Time +# +# +# === Custom \JSON Additions +# +# In addition to the \JSON additions provided, +# you can craft \JSON additions of your own, +# either for Ruby built-in classes or for user-defined classes. +# +# Here's a user-defined class +Foo+: +# class Foo +# attr_accessor :bar, :baz +# def initialize(bar, baz) +# self.bar = bar +# self.baz = baz +# end +# end +# +# Here's the \JSON addition for it: +# # Extend class Foo with JSON addition. +# class Foo +# # Serialize Foo object with its class name and arguments +# def to_json(*args) +# { +# JSON.create_id => self.class.name, +# 'a' => [ bar, baz ] +# }.to_json(*args) +# end +# # Deserialize JSON string by constructing new Foo object with arguments. +# def self.json_create(object) +# new(*object['a']) +# end +# end +# +# Demonstration: +# require 'json' +# # This Foo object has no custom addition. +# foo0 = Foo.new(0, 1) +# json0 = JSON.generate(foo0) +# obj0 = JSON.parse(json0) +# # Lood the custom addition. +# require_relative 'foo_addition' +# # This foo has the custom addition. +# foo1 = Foo.new(0, 1) +# json1 = JSON.generate(foo1) +# obj1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <" (String) +# With custom addition: {"json_class":"Foo","a":[0,1]} (String) +# Parsed JSON: +# Without custom addition: "#" (String) +# With custom addition: # (Foo) +# +# source://json//lib/json/version.rb#2 +module JSON + private + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//lib/json/common.rb#631 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//lib/json/common.rb#335 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#335 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//lib/json/common.rb#296 + def generate(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#557 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//lib/json/common.rb#245 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//lib/json/common.rb#256 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//lib/json/common.rb#215 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//lib/json/common.rb#230 + def parse!(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//lib/json/common.rb#390 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#390 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//lib/json/common.rb#575 + def recurse_proc(result, &proc); end + + # source://json//lib/json/common.rb#557 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//lib/json/common.rb#296 + def unparse(obj, opts = T.unsafe(nil)); end + + class << self + # :call-seq: + # JSON[object] -> new_array or new_string + # + # If +object+ is a \String, + # calls JSON.parse with +object+ and +opts+ (see method #parse): + # json = '[0, 1, null]' + # JSON[json]# => [0, 1, nil] + # + # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate): + # ruby = [0, 1, nil] + # JSON[ruby] # => '[0,1,null]' + # + # source://json//lib/json/common.rb#18 + def [](object, opts = T.unsafe(nil)); end + + # source://json//lib/json/common.rb#81 + def create_fast_state; end + + # Returns the current create identifier. + # See also JSON.create_id=. + # + # source://json//lib/json/common.rb#126 + def create_id; end + + # Sets create identifier, which is used to decide if the _json_create_ + # hook of a class should be called; initial value is +json_class+: + # JSON.create_id # => 'json_class' + # + # source://json//lib/json/common.rb#120 + def create_id=(new_value); end + + # source://json//lib/json/common.rb#91 + def create_pretty_state; end + + # Return the constant located at _path_. The format of _path_ has to be + # either ::A::B::C or A::B::C. In any case, A has to be located at the top + # level (absolute namespace path?). If there doesn't exist a constant at + # the given path, an ArgumentError is raised. + # + # source://json//lib/json/common.rb#42 + def deep_const_get(path); end + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//lib/json/common.rb#631 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # + # source://json//lib/json/common.rb#596 + def dump_default_options; end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # + # source://json//lib/json/common.rb#596 + def dump_default_options=(_arg0); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//lib/json/common.rb#335 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#335 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//lib/json/common.rb#296 + def generate(obj, opts = T.unsafe(nil)); end + + # Returns the JSON generator module that is used by JSON. This is + # either JSON::Ext::Generator or JSON::Pure::Generator: + # JSON.generator # => JSON::Ext::Generator + # + # source://json//lib/json/common.rb#103 + def generator; end + + # Set the module _generator_ to be used by JSON. + # + # source://json//lib/json/common.rb#58 + def generator=(generator); end + + # Encodes string using String.encode. + # + # source://json//lib/json/common.rb#653 + def iconv(to, from, string); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#557 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#420 + def load_default_options; end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#420 + def load_default_options=(_arg0); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//lib/json/common.rb#245 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//lib/json/common.rb#256 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//lib/json/common.rb#215 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//lib/json/common.rb#230 + def parse!(source, opts = T.unsafe(nil)); end + + # Returns the JSON parser class that is used by JSON. This is either + # JSON::Ext::Parser or JSON::Pure::Parser: + # JSON.parser # => JSON::Ext::Parser + # + # source://json//lib/json/common.rb#29 + def parser; end + + # Set the JSON parser class _parser_ to be used by JSON. + # + # source://json//lib/json/common.rb#32 + def parser=(parser); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//lib/json/common.rb#390 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#390 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//lib/json/common.rb#575 + def recurse_proc(result, &proc); end + + # source://json//lib/json/common.rb#557 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or Returns the JSON generator state class that is used by JSON. This is + # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: + # JSON.state # => JSON::Ext::Generator::State + # + # source://json//lib/json/common.rb#108 + def state; end + + # Sets or Returns the JSON generator state class that is used by JSON. This is + # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: + # JSON.state # => JSON::Ext::Generator::State + # + # source://json//lib/json/common.rb#108 + def state=(_arg0); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//lib/json/common.rb#296 + def unparse(obj, opts = T.unsafe(nil)); end + end +end + +# source://json//lib/json/common.rb#114 +JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) + +# source://json//lib/json/common.rb#111 +JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + +# source://json//lib/json/generic_object.rb#5 +class JSON::GenericObject < ::OpenStruct + # source://json//lib/json/generic_object.rb#63 + def as_json(*_arg0); end + + # source://json//lib/json/generic_object.rb#47 + def to_hash; end + + # source://json//lib/json/generic_object.rb#67 + def to_json(*a); end + + # source://json//lib/json/generic_object.rb#59 + def |(other); end + + class << self + # source://json//lib/json/generic_object.rb#41 + def dump(obj, *args); end + + # source://json//lib/json/generic_object.rb#21 + def from_hash(object); end + + # Sets the attribute json_creatable + # + # @param value the value to set the attribute json_creatable to. + # + # source://json//lib/json/generic_object.rb#13 + def json_creatable=(_arg0); end + + # @return [Boolean] + # + # source://json//lib/json/generic_object.rb#9 + def json_creatable?; end + + # source://json//lib/json/generic_object.rb#15 + def json_create(data); end + + # source://json//lib/json/generic_object.rb#36 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# The base exception for JSON errors. +# +# source://json//lib/json/common.rb#137 +class JSON::JSONError < ::StandardError + class << self + # source://json//lib/json/common.rb#138 + def wrap(exception); end + end +end + +# source://json//lib/json/common.rb#35 +JSON::Parser = JSON::Ext::Parser + +# source://json//lib/json/common.rb#73 +JSON::State = JSON::Ext::Generator::State + +# For backwards compatibility +# +# source://json//lib/json/common.rb#159 +JSON::UnparserError = JSON::GeneratorError + +# source://json//lib/json/common.rb#658 +module Kernel + private + + # If _object_ is string-like, parse the string and return the parsed result as + # a Ruby data structure. Otherwise, generate a JSON text from the Ruby data + # structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively. See + # generate and parse for their documentation. + # + # source://json//lib/json/common.rb#685 + def JSON(object, *args); end + + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + # + # source://json//lib/json/common.rb#663 + def j(*objs); end + + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + # + # source://json//lib/json/common.rb#672 + def jj(*objs); end +end diff --git a/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi b/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi new file mode 100644 index 0000000000..24286df8ea --- /dev/null +++ b/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi @@ -0,0 +1,127 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kramdown-parser-gfm` gem. +# Please instead update this file by running `bin/tapioca gem kramdown-parser-gfm`. + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm/options.rb#10 +module Kramdown + class << self + # source://kramdown/2.4.0/lib/kramdown/document.rb#49 + def data_dir; end + end +end + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm/options.rb#11 +module Kramdown::Options + class << self + # source://kramdown/2.4.0/lib/kramdown/options.rb#72 + def defaults; end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#51 + def define(name, type, default, desc, &block); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#67 + def defined?(name); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#62 + def definitions; end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#82 + def merge(hash); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#96 + def parse(name, data); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#141 + def simple_array_validator(val, name, size = T.unsafe(nil)); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#158 + def simple_hash_validator(val, name); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#122 + def str_to_sym(data); end + end +end + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#16 +module Kramdown::Parser; end + +# This class provides a parser implementation for the GFM dialect of Markdown. +# +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#19 +class Kramdown::Parser::GFM < ::Kramdown::Parser::Kramdown + # @return [GFM] a new instance of GFM + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#25 + def initialize(source, options); end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#108 + def generate_gfm_header_id(text); end + + # Returns the value of attribute paragraph_end. + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#23 + def paragraph_end; end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#55 + def parse; end + + # Copied from kramdown/parser/kramdown/header.rb, removed the first line + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#125 + def parse_atx_header_gfm_quirk; end + + # To handle task-lists we override the parse method for lists, converting matching text into + # checkbox input elements where necessary (as well as applying classes to the ul/ol and li + # elements). + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#163 + def parse_list; end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#142 + def parse_strikethrough_gfm; end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#60 + def update_elements(element); end + + # Update the raw text for automatic ID generation. + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#77 + def update_raw_text(item); end + + private + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#200 + def update_text_type(element, child); end +end + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#120 +Kramdown::Parser::GFM::ATX_HEADER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#190 +Kramdown::Parser::GFM::ESCAPED_CHARS_GFM = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#135 +Kramdown::Parser::GFM::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#134 +Kramdown::Parser::GFM::FENCED_CODEBLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#158 +Kramdown::Parser::GFM::LIST_TYPES = T.let(T.unsafe(nil), Array) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#106 +Kramdown::Parser::GFM::NON_WORD_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#193 +Kramdown::Parser::GFM::PARAGRAPH_END_GFM = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#138 +Kramdown::Parser::GFM::STRIKETHROUGH_DELIM = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#139 +Kramdown::Parser::GFM::STRIKETHROUGH_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#21 +Kramdown::Parser::GFM::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/kramdown@2.4.0.rbi b/sorbet/rbi/gems/kramdown@2.4.0.rbi new file mode 100644 index 0000000000..9b2edd5252 --- /dev/null +++ b/sorbet/rbi/gems/kramdown@2.4.0.rbi @@ -0,0 +1,3271 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kramdown` gem. +# Please instead update this file by running `bin/tapioca gem kramdown`. + +# source://kramdown//lib/kramdown/version.rb#10 +module Kramdown + class << self + # Return the data directory for kramdown. + # + # source://kramdown//lib/kramdown/document.rb#49 + def data_dir; end + end +end + +# This module contains all available converters, i.e. classes that take a root Element and convert +# it to a specific output format. The result is normally a string. For example, the +# Converter::Html module converts an element tree into valid HTML. +# +# Converters use the Base class for common functionality (like applying a template to the output) +# \- see its API documentation for how to create a custom converter class. +# +# source://kramdown//lib/kramdown/converter.rb#20 +module Kramdown::Converter + extend ::Kramdown::Utils::Configurable + + class << self + # source://kramdown//lib/kramdown/utils/configurable.rb#37 + def add_math_engine(data, *args, &block); end + + # source://kramdown//lib/kramdown/utils/configurable.rb#37 + def add_syntax_highlighter(data, *args, &block); end + + # source://kramdown//lib/kramdown/utils/configurable.rb#30 + def configurables; end + + # source://kramdown//lib/kramdown/utils/configurable.rb#34 + def math_engine(data); end + + # source://kramdown//lib/kramdown/utils/configurable.rb#34 + def syntax_highlighter(data); end + end +end + +# == \Base class for converters +# +# This class serves as base class for all converters. It provides methods that can/should be +# used by all converters (like #generate_id) as well as common functionality that is +# automatically applied to the result (for example, embedding the output into a template). +# +# A converter object is used as a throw-away object, i.e. it is only used for storing the needed +# state information during conversion. Therefore one can't instantiate a converter object +# directly but only use the Base::convert method. +# +# == Implementing a converter +# +# Implementing a new converter is rather easy: just derive a new class from this class and put +# it in the Kramdown::Converter module (the latter is only needed if auto-detection should work +# properly). Then you need to implement the #convert method which has to contain the conversion +# code for converting an element and has to return the conversion result. +# +# The actual transformation of the document tree can be done in any way. However, writing one +# method per element type is a straight forward way to do it - this is how the Html and Latex +# converters do the transformation. +# +# Have a look at the Base::convert method for additional information! +# +# source://kramdown//lib/kramdown/converter/base.rb#40 +class Kramdown::Converter::Base + # Initialize the converter with the given +root+ element and +options+ hash. + # + # @return [Base] a new instance of Base + # + # source://kramdown//lib/kramdown/converter/base.rb#55 + def initialize(root, options); end + + # Returns whether the template should be applied after the conversion of the tree. + # + # Defaults to true. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/converter/base.rb#73 + def apply_template_after?; end + + # Returns whether the template should be applied before the conversion of the tree. + # + # Defaults to false. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/converter/base.rb#66 + def apply_template_before?; end + + # The basic version of the ID generator, without any special provisions for empty or unique + # IDs. + # + # source://kramdown//lib/kramdown/converter/base.rb#237 + def basic_generate_id(str); end + + # Convert the element +el+ and return the resulting object. + # + # This is the only method that has to be implemented by sub-classes! + # + # @raise [NotImplementedError] + # + # source://kramdown//lib/kramdown/converter/base.rb#122 + def convert(_el); end + + # Can be used by a converter for storing arbitrary information during the conversion process. + # + # source://kramdown//lib/kramdown/converter/base.rb#43 + def data; end + + # Extract the code block/span language from the attributes. + # + # source://kramdown//lib/kramdown/converter/base.rb#174 + def extract_code_language(attr); end + + # See #extract_code_language + # + # *Warning*: This version will modify the given attributes if a language is present. + # + # source://kramdown//lib/kramdown/converter/base.rb#183 + def extract_code_language!(attr); end + + # Format the given math element with the math engine configured through the option + # 'math_engine'. + # + # source://kramdown//lib/kramdown/converter/base.rb#206 + def format_math(el, opts = T.unsafe(nil)); end + + # Generate an unique alpha-numeric ID from the the string +str+ for use as a header ID. + # + # Uses the option +auto_id_prefix+: the value of this option is prepended to every generated + # ID. + # + # source://kramdown//lib/kramdown/converter/base.rb#222 + def generate_id(str); end + + # Highlight the given +text+ in the language +lang+ with the syntax highlighter configured + # through the option 'syntax_highlighter'. + # + # source://kramdown//lib/kramdown/converter/base.rb#192 + def highlight_code(text, lang, type, opts = T.unsafe(nil)); end + + # Return +true+ if the header element +el+ should be used for the table of contents (as + # specified by the +toc_levels+ option). + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/converter/base.rb#162 + def in_toc?(el); end + + # The hash with the conversion options. + # + # source://kramdown//lib/kramdown/converter/base.rb#46 + def options; end + + # Return the output header level given a level. + # + # Uses the +header_offset+ option for adjusting the header level. + # + # source://kramdown//lib/kramdown/converter/base.rb#169 + def output_header_level(level); end + + # The root element that is converted. + # + # source://kramdown//lib/kramdown/converter/base.rb#49 + def root; end + + # Return the entity that represents the given smart_quote element. + # + # source://kramdown//lib/kramdown/converter/base.rb#248 + def smart_quote_entity(el); end + + # Add the given warning +text+ to the warning array. + # + # source://kramdown//lib/kramdown/converter/base.rb#156 + def warning(text); end + + # The warnings array. + # + # source://kramdown//lib/kramdown/converter/base.rb#52 + def warnings; end + + class << self + # Apply the +template+ using +body+ as the body string. + # + # The template is evaluated using ERB and the body is available in the @body instance variable + # and the converter object in the @converter instance variable. + # + # source://kramdown//lib/kramdown/converter/base.rb#130 + def apply_template(converter, body); end + + # Convert the element tree +tree+ and return the resulting conversion object (normally a + # string) and an array with warning messages. The parameter +options+ specifies the conversion + # options that should be used. + # + # Initializes a new instance of the calling class and then calls the #convert method with + # +tree+ as parameter. + # + # If the +template+ option is specified and non-empty, the template is evaluate with ERB + # before and/or after the tree conversion depending on the result of #apply_template_before? + # and #apply_template_after?. If the template is evaluated before, an empty string is used for + # the body; if evaluated after, the result is used as body. See ::apply_template. + # + # The template resolution is done in the following way (for the converter ConverterName): + # + # 1. Look in the current working directory for the template. + # + # 2. Append +.converter_name+ (e.g. +.html+) to the template name and look for the resulting + # file in the current working directory (the form +.convertername+ is deprecated). + # + # 3. Append +.converter_name+ to the template name and look for it in the kramdown data + # directory (the form +.convertername+ is deprecated). + # + # 4. Check if the template name starts with 'string://' and if so, strip this prefix away and + # use the rest as template. + # + # source://kramdown//lib/kramdown/converter/base.rb#101 + def convert(tree, options = T.unsafe(nil)); end + + # Return the template specified by +template+. + # + # source://kramdown//lib/kramdown/converter/base.rb#139 + def get_template(template); end + + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://kramdown//lib/kramdown/converter/base.rb#245 +Kramdown::Converter::Base::SMART_QUOTE_INDICES = T.let(T.unsafe(nil), Hash) + +# Converts a Kramdown::Document to a nested hash for further processing or debug output. +# +# source://kramdown//lib/kramdown/converter/hash_ast.rb#19 +class Kramdown::Converter::HashAST < ::Kramdown::Converter::Base + # source://kramdown//lib/kramdown/converter/hash_ast.rb#21 + def convert(el); end +end + +# source://kramdown//lib/kramdown/converter/hash_ast.rb#35 +Kramdown::Converter::HashAst = Kramdown::Converter::HashAST + +# Converts a Kramdown::Document to HTML. +# +# You can customize the HTML converter by sub-classing it and overriding the +convert_NAME+ +# methods. Each such method takes the following parameters: +# +# [+el+] The element of type +NAME+ to be converted. +# +# [+indent+] A number representing the current amount of spaces for indent (only used for +# block-level elements). +# +# The return value of such a method has to be a string containing the element +el+ formatted as +# HTML element. +# +# source://kramdown//lib/kramdown/converter/html.rb#30 +class Kramdown::Converter::Html < ::Kramdown::Converter::Base + include ::Kramdown::Utils::Html + include ::Kramdown::Parser::Html::Constants + + # Initialize the HTML converter with the given Kramdown document +doc+. + # + # @return [Html] a new instance of Html + # + # source://kramdown//lib/kramdown/converter/html.rb#39 + def initialize(root, options); end + + # Add the syntax highlighter name to the 'class' attribute of the given attribute hash. And + # overwrites or add a "language-LANG" part using the +lang+ parameter if +lang+ is not nil. + # + # source://kramdown//lib/kramdown/converter/html.rb#409 + def add_syntax_highlighter_to_class_attr(attr, lang = T.unsafe(nil)); end + + # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of + # the element. + # + # source://kramdown//lib/kramdown/converter/html.rb#57 + def convert(el, indent = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/html.rb#272 + def convert_a(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#365 + def convert_abbreviation(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#77 + def convert_blank(_el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#141 + def convert_blockquote(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#268 + def convert_br(_el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#111 + def convert_codeblock(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#280 + def convert_codespan(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#260 + def convert_comment(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#178 + def convert_dd(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#174 + def convert_dl(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#190 + def convert_dt(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#319 + def convert_em(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#324 + def convert_entity(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#294 + def convert_footnote(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#145 + def convert_header(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#155 + def convert_hr(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#201 + def convert_html_element(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#276 + def convert_img(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#178 + def convert_li(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#351 + def convert_math(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#162 + def convert_ol(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#86 + def convert_p(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#311 + def convert_raw(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#372 + def convert_root(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#347 + def convert_smart_quote(el, _indent); end + + # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img + # element. + # + # source://kramdown//lib/kramdown/converter/html.rb#99 + def convert_standalone_image(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#319 + def convert_strong(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_table(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_tbody(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#248 + def convert_td(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#81 + def convert_text(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_tfoot(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_thead(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_tr(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#339 + def convert_typographic_sym(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#162 + def convert_ul(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#228 + def convert_xml_comment(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#228 + def convert_xml_pi(el, indent); end + + # Fixes the elements for use in a TOC entry. + # + # source://kramdown//lib/kramdown/converter/html.rb#453 + def fix_for_toc_entry(elements); end + + # Return an HTML ordered list with the footnote content for the used footnotes. + # + # source://kramdown//lib/kramdown/converter/html.rb#488 + def footnote_content; end + + # Format the given element as block HTML. + # + # source://kramdown//lib/kramdown/converter/html.rb#397 + def format_as_block_html(name, attr, body, indent); end + + # Format the given element as block HTML with a newline after the start tag and indentation + # before the end tag. + # + # source://kramdown//lib/kramdown/converter/html.rb#403 + def format_as_indented_block_html(name, attr, body, indent); end + + # Format the given element as span HTML. + # + # source://kramdown//lib/kramdown/converter/html.rb#392 + def format_as_span_html(name, attr, body); end + + # Generate and return an element tree for the table of contents. + # + # source://kramdown//lib/kramdown/converter/html.rb#415 + def generate_toc_tree(toc, type, attr); end + + # The amount of indentation used when nesting HTML tags. + # + # source://kramdown//lib/kramdown/converter/html.rb#36 + def indent; end + + # The amount of indentation used when nesting HTML tags. + # + # source://kramdown//lib/kramdown/converter/html.rb#36 + def indent=(_arg0); end + + # Return the converted content of the children of +el+ as a string. The parameter +indent+ has + # to be the amount of indentation used for the element +el+. + # + # Pushes +el+ onto the @stack before converting the child elements and pops it from the stack + # afterwards. + # + # source://kramdown//lib/kramdown/converter/html.rb#66 + def inner(el, indent); end + + # Obfuscate the +text+ by using HTML entities. + # + # source://kramdown//lib/kramdown/converter/html.rb#476 + def obfuscate(text); end + + # Remove all footnotes from the given elements. + # + # source://kramdown//lib/kramdown/converter/html.rb#468 + def remove_footnotes(elements); end + + # Remove all link elements by unwrapping them. + # + # source://kramdown//lib/kramdown/converter/html.rb#460 + def unwrap_links(elements); end +end + +# source://kramdown//lib/kramdown/converter/html.rb#246 +Kramdown::Converter::Html::ENTITY_NBSP = T.let(T.unsafe(nil), Kramdown::Utils::Entities::Entity) + +# source://kramdown//lib/kramdown/converter/html.rb#485 +Kramdown::Converter::Html::FOOTNOTE_BACKLINK_FMT = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/converter/html.rb#328 +Kramdown::Converter::Html::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/html.rb#159 +Kramdown::Converter::Html::ZERO_TO_ONETWENTYEIGHT = T.let(T.unsafe(nil), Array) + +# Converts an element tree to the kramdown format. +# +# source://kramdown//lib/kramdown/converter/kramdown.rb#18 +class Kramdown::Converter::Kramdown < ::Kramdown::Converter::Base + include ::Kramdown::Utils::Html + + # @return [Kramdown] a new instance of Kramdown + # + # source://kramdown//lib/kramdown/converter/kramdown.rb#24 + def initialize(root, options); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#34 + def convert(el, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#291 + def convert_a(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#377 + def convert_abbreviation(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#70 + def convert_blank(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#107 + def convert_blockquote(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#287 + def convert_br(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#103 + def convert_codeblock(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#324 + def convert_codespan(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#279 + def convert_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#158 + def convert_dd(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#124 + def convert_dl(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#182 + def convert_dt(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#346 + def convert_em(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#356 + def convert_entity(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#329 + def convert_footnote(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#112 + def convert_header(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#120 + def convert_hr(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#195 + def convert_html_element(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#308 + def convert_img(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#130 + def convert_li(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#373 + def convert_math(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#124 + def convert_ol(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#88 + def convert_p(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#334 + def convert_raw(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#381 + def convert_root(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#369 + def convert_smart_quote(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#351 + def convert_strong(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#239 + def convert_table(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#260 + def convert_tbody(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#275 + def convert_td(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#76 + def convert_text(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#267 + def convert_tfoot(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#244 + def convert_thead(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#271 + def convert_tr(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#365 + def convert_typographic_sym(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#124 + def convert_ul(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#229 + def convert_xml_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#229 + def convert_xml_pi(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#408 + def create_abbrev_defs; end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#399 + def create_footnote_defs; end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#389 + def create_link_defs; end + + # Return the IAL containing the attributes of the element +el+. + # + # source://kramdown//lib/kramdown/converter/kramdown.rb#419 + def ial_for_element(el); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#54 + def inner(el, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#444 + def parse_title(attr); end +end + +# source://kramdown//lib/kramdown/converter/kramdown.rb#74 +Kramdown::Converter::Kramdown::ESCAPED_CHAR_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/converter/kramdown.rb#192 +Kramdown::Converter::Kramdown::HTML_ELEMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/converter/kramdown.rb#190 +Kramdown::Converter::Kramdown::HTML_TAGS_WITH_BODY = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/converter/kramdown.rb#360 +Kramdown::Converter::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash) + +# Converts an element tree to LaTeX. +# +# This converter uses ideas from other Markdown-to-LaTeX converters like Pandoc and Maruku. +# +# You can customize this converter by sub-classing it and overriding the +convert_NAME+ methods. +# Each such method takes the following parameters: +# +# [+el+] The element of type +NAME+ to be converted. +# +# [+opts+] A hash containing processing options that are passed down from parent elements. The +# key :parent is always set and contains the parent element as value. +# +# The return value of such a method has to be a string containing the element +el+ formatted +# correctly as LaTeX markup. +# +# source://kramdown//lib/kramdown/converter/latex.rb#31 +class Kramdown::Converter::Latex < ::Kramdown::Converter::Base + # Initialize the LaTeX converter with the +root+ element and the conversion +options+. + # + # @return [Latex] a new instance of Latex + # + # source://kramdown//lib/kramdown/converter/latex.rb#34 + def initialize(root, options); end + + # Return a LaTeX comment containing all attributes as 'key="value"' pairs. + # + # source://kramdown//lib/kramdown/converter/latex.rb#599 + def attribute_list(el); end + + # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of + # the element. + # + # source://kramdown//lib/kramdown/converter/latex.rb#41 + def convert(el, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/latex.rb#216 + def convert_a(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#569 + def convert_abbreviation(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#61 + def convert_blank(_el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#110 + def convert_blockquote(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#209 + def convert_br(_el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#87 + def convert_codeblock(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#239 + def convert_codespan(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#205 + def convert_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#151 + def convert_dd(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#139 + def convert_dl(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#147 + def convert_dt(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#263 + def convert_em(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#533 + def convert_entity(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#250 + def convert_footnote(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#114 + def convert_header(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#124 + def convert_hr(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#155 + def convert_html_element(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#225 + def convert_img(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#143 + def convert_li(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#556 + def convert_math(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#129 + def convert_ol(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#69 + def convert_p(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#255 + def convert_raw(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#57 + def convert_root(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#550 + def convert_smart_quote(el, opts); end + + # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img + # element. + # + # source://kramdown//lib/kramdown/converter/latex.rb#80 + def convert_standalone_image(el, _opts, img); end + + # source://kramdown//lib/kramdown/converter/latex.rb#267 + def convert_strong(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#177 + def convert_table(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#189 + def convert_tbody(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#201 + def convert_td(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#65 + def convert_text(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#193 + def convert_tfoot(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#185 + def convert_thead(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#197 + def convert_tr(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#542 + def convert_typographic_sym(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#129 + def convert_ul(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#166 + def convert_xml_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#170 + def convert_xml_pi(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#522 + def entity_to_latex(entity); end + + # Escape the special LaTeX characters in the string +str+. + # + # source://kramdown//lib/kramdown/converter/latex.rb#618 + def escape(str); end + + # Return the converted content of the children of +el+ as a string. + # + # source://kramdown//lib/kramdown/converter/latex.rb#46 + def inner(el, opts); end + + # Wrap the +text+ inside a LaTeX environment of type +type+. The element +el+ is passed on to + # the method #attribute_list -- the resulting string is appended to both the \\begin and the + # \\end lines of the LaTeX environment for easier post-processing of LaTeX environments. + # + # source://kramdown//lib/kramdown/converter/latex.rb#582 + def latex_environment(type, el, text); end + + # Return a string containing a valid \hypertarget command if the element has an ID defined, or + # +nil+ otherwise. If the parameter +add_label+ is +true+, a \label command will also be used + # additionally to the \hypertarget command. + # + # source://kramdown//lib/kramdown/converter/latex.rb#590 + def latex_link_target(el, add_label = T.unsafe(nil)); end + + # Normalize the abbreviation key so that it only contains allowed ASCII character + # + # source://kramdown//lib/kramdown/converter/latex.rb#575 + def normalize_abbreviation_key(key); end +end + +# Inspired by Maruku: entity conversion table based on the one from htmltolatex +# (http://sourceforge.net/projects/htmltolatex/), with some small adjustments/additions +# +# source://kramdown//lib/kramdown/converter/latex.rb#273 +Kramdown::Converter::Latex::ENTITY_CONV_TABLE = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/latex.rb#605 +Kramdown::Converter::Latex::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/latex.rb#615 +Kramdown::Converter::Latex::ESCAPE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/converter/latex.rb#175 +Kramdown::Converter::Latex::TABLE_ALIGNMENT_CHAR = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/latex.rb#537 +Kramdown::Converter::Latex::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash) + +# Converts a Kramdown::Document to a manpage in groff format. See man(7), groff_man(7) and +# man-pages(7) for information regarding the output. +# +# source://kramdown//lib/kramdown/converter/man.rb#18 +class Kramdown::Converter::Man < ::Kramdown::Converter::Base + # source://kramdown//lib/kramdown/converter/man.rb#20 + def convert(el, opts = T.unsafe(nil)); end + + private + + # source://kramdown//lib/kramdown/converter/man.rb#191 + def convert_a(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#229 + def convert_abbreviation(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#47 + def convert_blank(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#95 + def convert_blockquote(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#225 + def convert_br(_el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#89 + def convert_codeblock(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#221 + def convert_codespan(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#186 + def convert_comment(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#127 + def convert_dd(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#101 + def convert_dl(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#121 + def convert_dt(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#209 + def convert_em(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#255 + def convert_entity(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#241 + def convert_footnote(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#61 + def convert_header(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#47 + def convert_hr(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#182 + def convert_html_element(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#205 + def convert_img(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#110 + def convert_li(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#233 + def convert_math(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#101 + def convert_ol(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#52 + def convert_p(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#245 + def convert_raw(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#40 + def convert_root(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#259 + def convert_smart_quote(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#215 + def convert_strong(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#139 + def convert_table(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#154 + def convert_tbody(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#170 + def convert_td(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#249 + def convert_text(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#161 + def convert_tfoot(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#148 + def convert_thead(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#165 + def convert_tr(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#268 + def convert_typographic_sym(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#101 + def convert_ul(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#186 + def convert_xml_comment(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#47 + def convert_xml_pi(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#285 + def escape(text, preserve_whitespace = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/man.rb#26 + def inner(el, opts, use = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/man.rb#272 + def macro(name, *args); end + + # source://kramdown//lib/kramdown/converter/man.rb#276 + def newline(text); end + + # source://kramdown//lib/kramdown/converter/man.rb#281 + def quote(text); end + + # source://kramdown//lib/kramdown/converter/man.rb#293 + def unicode_char(codepoint); end +end + +# source://kramdown//lib/kramdown/converter/man.rb#137 +Kramdown::Converter::Man::TABLE_CELL_ALIGNMENT = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/man.rb#263 +Kramdown::Converter::Man::TYPOGRAPHIC_SYMS_MAP = T.let(T.unsafe(nil), Hash) + +# Removes all block (and optionally span) level HTML tags from the element tree. +# +# This converter can be used on parsed HTML documents to get an element tree that will only +# contain native kramdown elements. +# +# *Note* that the returned element tree may not be fully conformant (i.e. the content models of +# *some elements may be violated)! +# +# This converter modifies the given tree in-place and returns it. +# +# source://kramdown//lib/kramdown/converter/remove_html_tags.rb#25 +class Kramdown::Converter::RemoveHtmlTags < ::Kramdown::Converter::Base + # @return [RemoveHtmlTags] a new instance of RemoveHtmlTags + # + # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#27 + def initialize(root, options); end + + # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#32 + def convert(el); end +end + +# Converts a Kramdown::Document to an element tree that represents the table of contents. +# +# The returned tree consists of Element objects of type :toc where the root element is just used +# as container object. Each :toc element contains as value the wrapped :header element and under +# the attribute key :id the header ID that should be used (note that this ID may not exist in +# the wrapped element). +# +# Since the TOC tree consists of special :toc elements, one cannot directly feed this tree to +# other converters! +# +# source://kramdown//lib/kramdown/converter/toc.rb#25 +class Kramdown::Converter::Toc < ::Kramdown::Converter::Base + # @return [Toc] a new instance of Toc + # + # source://kramdown//lib/kramdown/converter/toc.rb#27 + def initialize(root, options); end + + # source://kramdown//lib/kramdown/converter/toc.rb#34 + def convert(el); end + + private + + # source://kramdown//lib/kramdown/converter/toc.rb#47 + def add_to_toc(el, id); end +end + +# The main interface to kramdown. +# +# This class provides a one-stop-shop for using kramdown to convert text into various output +# formats. Use it like this: +# +# require 'kramdown' +# doc = Kramdown::Document.new('This *is* some kramdown text') +# puts doc.to_html +# +# The #to_html method is a shortcut for using the Converter::Html class. See #method_missing for +# more information. +# +# The second argument to the ::new method is an options hash for customizing the behaviour of the +# used parser and the converter. See ::new for more information! +# +# source://kramdown//lib/kramdown/document.rb#73 +class Kramdown::Document + # Create a new Kramdown document from the string +source+ and use the provided +options+. The + # options that can be used are defined in the Options module. + # + # The special options key :input can be used to select the parser that should parse the + # +source+. It has to be the name of a class in the Kramdown::Parser module. For example, to + # select the kramdown parser, one would set the :input key to +Kramdown+. If this key is not + # set, it defaults to +Kramdown+. + # + # The +source+ is immediately parsed by the selected parser so that the root element is + # immediately available and the output can be generated. + # + # @return [Document] a new instance of Document + # + # source://kramdown//lib/kramdown/document.rb#96 + def initialize(source, options = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/document.rb#124 + def inspect; end + + # Check if a method is invoked that begins with +to_+ and if so, try to instantiate a converter + # class (i.e. a class in the Kramdown::Converter module) and use it for converting the document. + # + # For example, +to_html+ would instantiate the Kramdown::Converter::Html class. + # + # source://kramdown//lib/kramdown/document.rb#113 + def method_missing(id, *attr, &block); end + + # The options hash which holds the options for parsing/converting the Kramdown document. + # + # source://kramdown//lib/kramdown/document.rb#80 + def options; end + + # The root Element of the element tree. It is immediately available after the ::new method has + # been called. + # + # source://kramdown//lib/kramdown/document.rb#77 + def root; end + + # The root Element of the element tree. It is immediately available after the ::new method has + # been called. + # + # source://kramdown//lib/kramdown/document.rb#77 + def root=(_arg0); end + + # An array of warning messages. It is filled with warnings during the parsing phase (i.e. in + # ::new) and the conversion phase. + # + # source://kramdown//lib/kramdown/document.rb#84 + def warnings; end + + protected + + # Try requiring a parser or converter class and don't raise an error if the file is not found. + # + # source://kramdown//lib/kramdown/document.rb#129 + def try_require(type, name); end +end + +# Represents all elements in the element tree. +# +# kramdown only uses this one class for representing all available elements in an element tree +# (paragraphs, headers, emphasis, ...). The type of element can be set via the #type accessor. +# +# The root of a kramdown element tree has to be an element of type :root. It needs to have certain +# option keys set so that conversions work correctly. If only a part of a tree should be +# converted, duplicate the root node and assign the #children appropriately, e.g: +# +# root = doc.root +# new_root = root.dup +# new_root.children = [root.children[0]] # assign new array with elements to convert +# +# Following is a description of all supported element types. +# +# Note that the option :location may contain the start line number of an element in the source +# document. +# +# == Structural Elements +# +# === :root +# +# [Category] None +# [Usage context] As the root element of a document +# [Content model] Block-level elements +# +# Represents the root of a kramdown document. +# +# The root element contains the following option keys: +# +# parts of the kramdown document. +# +# :abbrev_defs:: This key may be used to store the mapping of abbreviation to abbreviation +# definition. +# +# :abbrev_attr:: This key may be used to store the mapping of abbreviation to abbreviation +# attributes. +# +# :options:: This key may be used to store options that were set during parsing of the document. +# +# :footnote_count:: This key stores the number of actually referenced footnotes of the document. +# +# === :blank +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Empty +# +# Represents one or more blank lines. It is not allowed to have two or more consecutive blank +# elements. +# +# The +value+ field may contain the original content of the blank lines. +# +# +# === :p +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Span-level elements +# +# Represents a paragraph. +# +# If the option :transparent is +true+, this element just represents a block of text. I.e. this +# element just functions as a container for span-level elements. +# +# +# === :header +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Span-level elements +# +# Represents a header. +# +# The option :level specifies the header level and has to contain a number between 1 and \6. The +# option :raw_text has to contain the raw header text. +# +# +# === :blockquote +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Block-level elements +# +# Represents a blockquote. +# +# +# === :codeblock +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Empty +# +# Represents a code block, i.e. a block of text that should be used as-is. +# +# The +value+ field has to contain the content of the code block. +# +# The option :lang specifies a highlighting language with possible HTML style options (e.g. +# php?start_inline=1) and should be used instead of a possibly also available language embedded in +# a class name of the form 'language-LANG'. +# +# +# === :ul +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] One or more :li elements +# +# Represents an unordered list. +# +# +# === :ol +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] One or more :li elements +# +# Represents an ordered list. +# +# +# === :li +# +# [Category] Block-level element +# [Usage context] Inside :ol and :ul elements +# [Content model] Block-level elements +# +# Represents a list item of an ordered or unordered list. +# +# Note that the first child of a list item must not be a :blank element! +# +# +# === :dl +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] One or more groups each consisting of one or more :dt elements followed by one +# or more :dd elements. +# +# Represents a definition list which contains groups consisting of terms and definitions for them. +# +# +# === :dt +# +# [Category] Block-level element +# [Usage context] Before :dt or :dd elements inside a :dl elment +# [Content model] Span-level elements +# +# Represents the term part of a term-definition group in a definition list. +# +# +# === :dd +# +# [Category] Block-level element +# [Usage context] After :dt or :dd elements inside a :dl elment +# [Content model] Block-level elements +# +# Represents the definition part of a term-definition group in a definition list. +# +# +# === :hr +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] None +# +# Represents a horizontal line. +# +# +# === :table +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Zero or one :thead elements, one or more :tbody elements, zero or one :tfoot +# elements +# +# Represents a table. Each table row (i.e. :tr element) of the table has to contain the same +# number of :td elements. +# +# The option :alignment has to be an array containing the alignment values, exactly one for each +# column of the table. The possible alignment values are :left, :center, :right and :default. +# +# +# === :thead +# +# [Category] None +# [Usage context] As first element inside a :table element +# [Content model] One or more :tr elements +# +# Represents the table header. +# +# +# === :tbody +# +# [Category] None +# [Usage context] After a :thead element but before a :tfoot element inside a :table element +# [Content model] One or more :tr elements +# +# Represents a table body. +# +# +# === :tfoot +# +# [Category] None +# [Usage context] As last element inside a :table element +# [Content model] One or more :tr elements +# +# Represents the table footer. +# +# +# === :tr +# +# [Category] None +# [Usage context] Inside :thead, :tbody and :tfoot elements +# [Content model] One or more :td elements +# +# Represents a table row. +# +# +# === :td +# +# [Category] Block-level element +# [Usage context] Inside :tr elements +# [Content model] As child of :thead/:tr span-level elements, as child of :tbody/:tr and +# :tfoot/:tr block-level elements +# +# Represents a table cell. +# +# +# === :math +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected +# [Content model] None +# +# Represents mathematical text that is written in LaTeX. +# +# The +value+ field has to contain the actual mathematical text. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. +# +# +# == Text Markup Elements +# +# === :text +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents text. +# +# The +value+ field has to contain the text itself. +# +# +# === :br +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a hard line break. +# +# +# === :a +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] Span-level elements +# +# Represents a link to an URL. +# +# The attribute +href+ has to be set to the URL to which the link points. The attribute +title+ +# optionally contains the title of the link. +# +# +# === :img +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents an image. +# +# The attribute +src+ has to be set to the URL of the image. The attribute +alt+ has to contain a +# text description of the image. The attribute +title+ optionally contains the title of the image. +# +# +# === :codespan +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents verbatim text. +# +# The +value+ field has to contain the content of the code span. +# +# +# === :footnote +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a footnote marker. +# +# The +value+ field has to contain an element whose children are the content of the footnote. The +# option :name has to contain a valid and unique footnote name. A valid footnote name consists of +# a word character or a digit and then optionally followed by other word characters, digits or +# dashes. +# +# +# === :em +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] Span-level elements +# +# Represents emphasis of its contents. +# +# +# === :strong +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] Span-level elements +# +# Represents strong importance for its contents. +# +# +# === :entity +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents an HTML entity. +# +# The +value+ field has to contain an instance of Kramdown::Utils::Entities::Entity. The option +# :original can be used to store the original representation of the entity. +# +# +# === :typographic_sym +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a typographic symbol. +# +# The +value+ field needs to contain a Symbol representing the specific typographic symbol from +# the following list: +# +# :mdash:: An mdash character (---) +# :ndash:: An ndash character (--) +# :hellip:: An ellipsis (...) +# :laquo:: A left guillemet (<<) +# :raquo:: A right guillemet (>>) +# :laquo_space:: A left guillemet with a space (<< ) +# :raquo_space:: A right guillemet with a space ( >>) +# +# +# === :smart_quote +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a quotation character. +# +# The +value+ field needs to contain a Symbol representing the specific quotation character: +# +# :lsquo:: Left single quote +# :rsquo:: Right single quote +# :ldquo:: Left double quote +# :rdquo:: Right double quote +# +# +# === :abbreviation +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a text part that is an abbreviation. +# +# The +value+ field has to contain the text part that is the abbreviation. The definition of the +# abbreviation is stored in the :root element of the document. +# +# +# == Other Elements +# +# === :html_element +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements or raw HTML elements are expected +# [Content model] Depends on the element +# +# Represents an HTML element. +# +# The +value+ field has to contain the name of the HTML element the element is representing. +# +# The option :category has to be set to either :span or :block depending on the whether the +# element is a block-level or a span-level element. The option :content_model has to be set to the +# content model for the element (either :block if it contains block-level elements, :span if it +# contains span-level elements or :raw if it contains raw content). +# +# +# === :xml_comment +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected or in raw HTML elements +# [Content model] None +# +# Represents an XML/HTML comment. +# +# The +value+ field has to contain the whole XML/HTML comment including the delimiters. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. +# +# +# === :xml_pi +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected or in raw HTML elements +# [Content model] None +# +# Represents an XML/HTML processing instruction. +# +# The +value+ field has to contain the whole XML/HTML processing instruction including the +# delimiters. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. +# +# +# === :comment +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected +# [Content model] None +# +# Represents a comment. +# +# The +value+ field has to contain the comment. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. If it is set to :span, then no blank lines are allowed in the comment. +# +# +# === :raw +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected +# [Content model] None +# +# Represents a raw string that should not be modified. For example, the element could contain some +# HTML code that should be output as-is without modification and escaping. +# +# The +value+ field has to contain the actual raw text. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. If it is set to :span, then no blank lines are allowed in the raw text. +# +# The option :type can be set to an array of strings to define for which converters the raw string +# is valid. +# +# source://kramdown//lib/kramdown/element.rb#482 +class Kramdown::Element + # Create a new Element object of type +type+. The optional parameters +value+, +attr+ and + # +options+ can also be set in this constructor for convenience. + # + # @return [Element] a new instance of Element + # + # source://kramdown//lib/kramdown/element.rb#496 + def initialize(type, value = T.unsafe(nil), attr = T.unsafe(nil), options = T.unsafe(nil)); end + + # The attributes of the element. + # + # source://kramdown//lib/kramdown/element.rb#502 + def attr; end + + # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :block+ with + # +el.block?+. + # + # Returns boolean true or false. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/element.rb#537 + def block?; end + + # The child elements of this element. + # + # source://kramdown//lib/kramdown/element.rb#492 + def children; end + + # The child elements of this element. + # + # source://kramdown//lib/kramdown/element.rb#492 + def children=(_arg0); end + + # source://kramdown//lib/kramdown/element.rb#511 + def inspect; end + + # The options hash for the element. It is used for storing arbitray options. + # + # source://kramdown//lib/kramdown/element.rb#507 + def options; end + + # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :span+ with + # +el.span?+. + # + # Returns boolean true or false. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/element.rb#545 + def span?; end + + # A symbol representing the element type. For example, :p or :blockquote. + # + # source://kramdown//lib/kramdown/element.rb#485 + def type; end + + # A symbol representing the element type. For example, :p or :blockquote. + # + # source://kramdown//lib/kramdown/element.rb#485 + def type=(_arg0); end + + # The value of the element. The interpretation of this field depends on the type of the element. + # Many elements don't use this field. + # + # source://kramdown//lib/kramdown/element.rb#489 + def value; end + + # The value of the element. The interpretation of this field depends on the type of the element. + # Many elements don't use this field. + # + # source://kramdown//lib/kramdown/element.rb#489 + def value=(_arg0); end + + class << self + # Return the category of +el+ which can be :block, :span or +nil+. + # + # Most elements have a fixed category, however, some elements can either appear in a block-level + # or a span-level context. These elements need to have the option :category correctly set. + # + # source://kramdown//lib/kramdown/element.rb#529 + def category(el); end + end +end + +# source://kramdown//lib/kramdown/element.rb#519 +Kramdown::Element::CATEGORY = T.let(T.unsafe(nil), Hash) + +# This error is raised when an error condition is encountered. +# +# *Note* that this error is only raised by the support framework for the parsers and converters. +# +# source://kramdown//lib/kramdown/error.rb#15 +class Kramdown::Error < ::RuntimeError; end + +# This module defines all options that are used by parsers and/or converters as well as providing +# methods to deal with the options. +# +# source://kramdown//lib/kramdown/options.rb#16 +module Kramdown::Options + class << self + # Return a Hash with the default values for all options. + # + # source://kramdown//lib/kramdown/options.rb#72 + def defaults; end + + # Define a new option called +name+ (a Symbol) with the given +type+ (String, Integer, Float, + # Symbol, Boolean, Object), default value +default+ and the description +desc+. If a block is + # specified, it should validate the value and either raise an error or return a valid value. + # + # The type 'Object' should only be used for complex types for which none of the other types + # suffices. A block needs to be specified when using type 'Object' and it has to cope with + # a value given as string and as the opaque type. + # + # @raise [ArgumentError] + # + # source://kramdown//lib/kramdown/options.rb#51 + def define(name, type, default, desc, &block); end + + # Return +true+ if an option called +name+ is defined. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/options.rb#67 + def defined?(name); end + + # Return all option definitions. + # + # source://kramdown//lib/kramdown/options.rb#62 + def definitions; end + + # Merge the #defaults Hash with the *parsed* options from the given Hash, i.e. only valid option + # names are considered and their value is run through the #parse method. + # + # source://kramdown//lib/kramdown/options.rb#82 + def merge(hash); end + + # Parse the given value +data+ as if it was a value for the option +name+ and return the parsed + # value with the correct type. + # + # If +data+ already has the correct type, it is just returned. Otherwise it is converted to a + # String and then to the correct type. + # + # @raise [ArgumentError] + # + # source://kramdown//lib/kramdown/options.rb#96 + def parse(name, data); end + + # Ensures that the option value +val+ for the option called +name+ is a valid array. The + # parameter +val+ can be + # + # - a comma separated string which is split into an array of values + # - or an array. + # + # Optionally, the array is checked for the correct size. + # + # source://kramdown//lib/kramdown/options.rb#141 + def simple_array_validator(val, name, size = T.unsafe(nil)); end + + # Ensures that the option value +val+ for the option called +name+ is a valid hash. The + # parameter +val+ can be + # + # - a hash in YAML format + # - or a Ruby Hash object. + # + # @raise [Kramdown::Error] + # + # source://kramdown//lib/kramdown/options.rb#158 + def simple_hash_validator(val, name); end + + # Converts the given String +data+ into a Symbol or +nil+ with the + # following provisions: + # + # - A leading colon is stripped from the string. + # - An empty value or a value equal to "nil" results in +nil+. + # + # source://kramdown//lib/kramdown/options.rb#122 + def str_to_sym(data); end + end +end + +# Allowed option types. +# +# source://kramdown//lib/kramdown/options.rb#39 +Kramdown::Options::ALLOWED_TYPES = T.let(T.unsafe(nil), Array) + +# Helper class introducing a boolean type for specifying boolean values (+true+ and +false+) as +# option types. +# +# source://kramdown//lib/kramdown/options.rb#20 +class Kramdown::Options::Boolean + class << self + # Return +true+ if +other+ is either +true+ or +false+ + # + # source://kramdown//lib/kramdown/options.rb#23 + def ===(other); end + end +end + +# Struct class for storing the definition of an option. +# +# source://kramdown//lib/kramdown/options.rb#36 +class Kramdown::Options::Definition < ::Struct + # Returns the value of attribute default + # + # @return [Object] the current value of default + def default; end + + # Sets the attribute default + # + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + # Returns the value of attribute desc + # + # @return [Object] the current value of desc + def desc; end + + # Sets the attribute desc + # + # @param value [Object] the value to set the attribute desc to. + # @return [Object] the newly set value + def desc=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + # Returns the value of attribute validator + # + # @return [Object] the current value of validator + def validator; end + + # Sets the attribute validator + # + # @param value [Object] the value to set the attribute validator to. + # @return [Object] the newly set value + def validator=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://kramdown//lib/kramdown/options.rb#396 +Kramdown::Options::SMART_QUOTES_ENTITIES = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/options.rb#397 +Kramdown::Options::SMART_QUOTES_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/options.rb#336 +Kramdown::Options::TOC_LEVELS_ARRAY = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/options.rb#335 +Kramdown::Options::TOC_LEVELS_RANGE = T.let(T.unsafe(nil), Range) + +# This module contains all available parsers. A parser takes an input string and converts the +# string to an element tree. +# +# New parsers should be derived from the Base class which provides common functionality - see its +# API documentation for how to create a custom converter class. +# +# source://kramdown//lib/kramdown/parser.rb#17 +module Kramdown::Parser; end + +# == \Base class for parsers +# +# This class serves as base class for parsers. It provides common methods that can/should be +# used by all parsers, especially by those using StringScanner(Kramdown) for parsing. +# +# A parser object is used as a throw-away object, i.e. it is only used for storing the needed +# state information during parsing. Therefore one can't instantiate a parser object directly but +# only use the Base::parse method. +# +# == Implementing a parser +# +# Implementing a new parser is rather easy: just derive a new class from this class and put it +# in the Kramdown::Parser module -- the latter is needed so that the auto-detection of the new +# parser works correctly. Then you need to implement the +#parse+ method which has to contain +# the parsing code. +# +# Have a look at the Base::parse, Base::new and Base#parse methods for additional information! +# +# source://kramdown//lib/kramdown/parser/base.rb#34 +class Kramdown::Parser::Base + # Initialize the parser object with the +source+ string and the parsing +options+. + # + # The @root element, the @warnings array and @text_type (specifies the default type for newly + # created text nodes) are automatically initialized. + # + # @return [Base] a new instance of Base + # + # source://kramdown//lib/kramdown/parser/base.rb#52 + def initialize(source, options); end + + # Modify the string +source+ to be usable by the parser (unifies line ending characters to + # +\n+ and makes sure +source+ ends with a new line character). + # + # source://kramdown//lib/kramdown/parser/base.rb#91 + def adapt_source(source); end + + # This helper method adds the given +text+ either to the last element in the +tree+ if it is a + # +type+ element or creates a new text element with the given +type+. + # + # source://kramdown//lib/kramdown/parser/base.rb#103 + def add_text(text, tree = T.unsafe(nil), type = T.unsafe(nil)); end + + # Extract the part of the StringScanner +strscan+ backed string specified by the +range+. This + # method works correctly under Ruby 1.8 and Ruby 1.9. + # + # source://kramdown//lib/kramdown/parser/base.rb#115 + def extract_string(range, strscan); end + + # The hash with the parsing options. + # + # source://kramdown//lib/kramdown/parser/base.rb#37 + def options; end + + # Parse the source string into an element tree. + # + # The parsing code should parse the source provided in @source and build an element tree the + # root of which should be @root. + # + # This is the only method that has to be implemented by sub-classes! + # + # @raise [NotImplementedError] + # + # source://kramdown//lib/kramdown/parser/base.rb#79 + def parse; end + + # The root element of element tree that is created from the source string. + # + # source://kramdown//lib/kramdown/parser/base.rb#46 + def root; end + + # The original source string. + # + # source://kramdown//lib/kramdown/parser/base.rb#43 + def source; end + + # Add the given warning +text+ to the warning array. + # + # source://kramdown//lib/kramdown/parser/base.rb#84 + def warning(text); end + + # The array with the parser warnings. + # + # source://kramdown//lib/kramdown/parser/base.rb#40 + def warnings; end + + class << self + # Parse the +source+ string into an element tree, possibly using the parsing +options+, and + # return the root element of the element tree and an array with warning messages. + # + # Initializes a new instance of the calling class and then calls the +#parse+ method that must + # be implemented by each subclass. + # + # source://kramdown//lib/kramdown/parser/base.rb#67 + def parse(source, options = T.unsafe(nil)); end + + private + + def allocate; end + def new(*_arg0); end + end +end + +# Used for parsing an HTML document. +# +# The parsing code is in the Parser module that can also be used by other parsers. +# +# source://kramdown//lib/kramdown/parser/html.rb#22 +class Kramdown::Parser::Html < ::Kramdown::Parser::Base + include ::Kramdown::Parser::Html::Constants + include ::Kramdown::Parser::Html::Parser + + # Parse the source string provided on initialization as HTML document. + # + # source://kramdown//lib/kramdown/parser/html.rb#586 + def parse; end +end + +# Contains all constants that are used when parsing. +# +# source://kramdown//lib/kramdown/parser/html.rb#25 +module Kramdown::Parser::Html::Constants; end + +# source://kramdown//lib/kramdown/parser/html.rb#32 +Kramdown::Parser::Html::Constants::HTML_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#59 +Kramdown::Parser::Html::Constants::HTML_BLOCK_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#30 +Kramdown::Parser::Html::Constants::HTML_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# The following elements are also parsed as raw since they need child elements that cannot +# be expressed using kramdown syntax: colgroup table tbody thead tfoot tr ul ol +# +# source://kramdown//lib/kramdown/parser/html.rb#48 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/html.rb#37 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_BLOCK = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#44 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_RAW = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#41 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_SPAN = T.let(T.unsafe(nil), Array) + +# :stopdoc: +# The following regexps are based on the ones used by REXML, with some slight modifications. +# +# source://kramdown//lib/kramdown/parser/html.rb#29 +Kramdown::Parser::Html::Constants::HTML_DOCTYPE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#66 +Kramdown::Parser::Html::Constants::HTML_ELEMENT = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/html.rb#63 +Kramdown::Parser::Html::Constants::HTML_ELEMENTS_WITHOUT_BODY = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#35 +Kramdown::Parser::Html::Constants::HTML_ENTITY_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#31 +Kramdown::Parser::Html::Constants::HTML_INSTRUCTION_RE = T.let(T.unsafe(nil), Regexp) + +# Some HTML elements like script belong to both categories (i.e. are valid in block and +# span HTML) and don't appear therefore! +# script, textarea +# +# source://kramdown//lib/kramdown/parser/html.rb#56 +Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#34 +Kramdown::Parser::Html::Constants::HTML_TAG_CLOSE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#33 +Kramdown::Parser::Html::Constants::HTML_TAG_RE = T.let(T.unsafe(nil), Regexp) + +# Converts HTML elements to native elements if possible. +# +# source://kramdown//lib/kramdown/parser/html.rb#197 +class Kramdown::Parser::Html::ElementConverter + include ::Kramdown::Parser::Html::Constants + include ::Kramdown::Utils::Entities + + # @return [ElementConverter] a new instance of ElementConverter + # + # source://kramdown//lib/kramdown/parser/html.rb#216 + def initialize(root); end + + # source://kramdown//lib/kramdown/parser/html.rb#384 + def convert_a(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_b(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#417 + def convert_code(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_em(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h1(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h2(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h3(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h4(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h5(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h6(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_i(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#417 + def convert_pre(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#563 + def convert_script(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_strong(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#460 + def convert_table(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#380 + def convert_textarea(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#375 + def extract_text(el, raw); end + + # source://kramdown//lib/kramdown/parser/html.rb#575 + def handle_math_tag(el); end + + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/html.rb#571 + def is_math_tag?(el); end + + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/html.rb#503 + def is_simple_table?(el); end + + # Convert the element +el+ and its children. + # + # source://kramdown//lib/kramdown/parser/html.rb#225 + def process(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil), parent = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#278 + def process_children(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#320 + def process_html_element(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end + + # Process the HTML text +raw+: compress whitespace (if +preserve+ is +false+) and convert + # entities in entity elements. + # + # source://kramdown//lib/kramdown/parser/html.rb#291 + def process_text(raw, preserve = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#326 + def remove_text_children(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#359 + def remove_whitespace_children(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#369 + def set_basics(el, type, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#349 + def strip_whitespace(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#330 + def wrap_text_children(el); end + + class << self + # source://kramdown//lib/kramdown/parser/html.rb#220 + def convert(root, el = T.unsafe(nil)); end + end +end + +# source://kramdown//lib/kramdown/parser/html.rb#393 +Kramdown::Parser::Html::ElementConverter::EMPHASIS_TYPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/html.rb#204 +Kramdown::Parser::Html::ElementConverter::REMOVE_TEXT_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#208 +Kramdown::Parser::Html::ElementConverter::REMOVE_WHITESPACE_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#213 +Kramdown::Parser::Html::ElementConverter::SIMPLE_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#210 +Kramdown::Parser::Html::ElementConverter::STRIP_WHITESPACE = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#206 +Kramdown::Parser::Html::ElementConverter::WRAP_TEXT_CHILDREN = T.let(T.unsafe(nil), Array) + +# Contains the parsing methods. This module can be mixed into any parser to get HTML parsing +# functionality. The only thing that must be provided by the class are instance variable +# parsing. +# +# source://kramdown//lib/kramdown/parser/html.rb#77 +module Kramdown::Parser::Html::Parser + include ::Kramdown::Parser::Html::Constants + + # Process the HTML start tag that has already be scanned/checked via @src. + # + # Does the common processing steps and then yields to the caller for further processing + # (first parameter is the created element; the second parameter is +true+ if the HTML + # element is already closed, ie. contains no body; the third parameter specifies whether the + # body - and the end tag - need to be handled in case closed=false). + # + # source://kramdown//lib/kramdown/parser/html.rb#87 + def handle_html_start_tag(line = T.unsafe(nil)); end + + # Handle the raw HTML tag at the current position. + # + # source://kramdown//lib/kramdown/parser/html.rb#127 + def handle_raw_html_tag(name); end + + # Parses the given string for HTML attributes and returns the resulting hash. + # + # If the optional +line+ parameter is supplied, it is used in warning messages. + # + # If the optional +in_html_tag+ parameter is set to +false+, attributes are not modified to + # contain only lowercase letters. + # + # source://kramdown//lib/kramdown/parser/html.rb#114 + def parse_html_attributes(str, line = T.unsafe(nil), in_html_tag = T.unsafe(nil)); end + + # Parse raw HTML from the current source position, storing the found elements in +el+. + # Parsing continues until one of the following criteria are fulfilled: + # + # - The end of the document is reached. + # - The matching end tag for the element +el+ is found (only used if +el+ is an HTML + # element). + # + # When an HTML start tag is found, processing is deferred to #handle_html_start_tag, + # providing the block given to this method. + # + # source://kramdown//lib/kramdown/parser/html.rb#150 + def parse_raw_html(el, &block); end +end + +# source://kramdown//lib/kramdown/parser/html.rb#139 +Kramdown::Parser::Html::Parser::HTML_RAW_START = T.let(T.unsafe(nil), Regexp) + +# Used for parsing a document in kramdown format. +# +# If you want to extend the functionality of the parser, you need to do the following: +# +# * Create a new subclass +# * add the needed parser methods +# * modify the @block_parsers and @span_parsers variables and add the names of your parser +# methods +# +# Here is a small example for an extended parser class that parses ERB style tags as raw text if +# they are used as span-level elements (an equivalent block-level parser should probably also be +# made to handle the block case): +# +# require 'kramdown/parser/kramdown' +# +# class Kramdown::Parser::ERBKramdown < Kramdown::Parser::Kramdown +# +# def initialize(source, options) +# super +# @span_parsers.unshift(:erb_tags) +# end +# +# ERB_TAGS_START = /<%.*?%>/ +# +# def parse_erb_tags +# @src.pos += @src.matched_size +# @tree.children << Element.new(:raw, @src.matched) +# end +# define_parser(:erb_tags, ERB_TAGS_START, '<%') +# +# end +# +# The new parser can be used like this: +# +# require 'kramdown/document' +# # require the file with the above parser class +# +# Kramdown::Document.new(input_text, :input => 'ERBKramdown').to_html +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#60 +class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base + include ::Kramdown + include ::Kramdown::Parser::Html::Constants + include ::Kramdown::Parser::Html::Parser + + # Create a new Kramdown parser object with the given +options+. + # + # @return [Kramdown] a new instance of Kramdown + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#65 + def initialize(source, options); end + + # This helper methods adds the approriate attributes to the element +el+ of type +a+ or +img+ + # and the element itself to the @tree. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#39 + def add_link(el, href, title, alt_text = T.unsafe(nil), ial = T.unsafe(nil)); end + + # Return +true+ if we are after a block boundary. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#21 + def after_block_boundary?; end + + # Return +true+ if we are before a block boundary. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#28 + def before_block_boundary?; end + + # Correct abbreviation attributes. + # + # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#34 + def correct_abbreviations_attributes; end + + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#96 + def handle_extension(name, opts, body, type, line_no = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/kramdown/html.rb#25 + def handle_kramdown_html_tag(el, closed, handle_body); end + + # Normalize the link identifier. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#17 + def normalize_link_id(id); end + + # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#56 + def paragraph_end; end + + # The source string provided on initialization is parsed into the @root element. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#88 + def parse; end + + # Parse the link definition at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#17 + def parse_abbrev_definition; end + + # Parse the string +str+ and extract all attributes and add all found attributes to the hash + # +opts+. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#18 + def parse_attribute_list(str, opts); end + + # Parse the Atx header at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#32 + def parse_atx_header; end + + # Parse the autolink at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#19 + def parse_autolink; end + + # Parse the blank line at the current postition. + # + # source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb#17 + def parse_blank_line; end + + # Parse one of the block extensions (ALD, block IAL or generic extension) at the current + # location. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#164 + def parse_block_extensions; end + + # Parse the HTML at the current position as block-level HTML. + # + # source://kramdown//lib/kramdown/parser/kramdown/html.rb#71 + def parse_block_html; end + + # Parse the math block at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/math.rb#19 + def parse_block_math; end + + # Parse the blockquote at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb#21 + def parse_blockquote; end + + # Parse the indented codeblock at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#23 + def parse_codeblock; end + + # Parse the fenced codeblock at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#37 + def parse_codeblock_fenced; end + + # Parse the codespan at the current scanner location. + # + # source://kramdown//lib/kramdown/parser/kramdown/codespan.rb#17 + def parse_codespan; end + + # Parse the ordered or unordered list at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#153 + def parse_definition_list; end + + # Parse the emphasis at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#17 + def parse_emphasis; end + + # Parse the EOB marker at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/eob.rb#17 + def parse_eob_marker; end + + # Parse the backslash-escaped character at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb#17 + def parse_escaped_chars; end + + # Parse the generic extension at the current point. The parameter +type+ can either be :block + # or :span depending whether we parse a block or span extension tag. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#54 + def parse_extension_start_tag(type); end + + # Used for parsing the first line of a list item or a definition, i.e. the line with list item + # marker or the definition marker. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#32 + def parse_first_list_line(indentation, content); end + + # Parse the foot note definition at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#21 + def parse_footnote_definition; end + + # Parse the footnote marker at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#40 + def parse_footnote_marker; end + + # Parse the horizontal rule at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb#17 + def parse_horizontal_rule; end + + # Parse the HTML entity at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/html_entity.rb#17 + def parse_html_entity; end + + # Parse the inline math at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/math.rb#44 + def parse_inline_math; end + + # Parse the line break at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/line_break.rb#17 + def parse_line_break; end + + # Parse the link at the current scanner position. This method is used to parse normal links as + # well as image links. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#61 + def parse_link; end + + # Parse the link definition at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#24 + def parse_link_definition; end + + # Parse the ordered or unordered list at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#54 + def parse_list; end + + # Parse the paragraph at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#31 + def parse_paragraph; end + + # Parse the Setext header at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#20 + def parse_setext_header; end + + # Parse the smart quotes at current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#158 + def parse_smart_quotes; end + + # Parse the extension span at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#192 + def parse_span_extensions; end + + # Parse the HTML at the current position as span-level HTML. + # + # source://kramdown//lib/kramdown/parser/kramdown/html.rb#102 + def parse_span_html; end + + # Parse the table at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/table.rb#25 + def parse_table; end + + # Parse the typographic symbols at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#22 + def parse_typographic_syms; end + + # Replace the abbreviation text with elements. + # + # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#41 + def replace_abbreviations(el, regexps = T.unsafe(nil)); end + + # Update the +ial+ with the information from the inline attribute list +opts+. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#41 + def update_ial_with_ial(ial, opts); end + + protected + + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#59 + def add_header(level, text, id); end + + # Adapt the object to allow parsing like specified in the options. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#121 + def configure_parser; end + + # Create a new block-level element, taking care of applying a preceding block IAL if it + # exists. This method should always be used for creating a block-level element! + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#305 + def new_block_el(*args); end + + # Parse all block-level elements in +text+ into the element +el+. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#140 + def parse_blocks(el, text = T.unsafe(nil)); end + + # Returns header text and optional ID. + # + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#47 + def parse_header_contents; end + + # Parse all span-level elements in the source string of @src into +el+. + # + # If the parameter +stop_re+ (a regexp) is used, parsing is immediately stopped if the regexp + # matches and if no block is given or if a block is given and it returns +true+. + # + # The parameter +parsers+ can be used to specify the (span-level) parsing methods that should + # be used for parsing. + # + # The parameter +text_type+ specifies the type which should be used for created text nodes. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#214 + def parse_spans(el, stop_re = T.unsafe(nil), parsers = T.unsafe(nil), text_type = T.unsafe(nil)); end + + # Reset the current parsing environment. The parameter +env+ can be used to set initial + # values for one or more environment variables. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#253 + def reset_env(opts = T.unsafe(nil)); end + + # Restore the current parsing environment. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#268 + def restore_env(env); end + + # Return the current parsing environment. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#263 + def save_env; end + + # Create the needed span parser regexps. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#134 + def span_parser_regexps(parsers = T.unsafe(nil)); end + + # Update the given attributes hash +attr+ with the information from the inline attribute list + # +ial+ and all referenced ALDs. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#274 + def update_attr_with_ial(attr, ial); end + + # + # Update the parser specific link definitions with the data from +link_defs+ (the value of the + # :link_defs option). + # + # The parameter +link_defs+ is a hash where the keys are possibly unnormalized link IDs and + # the values are two element arrays consisting of the link target and a title (can be +nil+). + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#116 + def update_link_definitions(link_defs); end + + # Update the raw text for automatic ID generation. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#288 + def update_raw_text(item); end + + # Update the tree by parsing all :+raw_text+ elements with the span-level parser (resets the + # environment) and by updating the attributes from the IALs. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#166 + def update_tree(element); end + + private + + # precomputed patterns for indentations 1..4 and fallback expression + # to compute pattern when indentation is outside the 1..4 range. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#258 + def fetch_pattern(type, indentation); end + + # source://kramdown//lib/kramdown/parser/kramdown.rb#200 + def span_pattern_cache(stop_re, span_start); end + + class << self + # Add a parser method + # + # * with the given +name+, + # * using +start_re+ as start regexp + # * and, for span parsers, +span_start+ as a String that can be used in a regexp and + # which identifies the starting character(s) + # + # to the registry. The method name is automatically derived from the +name+ or can explicitly + # be set by using the +meth_name+ parameter. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#328 + def define_parser(name, start_re, span_start = T.unsafe(nil), meth_name = T.unsafe(nil)); end + + # Return +true+ if there is a parser called +name+. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#339 + def has_parser?(name); end + + # Return the Data structure for the parser +name+. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#334 + def parser(name = T.unsafe(nil)); end + end +end + +# source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#14 +Kramdown::Parser::Kramdown::ABBREV_DEFINITION_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#14 +Kramdown::Parser::Kramdown::ACHARS = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#140 +Kramdown::Parser::Kramdown::ALD_ANY_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#142 +Kramdown::Parser::Kramdown::ALD_CLASS_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#139 +Kramdown::Parser::Kramdown::ALD_ID_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#141 +Kramdown::Parser::Kramdown::ALD_ID_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#150 +Kramdown::Parser::Kramdown::ALD_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#149 +Kramdown::Parser::Kramdown::ALD_TYPE_ANY = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#144 +Kramdown::Parser::Kramdown::ALD_TYPE_CLASS_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#145 +Kramdown::Parser::Kramdown::ALD_TYPE_ID_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#146 +Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#147 +Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS_MULTI = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#143 +Kramdown::Parser::Kramdown::ALD_TYPE_KEY_VALUE_PAIR = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#148 +Kramdown::Parser::Kramdown::ALD_TYPE_REF = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/header.rb#29 +Kramdown::Parser::Kramdown::ATX_HEADER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#16 +Kramdown::Parser::Kramdown::AUTOLINK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#15 +Kramdown::Parser::Kramdown::AUTOLINK_START_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb#14 +Kramdown::Parser::Kramdown::BLANK_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb#18 +Kramdown::Parser::Kramdown::BLOCKQUOTE_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#18 +Kramdown::Parser::Kramdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#160 +Kramdown::Parser::Kramdown::BLOCK_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/math.rb#16 +Kramdown::Parser::Kramdown::BLOCK_MATH_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#20 +Kramdown::Parser::Kramdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#19 +Kramdown::Parser::Kramdown::CODEBLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codespan.rb#14 +Kramdown::Parser::Kramdown::CODESPAN_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#150 +Kramdown::Parser::Kramdown::DEFINITION_LIST_START = T.let(T.unsafe(nil), Regexp) + +# Struct class holding all the needed data for one block/span-level parser method. +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#317 +class Kramdown::Parser::Kramdown::Data < ::Struct + # Returns the value of attribute method + # + # @return [Object] the current value of method + def method; end + + # Sets the attribute method + # + # @param value [Object] the value to set the attribute method to. + # @return [Object] the newly set value + def method=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute span_start + # + # @return [Object] the current value of span_start + def span_start; end + + # Sets the attribute span_start + # + # @param value [Object] the value to set the attribute span_start to. + # @return [Object] the newly set value + def span_start=(_); end + + # Returns the value of attribute start_re + # + # @return [Object] the current value of start_re + def start_re; end + + # Sets the attribute start_re + # + # @param value [Object] the value to set the attribute start_re to. + # @return [Object] the newly set value + def start_re=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#14 +Kramdown::Parser::Kramdown::EMPHASIS_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/eob.rb#14 +Kramdown::Parser::Kramdown::EOB_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb#14 +Kramdown::Parser::Kramdown::ESCAPED_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#154 +Kramdown::Parser::Kramdown::EXT_BLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#155 +Kramdown::Parser::Kramdown::EXT_BLOCK_STOP_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#187 +Kramdown::Parser::Kramdown::EXT_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#153 +Kramdown::Parser::Kramdown::EXT_START_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#152 +Kramdown::Parser::Kramdown::EXT_STOP_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#34 +Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#33 +Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#18 +Kramdown::Parser::Kramdown::FOOTNOTE_DEFINITION_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#37 +Kramdown::Parser::Kramdown::FOOTNOTE_MARKER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/header.rb#44 +Kramdown::Parser::Kramdown::HEADER_ID = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb#14 +Kramdown::Parser::Kramdown::HR_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#68 +Kramdown::Parser::Kramdown::HTML_BLOCK_START = T.let(T.unsafe(nil), Regexp) + +# Mapping of markdown attribute value to content model. I.e. :raw when "0", :default when "1" +# (use default content model for the HTML element), :span when "span", :block when block and +# for everything else +nil+ is returned. +# +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#21 +Kramdown::Parser::Kramdown::HTML_MARKDOWN_ATTR_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#99 +Kramdown::Parser::Kramdown::HTML_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#157 +Kramdown::Parser::Kramdown::IAL_BLOCK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#158 +Kramdown::Parser::Kramdown::IAL_BLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#14 +Kramdown::Parser::Kramdown::IAL_CLASS_ATTR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#188 +Kramdown::Parser::Kramdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# Regexp for matching indentation (one tab or four spaces) +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#344 +Kramdown::Parser::Kramdown::INDENT = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/math.rb#41 +Kramdown::Parser::Kramdown::INLINE_MATH_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#24 +Kramdown::Parser::Kramdown::LAZY_END = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#20 +Kramdown::Parser::Kramdown::LAZY_END_HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#21 +Kramdown::Parser::Kramdown::LAZY_END_HTML_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#22 +Kramdown::Parser::Kramdown::LAZY_END_HTML_STOP = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/line_break.rb#14 +Kramdown::Parser::Kramdown::LINE_BREAK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#53 +Kramdown::Parser::Kramdown::LINK_BRACKET_STOP_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#21 +Kramdown::Parser::Kramdown::LINK_DEFINITION_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#55 +Kramdown::Parser::Kramdown::LINK_INLINE_ID_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#56 +Kramdown::Parser::Kramdown::LINK_INLINE_TITLE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#54 +Kramdown::Parser::Kramdown::LINK_PAREN_STOP_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#57 +Kramdown::Parser::Kramdown::LINK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#19 +Kramdown::Parser::Kramdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#20 +Kramdown::Parser::Kramdown::LIST_ITEM_IAL_CHECK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#51 +Kramdown::Parser::Kramdown::LIST_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#50 +Kramdown::Parser::Kramdown::LIST_START_OL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#49 +Kramdown::Parser::Kramdown::LIST_START_UL = T.let(T.unsafe(nil), Regexp) + +# Regexp for matching the optional space (zero or up to three spaces) +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#346 +Kramdown::Parser::Kramdown::OPT_SPACE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#28 +Kramdown::Parser::Kramdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#27 +Kramdown::Parser::Kramdown::PARAGRAPH_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#26 +Kramdown::Parser::Kramdown::PARAGRAPH_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#22 +Kramdown::Parser::Kramdown::PARSE_FIRST_LIST_LINE_REGEXP_CACHE = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#47 +Kramdown::Parser::Kramdown::PATTERN_TAIL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/header.rb#17 +Kramdown::Parser::Kramdown::SETEXT_HEADER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#155 +Kramdown::Parser::Kramdown::SMART_QUOTES_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#189 +Kramdown::Parser::Kramdown::SPAN_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#122 +Kramdown::Parser::Kramdown::SQ_CLOSE = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#121 +Kramdown::Parser::Kramdown::SQ_PUNCT = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#124 +Kramdown::Parser::Kramdown::SQ_RULES = T.let(T.unsafe(nil), Array) + +# '" +# +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#145 +Kramdown::Parser::Kramdown::SQ_SUBSTS = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#18 +Kramdown::Parser::Kramdown::TABLE_FSEP_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#17 +Kramdown::Parser::Kramdown::TABLE_HSEP_ALIGN = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#21 +Kramdown::Parser::Kramdown::TABLE_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#20 +Kramdown::Parser::Kramdown::TABLE_PIPE_CHECK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#19 +Kramdown::Parser::Kramdown::TABLE_ROW_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#16 +Kramdown::Parser::Kramdown::TABLE_SEP_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#22 +Kramdown::Parser::Kramdown::TABLE_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#23 +Kramdown::Parser::Kramdown::TRAILING_WHITESPACE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#14 +Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#19 +Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#18 +Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_SUBST = T.let(T.unsafe(nil), Hash) + +# Used for parsing a document in Markdown format. +# +# This parser is based on the kramdown parser and removes the parser methods for the additional +# non-Markdown features. However, since some things are handled differently by the kramdown +# parser methods (like deciding when a list item contains just text), this parser differs from +# real Markdown parsers in some respects. +# +# Note, though, that the parser basically fails just one of the Markdown test cases (some others +# also fail but those failures are negligible). +# +# source://kramdown//lib/kramdown/parser/markdown.rb#25 +class Kramdown::Parser::Markdown < ::Kramdown::Parser::Kramdown + # @return [Markdown] a new instance of Markdown + # + # source://kramdown//lib/kramdown/parser/markdown.rb#32 + def initialize(source, options); end +end + +# :stopdoc: +# +# source://kramdown//lib/kramdown/parser/markdown.rb#40 +Kramdown::Parser::Markdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#43 +Kramdown::Parser::Markdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# Array with all the parsing methods that should be removed from the standard kramdown parser. +# +# source://kramdown//lib/kramdown/parser/markdown.rb#28 +Kramdown::Parser::Markdown::EXTENDED = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/markdown.rb#46 +Kramdown::Parser::Markdown::IAL_RAND_CHARS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/markdown.rb#47 +Kramdown::Parser::Markdown::IAL_RAND_STRING = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/markdown.rb#49 +Kramdown::Parser::Markdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#41 +Kramdown::Parser::Markdown::LAZY_END = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#48 +Kramdown::Parser::Markdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#44 +Kramdown::Parser::Markdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp) + +# == \Utils Module +# +# This module contains utility class/modules/methods that can be used by both parsers and +# converters. +# +# source://kramdown//lib/kramdown/utils.rb#16 +module Kramdown::Utils + class << self + # Treat +name+ as if it were snake cased (e.g. snake_case) and camelize it (e.g. SnakeCase). + # + # source://kramdown//lib/kramdown/utils.rb#26 + def camelize(name); end + + # source://kramdown//lib/kramdown/utils.rb#39 + def deep_const_get(str); end + + # Treat +name+ as if it were camelized (e.g. CamelizedName) and snake-case it (e.g. camelized_name). + # + # source://kramdown//lib/kramdown/utils.rb#31 + def snake_case(name); end + end +end + +# Methods for registering configurable extensions. +# +# source://kramdown//lib/kramdown/utils/configurable.rb#14 +module Kramdown::Utils::Configurable + # Create a new configurable extension called +name+. + # + # Three methods will be defined on the calling object which allow to use this configurable + # extension: + # + # configurables:: Returns a hash of hashes that is used to store all configurables of the + # object. + # + # (ext_name):: Return the configured extension +ext_name+. + # + # add_(ext_name, data=nil, &block):: Define an extension +ext_name+ by specifying either + # the data as argument or by using a block. + # + # source://kramdown//lib/kramdown/utils/configurable.rb#28 + def configurable(name); end +end + +# Provides convenience methods for handling named and numeric entities. +# +# source://kramdown//lib/kramdown/utils/entities.rb#15 +module Kramdown::Utils::Entities + private + + # Return the entity for the given code point or name +point_or_name+. + # + # source://kramdown//lib/kramdown/utils/entities.rb#334 + def entity(point_or_name); end + + class << self + # Return the entity for the given code point or name +point_or_name+. + # + # source://kramdown//lib/kramdown/utils/entities.rb#334 + def entity(point_or_name); end + end +end + +# Contains the mapping of code point (or name) to the actual Entity object. +# +# source://kramdown//lib/kramdown/utils/entities.rb#317 +Kramdown::Utils::Entities::ENTITY_MAP = T.let(T.unsafe(nil), Hash) + +# Array of arrays. Each sub-array specifies a code point and the associated name. +# +# This table is not used directly -- Entity objects are automatically created from it and put +# into a Hash map when this file is loaded. +# +# source://kramdown//lib/kramdown/utils/entities.rb#29 +Kramdown::Utils::Entities::ENTITY_TABLE = T.let(T.unsafe(nil), Array) + +# Represents an entity that has a +code_point+ and +name+. +# +# source://kramdown//lib/kramdown/utils/entities.rb#18 +class Kramdown::Utils::Entities::Entity < ::Struct + # Return the UTF8 representation of the entity. + # + # source://kramdown//lib/kramdown/utils/entities.rb#20 + def char; end + + # Returns the value of attribute code_point + # + # @return [Object] the current value of code_point + def code_point; end + + # Sets the attribute code_point + # + # @param value [Object] the value to set the attribute code_point to. + # @return [Object] the newly set value + def code_point=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Provides convenience methods for HTML related tasks. +# +# *Note* that this module has to be mixed into a class that has a @root (containing an element +# of type :root) and an @options (containing an options hash) instance variable so that some of +# the methods can work correctly. +# +# source://kramdown//lib/kramdown/utils/html.rb#21 +module Kramdown::Utils::Html + # Convert the entity +e+ to a string. The optional parameter +original+ may contain the + # original representation of the entity. + # + # This method uses the option +entity_output+ to determine the output form for the entity. + # + # source://kramdown//lib/kramdown/utils/html.rb#27 + def entity_to_str(e, original = T.unsafe(nil)); end + + # Escape the special HTML characters in the string +str+. The parameter +type+ specifies what + # is escaped: :all - all special HTML characters except the quotation mark as well as + # entities, :text - all special HTML characters except the quotation mark but no entities and + # :attribute - all special HTML characters including the quotation mark but no entities. + # + # source://kramdown//lib/kramdown/utils/html.rb#69 + def escape_html(str, type = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/utils/html.rb#74 + def fix_cjk_line_break(str); end + + # Return the HTML representation of the attributes +attr+. + # + # source://kramdown//lib/kramdown/utils/html.rb#44 + def html_attributes(attr); end +end + +# source://kramdown//lib/kramdown/utils/html.rb#59 +Kramdown::Utils::Html::ESCAPE_ALL_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/utils/html.rb#61 +Kramdown::Utils::Html::ESCAPE_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://kramdown//lib/kramdown/utils/html.rb#53 +Kramdown::Utils::Html::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/utils/html.rb#62 +Kramdown::Utils::Html::ESCAPE_RE_FROM_TYPE = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/utils/html.rb#60 +Kramdown::Utils::Html::ESCAPE_TEXT_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/utils/html.rb#73 +Kramdown::Utils::Html::REDUNDANT_LINE_BREAK_REGEX = T.let(T.unsafe(nil), Regexp) + +# A simple least recently used (LRU) cache. +# +# The cache relies on the fact that Ruby's Hash class maintains insertion order. So deleting +# and re-inserting a key-value pair on access moves the key to the last position. When an +# entry is added and the cache is full, the first entry is removed. +# +# source://kramdown//lib/kramdown/utils/lru_cache.rb#18 +class Kramdown::Utils::LRUCache + # Creates a new LRUCache that can hold +size+ entries. + # + # @return [LRUCache] a new instance of LRUCache + # + # source://kramdown//lib/kramdown/utils/lru_cache.rb#21 + def initialize(size); end + + # Returns the stored value for +key+ or +nil+ if no value was stored under the key. + # + # source://kramdown//lib/kramdown/utils/lru_cache.rb#27 + def [](key); end + + # Stores the +value+ under the +key+. + # + # source://kramdown//lib/kramdown/utils/lru_cache.rb#32 + def []=(key, value); end +end + +# This patched StringScanner adds line number information for current scan position and a +# start_line_number override for nested StringScanners. +# +# source://kramdown//lib/kramdown/utils/string_scanner.rb#17 +class Kramdown::Utils::StringScanner < ::StringScanner + # Takes the start line number as optional second argument. + # + # Note: The original second argument is no longer used so this should be safe. + # + # @return [StringScanner] a new instance of StringScanner + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#26 + def initialize(string, start_line_number = T.unsafe(nil)); end + + # Returns the line number for current charpos. + # + # NOTE: Requires that all line endings are normalized to '\n' + # + # NOTE: Normally we'd have to add one to the count of newlines to get the correct line number. + # However we add the one indirectly by using a one-based start_line_number. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#67 + def current_line_number; end + + # Sets the byte position of the scan pointer. + # + # Note: This also resets some internal variables, so always use pos= when setting the position + # and don't use any other method for that! + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#37 + def pos=(pos); end + + # Revert the position to one saved by #save_pos. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#56 + def revert_pos(data); end + + # Return information needed to revert the byte position of the string scanner in a performant + # way. + # + # The returned data can be fed to #revert_pos to revert the position to the saved one. + # + # Note: Just saving #pos won't be enough. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#51 + def save_pos; end + + # The start line number. Used for nested StringScanners that scan a sub-string of the source + # document. The kramdown parser uses this, e.g., for span level parsers. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#21 + def start_line_number; end +end + +# The kramdown version. +# +# source://kramdown//lib/kramdown/version.rb#13 +Kramdown::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/kwalify@0.7.2.rbi b/sorbet/rbi/gems/kwalify@0.7.2.rbi new file mode 100644 index 0000000000..9387f17724 --- /dev/null +++ b/sorbet/rbi/gems/kwalify@0.7.2.rbi @@ -0,0 +1,1401 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kwalify` gem. +# Please instead update this file by running `bin/tapioca gem kwalify`. + +# source://kwalify//lib/kwalify/types.rb#58 +class Date + include ::Comparable + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify/types.rb#17 +class FalseClass + include ::Kwalify::Boolean + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify.rb#8 +module Kwalify + extend ::Kwalify::Types + extend ::Kwalify::ErrorHelper + + class << self + # obsolete + # + # source://kwalify//lib/kwalify/meta-validator.rb#271 + def meta_validator; end + + # source://kwalify//lib/kwalify/messages.rb#11 + def msg(key); end + + # source://kwalify//lib/kwalify/messages.rb#163 + def word(key); end + end +end + +# source://kwalify//lib/kwalify/errors.rb#15 +class Kwalify::AssertionError < ::Kwalify::KwalifyError + # @return [AssertionError] a new instance of AssertionError + # + # source://kwalify//lib/kwalify/errors.rb#16 + def initialize(msg); end +end + +# source://kwalify//lib/kwalify/errors.rb#22 +class Kwalify::BaseError < ::Kwalify::KwalifyError + # @return [BaseError] a new instance of BaseError + # + # source://kwalify//lib/kwalify/errors.rb#23 + def initialize(message = T.unsafe(nil), path = T.unsafe(nil), value = T.unsafe(nil), rule = T.unsafe(nil), error_symbol = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/errors.rb#49 + def <=>(ex); end + + def _to_s; end + + # Returns the value of attribute column. + # + # source://kwalify//lib/kwalify/errors.rb#31 + def column; end + + # Sets the attribute column + # + # @param value the value to set the attribute column to. + # + # source://kwalify//lib/kwalify/errors.rb#31 + def column=(_arg0); end + + # Returns the value of attribute error_symbol. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def error_symbol; end + + # Sets the attribute error_symbol + # + # @param value the value to set the attribute error_symbol to. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def error_symbol=(_arg0); end + + # Returns the value of attribute filename. + # + # source://kwalify//lib/kwalify/errors.rb#31 + def filename; end + + # Sets the attribute filename + # + # @param value the value to set the attribute filename to. + # + # source://kwalify//lib/kwalify/errors.rb#31 + def filename=(_arg0); end + + # Returns the value of attribute linenum. + # + # source://kwalify//lib/kwalify/errors.rb#31 + def linenum; end + + # Sets the attribute linenum + # + # @param value the value to set the attribute linenum to. + # + # source://kwalify//lib/kwalify/errors.rb#31 + def linenum=(_arg0); end + + def message; end + + # Returns the value of attribute path. + # + # source://kwalify//lib/kwalify/errors.rb#33 + def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def path=(_arg0); end + + # Returns the value of attribute rule. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def rule; end + + # Sets the attribute rule + # + # @param value the value to set the attribute rule to. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def rule=(_arg0); end + + # source://kwalify//lib/kwalify/errors.rb#40 + def to_s; end + + # Returns the value of attribute value. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://kwalify//lib/kwalify/errors.rb#30 + def value=(_arg0); end +end + +# base class for Yaml::Parser +# +# source://kwalify//lib/kwalify/parser/base.rb#15 +class Kwalify::BaseParser + # source://kwalify//lib/kwalify/parser/base.rb#67 + def _getch; end + + # source://kwalify//lib/kwalify/parser/base.rb#36 + def _set_column_and_linenum(s); end + + # Returns the value of attribute column. + # + # source://kwalify//lib/kwalify/parser/base.rb#25 + def column; end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/parser/base.rb#57 + def eos?; end + + # Returns the value of attribute filename. + # + # source://kwalify//lib/kwalify/parser/base.rb#25 + def filename; end + + # source://kwalify//lib/kwalify/parser/base.rb#52 + def group(n); end + + # Returns the value of attribute linenum. + # + # source://kwalify//lib/kwalify/parser/base.rb#25 + def linenum; end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/parser/base.rb#47 + def match?(regexp); end + + # source://kwalify//lib/kwalify/parser/base.rb#62 + def peep(n = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/parser/base.rb#18 + def reset(input, filename = T.unsafe(nil), untabify = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/parser/base.rb#28 + def scan(regexp); end + + # source://kwalify//lib/kwalify/parser/base.rb#81 + def scan_string; end + + protected + + # source://kwalify//lib/kwalify/parser/base.rb#120 + def _syntax_error(message, path = T.unsafe(nil), linenum = T.unsafe(nil), column = T.unsafe(nil)); end +end + +# source://kwalify//lib/kwalify/parser/base.rb#79 +Kwalify::BaseParser::CHAR_TABLE = T.let(T.unsafe(nil), Hash) + +# source://kwalify//lib/kwalify/types.rb#11 +module Kwalify::Boolean; end + +# source://kwalify//lib/kwalify/errors.rb#93 +module Kwalify::ErrorHelper + # module_function + # + # @raise [AssertionError] + # + # source://kwalify//lib/kwalify/errors.rb#97 + def assert_error(message = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/errors.rb#108 + def schema_error(error_symbol, rule, path, val, args = T.unsafe(nil)); end + + private + + # source://kwalify//lib/kwalify/errors.rb#114 + def _build_message(message_key, val, args); end + + # source://kwalify//lib/kwalify/errors.rb#101 + def validate_error(error_symbol, rule, path, val, args = T.unsafe(nil)); end + + class << self + # source://kwalify//lib/kwalify/errors.rb#114 + def _build_message(message_key, val, args); end + + # source://kwalify//lib/kwalify/errors.rb#101 + def validate_error(error_symbol, rule, path, val, args = T.unsafe(nil)); end + end +end + +# source://kwalify//lib/kwalify.rb#64 +module Kwalify::Json; end + +# source://kwalify//lib/kwalify/errors.rb#11 +class Kwalify::KwalifyError < ::StandardError; end + +# source://kwalify//lib/kwalify/meta-validator.rb#269 +Kwalify::META_VALIDATOR = T.let(T.unsafe(nil), Kwalify::MetaValidator) + +# ex. +# meta_validator = Kwalify::MetaValidator.instance() +# schema = File.load_file('schema.yaml') +# errors = meta_validator.validate(schema) +# if !errors.empty? +# errors.each do |error| +# puts "[#{error.path}] #{error.message}" +# end +# end +# +# source://kwalify//lib/kwalify/meta-validator.rb#27 +class Kwalify::MetaValidator < ::Kwalify::Validator + # @return [MetaValidator] a new instance of MetaValidator + # + # source://kwalify//lib/kwalify/meta-validator.rb#40 + def initialize(schema, &block); end + + # source://kwalify//lib/kwalify/meta-validator.rb#44 + def validate_hook(value, rule, path, errors); end + + class << self + # source://kwalify//lib/kwalify/meta-validator.rb#32 + def instance; end + end +end + +# source://kwalify//lib/kwalify/meta-validator.rb#30 +Kwalify::MetaValidator::META_SCHEMA = T.let(T.unsafe(nil), String) + +# alias of YamlParser class +# +# source://kwalify//lib/kwalify/yaml-parser.rb#862 +class Kwalify::Parser < ::Kwalify::YamlParser + # @return [Parser] a new instance of Parser + # + # source://kwalify//lib/kwalify/yaml-parser.rb#863 + def initialize(yaml_str); end +end + +# base class of yaml parser +# +# ex. +# str = ARGF.read() +# parser = Kwalify::PlainYamlParser.new(str) +# doc = parser.parse() +# p doc +# +# source://kwalify//lib/kwalify/yaml-parser.rb#25 +class Kwalify::PlainYamlParser + # @return [PlainYamlParser] a new instance of PlainYamlParser + # + # source://kwalify//lib/kwalify/yaml-parser.rb#36 + def initialize(yaml_str); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/yaml-parser.rb#55 + def has_next?; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#45 + def parse; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#60 + def parse_all; end + + protected + + # source://kwalify//lib/kwalify/yaml-parser.rb#89 + def add_to_map(map, key, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#77 + def add_to_seq(seq, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#85 + def create_mapping(linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#107 + def create_scalar(value, linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#73 + def create_sequence(linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#112 + def current_line; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#116 + def current_linenum; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#101 + def merge_map(map, map2, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#97 + def set_default(map, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#93 + def set_map_with(map, key, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#81 + def set_seq_at(seq, i, value, linenum); end + + private + + # source://kwalify//lib/kwalify/yaml-parser.rb#149 + def _getchar; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#130 + def _getline; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#720 + def assert(bool_expr); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#173 + def current_char; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#161 + def getchar; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#167 + def getchar_or_nl; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#177 + def getlabel; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#124 + def getline; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#478 + def parse_alias(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#451 + def parse_anchor(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#546 + def parse_block_text(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#199 + def parse_child(column); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#267 + def parse_flow(depth); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#346 + def parse_flow_map(depth); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#376 + def parse_flow_map_item(depth); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#389 + def parse_flow_scalar(depth); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#314 + def parse_flow_seq(depth); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#342 + def parse_flow_seq_item(depth); end + + # flowstyle ::= flow_seq | flow_map | flow_scalar | alias + # + # flow_seq ::= '[' [ flow_seq_item { ',' sp flow_seq_item } ] ']' + # flow_seq_item ::= flowstyle + # + # flow_map ::= '{' [ flow_map_item { ',' sp flow_map_item } ] '}' + # flow_map_item ::= flowstyle ':' sp flowstyle + # + # flow_scalar ::= string | number | boolean | symbol | date + # + # source://kwalify//lib/kwalify/yaml-parser.rb#252 + def parse_flowstyle(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#625 + def parse_mapping(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#672 + def parse_scalar(indent, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#588 + def parse_sequence(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#435 + def parse_tag(column, value); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#210 + def parse_value(column, value, value_start_column); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#496 + def register_alias(label); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#470 + def register_anchor(label, data); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#143 + def reset_sbuf(str); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#503 + def resolve_aliases(data); end + + # -- + # def syntax_error(error_symbol, linenum=@linenum) + # msg = Kwalify.msg(error_symbol) % [linenum] + # return Kwalify::YamlSyntaxError.new(msg, linenum,error_symbol) + # end + # ++ + # + # source://kwalify//lib/kwalify/yaml-parser.rb#193 + def syntax_error(error_symbol, arg = T.unsafe(nil), linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#679 + def to_scalar(str); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/yaml-parser.rb#235 + def white?(ch); end +end + +# source://kwalify//lib/kwalify/yaml-parser.rb#27 +class Kwalify::PlainYamlParser::Alias + # @return [Alias] a new instance of Alias + # + # source://kwalify//lib/kwalify/yaml-parser.rb#28 + def initialize(label, linenum); end + + # Returns the value of attribute label. + # + # source://kwalify//lib/kwalify/yaml-parser.rb#32 + def label; end + + # Returns the value of attribute linenum. + # + # source://kwalify//lib/kwalify/yaml-parser.rb#32 + def linenum; end +end + +# source://kwalify//lib/kwalify.rb#10 +Kwalify::RELEASE = T.let(T.unsafe(nil), String) + +# source://kwalify//lib/kwalify/rule.rb#15 +class Kwalify::Rule + include ::Kwalify::ErrorHelper + + # @return [Rule] a new instance of Rule + # + # source://kwalify//lib/kwalify/rule.rb#40 + def initialize(hash = T.unsafe(nil), parent = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/rule.rb#46 + def _init(hash, path = T.unsafe(nil), rule_table = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/rule.rb#539 + def _uniqueness_check_table; end + + # Returns the value of attribute assert. + # + # source://kwalify//lib/kwalify/rule.rb#29 + def assert; end + + # Returns the value of attribute assert_proc. + # + # source://kwalify//lib/kwalify/rule.rb#30 + def assert_proc; end + + # Returns the value of attribute classname. + # + # source://kwalify//lib/kwalify/rule.rb#36 + def classname; end + + # Returns the value of attribute classobj. + # + # source://kwalify//lib/kwalify/rule.rb#37 + def classobj; end + + # Returns the value of attribute default. + # + # source://kwalify//lib/kwalify/rule.rb#35 + def default; end + + # Returns the value of attribute desc. + # + # source://kwalify//lib/kwalify/rule.rb#20 + def desc; end + + # Returns the value of attribute enum. + # + # source://kwalify//lib/kwalify/rule.rb#21 + def enum; end + + # Returns the value of attribute ident. + # + # source://kwalify//lib/kwalify/rule.rb#33 + def ident; end + + # Returns the value of attribute length. + # + # source://kwalify//lib/kwalify/rule.rb#32 + def length; end + + # Returns the value of attribute mapping. + # + # source://kwalify//lib/kwalify/rule.rb#28 + def mapping; end + + # Returns the value of attribute name. + # + # source://kwalify//lib/kwalify/rule.rb#19 + def name; end + + # Returns the value of attribute parent. + # + # source://kwalify//lib/kwalify/rule.rb#18 + def parent; end + + # Sets the attribute parent + # + # @param value the value to set the attribute parent to. + # + # source://kwalify//lib/kwalify/rule.rb#18 + def parent=(_arg0); end + + # Returns the value of attribute pattern. + # + # source://kwalify//lib/kwalify/rule.rb#25 + def pattern; end + + # Returns the value of attribute range. + # + # source://kwalify//lib/kwalify/rule.rb#31 + def range; end + + # Returns the value of attribute regexp. + # + # source://kwalify//lib/kwalify/rule.rb#26 + def regexp; end + + # Returns the value of attribute required. + # + # source://kwalify//lib/kwalify/rule.rb#22 + def required; end + + # Returns the value of attribute sequence. + # + # source://kwalify//lib/kwalify/rule.rb#27 + def sequence; end + + # Returns the value of attribute type. + # + # source://kwalify//lib/kwalify/rule.rb#23 + def type; end + + # Returns the value of attribute type_class. + # + # source://kwalify//lib/kwalify/rule.rb#24 + def type_class; end + + # Returns the value of attribute unique. + # + # source://kwalify//lib/kwalify/rule.rb#34 + def unique; end + + protected + + # source://kwalify//lib/kwalify/rule.rb#473 + def _inspect(str = T.unsafe(nil), level = T.unsafe(nil), done = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/rule.rb#86 + def get_init_method(sym); end + + private + + # source://kwalify//lib/kwalify/rule.rb#427 + def _check_confliction(hash, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#197 + def _init_assert_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#116 + def _init_class_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#358 + def _init_default_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#135 + def _init_desc_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#172 + def _init_enum_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#319 + def _init_ident_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#268 + def _init_length_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#396 + def _init_mapping_value(val, rule, path, rule_table); end + + # source://kwalify//lib/kwalify/rule.rb#130 + def _init_name_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#149 + def _init_pattern_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#216 + def _init_range_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#140 + def _init_required_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#375 + def _init_sequence_value(val, rule, path, rule_table); end + + # source://kwalify//lib/kwalify/rule.rb#95 + def _init_type_value(val, rule, path); end + + # source://kwalify//lib/kwalify/rule.rb#341 + def _init_unique_value(val, rule, path); end +end + +# source://kwalify//lib/kwalify/types.rb#49 +module Kwalify::Scalar; end + +# source://kwalify//lib/kwalify/errors.rb#60 +class Kwalify::SchemaError < ::Kwalify::BaseError + # @return [SchemaError] a new instance of SchemaError + # + # source://kwalify//lib/kwalify/errors.rb#61 + def initialize(message = T.unsafe(nil), path = T.unsafe(nil), rule = T.unsafe(nil), value = T.unsafe(nil), error_symbol = T.unsafe(nil)); end +end + +# syntax error for YAML and JSON +# +# source://kwalify//lib/kwalify/errors.rb#75 +class Kwalify::SyntaxError < ::Kwalify::BaseError + # KwalifyError + # + # @return [SyntaxError] a new instance of SyntaxError + # + # source://kwalify//lib/kwalify/errors.rb#76 + def initialize(msg, linenum = T.unsafe(nil), error_symbol = T.unsafe(nil)); end + + # attr_accessor :linenum, :error_symbol + # + # source://kwalify//lib/kwalify/errors.rb#82 + def message; end +end + +# source://kwalify//lib/kwalify/types.rb#30 +module Kwalify::Text + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify/types.rb#83 +module Kwalify::Types + private + + # -- + # def collection_class?(klass) + # return klass.is_a?(Array) || klass.is_a?(Hash) + # end + # + # def scalar_class?(klass) + # return !klass.is_a?(Array) && !klass.is_a?(Hash) && klass != Object + # end + # + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#134 + def collection?(val); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#143 + def collection_type?(type); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#138 + def scalar?(val); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#147 + def scalar_type?(type); end + + class << self + # -- + # def collection_class?(klass) + # return klass.is_a?(Array) || klass.is_a?(Hash) + # end + # + # def scalar_class?(klass) + # return !klass.is_a?(Array) && !klass.is_a?(Hash) && klass != Object + # end + # + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#134 + def collection?(val); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#143 + def collection_type?(type); end + + # source://kwalify//lib/kwalify/types.rb#119 + def get_type_class(type); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#138 + def scalar?(val); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/types.rb#147 + def scalar_type?(type); end + + # source://kwalify//lib/kwalify/types.rb#113 + def type_class(type); end + + # source://kwalify//lib/kwalify/types.rb#109 + def type_table; end + end +end + +# use "str" as default of @type +# +# source://kwalify//lib/kwalify/types.rb#86 +Kwalify::Types::DEFAULT_TYPE = T.let(T.unsafe(nil), String) + +# source://kwalify//lib/kwalify/util.rb#9 +module Kwalify::Util + private + + # source://kwalify//lib/kwalify/util.rb#77 + def _traverse_rule(rule, _done = T.unsafe(nil), &block); end + + # source://kwalify//lib/kwalify/util.rb#50 + def _traverse_schema(hash, _done = T.unsafe(nil), &block); end + + # create a hash table from list of hash with primary key. + # + # ex. + # hashlist = [ + # { "name"=>"Foo", "gender"=>"M", "age"=>20, }, + # { "name"=>"Bar", "gender"=>"F", "age"=>25, }, + # { "name"=>"Baz", "gender"=>"M", "age"=>30, }, + # ] + # hashtable = YamlHelper.create_hashtable(hashlist, "name") + # p hashtable + # # => { "Foo" => { "name"=>"Foo", "gender"=>"M", "age"=>20, }, + # # "Bar" => { "name"=>"Bar", "gender"=>"F", "age"=>25, }, + # # "Baz" => { "name"=>"Baz", "gender"=>"M", "age"=>30, }, } + # + # source://kwalify//lib/kwalify/util.rb#118 + def create_hashtable(hashlist, primarykey, flag_duplicate_check = T.unsafe(nil)); end + + # get class object. if not found, NameError raised. + # + # source://kwalify//lib/kwalify/util.rb#94 + def get_class(classname); end + + # get nested value directly. + # + # ex. + # val = YamlHelper.get_value(obj, ['aaa', 0, 'xxx']) + # + # This is equal to the following: + # begin + # val = obj['aaa'][0]['xxx'] + # rescue NameError + # val = nil + # end + # + # source://kwalify//lib/kwalify/util.rb#147 + def get_value(obj, path); end + + # traverse rule + # + # ex. + # schema = YAML.load_file('myschema.yaml') + # validator = Kwalify::Validator.new(schema) + # Kwalify::Util.traverse_rule(validator) do |rule| + # p rule if rule.classname + # end + # + # source://kwalify//lib/kwalify/util.rb#71 + def traverse_rule(validator, &block); end + + # traverse schema + # + # ex. + # schema = YAML.load_file('myschema.yaml') + # Kwalify::Util.traverse_schema(schema) do |rulehash| + # ## add module prefix to class name + # if rulehash['class'] + # rulehash['class'] = 'MyModule::' + rulehash['class'] + # end + # end + # + # source://kwalify//lib/kwalify/util.rb#44 + def traverse_schema(schema, &block); end + + # expand tab character to spaces + # + # ex. + # untabified_str = YamlHelper.untabify(tabbed_str) + # + # source://kwalify//lib/kwalify/util.rb#19 + def untabify(str, width = T.unsafe(nil)); end + + class << self + # @yield [rule] + # + # source://kwalify//lib/kwalify/util.rb#77 + def _traverse_rule(rule, _done = T.unsafe(nil), &block); end + + # @yield [hash] + # + # source://kwalify//lib/kwalify/util.rb#50 + def _traverse_schema(hash, _done = T.unsafe(nil), &block); end + + # create a hash table from list of hash with primary key. + # + # ex. + # hashlist = [ + # { "name"=>"Foo", "gender"=>"M", "age"=>20, }, + # { "name"=>"Bar", "gender"=>"F", "age"=>25, }, + # { "name"=>"Baz", "gender"=>"M", "age"=>30, }, + # ] + # hashtable = YamlHelper.create_hashtable(hashlist, "name") + # p hashtable + # # => { "Foo" => { "name"=>"Foo", "gender"=>"M", "age"=>20, }, + # # "Bar" => { "name"=>"Bar", "gender"=>"F", "age"=>25, }, + # # "Baz" => { "name"=>"Baz", "gender"=>"M", "age"=>30, }, } + # + # source://kwalify//lib/kwalify/util.rb#118 + def create_hashtable(hashlist, primarykey, flag_duplicate_check = T.unsafe(nil)); end + + # get class object. if not found, NameError raised. + # + # source://kwalify//lib/kwalify/util.rb#94 + def get_class(classname); end + + # get nested value directly. + # + # ex. + # val = YamlHelper.get_value(obj, ['aaa', 0, 'xxx']) + # + # This is equal to the following: + # begin + # val = obj['aaa'][0]['xxx'] + # rescue NameError + # val = nil + # end + # + # source://kwalify//lib/kwalify/util.rb#147 + def get_value(obj, path); end + + # traverse rule + # + # ex. + # schema = YAML.load_file('myschema.yaml') + # validator = Kwalify::Validator.new(schema) + # Kwalify::Util.traverse_rule(validator) do |rule| + # p rule if rule.classname + # end + # + # source://kwalify//lib/kwalify/util.rb#71 + def traverse_rule(validator, &block); end + + # traverse schema + # + # ex. + # schema = YAML.load_file('myschema.yaml') + # Kwalify::Util.traverse_schema(schema) do |rulehash| + # ## add module prefix to class name + # if rulehash['class'] + # rulehash['class'] = 'MyModule::' + rulehash['class'] + # end + # end + # + # source://kwalify//lib/kwalify/util.rb#44 + def traverse_schema(schema, &block); end + + # expand tab character to spaces + # + # ex. + # untabified_str = YamlHelper.untabify(tabbed_str) + # + # source://kwalify//lib/kwalify/util.rb#19 + def untabify(str, width = T.unsafe(nil)); end + end +end + +# add hash-like methods +# +# source://kwalify//lib/kwalify/util/hashlike.rb#14 +module Kwalify::Util::HashLike + # source://kwalify//lib/kwalify/util/hashlike.rb#16 + def [](key); end + + # source://kwalify//lib/kwalify/util/hashlike.rb#20 + def []=(key, val); end + + # not necessary + # + # source://kwalify//lib/kwalify/util/hashlike.rb#39 + def each; end + + # -- + # def keys() + # instance_variables().collect { |name| name[1, name.length-1] } + # end + # ++ + # + # @return [Boolean] + # + # source://kwalify//lib/kwalify/util/hashlike.rb#30 + def key?(key); end +end + +# source://kwalify//lib/kwalify/errors.rb#67 +class Kwalify::ValidationError < ::Kwalify::BaseError + # @return [ValidationError] a new instance of ValidationError + # + # source://kwalify//lib/kwalify/errors.rb#68 + def initialize(message = T.unsafe(nil), path = T.unsafe(nil), rule = T.unsafe(nil), value = T.unsafe(nil), error_symbol = T.unsafe(nil)); end +end + +# validate YAML document +# +# ex1. validate yaml document +# schema = YAML.load_file('schema.yaml') +# validator = Kwalify::Validator.new(schema) +# document = YAML.load_file('document.yaml') +# erros = validator.validate(document) +# if errors && !errors.empty? +# errors.each do |err| +# puts "- [#{err.path}] #{err.message}" +# end +# end +# +# ex2. validate with parsing +# schema = YAML.load_file('schema.yaml') +# validator = Kwalify::Validator.new(schema) +# parser = Kwalify::Yaml::Parser.new(validator) +# document = parser.parse(File.read('document.yaml')) +# errors = parser.errors +# if errors && errors.empty? +# errors.each do |e| +# puts "#{e.linenum}:#{e.column} [#{e.path}] #{e.message}" +# end +# end +# +# source://kwalify//lib/kwalify/validator.rb#40 +class Kwalify::Validator + include ::Kwalify::ErrorHelper + + # @return [Validator] a new instance of Validator + # + # source://kwalify//lib/kwalify/validator.rb#44 + def initialize(hash_or_rule, &block); end + + # source://kwalify//lib/kwalify/validator.rb#52 + def _inspect; end + + # source://kwalify//lib/kwalify/validator.rb#75 + def _validate(value, rule, path, errors, done, uniq_table, recursive = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/validator.rb#161 + def _validate_mapping_required_keys(hash, map_rule, path, errors); end + + # source://kwalify//lib/kwalify/validator.rb#188 + def _validate_unique(value, rule, path, errors, uniq_table); end + + # Returns the value of attribute rule. + # + # source://kwalify//lib/kwalify/validator.rb#49 + def rule; end + + # source://kwalify//lib/kwalify/validator.rb#57 + def validate(value); end + + protected + + # source://kwalify//lib/kwalify/validator.rb#67 + def validate_hook(value, rule, path, errors); end + + private + + # source://kwalify//lib/kwalify/validator.rb#202 + def _validate_assert(value, rule, path, errors); end + + # source://kwalify//lib/kwalify/validator.rb#211 + def _validate_enum(value, rule, path, errors); end + + # source://kwalify//lib/kwalify/validator.rb#255 + def _validate_length(value, rule, path, errors); end + + # source://kwalify//lib/kwalify/validator.rb#140 + def _validate_mapping(hash, map_rule, path, errors, done, uniq_table, recursive = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/validator.rb#222 + def _validate_pattern(value, rule, path, errors); end + + # source://kwalify//lib/kwalify/validator.rb#231 + def _validate_range(value, rule, path, errors); end + + # source://kwalify//lib/kwalify/validator.rb#175 + def _validate_scalar(value, rule, path, errors, done, uniq_table); end + + # source://kwalify//lib/kwalify/validator.rb#127 + def _validate_sequence(list, seq_rule, path, errors, done, uniq_table, recursive = T.unsafe(nil)); end +end + +# source://kwalify//lib/kwalify/parser/yaml.rb#16 +module Kwalify::Yaml + class << self + # read yaml_str, parse it, and return yaml document. + # + # opts: + # ::validator: Kwalify::Validator object + # ::preceding_aliass: allow preceding alias if true + # ::data_binding: enable data binding if true + # ::untabify: expand tab chars if true + # ::filename: filename + # + # source://kwalify//lib/kwalify.rb#45 + def load(yaml_str, opts = T.unsafe(nil)); end + + # read file, parse it, and return yaml document. + # see Kwalify::Yaml::Parser.load() + # + # source://kwalify//lib/kwalify.rb#57 + def load_file(filename, opts = T.unsafe(nil)); end + end +end + +# YAML parser with validator +# +# ex. +# schema = YAML.load_file('schema.yaml') +# require 'kwalify' +# validator = Kwalify::Validator.new(schema) +# parser = Kwalify::Yaml::Parser.new(validator) # validator is optional +# #parser.preceding_alias = true # optional +# #parser.data_binding = true # optional +# ydoc = parser.parse_file('data.yaml') +# errors = parser.errors +# if errors && !errors.empty? +# errors.each do |e| +# puts "line=#{e.linenum}, path=#{e.path}, mesg=#{e.message}" +# end +# end +# +# source://kwalify//lib/kwalify/parser/yaml.rb#40 +class Kwalify::Yaml::Parser < ::Kwalify::BaseParser + # @return [Parser] a new instance of Parser + # + # source://kwalify//lib/kwalify/parser/yaml.rb#46 + def initialize(validator = T.unsafe(nil), properties = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#335 + def _parse_map_value(map, map_rule, path, level, key, is_merged, uniq_table, _linenum, _column, _linenum2, _column2); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#90 + def _set_error_info(linenum = T.unsafe(nil), column = T.unsafe(nil), &block); end + + # *V + # + # source://kwalify//lib/kwalify/parser/yaml.rb#408 + def _validate_map_value(map, map_rule, rule, path, uniq_table, key, val, _linenum, _column); end + + # boolean + # + # source://kwalify//lib/kwalify/parser/yaml.rb#54 + def data_binding; end + + # boolean + # + # source://kwalify//lib/kwalify/parser/yaml.rb#54 + def data_binding=(_arg0); end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/parser/yaml.rb#112 + def document_start?; end + + # Returns the value of attribute errors. + # + # source://kwalify//lib/kwalify/parser/yaml.rb#68 + def errors; end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/parser/yaml.rb#122 + def has_next?; end + + # source://kwalify//lib/kwalify/parser/yaml.rb#795 + def location(path); end + + # Class + # + # source://kwalify//lib/kwalify/parser/yaml.rb#57 + def mapping_class; end + + # Class + # + # source://kwalify//lib/kwalify/parser/yaml.rb#57 + def mapping_class=(_arg0); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#127 + def parse(input = T.unsafe(nil), opts = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#198 + def parse_alias(rule, path, uniq_table, container); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#187 + def parse_anchor(rule, path, uniq_table, container); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#426 + def parse_block_map(map, map_rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#463 + def parse_block_scalar(rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#307 + def parse_block_seq(seq, seq_rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#484 + def parse_block_text(column, rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#235 + def parse_block_value(level, rule, path, uniq_table, container); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#166 + def parse_documents(input, opts = T.unsafe(nil), &block); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#133 + def parse_file(filename, opts = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#634 + def parse_flow_map(map, map_rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#673 + def parse_flow_scalar(rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#597 + def parse_flow_seq(seq, seq_rule, path, uniq_table); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#555 + def parse_flow_value(rule, path, uniq_table, container); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#139 + def parse_next; end + + # source://kwalify//lib/kwalify/parser/yaml.rb#166 + def parse_stream(input, opts = T.unsafe(nil), &block); end + + # boolean + # + # source://kwalify//lib/kwalify/parser/yaml.rb#55 + def preceding_alias; end + + # boolean + # + # source://kwalify//lib/kwalify/parser/yaml.rb#55 + def preceding_alias=(_arg0); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#60 + def reset_parser; end + + # source://kwalify//lib/kwalify/parser/base.rb#18 + def reset_scanner(input, filename = T.unsafe(nil), untabify = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#215 + def resolve_preceding_aliases(val); end + + # Class + # + # source://kwalify//lib/kwalify/parser/yaml.rb#56 + def sequence_class; end + + # Class + # + # source://kwalify//lib/kwalify/parser/yaml.rb#56 + def sequence_class=(_arg0); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#834 + def set_errors_linenum(errors); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#103 + def skip_spaces_and_comments; end + + # @return [Boolean] + # + # source://kwalify//lib/kwalify/parser/yaml.rb#117 + def stream_end?; end + + # source://kwalify//lib/kwalify/parser/yaml.rb#702 + def to_scalar(str); end + + # Validator + # + # source://kwalify//lib/kwalify/parser/yaml.rb#53 + def validator; end + + # Validator + # + # source://kwalify//lib/kwalify/parser/yaml.rb#53 + def validator=(_arg0); end + + protected + + # source://kwalify//lib/kwalify/parser/yaml.rb#783 + def _getclass(classname); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#762 + def add_to_seq(rule, seq, val, linenum, column); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#743 + def create_mapping(rule, linenum, column); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#757 + def create_scalar(rule, value, linenum, column); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#736 + def create_sequence(rule, linenum, column); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#768 + def put_to_map(rule, map, key, val, linenum, column); end + + private + + # source://kwalify//lib/kwalify/parser/yaml.rb#71 + def _error(klass, message, path, linenum, column); end + + # source://kwalify//lib/kwalify/parser/yaml.rb#453 + def to_mapkey(str); end +end + +# source://kwalify//lib/kwalify/parser/yaml.rb#182 +Kwalify::Yaml::Parser::MAPKEY_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://kwalify//lib/kwalify/parser/yaml.rb#184 +Kwalify::Yaml::Parser::PRECEDING_ALIAS_PLACEHOLDER = T.let(T.unsafe(nil), Object) + +# (OBSOLETE) yaml parser +# +# this class has been obsoleted. use Kwalify::Yaml::Parser instead. +# +# ex. +# # load document with YamlParser +# str = ARGF.read() +# parser = Kwalify::YamlParser.new(str) +# document = parser.parse() +# +# # validate document +# schema = YAML.load(File.read('schema.yaml')) +# validator = Kwalify::Validator.new(schema) +# errors = validator.validate(document) +# +# # print validation result +# if errors && !errors.empty? +# parser.set_errors_linenum(errors) +# errors.sort.each do |error| +# print "line %d: path %s: %s" % [error.linenum, error.path, error.message] +# end +# end +# +# source://kwalify//lib/kwalify/yaml-parser.rb#752 +class Kwalify::YamlParser < ::Kwalify::PlainYamlParser + # @return [YamlParser] a new instance of YamlParser + # + # source://kwalify//lib/kwalify/yaml-parser.rb#754 + def initialize(*args); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#759 + def parse; end + + # source://kwalify//lib/kwalify/yaml-parser.rb#764 + def path_linenum(path); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#794 + def set_error_linenums(errors); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#788 + def set_errors_linenum(errors); end + + protected + + # source://kwalify//lib/kwalify/yaml-parser.rb#823 + def add_to_map(map, key, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#807 + def add_to_seq(seq, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#817 + def create_mapping(linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#852 + def create_scalar(value, linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#801 + def create_sequence(linenum = T.unsafe(nil)); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#838 + def merge_map(map, collection, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#833 + def set_default(map, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#828 + def set_map_with(map, key, value, linenum); end + + # source://kwalify//lib/kwalify/yaml-parser.rb#812 + def set_seq_at(seq, i, value, linenum); end +end + +# (obsolete) use Kwalify::SyntaxError instead +# +# source://kwalify//lib/kwalify/errors.rb#89 +class Kwalify::YamlSyntaxError < ::Kwalify::SyntaxError; end + +# source://kwalify//lib/kwalify/types.rb#70 +class NilClass + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify/types.rb#36 +class Numeric + include ::Comparable + include ::Kwalify::Text + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify/types.rb#33 +class String + include ::Comparable + include ::Kwalify::Text + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify/types.rb#61 +class Time + include ::Comparable + include ::Kwalify::Scalar +end + +# source://kwalify//lib/kwalify/types.rb#14 +class TrueClass + include ::Kwalify::Boolean + include ::Kwalify::Scalar +end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi new file mode 100644 index 0000000000..f6b1d8ed67 --- /dev/null +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -0,0 +1,14237 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + +# source://language_server-protocol//lib/language_server/protocol/version.rb#1 +module LanguageServer; end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#2 +module LanguageServer::Protocol; end + +# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 +module LanguageServer::Protocol::Constant; end + +# The kind of a code action. +# +# Kinds are a hierarchical list of identifiers separated by `.`, +# e.g. `"refactor.extract.function"`. +# +# The set of kinds is open and client needs to announce the kinds it supports +# to the server during initialization. +# A set of predefined code action kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 +module LanguageServer::Protocol::Constant::CodeActionKind; end + +# Empty kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) + +# Base kind for quickfix actions: 'quickfix'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 +LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) + +# Base kind for refactoring actions: 'refactor'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) + +# Base kind for refactoring extraction actions: 'refactor.extract'. +# +# Example extract actions: +# +# - Extract method +# - Extract function +# - Extract variable +# - Extract interface from class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) + +# Base kind for refactoring inline actions: 'refactor.inline'. +# +# Example inline actions: +# +# - Inline function +# - Inline variable +# - Inline constant +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) + +# Base kind for refactoring rewrite actions: 'refactor.rewrite'. +# +# Example rewrite actions: +# +# - Convert JavaScript function to class +# - Add or remove parameter +# - Encapsulate field +# - Make method static +# - Move method to base class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) + +# Base kind for source actions: `source`. +# +# Source code actions apply to the entire file. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) + +# Base kind for a 'fix all' source action: `source.fixAll`. +# +# 'Fix all' actions automatically fix errors that have a clear fix that +# do not require user input. They should not suppress errors or perform +# unsafe fixes such as generating new types or classes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) + +# Base kind for an organize imports source action: +# `source.organizeImports`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) + +# The reason why code actions were requested. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end + +# Code actions were requested automatically. +# +# This typically happens when current selection in a file changes, but can +# also be triggered when file content changes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) + +# Code actions were explicitly requested by the user or by an extension. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# The kind of a completion entry. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionItemKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 +LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 +LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 +LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 +LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 +LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 +LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 +LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 +LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 +LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 +LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 +LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 +LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 +LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 +LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 +LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 +LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 +LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 +LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Completion item tags are extra annotations that tweak the rendering of a +# completion item. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 +module LanguageServer::Protocol::Constant::CompletionItemTag; end + +# Render a completion as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 +LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# How a completion was triggered +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionTriggerKind; end + +# Completion was triggered by typing an identifier (24x7 code +# complete), manual invocation (e.g Ctrl+Space) or via API. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Completion was triggered by a trigger character specified by +# the `triggerCharacters` properties of the +# `CompletionRegistrationOptions`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# Completion was re-triggered as the current completion list is incomplete. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 +module LanguageServer::Protocol::Constant::DiagnosticSeverity; end + +# Reports an error. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 +LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) + +# Reports a hint. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 +LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) + +# Reports an information. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 +LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) + +# Reports a warning. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 +LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) + +# The diagnostic tags. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 +module LanguageServer::Protocol::Constant::DiagnosticTag; end + +# Deprecated or obsolete code. +# +# Clients are allowed to rendered diagnostics with this tag strike through. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 +LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Unused or unnecessary code. +# +# Clients are allowed to render diagnostics with this tag faded out +# instead of having an error squiggle. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 +LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) + +# The document diagnostic report kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end + +# A diagnostic report with a full +# set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) + +# A report indicating that the last +# returned report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) + +# A document highlight kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentHighlightKind; end + +# Read-access of a symbol, like reading a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 +LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) + +# A textual occurrence. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 +LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) + +# Write-access of a symbol, like writing to a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 +LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 +module LanguageServer::Protocol::Constant::ErrorCodes; end + +# The server detected that the content of a document got +# modified outside normal conditions. A server should +# NOT send this error code if it detects a content change +# in it unprocessed messages. The result even computed +# on an older state might still be useful for the client. +# +# If a client decides that a result is not of any use anymore +# the client should cancel the request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 +LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 +LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) + +# This is the end range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. No LSP error codes should +# be defined between the start and end range. For backwards +# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` +# are left in the range. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# This is the end range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 +LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 +LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) + +# The client has canceled a request and a server as detected +# the cancel. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) + +# A request failed but it was syntactically correct, e.g the +# method name was known and the parameters were valid. The error +# message should contain human readable information about why +# the request failed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) + +# The server cancelled the request. This error code should +# only be used for requests that explicitly support being +# server cancellable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) + +# Error code indicating that a server received a notification or +# request before the server has received the `initialize` request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 +LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 +module LanguageServer::Protocol::Constant::FailureHandlingKind; end + +# Applying the workspace change is simply aborted if one of the changes +# provided fails. All operations executed before the failing operation +# stay executed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 +LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) + +# If the workspace edit contains only textual file changes they are +# executed transactional. If resource changes (create, rename or delete +# file) are part of the change the failure handling strategy is abort. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 +LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# All operations are executed transactional. That means they either all +# succeed or no changes at all are applied to the workspace. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 +LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# The client tries to undo the operations already executed. But there is no +# guarantee that this is succeeding. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 +LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) + +# The file event type. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 +module LanguageServer::Protocol::Constant::FileChangeType; end + +# The file got changed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 +LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) + +# The file got created. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 +LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) + +# The file got deleted. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 +LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) + +# A pattern kind describing if a glob pattern matches a file a folder or +# both. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 +module LanguageServer::Protocol::Constant::FileOperationPatternKind; end + +# The pattern matches a file only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) + +# The pattern matches a folder only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) + +# A set of predefined range kinds. +# The type is a string since the value set is extensible +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 +module LanguageServer::Protocol::Constant::FoldingRangeKind; end + +# Folding range for a comment +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 +LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) + +# Folding range for imports or includes +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 +LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) + +# Folding range for a region (e.g. `#region`) +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 +LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) + +# Known error codes for an `InitializeErrorCodes`; +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 +module LanguageServer::Protocol::Constant::InitializeErrorCodes; end + +# If the protocol version provided by the client can't be handled by +# the server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 +LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) + +# Inlay hint kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 +module LanguageServer::Protocol::Constant::InlayHintKind; end + +# An inlay hint that is for a parameter. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 +LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) + +# An inlay hint that for a type annotation. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 +LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) + +# Defines whether the insert text in a completion item should be interpreted as +# plain text or a snippet. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 +module LanguageServer::Protocol::Constant::InsertTextFormat; end + +# The primary text to be inserted is treated as a plain string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 +LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) + +# The primary text to be inserted is treated as a snippet. +# +# A snippet can define tab stops and placeholders with `$1`, `$2` +# and `${3:foo}`. `$0` defines the final tab stop, it defaults to +# the end of the snippet. Placeholders with equal identifiers are linked, +# that is typing in one will update others too. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 +LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) + +# How whitespace and indentation is handled during completion +# item insertion. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 +module LanguageServer::Protocol::Constant::InsertTextMode; end + +# The editor adjusts leading whitespace of new lines so that +# they match the indentation up to the cursor of the line for +# which the item is accepted. +# +# Consider a line like this: <2tabs><3tabs>foo. Accepting a +# multi line completion item is indented using 2 tabs and all +# following lines inserted will be indented using 2 tabs as well. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 +LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) + +# The insertion or replace strings is taken as it is. If the +# value is multi line the lines below the cursor will be +# inserted using the indentation defined in the string value. +# The client will not apply any kind of adjustments to the +# string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 +LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) + +# Describes the content type that a client supports in various +# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. +# +# Please note that `MarkupKinds` must not start with a `$`. This kinds +# are reserved for internal usage. +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 +module LanguageServer::Protocol::Constant::MarkupKind; end + +# Markdown is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 +LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) + +# Plain text is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 +LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 +module LanguageServer::Protocol::Constant::MessageType; end + +# An error message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 +LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) + +# An information message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 +LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) + +# A log message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 +LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) + +# A warning message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 +LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) + +# The moniker kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 +module LanguageServer::Protocol::Constant::MonikerKind; end + +# The moniker represents a symbol that is exported from a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 +LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) + +# The moniker represent a symbol that is imported into a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 +LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) + +# The moniker represents a symbol that is local to a project (e.g. a local +# variable of a function, a class not visible outside the project, ...) +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 +LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) + +# A notebook cell kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 +module LanguageServer::Protocol::Constant::NotebookCellKind; end + +# A code-cell is source code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 +LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) + +# A markup-cell is formatted source that is used for display. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 +LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) + +# A type indicating how positions are encoded, +# specifically what column offsets mean. +# A set of predefined position encoding kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 +module LanguageServer::Protocol::Constant::PositionEncodingKind; end + +# Character offsets count UTF-16 code units. +# +# This is the default and must always be supported +# by servers +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-32 code units. +# +# Implementation note: these are the same as Unicode code points, +# so this `PositionEncodingKind` may also be used for an +# encoding-agnostic representation of character offsets. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-8 code units (e.g bytes). +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 +module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end + +# The client's default behavior is to select the identifier +# according to the language's syntax rule. +# +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 +LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) + +# The kind of resource operations supported by the client. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 +module LanguageServer::Protocol::Constant::ResourceOperationKind; end + +# Supports creating new files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 +LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) + +# Supports deleting existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 +LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) + +# Supports renaming existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 +LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenTypes; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 +LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 +LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 +LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 +LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 +LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 +LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 +LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 +LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) + +# Represents a generic type. Acts as a fallback for types which +# can't be mapped to a specific type like class or enum. +# +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 +LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) + +# How a signature help was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end + +# Signature help was triggered by the cursor moving or by the document +# content changing. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) + +# Signature help was invoked manually by the user or by a command. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Signature help was triggered by a trigger character. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# A symbol kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 +module LanguageServer::Protocol::Constant::SymbolKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 +LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 +LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 +LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 +LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 +LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 +LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 +LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 +LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 +LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 +LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 +LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 +LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 +LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 +LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 +LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 +LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 +LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 +LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 +LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 +LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 +LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 +LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 +LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 +LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 +LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 +LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Symbol tags are extra annotations that tweak the rendering of a symbol. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 +module LanguageServer::Protocol::Constant::SymbolTag; end + +# Render a symbol as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 +LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Represents reasons why a text document is saved. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 +module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end + +# Automatic after a delay. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) + +# When the editor lost focus. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) + +# Manually triggered, e.g. by the user pressing save, by starting +# debugging, or by an API call. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) + +# Defines how the host (editor) should sync document changes to the language +# server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 +module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end + +# Documents are synced by always sending the full content +# of the document. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) + +# Documents are synced by sending the full content on open. +# After that only incremental updates to the document are +# sent. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) + +# Documents should not be synced at all. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 +module LanguageServer::Protocol::Constant::TokenFormat; end + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 +LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) + +# Moniker uniqueness level to define scope of the moniker. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 +module LanguageServer::Protocol::Constant::UniquenessLevel; end + +# The moniker is only unique inside a document +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 +LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) + +# The moniker is globally unique +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 +LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the group to which a project belongs +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 +LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) + +# The moniker is unique inside a project for which a dump got created +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 +LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the moniker scheme. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 +LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 +module LanguageServer::Protocol::Constant::WatchKind; end + +# Interested in change events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 +LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) + +# Interested in create events. +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 +LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) + +# Interested in delete events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 +LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 +module LanguageServer::Protocol::Interface; end + +# A special text edit with an additional change annotation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 +class LanguageServer::Protocol::Interface::AnnotatedTextEdit + # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 + def initialize(range:, new_text:, annotation_id:); end + + # The actual annotation identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams + # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 + def initialize(edit:, label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 + def attributes; end + + # The edits to apply. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 + def edit; end + + # An optional label of the workspace edit. This label is + # presented in the user interface for example on an undo + # stack to undo the workspace edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult + # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 + def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end + + # Indicates whether the edit was applied or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 + def applied; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 + def attributes; end + + # Depending on the client's failure handling strategy `failedChange` + # might contain the index of the change that failed. This property is + # only available if the client signals a `failureHandling` strategy + # in its client capabilities. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 + def failed_change; end + + # An optional textual description for why the edit was not applied. + # This may be used by the server for diagnostic logging or to provide + # a suitable error for a request that triggered the edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 + def failure_reason; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities + # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall + # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 + def initialize(from:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 + def attributes; end + + # The item that makes the call. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 + def from; end + + # The ranges at which the calls appear. This is relative to the caller + # denoted by [`this.from`](#CallHierarchyIncomingCall.from). + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 + def from_ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams + # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyItem + # @return [CallHierarchyItem] a new instance of CallHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 + def attributes; end + + # A data entry field that is preserved between a call hierarchy prepare and + # incoming calls or outgoing calls requests. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#CallHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOptions + # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall + # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 + def initialize(to:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 + def attributes; end + + # The range at which this item is called. This is the range relative to + # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 + def from_ranges; end + + # The item that is called. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 + def to; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams + # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams + # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions + # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 +class LanguageServer::Protocol::Interface::CancelParams + # @return [CancelParams] a new instance of CancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 + def initialize(id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 + def attributes; end + + # The request id to cancel. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 + def to_json(*args); end +end + +# Additional information that describes document changes. +# +# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 +class LanguageServer::Protocol::Interface::ChangeAnnotation + # @return [ChangeAnnotation] a new instance of ChangeAnnotation + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 + def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 + def attributes; end + + # A human-readable string which is rendered less prominent in + # the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 + def description; end + + # A human-readable string describing the actual change. The string + # is rendered prominent in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 + def label; end + + # A flag which indicates that user confirmation is needed + # before applying the change. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 + def needs_confirmation; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ClientCapabilities + # @return [ClientCapabilities] a new instance of ClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 + def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 + def attributes; end + + # Experimental client capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 + def experimental; end + + # General client capabilities. + # + # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 + def general; end + + # Capabilities specific to the notebook document support. + # + # @return [NotebookDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 + def notebook_document; end + + # Text document specific client capabilities. + # + # @return [TextDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 + def to_json(*args); end + + # Window specific client capabilities. + # + # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 + def window; end + + # Workspace specific client capabilities. + # + # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 + def workspace; end +end + +# A code action represents a change that can be performed in code, e.g. to fix +# a problem or to refactor code. +# +# A CodeAction must set either `edit` and/or a `command`. If both are supplied, +# the `edit` is applied first, then the `command` is executed. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 +class LanguageServer::Protocol::Interface::CodeAction + # @return [CodeAction] a new instance of CodeAction + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 + def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 + def attributes; end + + # A command this code action executes. If a code action + # provides an edit and a command, first the edit is + # executed and then the command. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 + def command; end + + # A data entry field that is preserved on a code action between + # a `textDocument/codeAction` and a `codeAction/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 + def data; end + + # The diagnostics that this code action resolves. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 + def diagnostics; end + + # Marks that the code action cannot currently be applied. + # + # Clients should follow the following guidelines regarding disabled code + # actions: + # + # - Disabled code actions are not shown in automatic lightbulbs code + # action menus. + # + # - Disabled actions are shown as faded out in the code action menu when + # the user request a more specific type of code action, such as + # refactorings. + # + # - If the user has a keybinding that auto applies a code action and only + # a disabled code actions are returned, the client should show the user + # an error message with `reason` in the editor. + # + # @return [{ reason: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 + def disabled; end + + # The workspace edit this code action performs. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 + def edit; end + + # Marks this as a preferred action. Preferred actions are used by the + # `auto fix` command and can be targeted by keybindings. + # + # A quick fix should be marked preferred if it properly addresses the + # underlying error. A refactoring should be marked preferred if it is the + # most reasonable choice of actions to take. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 + def is_preferred; end + + # The kind of the code action. + # + # Used to filter code actions. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 + def kind; end + + # A short, human-readable, title for this code action. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeActionClientCapabilities + # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 + def attributes; end + + # The client supports code action literals as a valid + # response of the `textDocument/codeAction` request. + # + # @return [{ codeActionKind: { valueSet: string[]; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 + def code_action_literal_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/codeAction` and a + # `codeAction/resolve` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 + def data_support; end + + # Whether code action supports the `disabled` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 + def disabled_support; end + + # Whether code action supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # `CodeAction#edit` property by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 + def honors_change_annotations; end + + # Whether code action supports the `isPreferred` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 + def is_preferred_support; end + + # Whether the client supports resolving additional code action + # properties via a separate `codeAction/resolve` request. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 + def to_json(*args); end +end + +# Contains additional diagnostic information about the context in which +# a code action is run. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 +class LanguageServer::Protocol::Interface::CodeActionContext + # @return [CodeActionContext] a new instance of CodeActionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 + def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 + def attributes; end + + # An array of diagnostics known on the client side overlapping the range + # provided to the `textDocument/codeAction` request. They are provided so + # that the server knows which errors are currently presented to the user + # for the given range. There is no guarantee that these accurately reflect + # the error state of the resource. The primary parameter + # to compute code actions is the provided range. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 + def diagnostics; end + + # Requested kind of actions to return. + # + # Actions not of this kind are filtered out by the client before being + # shown. So servers can omit computing them. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 + def only; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 + def to_json(*args); end + + # The reason why code actions were requested. + # + # @return [CodeActionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionOptions + # @return [CodeActionOptions] a new instance of CodeActionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 + def code_action_kinds; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 + def work_done_progress; end +end + +# Params for the CodeActionRequest +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 +class LanguageServer::Protocol::Interface::CodeActionParams + # @return [CodeActionParams] a new instance of CodeActionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 + def attributes; end + + # Context carrying additional information. + # + # @return [CodeActionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 + def partial_result_token; end + + # The range for which the command was invoked. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 + def range; end + + # The document in which the command was invoked. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions + # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 + def code_action_kinds; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 + def document_selector; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 + def work_done_progress; end +end + +# Structure to capture a description for an error code. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 +class LanguageServer::Protocol::Interface::CodeDescription + # @return [CodeDescription] a new instance of CodeDescription + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 + def initialize(href:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 + def attributes; end + + # An URI to open with more information about the diagnostic error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 + def href; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 + def to_json(*args); end +end + +# A code lens represents a command that should be shown along with +# source text, like the number of references, a way to run tests, etc. +# +# A code lens is _unresolved_ when no command is associated to it. For +# performance reasons the creation of a code lens and resolving should be done +# in two stages. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 +class LanguageServer::Protocol::Interface::CodeLens + # @return [CodeLens] a new instance of CodeLens + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 + def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 + def attributes; end + + # The command this code lens represents. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 + def command; end + + # A data entry field that is preserved on a code lens item between + # a code lens and a code lens resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 + def data; end + + # The range in which this code lens is valid. Should only span a single + # line. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensClientCapabilities + # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 + def attributes; end + + # Whether code lens supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensOptions + # @return [CodeLensOptions] a new instance of CodeLensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 + def attributes; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 +class LanguageServer::Protocol::Interface::CodeLensParams + # @return [CodeLensParams] a new instance of CodeLensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 + def partial_result_token; end + + # The document to request code lens for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions + # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 + def document_selector; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities + # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from the + # server to the client. + # + # Note that this event is global and will force the client to refresh all + # code lenses currently shown. It should be used with absolute care and is + # useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# Represents a color in RGBA space. +# +# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 +class LanguageServer::Protocol::Interface::Color + # @return [Color] a new instance of Color + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 + def initialize(red:, green:, blue:, alpha:); end + + # The alpha component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 + def alpha; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 + def attributes; end + + # The blue component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 + def blue; end + + # The green component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 + def green; end + + # The red component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 + def red; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 +class LanguageServer::Protocol::Interface::ColorInformation + # @return [ColorInformation] a new instance of ColorInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 + def initialize(range:, color:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 + def attributes; end + + # The actual color value for this color range. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 + def color; end + + # The range in the document where this color appears. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentation + # @return [ColorPresentation] a new instance of ColorPresentation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 + def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end + + # An optional array of additional [text edits](#TextEdit) that are applied + # when selecting this color presentation. Edits must not overlap with the + # main [edit](#ColorPresentation.textEdit) nor with themselves. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 + def attributes; end + + # The label of this color presentation. It will be shown on the color + # picker header. By default this is also the text that is inserted when + # selecting this color presentation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 + def label; end + + # An [edit](#TextEdit) which is applied to a document when selecting + # this presentation for the color. When `falsy` the + # [label](#ColorPresentation.label) is used. + # + # @return [TextEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 + def text_edit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentationParams + # @return [ColorPresentationParams] a new instance of ColorPresentationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 + def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 + def attributes; end + + # The color information to request presentations for. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 + def color; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 + def partial_result_token; end + + # The range where the color would be inserted. Serves as a context. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 +class LanguageServer::Protocol::Interface::Command + # @return [Command] a new instance of Command + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 + def initialize(title:, command:, arguments: T.unsafe(nil)); end + + # Arguments that the command handler should be + # invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 + def command; end + + # Title of the command, like `save`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CompletionClientCapabilities + # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 + def attributes; end + + # The client supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 + def completion_item; end + + # @return [{ valueSet?: CompletionItemKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 + def completion_item_kind; end + + # The client supports the following `CompletionList` specific + # capabilities. + # + # @return [{ itemDefaults?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 + def completion_list; end + + # The client supports to send additional context information for a + # `textDocument/completion` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 + def context_support; end + + # Whether completion supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 + def dynamic_registration; end + + # The client's default when the completion item doesn't provide a + # `insertTextMode` property. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 + def insert_text_mode; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 + def to_json(*args); end +end + +# Contains additional information about the context in which a completion +# request is triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 +class LanguageServer::Protocol::Interface::CompletionContext + # @return [CompletionContext] a new instance of CompletionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 + def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 + def to_json(*args); end + + # The trigger character (a single character) that has trigger code + # complete. Is undefined if + # `triggerKind !== CompletionTriggerKind.TriggerCharacter` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 + def trigger_character; end + + # How the completion was triggered. + # + # @return [CompletionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 +class LanguageServer::Protocol::Interface::CompletionItem + # @return [CompletionItem] a new instance of CompletionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 + def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # An optional array of additional text edits that are applied when + # selecting this completion. Edits must not overlap (including the same + # insert position) with the main edit nor with themselves. + # + # Additional text edits should be used to change text unrelated to the + # current cursor position (for example adding an import statement at the + # top of the file if the completion item will insert an unqualified type). + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 + def attributes; end + + # An optional command that is executed *after* inserting this completion. + # *Note* that additional modifications to the current document should be + # described with the additionalTextEdits-property. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 + def command; end + + # An optional set of characters that when pressed while this completion is + # active will accept it first and then type that character. *Note* that all + # commit characters should have `length=1` and that superfluous characters + # will be ignored. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 + def commit_characters; end + + # A data entry field that is preserved on a completion item between + # a completion and a completion resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 + def data; end + + # Indicates if this item is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 + def deprecated; end + + # A human-readable string with additional information + # about this item, like type or symbol information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 + def detail; end + + # A human-readable string that represents a doc-comment. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 + def documentation; end + + # A string that should be used when filtering a set of + # completion items. When `falsy` the label is used as the + # filter text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 + def filter_text; end + + # A string that should be inserted into a document when selecting + # this completion. When `falsy` the label is used as the insert text + # for this item. + # + # The `insertText` is subject to interpretation by the client side. + # Some tools might not take the string literally. For example + # VS Code when code complete is requested in this example + # `con` and a completion item with an `insertText` of + # `console` is provided it will only insert `sole`. Therefore it is + # recommended to use `textEdit` instead since it avoids additional client + # side interpretation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 + def insert_text; end + + # The format of the insert text. The format applies to both the + # `insertText` property and the `newText` property of a provided + # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + # + # Please note that the insertTextFormat doesn't apply to + # `additionalTextEdits`. + # + # @return [InsertTextFormat] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 + def insert_text_format; end + + # How whitespace and indentation is handled during completion + # item insertion. If not provided the client's default value depends on + # the `textDocument.completion.insertTextMode` client capability. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 + def insert_text_mode; end + + # The kind of this completion item. Based of the kind + # an icon is chosen by the editor. The standardized set + # of available values is defined in `CompletionItemKind`. + # + # @return [CompletionItemKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 + def kind; end + + # The label of this completion item. + # + # The label property is also by default the text that + # is inserted when selecting this completion. + # + # If label details are provided the label itself should + # be an unqualified name of the completion item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 + def label; end + + # Additional details for the label + # + # @return [CompletionItemLabelDetails] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 + def label_details; end + + # Select this item when showing. + # + # *Note* that only one completion item can be selected and that the + # tool / client decides which item that is. The rule is that the *first* + # item of those that match best is selected. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 + def preselect; end + + # A string that should be used when comparing this item + # with other items. When `falsy` the label is used + # as the sort text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 + def sort_text; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 + def tags; end + + # An edit which is applied to a document when selecting this completion. + # When an edit is provided the value of `insertText` is ignored. + # + # *Note:* The range of the edit must be a single line range and it must + # contain the position at which completion has been requested. + # + # Most editors support two different operations when accepting a completion + # item. One is to insert a completion text and the other is to replace an + # existing text with a completion text. Since this can usually not be + # predetermined by a server it can report both ranges. Clients need to + # signal support for `InsertReplaceEdit`s via the + # `textDocument.completion.completionItem.insertReplaceSupport` client + # capability property. + # + # *Note 1:* The text edit's range as well as both ranges from an insert + # replace edit must be a [single line] and they must contain the position + # at which completion has been requested. + # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + # must be a prefix of the edit's replace range, that means it must be + # contained and starting at the same position. + # + # @return [TextEdit | InsertReplaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 + def text_edit; end + + # The edit text used if the completion item is part of a CompletionList and + # CompletionList defines an item default for the text edit range. + # + # Clients will only honor this property if they opt into completion list + # item defaults using the capability `completionList.itemDefaults`. + # + # If not provided and a list's default range is provided the label + # property is used as a text. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 + def text_edit_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 + def to_json(*args); end +end + +# Additional details for a completion item label. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 +class LanguageServer::Protocol::Interface::CompletionItemLabelDetails + # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 + def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 + def attributes; end + + # An optional string which is rendered less prominently after + # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified + # names or file path. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 + def description; end + + # An optional string which is rendered less prominently directly after + # {@link CompletionItem.label label}, without any spacing. Should be + # used for function signatures or type annotations. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 + def detail; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 + def to_json(*args); end +end + +# Represents a collection of [completion items](#CompletionItem) to be +# presented in the editor. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 +class LanguageServer::Protocol::Interface::CompletionList + # @return [CompletionList] a new instance of CompletionList + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 + def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 + def attributes; end + + # This list is not complete. Further typing should result in recomputing + # this list. + # + # Recomputed lists have all their items replaced (not appended) in the + # incomplete completion sessions. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 + def is_incomplete; end + + # In many cases the items of an actual completion result share the same + # value for properties like `commitCharacters` or the range of a text + # edit. A completion list can therefore define item defaults which will + # be used if a completion item itself doesn't specify the value. + # + # If a completion list specifies a default value and a completion item + # also specifies a corresponding value the one from the item is used. + # + # Servers are only allowed to return default values if the client + # signals support for this via the `completionList.itemDefaults` + # capability. + # + # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 + def item_defaults; end + + # The completion items. + # + # @return [CompletionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 + def to_json(*args); end +end + +# Completion options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 +class LanguageServer::Protocol::Interface::CompletionOptions + # @return [CompletionOptions] a new instance of CompletionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 + def completion_item; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 +class LanguageServer::Protocol::Interface::CompletionParams + # @return [CompletionParams] a new instance of CompletionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 + def attributes; end + + # The completion context. This is only available if the client specifies + # to send this using the client capability + # `completion.contextSupport === true` + # + # @return [CompletionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CompletionRegistrationOptions + # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 + def completion_item; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 + def document_selector; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationItem + # @return [ConfigurationItem] a new instance of ConfigurationItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 + def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 + def attributes; end + + # The scope to get the configuration section for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 + def scope_uri; end + + # The configuration section asked for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 + def section; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationParams + # @return [ConfigurationParams] a new instance of ConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 + def attributes; end + + # @return [ConfigurationItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 + def to_json(*args); end +end + +# Create file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 +class LanguageServer::Protocol::Interface::CreateFile + # @return [CreateFile] a new instance of CreateFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 + def attributes; end + + # A create + # + # @return ["create"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 + def kind; end + + # Additional options + # + # @return [CreateFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 + def to_json(*args); end + + # The resource to create. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 + def uri; end +end + +# Options to create a file. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 +class LanguageServer::Protocol::Interface::CreateFileOptions + # @return [CreateFileOptions] a new instance of CreateFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 + def attributes; end + + # Ignore if exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite existing file. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated creation +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 +class LanguageServer::Protocol::Interface::CreateFilesParams + # @return [CreateFilesParams] a new instance of CreateFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 + def attributes; end + + # An array of all files/folders created in this operation. + # + # @return [FileCreate[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DeclarationClientCapabilities + # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 + def attributes; end + + # Whether declaration supports dynamic registration. If this is set to + # `true` the client supports the new `DeclarationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of declaration links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationOptions + # @return [DeclarationOptions] a new instance of DeclarationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 +class LanguageServer::Protocol::Interface::DeclarationParams + # @return [DeclarationParams] a new instance of DeclarationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions + # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DefinitionClientCapabilities + # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 + def attributes; end + + # Whether definition supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionOptions + # @return [DefinitionOptions] a new instance of DefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 +class LanguageServer::Protocol::Interface::DefinitionParams + # @return [DefinitionParams] a new instance of DefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions + # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 + def work_done_progress; end +end + +# Delete file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 +class LanguageServer::Protocol::Interface::DeleteFile + # @return [DeleteFile] a new instance of DeleteFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 + def attributes; end + + # A delete + # + # @return ["delete"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 + def kind; end + + # Delete options. + # + # @return [DeleteFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 + def to_json(*args); end + + # The file to delete. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 + def uri; end +end + +# Delete file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 +class LanguageServer::Protocol::Interface::DeleteFileOptions + # @return [DeleteFileOptions] a new instance of DeleteFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 + def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 + def attributes; end + + # Ignore the operation if the file doesn't exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 + def ignore_if_not_exists; end + + # Delete the content recursively if a folder is denoted. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 + def recursive; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated deletes +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 +class LanguageServer::Protocol::Interface::DeleteFilesParams + # @return [DeleteFilesParams] a new instance of DeleteFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 + def attributes; end + + # An array of all files/folders deleted in this operation. + # + # @return [FileDelete[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 +class LanguageServer::Protocol::Interface::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 + def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 + def attributes; end + + # The diagnostic's code, which might appear in the user interface. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 + def code; end + + # An optional property to describe the error code. + # + # @return [CodeDescription] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 + def code_description; end + + # A data entry field that is preserved between a + # `textDocument/publishDiagnostics` notification and + # `textDocument/codeAction` request. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 + def data; end + + # The diagnostic's message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 + def message; end + + # The range at which the message applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 + def range; end + + # An array of related diagnostic information, e.g. when symbol-names within + # a scope collide all definitions can be marked via this property. + # + # @return [DiagnosticRelatedInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 + def related_information; end + + # The diagnostic's severity. Can be omitted. If omitted it is up to the + # client to interpret diagnostics as error, warning, info or hint. + # + # @return [DiagnosticSeverity] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 + def severity; end + + # A human-readable string describing the source of this + # diagnostic, e.g. 'typescript' or 'super lint'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 + def source; end + + # Additional metadata about the diagnostic. + # + # @return [DiagnosticTag[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 + def to_json(*args); end +end + +# Client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities + # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 + def dynamic_registration; end + + # Whether the clients supports related documents for document diagnostic + # pulls. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 + def related_document_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 + def to_json(*args); end +end + +# Diagnostic options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticOptions + # @return [DiagnosticOptions] a new instance of DiagnosticOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 + def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 + def attributes; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 + def workspace_diagnostics; end +end + +# Diagnostic registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions + # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 + def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 + def id; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 + def workspace_diagnostics; end +end + +# Represents a related message and source code location for a diagnostic. +# This should be used to point to code locations that cause or are related to +# a diagnostics, e.g when duplicating a symbol in a scope. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 +class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation + # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 + def initialize(location:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 + def attributes; end + + # The location of this related diagnostic information. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 + def location; end + + # The message of this related diagnostic information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 + def to_json(*args); end +end + +# Cancellation data returned from a diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData + # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 + def initialize(retrigger_request:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 + def attributes; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 + def retrigger_request; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 + def to_json(*args); end +end + +# Workspace client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities + # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # pulled diagnostics currently shown. It should be used with absolute care + # and is useful for situation where a server for example detects a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities + # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 + def attributes; end + + # Did change configuration notification supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationParams + # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 + def initialize(settings:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 + def attributes; end + + # The actual changed settings + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 + def settings; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 + def to_json(*args); end +end + +# The params sent in a change notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams + # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 + def initialize(notebook_document:, change:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 + def attributes; end + + # The actual changes to the notebook document. + # + # The change describes single state change to the notebook document. + # So it moves a notebook document, its cells and its cell text document + # contents from state S to S'. + # + # To mirror the content of a notebook using change events use the + # following approach: + # - start with the same initial content + # - apply the 'notebookDocument/didChange' notifications in the order + # you receive them. + # + # @return [NotebookDocumentChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 + def change; end + + # The notebook document that did change. The version number points + # to the version after all provided changes have been applied. + # + # @return [VersionedNotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams + # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 + def initialize(text_document:, content_changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 + def attributes; end + + # The actual content changes. The content changes describe single state + # changes to the document. So if there are two content changes c1 (at + # array index 0) and c2 (at array index 1) for a document in state S then + # c1 moves the document from S to S' and c2 from S' to S''. So c1 is + # computed on the state S and c2 is computed on the state S'. + # + # To mirror the content of a document using change events use the following + # approach: + # - start with the same initial content + # - apply the 'textDocument/didChange' notifications in the order you + # receive them. + # - apply the `TextDocumentContentChangeEvent`s in a single notification + # in the order you receive them. + # + # @return [TextDocumentContentChangeEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 + def content_changes; end + + # The document that did change. The version number points + # to the version after all provided content changes have + # been applied. + # + # @return [VersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities + # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 + def attributes; end + + # Did change watched files notification supports dynamic registration. + # Please note that the current protocol doesn't support static + # configuration for file changes from the server side. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client has support for relative patterns + # or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 + def relative_pattern_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams + # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 + def initialize(changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 + def attributes; end + + # The actual file events. + # + # @return [FileEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 + def changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 + def to_json(*args); end +end + +# Describe options to be used when registering for file system change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions + # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 + def initialize(watchers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 + def to_json(*args); end + + # The watchers to register. + # + # @return [FileSystemWatcher[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 + def watchers; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams + # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 + def initialize(event:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 + def attributes; end + + # The actual workspace folder change event. + # + # @return [WorkspaceFoldersChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 + def event; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 + def to_json(*args); end +end + +# The params sent in a close notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams + # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell that got closed. + # + # @return [TextDocumentIdentifier[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got closed. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams + # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 + def attributes; end + + # The document that was closed. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in an open notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams + # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell. + # + # @return [TextDocumentItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got opened. + # + # @return [NotebookDocument] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams + # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 + def attributes; end + + # The document that was opened. + # + # @return [TextDocumentItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in a save notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams + # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 + def initialize(notebook_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 + def attributes; end + + # The notebook document that got saved. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams + # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 + def initialize(text_document:, text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 + def attributes; end + + # Optional the content when saved. Depends on the includeText value + # when the save notification was requested. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 + def text; end + + # The document that was saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities + # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 + def attributes; end + + # Whether document color supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorOptions + # @return [DocumentColorOptions] a new instance of DocumentColorOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorParams + # @return [DocumentColorParams] a new instance of DocumentColorParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions + # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 + def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 + def work_done_progress; end +end + +# Parameters of the document diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticParams + # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 + def partial_result_token; end + + # The result id of a previous response if provided. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 + def work_done_token; end +end + +# A partial result for a document diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult + # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 + def initialize(related_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 + def related_documents; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 +class LanguageServer::Protocol::Interface::DocumentFilter + # @return [DocumentFilter] a new instance of DocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 + def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 + def attributes; end + + # A language id, like `typescript`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 + def language; end + + # A glob pattern, like `*.{ts,js}`. + # + # Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities + # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingOptions + # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingParams + # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 + def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 + def attributes; end + + # The format options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 + def options; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions + # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# A document highlight is a range inside a text document which deserves +# special attention. Usually a document highlight is visualized by changing +# the background color of its range. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 +class LanguageServer::Protocol::Interface::DocumentHighlight + # @return [DocumentHighlight] a new instance of DocumentHighlight + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 + def initialize(range:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 + def attributes; end + + # The highlight kind, default is DocumentHighlightKind.Text. + # + # @return [DocumentHighlightKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 + def kind; end + + # The range this highlight applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities + # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 + def attributes; end + + # Whether document highlight supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightOptions + # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightParams + # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions + # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 + def work_done_progress; end +end + +# A document link is a range in a text document that links to an internal or +# external resource, like another text document or a web site. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 +class LanguageServer::Protocol::Interface::DocumentLink + # @return [DocumentLink] a new instance of DocumentLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 + def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 + def attributes; end + + # A data entry field that is preserved on a document link between a + # DocumentLinkRequest and a DocumentLinkResolveRequest. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 + def data; end + + # The range this link applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 + def range; end + + # The uri this link points to. If missing a resolve request is sent later. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 + def target; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 + def to_json(*args); end + + # The tooltip text when you hover over this link. + # + # If a tooltip is provided, is will be displayed in a string that includes + # instructions on how to trigger the link, such as `{0} (ctrl + click)`. + # The specific instructions vary depending on OS, user settings, and + # localization. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 + def tooltip; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities + # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 + def attributes; end + + # Whether document link supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 + def to_json(*args); end + + # Whether the client supports the `tooltip` property on `DocumentLink`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 + def tooltip_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkOptions + # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 + def attributes; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkParams + # @return [DocumentLinkParams] a new instance of DocumentLinkParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 + def partial_result_token; end + + # The document to provide document links for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions + # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 + def document_selector; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities + # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether on type formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions + # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 + def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 + def attributes; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams + # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 + def initialize(text_document:, position:, ch:, options:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 + def attributes; end + + # The character that has been typed that triggered the formatting + # on type request. That is not necessarily the last character that + # got inserted into the document since the client could auto insert + # characters as well (e.g. like automatic brace completion). + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 + def ch; end + + # The formatting options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 + def options; end + + # The position around which the on type formatting should happen. + # This is not necessarily the exact position where the character denoted + # by the property `ch` got typed. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 + def position; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions + # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 + def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 + def document_selector; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities + # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions + # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams + # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 + def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 + def attributes; end + + # The format options + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 + def options; end + + # The range to format + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 + def range; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions + # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# Represents programming constructs like variables, classes, interfaces etc. +# that appear in a document. Document symbols can be hierarchical and they +# have two ranges: one that encloses its definition and one that points to its +# most interesting range, e.g. the range of an identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 +class LanguageServer::Protocol::Interface::DocumentSymbol + # @return [DocumentSymbol] a new instance of DocumentSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 + def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 + def attributes; end + + # Children of this symbol, e.g. properties of a class. + # + # @return [DocumentSymbol[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 + def children; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 + def deprecated; end + + # More detail for this symbol, e.g the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 + def detail; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 + def kind; end + + # The name of this symbol. Will be displayed in the user interface and + # therefore must not be an empty string or a string only consisting of + # white spaces. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else like comments. This information is typically used to + # determine if the clients cursor is inside the symbol to reveal in the + # symbol in the UI. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the `range`. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 + def selection_range; end + + # Tags for this document symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities + # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 + def attributes; end + + # Whether document symbol supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 + def dynamic_registration; end + + # The client supports hierarchical document symbols. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 + def hierarchical_document_symbol_support; end + + # The client supports an additional label presented in the UI when + # registering a document symbol provider. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 + def label_support; end + + # Specific capabilities for the `SymbolKind` in the + # `textDocument/documentSymbol` request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 + def symbol_kind; end + + # The client supports tags on `SymbolInformation`. Tags are supported on + # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolOptions + # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 + def attributes; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolParams + # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions + # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 + def document_selector; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities + # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 + def attributes; end + + # Execute command supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandOptions + # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandParams + # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 + def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Arguments that the command should be invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 + def command; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 + def work_done_token; end +end + +# Execute command registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 +class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions + # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 +class LanguageServer::Protocol::Interface::ExecutionSummary + # @return [ExecutionSummary] a new instance of ExecutionSummary + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 + def initialize(execution_order:, success: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 + def attributes; end + + # A strict monotonically increasing value + # indicating the execution order of a cell + # inside a notebook. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 + def execution_order; end + + # Whether the execution was successful or + # not if known by the client. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 + def to_json(*args); end +end + +# Represents information on a file/folder create. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 +class LanguageServer::Protocol::Interface::FileCreate + # @return [FileCreate] a new instance of FileCreate + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being created. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 + def uri; end +end + +# Represents information on a file/folder delete. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 +class LanguageServer::Protocol::Interface::FileDelete + # @return [FileDelete] a new instance of FileDelete + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being deleted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 + def uri; end +end + +# An event describing a file change. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 +class LanguageServer::Protocol::Interface::FileEvent + # @return [FileEvent] a new instance of FileEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 + def initialize(uri:, type:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 + def to_json(*args); end + + # The change type. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 + def type; end + + # The file's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 + def uri; end +end + +# A filter to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 +class LanguageServer::Protocol::Interface::FileOperationFilter + # @return [FileOperationFilter] a new instance of FileOperationFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 + def initialize(pattern:, scheme: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 + def attributes; end + + # The actual file operation pattern. + # + # @return [FileOperationPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 + def pattern; end + + # A Uri like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 + def to_json(*args); end +end + +# A pattern to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 +class LanguageServer::Protocol::Interface::FileOperationPattern + # @return [FileOperationPattern] a new instance of FileOperationPattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 + def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 + def attributes; end + + # The glob pattern to match. Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 + def glob; end + + # Whether to match files or folders with this pattern. + # + # Matches both if undefined. + # + # @return [FileOperationPatternKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 + def matches; end + + # Additional options used during matching. + # + # @return [FileOperationPatternOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 + def to_json(*args); end +end + +# Matching options for the file operation pattern. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationPatternOptions + # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 + def initialize(ignore_case: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 + def attributes; end + + # The pattern should be matched ignoring casing. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 + def ignore_case; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 + def to_json(*args); end +end + +# The options to register for file operations. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions + # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 + def initialize(filters:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 + def attributes; end + + # The actual filters. + # + # @return [FileOperationFilter[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 + def filters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 + def to_json(*args); end +end + +# Represents information on a file/folder rename. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 +class LanguageServer::Protocol::Interface::FileRename + # @return [FileRename] a new instance of FileRename + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 + def initialize(old_uri:, new_uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 + def attributes; end + + # A file:// URI for the new location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 + def new_uri; end + + # A file:// URI for the original location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 + def old_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 +class LanguageServer::Protocol::Interface::FileSystemWatcher + # @return [FileSystemWatcher] a new instance of FileSystemWatcher + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 + def initialize(glob_pattern:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 + def attributes; end + + # The glob pattern to watch. See {@link GlobPattern glob pattern} + # for more detail. + # + # @return [GlobPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 + def glob_pattern; end + + # The kind of events of interest. If omitted it defaults + # to WatchKind.Create | WatchKind.Change | WatchKind.Delete + # which is 7. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 + def to_json(*args); end +end + +# Represents a folding range. To be valid, start and end line must be bigger +# than zero and smaller than the number of lines in the document. Clients +# are free to ignore invalid ranges. +# +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 +class LanguageServer::Protocol::Interface::FoldingRange + # @return [FoldingRange] a new instance of FoldingRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 + def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 + def attributes; end + + # The text that the client should show when the specified range is + # collapsed. If not defined or not supported by the client, a default + # will be chosen by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 + def collapsed_text; end + + # The zero-based character offset before the folded range ends. If not + # defined, defaults to the length of the end line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 + def end_character; end + + # The zero-based end line of the range to fold. The folded area ends with + # the line's last character. To be valid, the end must be zero or larger + # and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 + def end_line; end + + # Describes the kind of the folding range such as `comment` or `region`. + # The kind is used to categorize folding ranges and used by commands like + # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an + # enumeration of standardized kinds. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 + def kind; end + + # The zero-based character offset from where the folded range starts. If + # not defined, defaults to the length of the start line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 + def start_character; end + + # The zero-based start line of the range to fold. The folded area starts + # after the line's last character. To be valid, the end must be zero or + # larger and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 + def start_line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities + # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 + def attributes; end + + # Whether implementation supports dynamic registration for folding range + # providers. If this is set to `true` the client supports the new + # `FoldingRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 + def dynamic_registration; end + + # Specific options for the folding range. + # + # @return [{ collapsedText?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 + def folding_range; end + + # Specific options for the folding range kind. + # + # @return [{ valueSet?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 + def folding_range_kind; end + + # If set, the client signals that it only supports folding complete lines. + # If set, client will ignore specified `startCharacter` and `endCharacter` + # properties in a FoldingRange. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 + def line_folding_only; end + + # The maximum number of folding ranges that the client prefers to receive + # per document. The value serves as a hint, servers are free to follow the + # limit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 + def range_limit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeOptions + # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeParams + # @return [FoldingRangeParams] a new instance of FoldingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions + # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 + def work_done_progress; end +end + +# Value-object describing what options formatting should use. +# +# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 +class LanguageServer::Protocol::Interface::FormattingOptions + # @return [FormattingOptions] a new instance of FormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 + def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 + def attributes; end + + # Insert a newline character at the end of the file if one does not exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 + def insert_final_newline; end + + # Prefer spaces over tabs. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 + def insert_spaces; end + + # Size of a tab in spaces. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 + def tab_size; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 + def to_json(*args); end + + # Trim all newlines after the final newline at the end of the file. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 + def trim_final_newlines; end + + # Trim trailing whitespace on a line. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 + def trim_trailing_whitespace; end +end + +# A diagnostic report with a full set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport + # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 + def to_json(*args); end +end + +# The result of a hover request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 +class LanguageServer::Protocol::Interface::Hover + # @return [Hover] a new instance of Hover + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 + def initialize(contents:, range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 + def attributes; end + + # The hover's content + # + # @return [MarkupContent | MarkedString | MarkedString[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 + def contents; end + + # An optional range is a range inside a text document + # that is used to visualize a hover, e.g. by changing the background color. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::HoverClientCapabilities + # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 + def attributes; end + + # Client supports the follow content formats if the content + # property refers to a `literal of type MarkupContent`. + # The order describes the preferred format of the client. + # + # @return [MarkupKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 + def content_format; end + + # Whether hover supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 +class LanguageServer::Protocol::Interface::HoverOptions + # @return [HoverOptions] a new instance of HoverOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 +class LanguageServer::Protocol::Interface::HoverParams + # @return [HoverParams] a new instance of HoverParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 +class LanguageServer::Protocol::Interface::HoverRegistrationOptions + # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 +class LanguageServer::Protocol::Interface::HoverResult + # @return [HoverResult] a new instance of HoverResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ImplementationClientCapabilities + # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `ImplementationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationOptions + # @return [ImplementationOptions] a new instance of ImplementationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 +class LanguageServer::Protocol::Interface::ImplementationParams + # @return [ImplementationParams] a new instance of ImplementationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions + # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 +class LanguageServer::Protocol::Interface::InitializeError + # @return [InitializeError] a new instance of InitializeError + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 + def initialize(retry:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 + def attributes; end + + # Indicates whether the client execute the following retry logic: + # (1) show the message provided by the ResponseError to the user + # (2) user selects retry or cancel + # (3) if user selected retry the initialize method is sent again. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 + def retry; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 +class LanguageServer::Protocol::Interface::InitializeParams + # @return [InitializeParams] a new instance of InitializeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 + def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 + def attributes; end + + # The capabilities provided by the client (editor or tool) + # + # @return [ClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 + def capabilities; end + + # Information about the client + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 + def client_info; end + + # User provided initialization options. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 + def initialization_options; end + + # The locale the client is currently showing the user interface + # in. This must not necessarily be the locale of the operating + # system. + # + # Uses IETF language tags as the value's syntax + # (See https://en.wikipedia.org/wiki/IETF_language_tag) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 + def locale; end + + # The process Id of the parent process that started the server. Is null if + # the process has not been started by another process. If the parent + # process is not alive then the server should exit (see exit notification) + # its process. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 + def process_id; end + + # The rootPath of the workspace. Is null + # if no folder is open. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 + def root_path; end + + # The rootUri of the workspace. Is null if no + # folder is open. If both `rootPath` and `rootUri` are set + # `rootUri` wins. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 + def root_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 + def to_json(*args); end + + # The initial trace setting. If omitted trace is disabled ('off'). + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 + def trace; end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 + def work_done_token; end + + # The workspace folders configured in the client when the server starts. + # This property is only available if the client supports workspace folders. + # It can be `null` if the client supports workspace folders but none are + # configured. + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 + def workspace_folders; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 +class LanguageServer::Protocol::Interface::InitializeResult + # @return [InitializeResult] a new instance of InitializeResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 + def initialize(capabilities:, server_info: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 + def attributes; end + + # The capabilities the language server provides. + # + # @return [ServerCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 + def capabilities; end + + # Information about the server. + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 + def server_info; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 +class LanguageServer::Protocol::Interface::InitializedParams + # @return [InitializedParams] a new instance of InitializedParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 + def initialize; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 + def to_json(*args); end +end + +# Inlay hint information. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 +class LanguageServer::Protocol::Interface::InlayHint + # @return [InlayHint] a new instance of InlayHint + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 + def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 + def attributes; end + + # A data entry field that is preserved on an inlay hint between + # a `textDocument/inlayHint` and a `inlayHint/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 + def data; end + + # The kind of this hint. Can be omitted in which case the client + # should fall back to a reasonable default. + # + # @return [InlayHintKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 + def kind; end + + # The label of this hint. A human readable string or an array of + # InlayHintLabelPart label parts. + # + # *Note* that neither the string nor the label part can be empty. + # + # @return [string | InlayHintLabelPart[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 + def label; end + + # Render padding before the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 + def padding_left; end + + # Render padding after the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 + def padding_right; end + + # The position of this hint. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 + def position; end + + # Optional text edits that are performed when accepting this inlay hint. + # + # *Note* that edits are expected to change the document so that the inlay + # hint (or its nearest variant) is now part of the document and the inlay + # hint itself is now obsolete. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 + def text_edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 + def to_json(*args); end + + # The tooltip text when you hover over this item. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 + def tooltip; end +end + +# Inlay hint client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintClientCapabilities + # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 + def attributes; end + + # Whether inlay hints support dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 + def dynamic_registration; end + + # Indicates which properties a client can resolve lazily on an inlay + # hint. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 + def to_json(*args); end +end + +# An inlay hint label part allows for interactive and composite labels +# of inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 +class LanguageServer::Protocol::Interface::InlayHintLabelPart + # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 + def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 + def attributes; end + + # An optional command for this label part. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 + def command; end + + # An optional source code location that represents this + # label part. + # + # The editor will use this location for the hover and for code navigation + # features: This part will become a clickable link that resolves to the + # definition of the symbol at the given location (not necessarily the + # location itself), it shows the hover that shows at the given location, + # and it shows a context menu with further code navigation commands. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 + def location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 + def to_json(*args); end + + # The tooltip text when you hover over this label part. Depending on + # the client capability `inlayHint.resolveSupport` clients might resolve + # this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 + def tooltip; end + + # The value of this label part. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 + def value; end +end + +# Inlay hint options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintOptions + # @return [InlayHintOptions] a new instance of InlayHintOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 + def attributes; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 + def work_done_progress; end +end + +# A parameter literal used in inlay hint requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 +class LanguageServer::Protocol::Interface::InlayHintParams + # @return [InlayHintParams] a new instance of InlayHintParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 + def attributes; end + + # The visible document range for which inlay hints should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 + def work_done_token; end +end + +# Inlay hint options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions + # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 + def id; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 + def work_done_progress; end +end + +# Client workspace capabilities specific to inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities + # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inlay hints currently shown. It should be used with absolute care and + # is useful for situation where a server for example detects a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# Client capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueClientCapabilities + # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 + def attributes; end + + # Whether implementation supports dynamic registration for inline + # value providers. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 +class LanguageServer::Protocol::Interface::InlineValueContext + # @return [InlineValueContext] a new instance of InlineValueContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 + def initialize(frame_id:, stopped_location:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 + def attributes; end + + # The stack frame (as a DAP Id) where the execution has stopped. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 + def frame_id; end + + # The document range where execution has stopped. + # Typically the end position of the range denotes the line where the + # inline values are shown. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 + def stopped_location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 + def to_json(*args); end +end + +# Provide an inline value through an expression evaluation. +# +# If only a range is specified, the expression will be extracted from the +# underlying document. +# +# An optional expression can be used to override the extracted expression. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 +class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression + # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 + def initialize(range:, expression: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 + def attributes; end + + # If specified the expression overrides the extracted expression. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 + def expression; end + + # The document range for which the inline value applies. + # The range is used to extract the evaluatable expression from the + # underlying document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 + def to_json(*args); end +end + +# Inline value options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueOptions + # @return [InlineValueOptions] a new instance of InlineValueOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 + def work_done_progress; end +end + +# A parameter literal used in inline value requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 +class LanguageServer::Protocol::Interface::InlineValueParams + # @return [InlineValueParams] a new instance of InlineValueParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 + def attributes; end + + # Additional information about the context in which inline values were + # requested. + # + # @return [InlineValueContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 + def context; end + + # The document range for which inline values should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 + def work_done_token; end +end + +# Inline value options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions + # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 + def work_done_progress; end +end + +# Provide inline value as text. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 +class LanguageServer::Protocol::Interface::InlineValueText + # @return [InlineValueText] a new instance of InlineValueText + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 + def initialize(range:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 + def attributes; end + + # The document range for which the inline value applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 + def range; end + + # The text of the inline value. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 + def to_json(*args); end +end + +# Provide inline value through a variable lookup. +# +# If only a range is specified, the variable name will be extracted from +# the underlying document. +# +# An optional variable name can be used to override the extracted name. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 +class LanguageServer::Protocol::Interface::InlineValueVariableLookup + # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 + def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 + def attributes; end + + # How to perform the lookup. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 + def case_sensitive_lookup; end + + # The document range for which the inline value applies. + # The range is used to extract the variable name from the underlying + # document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 + def to_json(*args); end + + # If specified the name of the variable to look up. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 + def variable_name; end +end + +# Client workspace capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities + # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inline values currently shown. It should be used with absolute care and + # is useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# A special text edit to provide an insert and a replace operation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 +class LanguageServer::Protocol::Interface::InsertReplaceEdit + # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 + def initialize(new_text:, insert:, replace:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 + def attributes; end + + # The range if the insert is requested + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 + def insert; end + + # The string to be inserted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 + def new_text; end + + # The range if the replace is requested. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 + def replace; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities + # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 + def attributes; end + + # Whether the implementation supports dynamic registration. + # If this is set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions + # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeParams + # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions + # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRanges + # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 + def initialize(ranges:, word_pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 + def attributes; end + + # A list of ranges that can be renamed together. The ranges must have + # identical length and contain identical text content. The ranges cannot + # overlap. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 + def ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 + def to_json(*args); end + + # An optional word pattern (regular expression) that describes valid + # contents for the given ranges. If no pattern is provided, the client + # configuration's word pattern will be used. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 + def word_pattern; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 +class LanguageServer::Protocol::Interface::Location + # @return [Location] a new instance of Location + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 + def initialize(uri:, range:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 + def attributes; end + + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 +class LanguageServer::Protocol::Interface::LocationLink + # @return [LocationLink] a new instance of LocationLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 + def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 + def attributes; end + + # Span of the origin of this link. + # + # Used as the underlined span for mouse interaction. Defaults to the word + # range at the mouse position. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 + def origin_selection_range; end + + # The full target range of this link. If the target for example is a symbol + # then target range is the range enclosing this symbol not including + # leading/trailing whitespace but everything else like comments. This + # information is typically used to highlight the range in the editor. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 + def target_range; end + + # The range that should be selected and revealed when this link is being + # followed, e.g the name of a function. Must be contained by the + # `targetRange`. See also `DocumentSymbol#range` + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 + def target_selection_range; end + + # The target resource identifier of this link. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 + def target_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 +class LanguageServer::Protocol::Interface::LogMessageParams + # @return [LogMessageParams] a new instance of LogMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 + def type; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 +class LanguageServer::Protocol::Interface::LogTraceParams + # @return [LogTraceParams] a new instance of LogTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 + def initialize(message:, verbose: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 + def attributes; end + + # The message to be logged. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 + def to_json(*args); end + + # Additional information that can be computed if the `trace` configuration + # is set to `'verbose'` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 + def verbose; end +end + +# A `MarkupContent` literal represents a string value which content is +# interpreted base on its kind flag. Currently the protocol supports +# `plaintext` and `markdown` as markup kinds. +# +# If the kind is `markdown` then the value can contain fenced code blocks like +# in GitHub issues. +# +# Here is an example how such a string can be constructed using +# JavaScript / TypeScript: +# ```typescript +# let markdown: MarkdownContent = { +# kind: MarkupKind.Markdown, +# value: [ +# '# Header', +# 'Some text', +# '```typescript', +# 'someCode();', +# '```' +# ].join('\n') +# }; +# ``` +# +# *Please Note* that clients might sanitize the return markdown. A client could +# decide to remove HTML from the markdown to avoid script execution. +# +# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 +class LanguageServer::Protocol::Interface::MarkupContent + # @return [MarkupContent] a new instance of MarkupContent + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 + def initialize(kind:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 + def attributes; end + + # The type of the Markup + # + # @return [MarkupKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 + def to_json(*args); end + + # The content itself + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 +class LanguageServer::Protocol::Interface::Message + # @return [Message] a new instance of Message + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 + def initialize(jsonrpc:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 + def jsonrpc; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 +class LanguageServer::Protocol::Interface::MessageActionItem + # @return [MessageActionItem] a new instance of MessageActionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 + def initialize(title:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 + def attributes; end + + # A short title like 'Retry', 'Open Log' etc. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 + def to_json(*args); end +end + +# Moniker definition to match LSIF 0.5 moniker definition. +# +# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 +class LanguageServer::Protocol::Interface::Moniker + # @return [Moniker] a new instance of Moniker + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 + def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 + def attributes; end + + # The identifier of the moniker. The value is opaque in LSIF however + # schema owners are allowed to define the structure if they want. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 + def identifier; end + + # The moniker kind if known. + # + # @return [MonikerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 + def kind; end + + # The scheme of the moniker. For example tsc or .Net + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 + def to_json(*args); end + + # The scope in which the moniker is unique + # + # @return [UniquenessLevel] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 + def unique; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::MonikerClientCapabilities + # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerOptions + # @return [MonikerOptions] a new instance of MonikerOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 +class LanguageServer::Protocol::Interface::MonikerParams + # @return [MonikerParams] a new instance of MonikerParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerRegistrationOptions + # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 + def work_done_progress; end +end + +# A notebook cell. +# +# A cell's document URI must be unique across ALL notebook +# cells and can therefore be used to uniquely identify a +# notebook cell or the cell's text document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 +class LanguageServer::Protocol::Interface::NotebookCell + # @return [NotebookCell] a new instance of NotebookCell + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 + def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 + def attributes; end + + # The URI of the cell's text document + # content. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 + def document; end + + # Additional execution summary information + # if supported by the client. + # + # @return [ExecutionSummary] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 + def execution_summary; end + + # The cell's kind + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 + def kind; end + + # Additional metadata stored with the cell. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 + def to_json(*args); end +end + +# A change describing how to move a `NotebookCell` +# array from state S to S'. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellArrayChange + # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 + def initialize(start:, delete_count:, cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 + def attributes; end + + # The new cells, if any + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 + def cells; end + + # The deleted cells + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 + def delete_count; end + + # The start offset of the cell that changed. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 + def to_json(*args); end +end + +# A notebook cell text document filter denotes a cell text +# document by different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter + # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 + def initialize(notebook:, language: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 + def attributes; end + + # A language id like `python`. + # + # Will be matched against the language id of the + # notebook cell document. '*' matches every language. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 + def language; end + + # A filter that matches against the notebook + # containing the notebook cell. If a string + # value is provided it matches against the + # notebook type. '*' matches every notebook. + # + # @return [string | NotebookDocumentFilter] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 + def notebook; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 + def to_json(*args); end +end + +# A notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocument + # @return [NotebookDocument] a new instance of NotebookDocument + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 + def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 + def attributes; end + + # The cells of a notebook. + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 + def cells; end + + # Additional metadata stored with the notebook + # document. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 + def metadata; end + + # The type of the notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 + def notebook_type; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 + def version; end +end + +# A change event for a notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent + # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 + def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 + def attributes; end + + # Changes to cells + # + # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 + def cells; end + + # The changed meta data if any. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 + def to_json(*args); end +end + +# Capabilities specific to the notebook document support. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities + # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 + def initialize(synchronization:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to notebook document synchronization + # + # @return [NotebookDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 + def to_json(*args); end +end + +# A notebook document filter denotes a notebook document by +# different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookDocumentFilter + # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 + def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 + def attributes; end + + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 + def notebook_type; end + + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 + def to_json(*args); end +end + +# A literal to identify a notebook document in the client. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier + # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 + def uri; end +end + +# Notebook specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities + # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 + def attributes; end + + # Whether implementation supports dynamic registration. If this is + # set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 + def dynamic_registration; end + + # The client supports sending execution summary data per cell. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 + def execution_summary_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 + def to_json(*args); end +end + +# Options specific to a notebook plus its cells +# to be synced to the server. +# +# If a selector provides a notebook document +# filter but no cell selector all cells of a +# matching notebook document will be synced. +# +# If a selector provides no notebook document +# filter but only a cell selector all notebook +# documents that contain at least one matching +# cell will be synced. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions + # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 + def initialize(notebook_selector:, save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 + def attributes; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 + def to_json(*args); end +end + +# Registration options specific to a notebook. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions + # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 + def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 + def id; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 +class LanguageServer::Protocol::Interface::NotificationMessage + # @return [NotificationMessage] a new instance of NotificationMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 + def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 + def method; end + + # The notification's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier + # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. If an optional versioned text document + # identifier is sent from the server to the client and the file is not + # open in the editor (the server has not received an open notification + # before) the server can send `null` to indicate that the version is + # known and the content on disk is the master (as specified with document + # content ownership). + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 + def version; end +end + +# Represents a parameter of a callable-signature. A parameter can +# have a label and a doc-comment. +# +# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 +class LanguageServer::Protocol::Interface::ParameterInformation + # @return [ParameterInformation] a new instance of ParameterInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 + def initialize(label:, documentation: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 + def attributes; end + + # The human-readable doc-comment of this parameter. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 + def documentation; end + + # The label of this parameter information. + # + # Either a string or an inclusive start and exclusive end offsets within + # its containing signature label. (see SignatureInformation.label). The + # offsets are based on a UTF-16 string representation as `Position` and + # `Range` does. + # + # *Note*: a label of type string should be a substring of its containing + # signature label. Its intended use case is to highlight the parameter + # label part in the `SignatureInformation.label`. + # + # @return [string | [number, number]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 +class LanguageServer::Protocol::Interface::PartialResultParams + # @return [PartialResultParams] a new instance of PartialResultParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 + def initialize(partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 +class LanguageServer::Protocol::Interface::Position + # @return [Position] a new instance of Position + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 + def initialize(line:, character:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 + def attributes; end + + # Character offset on a line in a document (zero-based). The meaning of this + # offset is determined by the negotiated `PositionEncodingKind`. + # + # If the character value is greater than the line length it defaults back + # to the line length. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 + def character; end + + # Line position in a document (zero-based). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 + def line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 +class LanguageServer::Protocol::Interface::PrepareRenameParams + # @return [PrepareRenameParams] a new instance of PrepareRenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 + def work_done_token; end +end + +# A previous result id in a workspace pull request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 +class LanguageServer::Protocol::Interface::PreviousResultId + # @return [PreviousResultId] a new instance of PreviousResultId + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 + def initialize(uri:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 + def to_json(*args); end + + # The URI for which the client knows a + # result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 + def uri; end + + # The value of the previous result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 +class LanguageServer::Protocol::Interface::ProgressParams + # @return [ProgressParams] a new instance of ProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 + def initialize(token:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 + def to_json(*args); end + + # The progress token provided by the client or server. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 + def token; end + + # The progress data. + # + # @return [T] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities + # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 + def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 + def attributes; end + + # Client supports a codeDescription property + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 + def code_description_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/publishDiagnostics` and + # `textDocument/codeAction` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 + def data_support; end + + # Whether the clients accepts diagnostics with related information. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 + def related_information; end + + # Client supports the tag property to provide meta data about a diagnostic. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: DiagnosticTag[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 + def to_json(*args); end + + # Whether the client interprets the version property of the + # `textDocument/publishDiagnostics` notification's parameter. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 + def version_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsParams + # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 + def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 + def attributes; end + + # An array of diagnostic information items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 + def diagnostics; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 + def uri; end + + # Optional the version number of the document the diagnostics are published + # for. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 +class LanguageServer::Protocol::Interface::Range + # @return [Range] a new instance of Range + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 + def initialize(start:, end:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 + def attributes; end + + # The range's end position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 + def end; end + + # The range's start position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ReferenceClientCapabilities + # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 + def attributes; end + + # Whether references supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 +class LanguageServer::Protocol::Interface::ReferenceContext + # @return [ReferenceContext] a new instance of ReferenceContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 + def initialize(include_declaration:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 + def attributes; end + + # Include the declaration of the current symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 + def include_declaration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceOptions + # @return [ReferenceOptions] a new instance of ReferenceOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 +class LanguageServer::Protocol::Interface::ReferenceParams + # @return [ReferenceParams] a new instance of ReferenceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 + def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 + def attributes; end + + # @return [ReferenceContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions + # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 + def work_done_progress; end +end + +# General parameters to register for a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 +class LanguageServer::Protocol::Interface::Registration + # @return [Registration] a new instance of Registration + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 + def initialize(id:, method:, register_options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 + def id; end + + # The method / capability to register for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 + def method; end + + # Options necessary for the registration. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 + def register_options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 +class LanguageServer::Protocol::Interface::RegistrationParams + # @return [RegistrationParams] a new instance of RegistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 + def initialize(registrations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 + def attributes; end + + # @return [Registration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 + def registrations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 + def to_json(*args); end +end + +# Client capabilities specific to regular expressions. +# +# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities + # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 + def initialize(engine:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 + def attributes; end + + # The engine's name. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 + def engine; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 + def to_json(*args); end + + # The engine's version. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 + def version; end +end + +# A full diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport + # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 + def related_documents; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 + def to_json(*args); end +end + +# An unchanged diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport + # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 + def related_documents; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 + def to_json(*args); end +end + +# A relative pattern is a helper to construct glob patterns that are matched +# relatively to a base URI. The common value for a `baseUri` is a workspace +# folder root, but it can be another absolute URI as well. +# +# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 +class LanguageServer::Protocol::Interface::RelativePattern + # @return [RelativePattern] a new instance of RelativePattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 + def initialize(base_uri:, pattern:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 + def attributes; end + + # A workspace folder or a base URI to which this pattern will be matched + # against relatively. + # + # @return [string | WorkspaceFolder] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 + def base_uri; end + + # The actual glob pattern; + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 + def pattern; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::RenameClientCapabilities + # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 + def attributes; end + + # Whether rename supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # rename request's workspace edit by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 + def honors_change_annotations; end + + # Client supports testing for validity of rename operations + # before execution. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 + def prepare_support; end + + # Client supports the default behavior result + # (`{ defaultBehavior: boolean }`). + # + # The value indicates the default behavior used by the + # client. + # + # @return [1] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 + def prepare_support_default_behavior; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 + def to_json(*args); end +end + +# Rename file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 +class LanguageServer::Protocol::Interface::RenameFile + # @return [RenameFile] a new instance of RenameFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 + def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 + def attributes; end + + # A rename + # + # @return ["rename"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 + def kind; end + + # The new location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 + def new_uri; end + + # The old (existing) location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 + def old_uri; end + + # Rename options. + # + # @return [RenameFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 + def to_json(*args); end +end + +# Rename file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 +class LanguageServer::Protocol::Interface::RenameFileOptions + # @return [RenameFileOptions] a new instance of RenameFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 + def attributes; end + + # Ignores if target exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite target if existing. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated renames +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 +class LanguageServer::Protocol::Interface::RenameFilesParams + # @return [RenameFilesParams] a new instance of RenameFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 + def attributes; end + + # An array of all files/folders renamed in this operation. When a folder + # is renamed, only the folder will be included, and not its children. + # + # @return [FileRename[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 +class LanguageServer::Protocol::Interface::RenameOptions + # @return [RenameOptions] a new instance of RenameOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 + def attributes; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 +class LanguageServer::Protocol::Interface::RenameParams + # @return [RenameParams] a new instance of RenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 + def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 + def attributes; end + + # The new name of the symbol. If the given name is not valid the + # request must return a [ResponseError](#ResponseError) with an + # appropriate message set. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 + def new_name; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 +class LanguageServer::Protocol::Interface::RenameRegistrationOptions + # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 + def document_selector; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 +class LanguageServer::Protocol::Interface::RequestMessage + # @return [RequestMessage] a new instance of RequestMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 + def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 + def attributes; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 + def method; end + + # The method's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 +class LanguageServer::Protocol::Interface::ResponseError + # @return [ResponseError] a new instance of ResponseError + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 + def initialize(code:, message:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 + def attributes; end + + # A number indicating the error type that occurred. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 + def code; end + + # A primitive or structured value that contains additional + # information about the error. Can be omitted. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 + def data; end + + # A string providing a short description of the error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 +class LanguageServer::Protocol::Interface::ResponseMessage + # @return [ResponseMessage] a new instance of ResponseMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 + def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 + def attributes; end + + # The error object in case a request fails. + # + # @return [ResponseError] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 + def error; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 + def jsonrpc; end + + # The result of a request. This member is REQUIRED on success. + # This member MUST NOT exist if there was an error invoking the method. + # + # @return [string | number | boolean | object] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 + def result; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 +class LanguageServer::Protocol::Interface::SaveOptions + # @return [SaveOptions] a new instance of SaveOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 + def initialize(include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 + def attributes; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 +class LanguageServer::Protocol::Interface::SelectionRange + # @return [SelectionRange] a new instance of SelectionRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 + def initialize(range:, parent: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 + def attributes; end + + # The parent selection range containing this range. Therefore + # `parent.range` must contain `this.range`. + # + # @return [SelectionRange] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 + def parent; end + + # The [range](#Range) of this selection range. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities + # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration for selection range + # providers. If this is set to `true` the client supports the new + # `SelectionRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeOptions + # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeParams + # @return [SelectionRangeParams] a new instance of SelectionRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 + def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 + def partial_result_token; end + + # The positions inside the text document. + # + # @return [Position[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 + def positions; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions + # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokens + # @return [SemanticTokens] a new instance of SemanticTokens + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 + def initialize(data:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 + def attributes; end + + # The actual tokens. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 + def data; end + + # An optional result id. If provided and clients support delta updating + # the client will include the result id in the next semantic token request. + # A server can then instead of computing all semantic tokens again simply + # send a delta. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities + # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 + def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 + def attributes; end + + # Whether the client uses semantic tokens to augment existing + # syntax tokens. If set to `true` client side created syntax + # tokens and semantic tokens are both used for colorization. If + # set to `false` the client only uses the returned semantic tokens + # for colorization. + # + # If the value is `undefined` then the client behavior is not + # specified. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 + def augments_syntax_tokens; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 + def dynamic_registration; end + + # The formats the clients supports. + # + # @return ["relative"[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 + def formats; end + + # Whether the client supports tokens that can span multiple lines. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 + def multiline_token_support; end + + # Whether the client supports tokens that can overlap each other. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 + def overlapping_token_support; end + + # Which requests the client supports and might send to the server + # depending on the server's capability. Please note that clients might not + # show semantic tokens or degrade some of the user experience if a range + # or full request is advertised by the client but not provided by the + # server. If for example the client capability `requests.full` and + # `request.range` are both set to true but the server only provides a + # range provider the client might not render a minimap correctly or might + # even decide to not show any semantic tokens at all. + # + # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 + def requests; end + + # Whether the client allows the server to actively cancel a + # semantic token request, e.g. supports returning + # ErrorCodes.ServerCancelled. If a server does the client + # needs to retrigger the request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 + def server_cancel_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 + def to_json(*args); end + + # The token modifiers that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 + def token_modifiers; end + + # The token types that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDelta + # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 + def initialize(edits:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 + def attributes; end + + # The semantic token edits to transform a previous result into a new + # result. + # + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 + def edits; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams + # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 + def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 + def partial_result_token; end + + # The result id of a previous response. The result Id can either point to + # a full response or a delta response depending on what was received last. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult + # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 + def initialize(edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 + def attributes; end + + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 + def edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensEdit + # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 + def initialize(start:, delete_count:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 + def attributes; end + + # The elements to insert. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 + def data; end + + # The count of elements to remove. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 + def delete_count; end + + # The start offset of the edit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensLegend + # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 + def initialize(token_types:, token_modifiers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 + def to_json(*args); end + + # The token modifiers a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 + def token_modifiers; end + + # The token types a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensOptions + # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 + def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 + def attributes; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 + def full; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensParams + # @return [SemanticTokensParams] a new instance of SemanticTokensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensPartialResult + # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 + def initialize(data:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 + def attributes; end + + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 + def data; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRangeParams + # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 + def partial_result_token; end + + # The range the semantic tokens are requested for. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions + # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 + def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 + def document_selector; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 + def full; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 + def id; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities + # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # semantic tokens currently shown. It should be used with absolute care + # and is useful for situation where a server for example detect a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ServerCapabilities + # @return [ServerCapabilities] a new instance of ServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 + def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 + def attributes; end + + # The server provides call hierarchy support. + # + # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 + def call_hierarchy_provider; end + + # The server provides code actions. The `CodeActionOptions` return type is + # only valid if the client signals code action literal support via the + # property `textDocument.codeAction.codeActionLiteralSupport`. + # + # @return [boolean | CodeActionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 + def code_action_provider; end + + # The server provides code lens. + # + # @return [CodeLensOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 + def code_lens_provider; end + + # The server provides color provider support. + # + # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 + def color_provider; end + + # The server provides completion support. + # + # @return [CompletionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 + def completion_provider; end + + # The server provides go to declaration support. + # + # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 + def declaration_provider; end + + # The server provides goto definition support. + # + # @return [boolean | DefinitionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 + def definition_provider; end + + # The server has support for pull model diagnostics. + # + # @return [DiagnosticOptions | DiagnosticRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 + def diagnostic_provider; end + + # The server provides document formatting. + # + # @return [boolean | DocumentFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 + def document_formatting_provider; end + + # The server provides document highlight support. + # + # @return [boolean | DocumentHighlightOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 + def document_highlight_provider; end + + # The server provides document link support. + # + # @return [DocumentLinkOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 + def document_link_provider; end + + # The server provides document formatting on typing. + # + # @return [DocumentOnTypeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 + def document_on_type_formatting_provider; end + + # The server provides document range formatting. + # + # @return [boolean | DocumentRangeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 + def document_range_formatting_provider; end + + # The server provides document symbol support. + # + # @return [boolean | DocumentSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 + def document_symbol_provider; end + + # The server provides execute command support. + # + # @return [ExecuteCommandOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 + def execute_command_provider; end + + # Experimental server capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 + def experimental; end + + # The server provides folding provider support. + # + # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 + def folding_range_provider; end + + # The server provides hover support. + # + # @return [boolean | HoverOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 + def hover_provider; end + + # The server provides goto implementation support. + # + # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 + def implementation_provider; end + + # The server provides inlay hints. + # + # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 + def inlay_hint_provider; end + + # The server provides inline values. + # + # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 + def inline_value_provider; end + + # The server provides linked editing range support. + # + # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 + def linked_editing_range_provider; end + + # Whether server provides moniker support. + # + # @return [boolean | MonikerOptions | MonikerRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 + def moniker_provider; end + + # Defines how notebook documents are synced. + # + # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 + def notebook_document_sync; end + + # The position encoding the server picked from the encodings offered + # by the client via the client capability `general.positionEncodings`. + # + # If the client didn't provide any position encodings the only valid + # value that a server can return is 'utf-16'. + # + # If omitted it defaults to 'utf-16'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 + def position_encoding; end + + # The server provides find references support. + # + # @return [boolean | ReferenceOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 + def references_provider; end + + # The server provides rename support. RenameOptions may only be + # specified if the client states that it supports + # `prepareSupport` in its initial `initialize` request. + # + # @return [boolean | RenameOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 + def rename_provider; end + + # The server provides selection range support. + # + # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 + def selection_range_provider; end + + # The server provides semantic tokens support. + # + # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 + def semantic_tokens_provider; end + + # The server provides signature help support. + # + # @return [SignatureHelpOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 + def signature_help_provider; end + + # Defines how text documents are synced. Is either a detailed structure + # defining each notification or for backwards compatibility the + # TextDocumentSyncKind number. If omitted it defaults to + # `TextDocumentSyncKind.None`. + # + # @return [TextDocumentSyncOptions | TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 + def text_document_sync; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 + def to_json(*args); end + + # The server provides goto type definition support. + # + # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 + def type_definition_provider; end + + # The server provides type hierarchy support. + # + # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 + def type_hierarchy_provider; end + + # Workspace specific server capabilities + # + # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 + def workspace; end + + # The server provides workspace symbol support. + # + # @return [boolean | WorkspaceSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 + def workspace_symbol_provider; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 +class LanguageServer::Protocol::Interface::SetTraceParams + # @return [SetTraceParams] a new instance of SetTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 + def to_json(*args); end + + # The new value that should be assigned to the trace setting. + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 + def value; end +end + +# Client capabilities for the show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities + # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 + def initialize(support:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 + def attributes; end + + # The client has support for the show document + # request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 + def support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 + def to_json(*args); end +end + +# Params to show a resource. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentParams + # @return [ShowDocumentParams] a new instance of ShowDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 + def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 + def attributes; end + + # Indicates to show the resource in an external program. + # To show, for example, `https://code.visualstudio.com/` + # in the default WEB browser set `external` to `true`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 + def external; end + + # An optional selection range if the document is a text + # document. Clients might ignore the property if an + # external program is started or the file is not a text + # file. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 + def selection; end + + # An optional property to indicate whether the editor + # showing the document should take focus or not. + # Clients might ignore this property if an external + # program is started. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 + def take_focus; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 + def to_json(*args); end + + # The uri to show. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 + def uri; end +end + +# The result of an show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentResult + # @return [ShowDocumentResult] a new instance of ShowDocumentResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 + def initialize(success:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 + def attributes; end + + # A boolean indicating if the show was successful. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageParams + # @return [ShowMessageParams] a new instance of ShowMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 + def attributes; end + + # The actual message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType}. + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 + def type; end +end + +# Show message request client capabilities +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities + # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 + def initialize(message_action_item: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to the `MessageActionItem` type. + # + # @return [{ additionalPropertiesSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 + def message_action_item; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageRequestParams + # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 + def initialize(type:, message:, actions: T.unsafe(nil)); end + + # The message action items to present. + # + # @return [MessageActionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 + def actions; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 + def type; end +end + +# Signature help represents the signature of something +# callable. There can be multiple signature but only one +# active and only one active parameter. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 +class LanguageServer::Protocol::Interface::SignatureHelp + # @return [SignatureHelp] a new instance of SignatureHelp + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 + def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The active parameter of the active signature. If omitted or the value + # lies outside the range of `signatures[activeSignature].parameters` + # defaults to 0 if the active signature has parameters. If + # the active signature has no parameters it is ignored. + # In future version of the protocol this property might become + # mandatory to better express the active parameter if the + # active signature does have any. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 + def active_parameter; end + + # The active signature. If omitted or the value lies outside the + # range of `signatures` the value defaults to zero or is ignore if + # the `SignatureHelp` as no signatures. + # + # Whenever possible implementors should make an active decision about + # the active signature and shouldn't rely on a default value. + # + # In future version of the protocol this property might become + # mandatory to better express this. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 + def active_signature; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 + def attributes; end + + # One or more signatures. If no signatures are available the signature help + # request should return `null`. + # + # @return [SignatureInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 + def signatures; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities + # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 + def attributes; end + + # The client supports to send additional context information for a + # `textDocument/signatureHelp` request. A client that opts into + # contextSupport will also support the `retriggerCharacters` on + # `SignatureHelpOptions`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 + def context_support; end + + # Whether signature help supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 + def dynamic_registration; end + + # The client supports the following `SignatureInformation` + # specific properties. + # + # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 + def signature_information; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 + def to_json(*args); end +end + +# Additional information about the context in which a signature help request +# was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 +class LanguageServer::Protocol::Interface::SignatureHelpContext + # @return [SignatureHelpContext] a new instance of SignatureHelpContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 + def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end + + # The currently active `SignatureHelp`. + # + # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field + # updated based on the user navigating through available signatures. + # + # @return [SignatureHelp] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 + def active_signature_help; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 + def attributes; end + + # `true` if signature help was already showing when it was triggered. + # + # Retriggers occur when the signature help is already active and can be + # caused by actions such as typing a trigger character, a cursor move, or + # document content changes. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 + def is_retrigger; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 + def to_json(*args); end + + # Character that caused signature help to be triggered. + # + # This is undefined when triggerKind !== + # SignatureHelpTriggerKind.TriggerCharacter + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 + def trigger_character; end + + # Action that caused signature help to be triggered. + # + # @return [SignatureHelpTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpOptions + # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 + def attributes; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpParams + # @return [SignatureHelpParams] a new instance of SignatureHelpParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 + def attributes; end + + # The signature help context. This is only available if the client + # specifies to send this using the client capability + # `textDocument.signatureHelp.contextSupport === true` + # + # @return [SignatureHelpContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 + def context; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions + # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 + def document_selector; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 + def work_done_progress; end +end + +# Represents the signature of something callable. A signature +# can have a label, like a function-name, a doc-comment, and +# a set of parameters. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 +class LanguageServer::Protocol::Interface::SignatureInformation + # @return [SignatureInformation] a new instance of SignatureInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 + def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The index of the active parameter. + # + # If provided, this is used in place of `SignatureHelp.activeParameter`. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 + def active_parameter; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 + def attributes; end + + # The human-readable doc-comment of this signature. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 + def documentation; end + + # The label of this signature. Will be shown in + # the UI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 + def label; end + + # The parameters of this signature. + # + # @return [ParameterInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 + def parameters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 + def to_json(*args); end +end + +# Static registration options to be returned in the initialize request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 +class LanguageServer::Protocol::Interface::StaticRegistrationOptions + # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 + def initialize(id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 + def to_json(*args); end +end + +# Represents information about programming constructs like variables, classes, +# interfaces etc. +# +# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 +class LanguageServer::Protocol::Interface::SymbolInformation + # @return [SymbolInformation] a new instance of SymbolInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 + def container_name; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 + def deprecated; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 + def kind; end + + # The location of this symbol. The location's range is used by a tool + # to reveal the location in the editor. If the symbol is selected in the + # tool the range's start information is used to position the cursor. So + # the range usually spans more then the actual symbol's name and does + # normally include things like visibility modifiers. + # + # The range doesn't have to denote a node range in the sense of an abstract + # syntax tree. It can therefore not be used to re-construct a hierarchy of + # the symbols. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 + def name; end + + # Tags for this symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 + def to_json(*args); end +end + +# Describe options to be used when registering for text document change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions + # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 + def initialize(document_selector:, sync_kind:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 + def document_selector; end + + # How documents are synced to the server. See TextDocumentSyncKind.Full + # and TextDocumentSyncKind.Incremental. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 + def sync_kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 + def to_json(*args); end +end + +# Text document specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities + # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 + def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 + def attributes; end + + # Capabilities specific to the various call hierarchy requests. + # + # @return [CallHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 + def call_hierarchy; end + + # Capabilities specific to the `textDocument/codeAction` request. + # + # @return [CodeActionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 + def code_action; end + + # Capabilities specific to the `textDocument/codeLens` request. + # + # @return [CodeLensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 + def code_lens; end + + # Capabilities specific to the `textDocument/documentColor` and the + # `textDocument/colorPresentation` request. + # + # @return [DocumentColorClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 + def color_provider; end + + # Capabilities specific to the `textDocument/completion` request. + # + # @return [CompletionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 + def completion; end + + # Capabilities specific to the `textDocument/declaration` request. + # + # @return [DeclarationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 + def declaration; end + + # Capabilities specific to the `textDocument/definition` request. + # + # @return [DefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 + def definition; end + + # Capabilities specific to the diagnostic pull model. + # + # @return [DiagnosticClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 + def diagnostic; end + + # Capabilities specific to the `textDocument/documentHighlight` request. + # + # @return [DocumentHighlightClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 + def document_highlight; end + + # Capabilities specific to the `textDocument/documentLink` request. + # + # @return [DocumentLinkClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 + def document_link; end + + # Capabilities specific to the `textDocument/documentSymbol` request. + # + # @return [DocumentSymbolClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 + def document_symbol; end + + # Capabilities specific to the `textDocument/foldingRange` request. + # + # @return [FoldingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 + def folding_range; end + + # Capabilities specific to the `textDocument/formatting` request. + # + # @return [DocumentFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 + def formatting; end + + # Capabilities specific to the `textDocument/hover` request. + # + # @return [HoverClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 + def hover; end + + # Capabilities specific to the `textDocument/implementation` request. + # + # @return [ImplementationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 + def implementation; end + + # Capabilities specific to the `textDocument/inlayHint` request. + # + # @return [InlayHintClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 + def inlay_hint; end + + # Capabilities specific to the `textDocument/inlineValue` request. + # + # @return [InlineValueClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 + def inline_value; end + + # Capabilities specific to the `textDocument/linkedEditingRange` request. + # + # @return [LinkedEditingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 + def linked_editing_range; end + + # Capabilities specific to the `textDocument/moniker` request. + # + # @return [MonikerClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 + def moniker; end + + # request. + # Capabilities specific to the `textDocument/onTypeFormatting` request. + # + # @return [DocumentOnTypeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 + def on_type_formatting; end + + # Capabilities specific to the `textDocument/publishDiagnostics` + # notification. + # + # @return [PublishDiagnosticsClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 + def publish_diagnostics; end + + # Capabilities specific to the `textDocument/rangeFormatting` request. + # + # @return [DocumentRangeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 + def range_formatting; end + + # Capabilities specific to the `textDocument/references` request. + # + # @return [ReferenceClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 + def references; end + + # Capabilities specific to the `textDocument/rename` request. + # + # @return [RenameClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 + def rename; end + + # Capabilities specific to the `textDocument/selectionRange` request. + # + # @return [SelectionRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 + def selection_range; end + + # Capabilities specific to the various semantic token requests. + # + # @return [SemanticTokensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 + def semantic_tokens; end + + # Capabilities specific to the `textDocument/signatureHelp` request. + # + # @return [SignatureHelpClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 + def signature_help; end + + # @return [TextDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 + def to_json(*args); end + + # Capabilities specific to the `textDocument/typeDefinition` request. + # + # @return [TypeDefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 + def type_definition; end + + # Capabilities specific to the various type hierarchy requests. + # + # @return [TypeHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 + def type_hierarchy; end +end + +# An event describing a change to a text document. If only a text is provided +# it is considered to be the full content of the document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 +class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent + # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 + def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 + def attributes; end + + # The range of the document that changed. + # + # @return [Range, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 + def range; end + + # The optional length of the range that got replaced. + # + # @return [number, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 + def range_length; end + + # The new text for the provided range. + # + # --- OR --- + # + # The new text of the whole document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentEdit + # @return [TextDocumentEdit] a new instance of TextDocumentEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 + def initialize(text_document:, edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 + def attributes; end + + # The edits to be applied. + # + # @return [(TextEdit | AnnotatedTextEdit)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 + def edits; end + + # The text document to change. + # + # @return [OptionalVersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentIdentifier + # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentItem + # @return [TextDocumentItem] a new instance of TextDocumentItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 + def initialize(uri:, language_id:, version:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 + def attributes; end + + # The text document's language identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 + def language_id; end + + # The content of the opened text document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentPositionParams + # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 + def initialize(text_document:, position:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 + def to_json(*args); end +end + +# General text document registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions + # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 + def initialize(document_selector:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions + # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 + def initialize(document_selector:, include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 + def document_selector; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities + # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 + def attributes; end + + # The client supports did save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 + def did_save; end + + # Whether text document synchronization supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 + def to_json(*args); end + + # The client supports sending will save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 + def will_save; end + + # The client supports sending a will save request and + # waits for a response providing text edits which will + # be applied to the document before it is saved. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncOptions + # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 + def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 + def attributes; end + + # Change notifications are sent to the server. See + # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and + # TextDocumentSyncKind.Incremental. If omitted it defaults to + # TextDocumentSyncKind.None. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 + def change; end + + # Open and close notifications are sent to the server. If omitted open + # close notifications should not be sent. + # Open and close notifications are sent to the server. If omitted open + # close notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 + def open_close; end + + # If present save notifications are sent to the server. If omitted the + # notification should not be sent. + # + # @return [boolean | SaveOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 + def to_json(*args); end + + # If present will save notifications are sent to the server. If omitted + # the notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 + def will_save; end + + # If present will save wait until requests are sent to the server. If + # omitted the request should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 +class LanguageServer::Protocol::Interface::TextEdit + # @return [TextEdit] a new instance of TextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 + def initialize(range:, new_text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities + # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `TypeDefinitionRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionOptions + # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionParams + # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions + # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyItem + # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 + def attributes; end + + # A data entry field that is preserved between a type hierarchy prepare and + # supertypes or subtypes requests. It could also be used to identify the + # type hierarchy in the server, helping improve the performance on + # resolving supertypes and subtypes. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#TypeHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyOptions + # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams + # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions + # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams + # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams + # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 + def work_done_token; end +end + +# A diagnostic report indicating that the last returned +# report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 +class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport + # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 + def initialize(kind:, result_id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 + def to_json(*args); end +end + +# General parameters to unregister a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 +class LanguageServer::Protocol::Interface::Unregistration + # @return [Unregistration] a new instance of Unregistration + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 + def initialize(id:, method:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 + def attributes; end + + # The id used to unregister the request or notification. Usually an id + # provided during the register request. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 + def id; end + + # The method / capability to unregister for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 + def method; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 +class LanguageServer::Protocol::Interface::UnregistrationParams + # @return [UnregistrationParams] a new instance of UnregistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 + def initialize(unregisterations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 + def to_json(*args); end + + # @return [Unregistration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 + def unregisterations; end +end + +# A versioned notebook document identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier + # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 + def initialize(version:, uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 + def uri; end + + # The version number of this notebook document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier + # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 + def version; end +end + +# The parameters send in a will save text document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 +class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams + # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 + def initialize(text_document:, reason:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 + def attributes; end + + # The 'TextDocumentSaveReason'. + # + # @return [TextDocumentSaveReason] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 + def reason; end + + # The document that will be saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressBegin + # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 + def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 + def attributes; end + + # Controls if a cancel button should show to allow the user to cancel the + # long running operation. Clients that don't support cancellation are + # allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 + def cancellable; end + + # @return ["begin"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 + def percentage; end + + # Mandatory title of the progress operation. Used to briefly inform about + # the kind of operation being performed. + # + # Examples: "Indexing" or "Linking dependencies". + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams + # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams + # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressEnd + # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 + def initialize(kind:, message: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 + def attributes; end + + # @return ["end"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 + def kind; end + + # Optional, a final message indicating to for example indicate the outcome + # of the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressOptions + # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressParams + # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 + def initialize(work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressReport + # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 + def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 + def attributes; end + + # Controls enablement state of a cancel button. This property is only valid + # if a cancel button got requested in the `WorkDoneProgressBegin` payload. + # + # Clients that don't support cancellation or don't support control the + # button's enablement state are allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 + def cancellable; end + + # @return ["report"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 + def percentage; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 + def to_json(*args); end +end + +# Parameters of the workspace diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams + # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 + def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 + def partial_result_token; end + + # The currently known diagnostic reports with their + # previous result ids. + # + # @return [PreviousResultId[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 + def previous_result_ids; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 + def work_done_token; end +end + +# A workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport + # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 + def to_json(*args); end +end + +# A partial result for a workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult + # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEdit + # @return [WorkspaceEdit] a new instance of WorkspaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 + def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 + def attributes; end + + # A map of change annotations that can be referenced in + # `AnnotatedTextEdit`s or create, rename and delete file / folder + # operations. + # + # Whether clients honor this property depends on the client capability + # `workspace.changeAnnotationSupport`. + # + # @return [{ [id: string]: ChangeAnnotation; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 + def change_annotations; end + + # Holds changes to existing resources. + # + # @return [{}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 + def changes; end + + # Depending on the client capability + # `workspace.workspaceEdit.resourceOperations` document changes are either + # an array of `TextDocumentEdit`s to express changes to n different text + # documents where each text document edit addresses a specific version of + # a text document. Or it can contain above `TextDocumentEdit`s mixed with + # create, rename and delete file / folder operations. + # + # Whether a client supports versioned document edits is expressed via + # `workspace.workspaceEdit.documentChanges` client capability. + # + # If a client neither supports `documentChanges` nor + # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s + # using the `changes` property are supported. + # + # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 + def document_changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities + # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 + def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 + def attributes; end + + # Whether the client in general supports change annotations on text edits, + # create file, rename file and delete file changes. + # + # @return [{ groupsOnLabel?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 + def change_annotation_support; end + + # The client supports versioned document changes in `WorkspaceEdit`s + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 + def document_changes; end + + # The failure handling strategy of a client if applying the workspace edit + # fails. + # + # @return [FailureHandlingKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 + def failure_handling; end + + # Whether the client normalizes line endings to the client specific + # setting. + # If set to `true` the client will normalize line ending characters + # in a workspace edit to the client specific new line character(s). + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 + def normalizes_line_endings; end + + # The resource operations the client supports. Clients should at least + # support 'create', 'rename' and 'delete' files and folders. + # + # @return [ResourceOperationKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 + def resource_operations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFolder + # @return [WorkspaceFolder] a new instance of WorkspaceFolder + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 + def initialize(uri:, name:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 + def attributes; end + + # The name of the workspace folder. Used to refer to this + # workspace folder in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 + def name; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 + def to_json(*args); end + + # The associated URI for this workspace folder. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 + def uri; end +end + +# The workspace folder change event. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent + # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 + def initialize(added:, removed:); end + + # The array of added workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 + def added; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 + def attributes; end + + # The array of the removed workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 + def removed; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities + # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 + def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 + def attributes; end + + # Whether the server wants to receive workspace folder + # change notifications. + # + # If a string is provided, the string is treated as an ID + # under which the notification is registered on the client + # side. The ID can be used to unregister for these events + # using the `client/unregisterCapability` request. + # + # @return [string | boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 + def change_notifications; end + + # The server has support for workspace folders + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 + def supported; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 + def to_json(*args); end +end + +# A full document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport + # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 + def version; end +end + +# A special workspace symbol that supports locations without a range +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbol + # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 + def container_name; end + + # A data entry field that is preserved on a workspace symbol between a + # workspace symbol request and a workspace symbol resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 + def data; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 + def kind; end + + # The location of this symbol. Whether a server is allowed to + # return a location without a range depends on the client + # capability `workspace.symbol.resolveSupport`. + # + # See also `SymbolInformation.location`. + # + # @return [Location | { uri: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 + def name; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities + # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 + def attributes; end + + # Symbol request supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 + def dynamic_registration; end + + # The client support partial workspace symbols. The client will send the + # request `workspaceSymbol/resolve` to the server to resolve additional + # properties. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 + def resolve_support; end + + # Specific capabilities for the `SymbolKind` in the `workspace/symbol` + # request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 + def symbol_kind; end + + # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions + # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 + def work_done_progress; end +end + +# The parameters of a Workspace Symbol Request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbolParams + # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 + def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 + def partial_result_token; end + + # A query string to filter symbols by. Clients may send an empty + # string here to request all symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 + def query; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions + # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 + def work_done_progress; end +end + +# An unchanged document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport + # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 +module LanguageServer::Protocol::Transport; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 +module LanguageServer::Protocol::Transport::Io; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 +class LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 + def initialize(io); end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 + def read(&block); end + + private + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 + def io; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 +class LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 + def initialize(io); end + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 + def io; end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 + def write(response); end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 +module LanguageServer::Protocol::Transport::Stdio; end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#3 +LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/mime-types-data@3.2023.0808.rbi b/sorbet/rbi/gems/mime-types-data@3.2023.0808.rbi new file mode 100644 index 0000000000..822983cb6e --- /dev/null +++ b/sorbet/rbi/gems/mime-types-data@3.2023.0808.rbi @@ -0,0 +1,126 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mime-types-data` gem. +# Please instead update this file by running `bin/tapioca gem mime-types-data`. + +# source://mime-types-data//lib/mime/types/data.rb#3 +module MIME; end + +# source://mime-types-data//lib/mime/types/data.rb#4 +class MIME::Types + extend ::Enumerable + + # source://mime-types/3.5.1/lib/mime/types.rb#75 + def initialize; end + + # source://mime-types/3.5.1/lib/mime/types.rb#125 + def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end + + # source://mime-types/3.5.1/lib/mime/types.rb#167 + def add(*types); end + + # source://mime-types/3.5.1/lib/mime/types.rb#188 + def add_type(type, quiet = T.unsafe(nil)); end + + # source://mime-types/3.5.1/lib/mime/types.rb#81 + def count; end + + # source://mime-types/3.5.1/lib/mime/types.rb#90 + def each; end + + # source://mime-types/3.5.1/lib/mime/types.rb#85 + def inspect; end + + # source://mime-types/3.5.1/lib/mime/types.rb#153 + def of(filename); end + + # source://mime-types/3.5.1/lib/mime/types.rb#153 + def type_for(filename); end + + private + + # source://mime-types/3.5.1/lib/mime/types.rb#201 + def add_type_variant!(mime_type); end + + # source://mime-types/3.5.1/lib/mime/types.rb#211 + def index_extensions!(mime_type); end + + # source://mime-types/3.5.1/lib/mime/types.rb#221 + def match(pattern); end + + # source://mime-types/3.5.1/lib/mime/types.rb#215 + def prune_matches(matches, complete, registered); end + + # source://mime-types/3.5.1/lib/mime/types.rb#205 + def reindex_extensions!(mime_type); end + + class << self + # source://mime-types/3.5.1/lib/mime/types/registry.rb#14 + def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#39 + def add(*types); end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#19 + def count; end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#24 + def each; end + + # source://mime-types/3.5.1/lib/mime/types/logger.rb#12 + def logger; end + + # source://mime-types/3.5.1/lib/mime/types/logger.rb#12 + def logger=(_arg0); end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#7 + def new(*_arg0); end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#33 + def of(filename); end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#33 + def type_for(filename); end + + private + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#75 + def __instances__; end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#55 + def __types__; end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#45 + def lazy_load?; end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#65 + def load_default_mime_types(mode = T.unsafe(nil)); end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#60 + def load_mode; end + + # source://mime-types/3.5.1/lib/mime/types/registry.rb#79 + def reindex_extensions(type); end + end +end + +# source://mime-types-data//lib/mime/types/data.rb#5 +module MIME::Types::Data; end + +# The path that will be used for loading the MIME::Types data. The +# default location is __FILE__/../../../../data, which is where the data +# lives in the gem installation of the mime-types-data library. +# +# The MIME::Types::Loader will load all JSON or columnar files contained +# in this path. +# +# System maintainer note: this is the constant to change when packaging +# mime-types for your system. It is recommended that the path be +# something like /usr/share/ruby/mime-types/. +# +# source://mime-types-data//lib/mime/types/data.rb#18 +MIME::Types::Data::PATH = T.let(T.unsafe(nil), String) + +# source://mime-types-data//lib/mime/types/data.rb#6 +MIME::Types::Data::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/mime-types@3.5.1.rbi b/sorbet/rbi/gems/mime-types@3.5.1.rbi new file mode 100644 index 0000000000..6481f44807 --- /dev/null +++ b/sorbet/rbi/gems/mime-types@3.5.1.rbi @@ -0,0 +1,1251 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mime-types` gem. +# Please instead update this file by running `bin/tapioca gem mime-types`. + +# The namespace for MIME applications, tools, and libraries. +# +# source://mime-types//lib/mime/types.rb#4 +module MIME; end + +# The definition of one MIME content-type. +# +# == Usage +# require 'mime/types' +# +# plaintext = MIME::Types['text/plain'] # => [ text/plain ] +# text = plaintext.first +# puts text.media_type # => 'text' +# puts text.sub_type # => 'plain' +# +# puts text.extensions.join(' ') # => 'txt asc c cc h hh cpp hpp dat hlp' +# puts text.preferred_extension # => 'txt' +# puts text.friendly # => 'Text Document' +# puts text.i18n_key # => 'text.plain' +# +# puts text.encoding # => quoted-printable +# puts text.default_encoding # => quoted-printable +# puts text.binary? # => false +# puts text.ascii? # => true +# puts text.obsolete? # => false +# puts text.registered? # => true +# puts text.provisional? # => false +# puts text.complete? # => true +# +# puts text # => 'text/plain' +# +# puts text == 'text/plain' # => true +# puts 'text/plain' == text # => true +# puts text == 'text/x-plain' # => false +# puts 'text/x-plain' == text # => false +# +# puts MIME::Type.simplified('x-appl/x-zip') # => 'x-appl/x-zip' +# puts MIME::Type.i18n_key('x-appl/x-zip') # => 'x-appl.x-zip' +# +# puts text.like?('text/x-plain') # => true +# puts text.like?(MIME::Type.new('x-text/x-plain')) # => true +# +# puts text.xrefs.inspect # => { "rfc" => [ "rfc2046", "rfc3676", "rfc5147" ] } +# puts text.xref_urls # => [ "http://www.iana.org/go/rfc2046", +# # "http://www.iana.org/go/rfc3676", +# # "http://www.iana.org/go/rfc5147" ] +# +# xtext = MIME::Type.new('x-text/x-plain') +# puts xtext.media_type # => 'text' +# puts xtext.raw_media_type # => 'x-text' +# puts xtext.sub_type # => 'plain' +# puts xtext.raw_sub_type # => 'x-plain' +# puts xtext.complete? # => false +# +# puts MIME::Types.any? { |type| type.content_type == 'text/plain' } # => true +# puts MIME::Types.all?(&:registered?) # => false +# +# # Various string representations of MIME types +# qcelp = MIME::Types['audio/QCELP'].first # => audio/QCELP +# puts qcelp.content_type # => 'audio/QCELP' +# puts qcelp.simplified # => 'audio/qcelp' +# +# xwingz = MIME::Types['application/x-Wingz'].first # => application/x-Wingz +# puts xwingz.content_type # => 'application/x-Wingz' +# puts xwingz.simplified # => 'application/x-wingz' +# +# source://mime-types//lib/mime/type.rb#67 +class MIME::Type + include ::Comparable + + # Builds a MIME::Type object from the +content_type+, a MIME Content Type + # value (e.g., 'text/plain' or 'application/x-eruby'). The constructed object + # is yielded to an optional block for additional configuration, such as + # associating extensions and encoding information. + # + # * When provided a Hash or a MIME::Type, the MIME::Type will be + # constructed with #init_with. + # * When provided an Array, the MIME::Type will be constructed using + # the first element as the content type and the remaining flattened + # elements as extensions. + # * Otherwise, the content_type will be used as a string. + # + # Yields the newly constructed +self+ object. + # + # @return [Type] a new instance of Type + # @yield [_self] + # @yieldparam _self [MIME::Type] the object that the method was called on + # + # source://mime-types//lib/mime/type.rb#125 + def initialize(content_type); end + + # Compares the +other+ MIME::Type against the exact content type or the + # simplified type (the simplified type will be used if comparing against + # something that can be treated as a String with #to_s). In comparisons, this + # is done against the lowercase version of the MIME::Type. + # + # source://mime-types//lib/mime/type.rb#165 + def <=>(other); end + + # Merge the +extensions+ provided into this MIME::Type. The extensions added + # will be merged uniquely. + # + # source://mime-types//lib/mime/type.rb#313 + def add_extensions(*extensions); end + + # MIME types can be specified to be sent across a network in particular + # formats. This method returns +false+ when the MIME::Type encoding is + # set to base64. + # + # @return [Boolean] + # + # source://mime-types//lib/mime/type.rb#467 + def ascii?; end + + # MIME types can be specified to be sent across a network in particular + # formats. This method returns +true+ when the MIME::Type encoding is set + # to base64. + # + # @return [Boolean] + # + # source://mime-types//lib/mime/type.rb#460 + def binary?; end + + # Returns +true+ if the MIME::Type specifies an extension list, + # indicating that it is a complete MIME::Type. + # + # @return [Boolean] + # + # source://mime-types//lib/mime/type.rb#477 + def complete?; end + + # Returns the whole MIME content-type string. + # + # The content type is a presentation value from the MIME type registry and + # should not be used for comparison. The case of the content type is + # preserved, and extension markers (x-) are kept. + # + # text/plain => text/plain + # x-chemical/x-pdb => x-chemical/x-pdb + # audio/QCELP => audio/QCELP + # + # source://mime-types//lib/mime/type.rb#262 + def content_type; end + + # Returns the default encoding for the MIME::Type based on the media type. + # + # source://mime-types//lib/mime/type.rb#366 + def default_encoding; end + + # The documentation for this MIME::Type. + # + # source://mime-types//lib/mime/type.rb#390 + def docs; end + + # The documentation for this MIME::Type. + # + # source://mime-types//lib/mime/type.rb#390 + def docs=(_arg0); end + + # Populates the +coder+ with attributes about this record for + # serialization. The structure of +coder+ should match the structure used + # with #init_with. + # + # This method should be considered a private implementation detail. + # + # source://mime-types//lib/mime/type.rb#511 + def encode_with(coder); end + + # Returns the value of attribute encoding. + # + # source://mime-types//lib/mime/type.rb#352 + def encoding; end + + # source://mime-types//lib/mime/type.rb#355 + def encoding=(enc); end + + # Returns +true+ if the +other+ object is a MIME::Type and the content types + # match. + # + # @return [Boolean] + # + # source://mime-types//lib/mime/type.rb#223 + def eql?(other); end + + # The list of extensions which are known to be used for this MIME::Type. + # Non-array values will be coerced into an array with #to_a. Array values + # will be flattened, +nil+ values removed, and made unique. + # + # :attr_accessor: extensions + # + # source://mime-types//lib/mime/type.rb#301 + def extensions; end + + # source://mime-types//lib/mime/type.rb#306 + def extensions=(value); end + + # A friendly short description for this MIME::Type. + # + # call-seq: + # text_plain.friendly # => "Text File" + # text_plain.friendly('en') # => "Text File" + # + # source://mime-types//lib/mime/type.rb#397 + def friendly(lang = T.unsafe(nil)); end + + # Returns a hash based on the #simplified value. + # + # This maintains the invariant that two #eql? instances must have the same + # #hash (although having the same #hash does *not* imply that the objects are + # #eql?). + # + # To see why, suppose a MIME::Type instance +a+ is compared to another object + # +b+, and that a.eql?(b) is true. By the definition of #eql?, + # we know the following: + # + # 1. +b+ is a MIME::Type instance itself. + # 2. a == b is true. + # + # Due to the first point, we know that +b+ should respond to the #simplified + # method. Thus, per the definition of #<=>, we know that +a.simplified+ must + # be equal to +b.simplified+, as compared by the <=> method corresponding to + # +a.simplified+. + # + # Presumably, if a.simplified <=> b.simplified is +0+, then + # +a.simplified+ has the same hash as +b.simplified+. So we assume it's + # suitable for #hash to delegate to #simplified in service of the #eql? + # invariant. + # + # source://mime-types//lib/mime/type.rb#249 + def hash; end + + # A key suitable for use as a lookup key for translations, such as with + # the I18n library. + # + # call-seq: + # text_plain.i18n_key # => "text.plain" + # 3gpp_xml.i18n_key # => "application.vnd-3gpp-bsf-xml" + # # from application/vnd.3gpp.bsf+xml + # x_msword.i18n_key # => "application.word" + # # from application/x-msword + # + # source://mime-types//lib/mime/type.rb#422 + def i18n_key; end + + # Initialize an empty object from +coder+, which must contain the + # attributes necessary for initializing an empty object. + # + # This method should be considered a private implementation detail. + # + # source://mime-types//lib/mime/type.rb#540 + def init_with(coder); end + + # source://mime-types//lib/mime/type.rb#556 + def inspect; end + + # Indicates that a MIME type is like another type. This differs from + # == because x- prefixes are removed for this comparison. + # + # @return [Boolean] + # + # source://mime-types//lib/mime/type.rb#151 + def like?(other); end + + # Returns the media type of the simplified MIME::Type. + # + # text/plain => text + # x-chemical/x-pdb => x-chemical + # audio/QCELP => audio + # + # source://mime-types//lib/mime/type.rb#275 + def media_type; end + + # Returns +true+ if the media type is obsolete. + # + # source://mime-types//lib/mime/type.rb#386 + def obsolete; end + + # Returns +true+ if the media type is obsolete. + # + # source://mime-types//lib/mime/type.rb#386 + def obsolete=(_arg0); end + + # Returns +true+ if the media type is obsolete. + # + # source://mime-types//lib/mime/type.rb#386 + def obsolete?; end + + # source://mime-types//lib/mime/type.rb#327 + def preferred_extension; end + + # source://mime-types//lib/mime/type.rb#332 + def preferred_extension=(value); end + + # Compares the +other+ MIME::Type based on how reliable it is before doing a + # normal <=> comparison. Used by MIME::Types#[] to sort types. The + # comparisons involved are: + # + # 1. self.simplified <=> other.simplified (ensures that we + # don't try to compare different types) + # 2. IANA-registered definitions < other definitions. + # 3. Complete definitions < incomplete definitions. + # 4. Current definitions < obsolete definitions. + # 5. Obselete with use-instead names < obsolete without. + # 6. Obsolete use-instead definitions are compared. + # + # While this method is public, its use is strongly discouraged by consumers + # of mime-types. In mime-types 3, this method is likely to see substantial + # revision and simplification to ensure current registered content types sort + # before unregistered or obsolete content types. + # + # source://mime-types//lib/mime/type.rb#195 + def priority_compare(other); end + + # Indicates whether the MIME type's registration with IANA is provisional. + # + # source://mime-types//lib/mime/type.rb#450 + def provisional; end + + # Indicates whether the MIME type's registration with IANA is provisional. + # + # source://mime-types//lib/mime/type.rb#450 + def provisional=(_arg0); end + + # Indicates whether the MIME type's registration with IANA is provisional. + # + # @return [Boolean] + # + # source://mime-types//lib/mime/type.rb#453 + def provisional?; end + + # Returns the media type of the unmodified MIME::Type. + # + # text/plain => text + # x-chemical/x-pdb => x-chemical + # audio/QCELP => audio + # + # source://mime-types//lib/mime/type.rb#281 + def raw_media_type; end + + # Returns the media type of the unmodified MIME::Type. + # + # text/plain => plain + # x-chemical/x-pdb => x-pdb + # audio/QCELP => qcelp + # + # source://mime-types//lib/mime/type.rb#293 + def raw_sub_type; end + + # Indicates whether the MIME type has been registered with IANA. + # + # source://mime-types//lib/mime/type.rb#446 + def registered; end + + # Indicates whether the MIME type has been registered with IANA. + # + # source://mime-types//lib/mime/type.rb#446 + def registered=(_arg0); end + + # Indicates whether the MIME type has been registered with IANA. + # + # source://mime-types//lib/mime/type.rb#446 + def registered?; end + + # Indicateswhether the MIME type is declared as a signature type. + # + # source://mime-types//lib/mime/type.rb#472 + def signature; end + + # Indicateswhether the MIME type is declared as a signature type. + # + # source://mime-types//lib/mime/type.rb#472 + def signature=(_arg0); end + + # Indicateswhether the MIME type is declared as a signature type. + # + # source://mime-types//lib/mime/type.rb#472 + def signature?; end + + # A simplified form of the MIME content-type string, suitable for + # case-insensitive comparison, with the content_type converted to lowercase. + # + # text/plain => text/plain + # x-chemical/x-pdb => x-chemical/x-pdb + # audio/QCELP => audio/qcelp + # + # source://mime-types//lib/mime/type.rb#269 + def simplified; end + + # Returns the sub-type of the simplified MIME::Type. + # + # text/plain => plain + # x-chemical/x-pdb => pdb + # audio/QCELP => QCELP + # + # source://mime-types//lib/mime/type.rb#287 + def sub_type; end + + # Converts the MIME::Type to a hash. The output of this method can also be + # used to initialize a MIME::Type. + # + # source://mime-types//lib/mime/type.rb#502 + def to_h; end + + # Converts the MIME::Type to a JSON string. + # + # source://mime-types//lib/mime/type.rb#495 + def to_json(*args); end + + # Returns the MIME::Type as a string. + # + # source://mime-types//lib/mime/type.rb#482 + def to_s; end + + # Returns the MIME::Type as a string for implicit conversions. This allows + # MIME::Type objects to appear on either side of a comparison. + # + # 'text/plain' == MIME::Type.new('text/plain') + # + # source://mime-types//lib/mime/type.rb#490 + def to_str; end + + # source://mime-types//lib/mime/type.rb#378 + def use_instead; end + + # Sets the attribute use_instead + # + # @param value the value to set the attribute use_instead to. + # + # source://mime-types//lib/mime/type.rb#383 + def use_instead=(_arg0); end + + # The decoded cross-reference URL list for this MIME::Type. + # + # source://mime-types//lib/mime/type.rb#438 + def xref_urls; end + + # Returns the value of attribute xrefs. + # + # source://mime-types//lib/mime/type.rb#430 + def xrefs; end + + # source://mime-types//lib/mime/type.rb#433 + def xrefs=(xrefs); end + + private + + # source://mime-types//lib/mime/type.rb#609 + def content_type=(type_string); end + + # MRI 2.2 and older don't have a method for string interning, + # so we simply freeze them for keeping a similar interface + # + # source://mime-types//lib/mime/type.rb#626 + def intern_string(string); end + + # source://mime-types//lib/mime/type.rb#637 + def xref_map(values, helper); end + + # source://mime-types//lib/mime/type.rb#645 + def xref_url_for_draft(value); end + + # source://mime-types//lib/mime/type.rb#653 + def xref_url_for_person(value); end + + # source://mime-types//lib/mime/type.rb#641 + def xref_url_for_rfc(value); end + + # source://mime-types//lib/mime/type.rb#649 + def xref_url_for_rfc_errata(value); end + + # source://mime-types//lib/mime/type.rb#657 + def xref_url_for_template(value); end + + class << self + # Converts a provided +content_type+ into a translation key suitable for + # use with the I18n library. + # + # source://mime-types//lib/mime/type.rb#576 + def i18n_key(content_type); end + + # Return a +MatchData+ object of the +content_type+ against pattern of + # media types. + # + # source://mime-types//lib/mime/type.rb#584 + def match(content_type); end + + # MIME media types are case-insensitive, but are typically presented in a + # case-preserving format in the type registry. This method converts + # +content_type+ to lowercase. + # + # In previous versions of mime-types, this would also remove any extension + # prefix (x-). This is no longer default behaviour, but may be + # provided by providing a truth value to +remove_x_prefix+. + # + # source://mime-types//lib/mime/type.rb#570 + def simplified(content_type, remove_x_prefix: T.unsafe(nil)); end + + private + + # source://mime-types//lib/mime/type.rb#595 + def simplify_matchdata(matchdata, remove_x = T.unsafe(nil), joiner: T.unsafe(nil)); end + end +end + +# source://mime-types//lib/mime/type.rb#106 +MIME::Type::ASCII_ENCODINGS = T.let(T.unsafe(nil), Array) + +# source://mime-types//lib/mime/type.rb#105 +MIME::Type::BINARY_ENCODINGS = T.let(T.unsafe(nil), Array) + +# A version of MIME::Type that works hand-in-hand with a MIME::Types::Columnar +# container to load data by columns. +# +# When a field is has not yet been loaded, that data will be loaded for all +# types in the container before forwarding the message to MIME::Type. +# +# More information can be found in MIME::Types::Columnar. +# +# MIME::Type::Columnar is *not* intended to be created except by +# MIME::Types::Columnar containers. +# +# source://mime-types//lib/mime/type/columnar.rb#15 +class MIME::Type::Columnar < ::MIME::Type + # @return [Columnar] a new instance of Columnar + # + # source://mime-types//lib/mime/type/columnar.rb#16 + def initialize(container, content_type, extensions); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def docs(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def docs=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#43 + def encode_with(coder); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def encoding(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def encoding=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def friendly(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def obsolete(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def obsolete=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def obsolete?(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def preferred_extension(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def preferred_extension=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def provisional(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def provisional=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def provisional?(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def registered(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def registered=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def registered?(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def signature(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def signature=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def signature?(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def use_instead(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def use_instead=(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def xref_urls(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def xrefs(*args); end + + # source://mime-types//lib/mime/type/columnar.rb#27 + def xrefs=(*args); end +end + +# source://mime-types//lib/mime/type.rb#104 +MIME::Type::I18N_RE = T.let(T.unsafe(nil), Regexp) + +# Reflects a MIME content-type specification that is not correctly +# formatted (it isn't +type+/+subtype+). +# +# source://mime-types//lib/mime/type.rb#71 +class MIME::Type::InvalidContentType < ::ArgumentError + # :stopdoc: + # + # @return [InvalidContentType] a new instance of InvalidContentType + # + # source://mime-types//lib/mime/type.rb#72 + def initialize(type_string); end + + # source://mime-types//lib/mime/type.rb#76 + def to_s; end +end + +# Reflects an unsupported MIME encoding. +# +# source://mime-types//lib/mime/type.rb#84 +class MIME::Type::InvalidEncoding < ::ArgumentError + # :stopdoc: + # + # @return [InvalidEncoding] a new instance of InvalidEncoding + # + # source://mime-types//lib/mime/type.rb#85 + def initialize(encoding); end + + # source://mime-types//lib/mime/type.rb#89 + def to_s; end +end + +# :stopdoc: +# TODO verify mime-type character restrictions; I am pretty sure that this is +# too wide open. +# +# source://mime-types//lib/mime/type.rb#103 +MIME::Type::MEDIA_TYPE_RE = T.let(T.unsafe(nil), Regexp) + +# The released version of the mime-types library. +# +# source://mime-types//lib/mime/type.rb#96 +MIME::Type::VERSION = T.let(T.unsafe(nil), String) + +# MIME::Types is a registry of MIME types. It is both a class (created with +# MIME::Types.new) and a default registry (loaded automatically or through +# interactions with MIME::Types.[] and MIME::Types.type_for). +# +# == The Default mime-types Registry +# +# The default mime-types registry is loaded automatically when the library +# is required (require 'mime/types'), but it may be lazily loaded +# (loaded on first use) with the use of the environment variable +# +RUBY_MIME_TYPES_LAZY_LOAD+ having any value other than +false+. The +# initial startup is about 14× faster (~10 ms vs ~140 ms), but the +# registry will be loaded at some point in the future. +# +# The default mime-types registry can also be loaded from a Marshal cache +# file specific to the version of MIME::Types being loaded. This will be +# handled automatically with the use of a file referred to in the +# environment variable +RUBY_MIME_TYPES_CACHE+. MIME::Types will attempt to +# load the registry from this cache file (MIME::Type::Cache.load); if it +# cannot be loaded (because the file does not exist, there is an error, or +# the data is for a different version of mime-types), the default registry +# will be loaded from the normal JSON version and then the cache file will +# be *written* to the location indicated by +RUBY_MIME_TYPES_CACHE+. Cache +# file loads just over 4½× faster (~30 ms vs ~140 ms). +# loads. +# +# Notes: +# * The loading of the default registry is *not* atomic; when using a +# multi-threaded environment, it is recommended that lazy loading is not +# used and mime-types is loaded as early as possible. +# * Cache files should be specified per application in a multiprocess +# environment and should be initialized during deployment or before +# forking to minimize the chance that the multiple processes will be +# trying to write to the same cache file at the same time, or that two +# applications that are on different versions of mime-types would be +# thrashing the cache. +# * Unless cache files are preinitialized, the application using the +# mime-types cache file must have read/write permission to the cache file. +# +# == Usage +# require 'mime/types' +# +# plaintext = MIME::Types['text/plain'] +# print plaintext.media_type # => 'text' +# print plaintext.sub_type # => 'plain' +# +# puts plaintext.extensions.join(" ") # => 'asc txt c cc h hh cpp' +# +# puts plaintext.encoding # => 8bit +# puts plaintext.binary? # => false +# puts plaintext.ascii? # => true +# puts plaintext.obsolete? # => false +# puts plaintext.registered? # => true +# puts plaintext.provisional? # => false +# puts plaintext == 'text/plain' # => true +# puts MIME::Type.simplified('x-appl/x-zip') # => 'appl/zip' +# +# source://mime-types//lib/mime/types.rb#6 +class MIME::Types + include ::Enumerable + extend ::Enumerable + + # Creates a new MIME::Types registry. + # + # @return [Types] a new instance of Types + # + # source://mime-types//lib/mime/types.rb#75 + def initialize; end + + # Returns a list of MIME::Type objects, which may be empty. The optional + # flag parameters are :complete (finds only complete MIME::Type + # objects) and :registered (finds only MIME::Types that are + # registered). It is possible for multiple matches to be returned for + # either type (in the example below, 'text/plain' returns two values -- + # one for the general case, and one for VMS systems). + # + # puts "\nMIME::Types['text/plain']" + # MIME::Types['text/plain'].each { |t| puts t.to_a.join(", ") } + # + # puts "\nMIME::Types[/^image/, complete: true]" + # MIME::Types[/^image/, :complete => true].each do |t| + # puts t.to_a.join(", ") + # end + # + # If multiple type definitions are returned, returns them sorted as + # follows: + # 1. Complete definitions sort before incomplete ones; + # 2. IANA-registered definitions sort before LTSW-recorded + # definitions. + # 3. Current definitions sort before obsolete ones; + # 4. Obsolete definitions with use-instead clauses sort before those + # without; + # 5. Obsolete definitions use-instead clauses are compared. + # 6. Sort on name. + # + # source://mime-types//lib/mime/types.rb#125 + def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end + + # Add one or more MIME::Type objects to the set of known types. If the + # type is already known, a warning will be displayed. + # + # The last parameter may be the value :silent or +true+ which + # will suppress duplicate MIME type warnings. + # + # source://mime-types//lib/mime/types.rb#167 + def add(*types); end + + # Add a single MIME::Type object to the set of known types. If the +type+ is + # already known, a warning will be displayed. The +quiet+ parameter may be a + # truthy value to suppress that warning. + # + # source://mime-types//lib/mime/types.rb#188 + def add_type(type, quiet = T.unsafe(nil)); end + + # Returns the number of known type variants. + # + # source://mime-types//lib/mime/types.rb#81 + def count; end + + # Iterates through the type variants. + # + # source://mime-types//lib/mime/types.rb#90 + def each; end + + # source://mime-types//lib/mime/types.rb#85 + def inspect; end + + # Return the list of MIME::Types which belongs to the file based on its + # filename extension. If there is no extension, the filename will be used + # as the matching criteria on its own. + # + # This will always return a merged, flatten, priority sorted, unique array. + # + # puts MIME::Types.type_for('citydesk.xml') + # => [application/xml, text/xml] + # puts MIME::Types.type_for('citydesk.gif') + # => [image/gif] + # puts MIME::Types.type_for(%w(citydesk.xml citydesk.gif)) + # => [application/xml, image/gif, text/xml] + # + # source://mime-types//lib/mime/types.rb#153 + def of(filename); end + + # Return the list of MIME::Types which belongs to the file based on its + # filename extension. If there is no extension, the filename will be used + # as the matching criteria on its own. + # + # This will always return a merged, flatten, priority sorted, unique array. + # + # puts MIME::Types.type_for('citydesk.xml') + # => [application/xml, text/xml] + # puts MIME::Types.type_for('citydesk.gif') + # => [image/gif] + # puts MIME::Types.type_for(%w(citydesk.xml citydesk.gif)) + # => [application/xml, image/gif, text/xml] + # + # source://mime-types//lib/mime/types.rb#153 + def type_for(filename); end + + private + + # source://mime-types//lib/mime/types.rb#201 + def add_type_variant!(mime_type); end + + # source://mime-types//lib/mime/types.rb#211 + def index_extensions!(mime_type); end + + # source://mime-types//lib/mime/types.rb#221 + def match(pattern); end + + # source://mime-types//lib/mime/types.rb#215 + def prune_matches(matches, complete, registered); end + + # source://mime-types//lib/mime/types.rb#205 + def reindex_extensions!(mime_type); end + + class << self + # MIME::Types#[] against the default MIME::Types registry. + # + # source://mime-types//lib/mime/types/registry.rb#14 + def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end + + # MIME::Types#add against the default MIME::Types registry. + # + # source://mime-types//lib/mime/types/registry.rb#39 + def add(*types); end + + # MIME::Types#count against the default MIME::Types registry. + # + # source://mime-types//lib/mime/types/registry.rb#19 + def count; end + + # MIME::Types#each against the default MIME::Types registry. + # + # source://mime-types//lib/mime/types/registry.rb#24 + def each; end + + # Configure the MIME::Types logger. This defaults to an instance of a + # logger that passes messages (unformatted) through to Kernel#warn. + # + # source://mime-types//lib/mime/types/logger.rb#12 + def logger; end + + # Configure the MIME::Types logger. This defaults to an instance of a + # logger that passes messages (unformatted) through to Kernel#warn. + # + # source://mime-types//lib/mime/types/logger.rb#12 + def logger=(_arg0); end + + # source://mime-types//lib/mime/types/registry.rb#7 + def new(*_arg0); end + + # MIME::Types#type_for against the default MIME::Types registry. + # + # source://mime-types//lib/mime/types/registry.rb#33 + def of(filename); end + + # MIME::Types#type_for against the default MIME::Types registry. + # + # source://mime-types//lib/mime/types/registry.rb#33 + def type_for(filename); end + + private + + # source://mime-types//lib/mime/types/registry.rb#75 + def __instances__; end + + # source://mime-types//lib/mime/types/registry.rb#55 + def __types__; end + + # @return [Boolean] + # + # source://mime-types//lib/mime/types/registry.rb#45 + def lazy_load?; end + + # source://mime-types//lib/mime/types/registry.rb#65 + def load_default_mime_types(mode = T.unsafe(nil)); end + + # source://mime-types//lib/mime/types/registry.rb#60 + def load_mode; end + + # source://mime-types//lib/mime/types/registry.rb#79 + def reindex_extensions(type); end + end +end + +# Caching of MIME::Types registries is advisable if you will be loading +# the default registry relatively frequently. With the class methods on +# MIME::Types::Cache, any MIME::Types registry can be marshaled quickly +# and easily. +# +# The cache is invalidated on a per-data-version basis; a cache file for +# version 3.2015.1118 will not be reused with version 3.2015.1201. +# +# source://mime-types//lib/mime/types/cache.rb#3 +class MIME::Types::Cache < ::Struct + def data; end + def data=(_); end + def version; end + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + + # Attempts to load the cache from the file provided as a parameter or in + # the environment variable +RUBY_MIME_TYPES_CACHE+. Returns +nil+ if the + # file does not exist, if the file cannot be loaded, or if the data in + # the cache version is different than this version. + # + # source://mime-types//lib/mime/types/cache.rb#17 + def load(cache_file = T.unsafe(nil)); end + + def members; end + def new(*_arg0); end + + # Attempts to save the types provided to the cache file provided. + # + # If +types+ is not provided or is +nil+, the cache will contain the + # current MIME::Types default registry. + # + # If +cache_file+ is not provided or is +nil+, the cache will be written + # to the file specified in the environment variable + # +RUBY_MIME_TYPES_CACHE+. If there is no cache file specified either + # directly or through the environment, this method will return +nil+ + # + # source://mime-types//lib/mime/types/cache.rb#46 + def save(types = T.unsafe(nil), cache_file = T.unsafe(nil)); end + end +end + +# MIME::Types::Columnar is used to extend a MIME::Types container to load data +# by columns instead of from JSON or YAML. Column loads of MIME types loaded +# through the columnar store are synchronized with a Mutex. +# +# MIME::Types::Columnar is not intended to be used directly, but will be added +# to an instance of MIME::Types when it is loaded with +# MIME::Types::Loader#load_columnar. +# +# source://mime-types//lib/mime/types/_columnar.rb#12 +module MIME::Types::Columnar + # Load the first column data file (type and extensions). + # + # source://mime-types//lib/mime/types/_columnar.rb#22 + def load_base_data(path); end + + private + + # source://mime-types//lib/mime/types/_columnar.rb#122 + def arr(line); end + + # source://mime-types//lib/mime/types/_columnar.rb#110 + def dict(line, array: T.unsafe(nil)); end + + # source://mime-types//lib/mime/types/_columnar.rb#41 + def each_file_line(name, lookup = T.unsafe(nil)); end + + # source://mime-types//lib/mime/types/_columnar.rb#134 + def flag(line); end + + # source://mime-types//lib/mime/types/_columnar.rb#70 + def load_docs; end + + # source://mime-types//lib/mime/types/_columnar.rb#63 + def load_encoding; end + + # source://mime-types//lib/mime/types/_columnar.rb#82 + def load_flags; end + + # source://mime-types//lib/mime/types/_columnar.rb#98 + def load_friendly; end + + # source://mime-types//lib/mime/types/_columnar.rb#76 + def load_preferred_extension; end + + # source://mime-types//lib/mime/types/_columnar.rb#104 + def load_use_instead; end + + # source://mime-types//lib/mime/types/_columnar.rb#92 + def load_xrefs; end + + # source://mime-types//lib/mime/types/_columnar.rb#130 + def opt(line); end + + class << self + # source://mime-types//lib/mime/types/_columnar.rb#15 + def extended(obj); end + end +end + +# source://mime-types//lib/mime/types/_columnar.rb#13 +MIME::Types::Columnar::LOAD_MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# MIME::Types requires a serializable keyed container that returns an empty Set +# on a key miss. Hash#default_value cannot be used because, while it traverses +# the Marshal format correctly, it won't survive any other serialization +# format (plus, a default of a mutable object resuls in a shared mess). +# Hash#default_proc cannot be used without a wrapper because it prevents +# Marshal serialization (and doesn't survive the round-trip). +# +# source://mime-types//lib/mime/types/container.rb#12 +class MIME::Types::Container + extend ::Forwardable + + # @return [Container] a new instance of Container + # + # source://mime-types//lib/mime/types/container.rb#15 + def initialize(hash = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def ==(*args, **_arg1, &block); end + + # source://mime-types//lib/mime/types/container.rb#20 + def [](key); end + + # source://mime-types//lib/mime/types/container.rb#24 + def []=(key, value); end + + # source://mime-types//lib/mime/types/container.rb#61 + def add(key, value); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def count(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_value(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def empty?(*args, **_arg1, &block); end + + # source://mime-types//lib/mime/types/container.rb#73 + def encode_with(coder); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def flat_map(*args, **_arg1, &block); end + + # source://mime-types//lib/mime/types/container.rb#77 + def init_with(coder); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def keys(*args, **_arg1, &block); end + + # source://mime-types//lib/mime/types/container.rb#65 + def marshal_dump; end + + # source://mime-types//lib/mime/types/container.rb#69 + def marshal_load(hash); end + + # source://mime-types//lib/mime/types/container.rb#34 + def merge(other); end + + # source://mime-types//lib/mime/types/container.rb#38 + def merge!(other); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def select(*args, **_arg1, &block); end + + # source://mime-types//lib/mime/types/container.rb#46 + def to_hash; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def values(*args, **_arg1, &block); end + + protected + + # Returns the value of attribute container. + # + # source://mime-types//lib/mime/types/container.rb#84 + def container; end + + # Sets the attribute container + # + # @param value the value to set the attribute container to. + # + # source://mime-types//lib/mime/types/container.rb#84 + def container=(_arg0); end + + # source://mime-types//lib/mime/types/container.rb#86 + def normalize; end +end + +# source://mime-types//lib/mime/types/container.rb#94 +MIME::Types::Container::EMPTY_SET = T.let(T.unsafe(nil), Set) + +# This class is responsible for initializing the MIME::Types registry from +# the data files supplied with the mime-types library. +# +# The Loader will use one of the following paths: +# 1. The +path+ provided in its constructor argument; +# 2. The value of ENV['RUBY_MIME_TYPES_DATA']; or +# 3. The value of MIME::Types::Data::PATH. +# +# When #load is called, the +path+ will be searched recursively for all YAML +# (.yml or .yaml) files. By convention, there is one file for each media +# type (application.yml, audio.yml, etc.), but this is not required. +# +# source://mime-types//lib/mime/types/loader.rb#22 +class MIME::Types::Loader + # Creates a Loader object that can be used to load MIME::Types registries + # into memory, using YAML, JSON, or Columnar registry format loaders. + # + # @return [Loader] a new instance of Loader + # + # source://mime-types//lib/mime/types/loader.rb#31 + def initialize(path = T.unsafe(nil), container = T.unsafe(nil)); end + + # The MIME::Types container instance that will be loaded. If not provided + # at initialization, a new MIME::Types instance will be constructed. + # + # source://mime-types//lib/mime/types/loader.rb#27 + def container; end + + # Loads a MIME::Types registry. Loads from JSON files by default + # (#load_json). + # + # This will load from columnar files (#load_columnar) if columnar: + # true is provided in +options+ and there are columnar files in +path+. + # + # source://mime-types//lib/mime/types/loader.rb#82 + def load(options = T.unsafe(nil)); end + + # Loads a MIME::Types registry from columnar files recursively found in + # +path+. + # + # source://mime-types//lib/mime/types/loader.rb#69 + def load_columnar; end + + # Loads a MIME::Types registry from JSON files (*.json) + # recursively found in +path+. + # + # It is expected that the JSON objects will be an array of hash objects. + # The JSON format is the registry format for the MIME types registry + # shipped with the mime-types library. + # + # source://mime-types//lib/mime/types/loader.rb#59 + def load_json; end + + # Loads a MIME::Types registry from YAML files (*.yml or + # *.yaml) recursively found in +path+. + # + # It is expected that the YAML objects contained within the registry array + # will be tagged as !ruby/object:MIME::Type. + # + # Note that the YAML format is about 2½ times *slower* than the JSON format. + # + # NOTE: The purpose of this format is purely for maintenance reasons. + # + # source://mime-types//lib/mime/types/loader.rb#46 + def load_yaml; end + + # The path that will be read for the MIME::Types files. + # + # source://mime-types//lib/mime/types/loader.rb#24 + def path; end + + private + + # source://mime-types//lib/mime/types/loader.rb#156 + def columnar_path; end + + # source://mime-types//lib/mime/types/loader.rb#152 + def json_path; end + + # source://mime-types//lib/mime/types/loader.rb#148 + def yaml_path; end + + class << self + # Loads the default MIME::Type registry. + # + # source://mime-types//lib/mime/types/loader.rb#92 + def load(options = T.unsafe(nil)); end + + # Loads MIME::Types from a single JSON file. + # + # It is expected that the JSON objects will be an array of hash objects. + # The JSON format is the registry format for the MIME types registry + # shipped with the mime-types library. + # + # source://mime-types//lib/mime/types/loader.rb#126 + def load_from_json(filename); end + + # Loads MIME::Types from a single YAML file. + # + # It is expected that the YAML objects contained within the registry + # array will be tagged as !ruby/object:MIME::Type. + # + # Note that the YAML format is about 2½ times *slower* than the JSON + # format. + # + # NOTE: The purpose of this format is purely for maintenance reasons. + # + # source://mime-types//lib/mime/types/loader.rb#105 + def load_from_yaml(filename); end + + private + + # @return [Boolean] + # + # source://mime-types//lib/mime/types/loader.rb#137 + def old_yaml?; end + + # source://mime-types//lib/mime/types/loader.rb#133 + def read_file(filename); end + end +end + +# The release version of Ruby MIME::Types +# +# source://mime-types//lib/mime/types.rb#70 +MIME::Types::VERSION = T.let(T.unsafe(nil), String) + +# source://mime-types//lib/mime/types/logger.rb#15 +class MIME::Types::WarnLogger < ::Logger + # @return [WarnLogger] a new instance of WarnLogger + # + # source://mime-types//lib/mime/types/logger.rb#28 + def initialize(_one, _two = T.unsafe(nil), _three = T.unsafe(nil)); end +end + +# source://mime-types//lib/mime/types/logger.rb#16 +class MIME::Types::WarnLogger::WarnLogDevice < ::Logger::LogDevice + # @return [WarnLogDevice] a new instance of WarnLogDevice + # + # source://mime-types//lib/mime/types/logger.rb#17 + def initialize(*_arg0); end + + # source://mime-types//lib/mime/types/logger.rb#24 + def close; end + + # source://mime-types//lib/mime/types/logger.rb#20 + def write(m); end +end diff --git a/sorbet/rbi/gems/mini_mime@1.1.5.rbi b/sorbet/rbi/gems/mini_mime@1.1.5.rbi new file mode 100644 index 0000000000..edabba1454 --- /dev/null +++ b/sorbet/rbi/gems/mini_mime@1.1.5.rbi @@ -0,0 +1,172 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mini_mime` gem. +# Please instead update this file by running `bin/tapioca gem mini_mime`. + +# source://mini_mime//lib/mini_mime/version.rb#2 +module MiniMime + class << self + # source://mini_mime//lib/mini_mime.rb#14 + def lookup_by_content_type(mime); end + + # source://mini_mime//lib/mini_mime.rb#10 + def lookup_by_extension(extension); end + + # source://mini_mime//lib/mini_mime.rb#6 + def lookup_by_filename(filename); end + end +end + +# source://mini_mime//lib/mini_mime.rb#18 +module MiniMime::Configuration + class << self + # Returns the value of attribute content_type_db_path. + # + # source://mini_mime//lib/mini_mime.rb#21 + def content_type_db_path; end + + # Sets the attribute content_type_db_path + # + # @param value the value to set the attribute content_type_db_path to. + # + # source://mini_mime//lib/mini_mime.rb#21 + def content_type_db_path=(_arg0); end + + # Returns the value of attribute ext_db_path. + # + # source://mini_mime//lib/mini_mime.rb#20 + def ext_db_path; end + + # Sets the attribute ext_db_path + # + # @param value the value to set the attribute ext_db_path to. + # + # source://mini_mime//lib/mini_mime.rb#20 + def ext_db_path=(_arg0); end + end +end + +# source://mini_mime//lib/mini_mime.rb#52 +class MiniMime::Db + # @return [Db] a new instance of Db + # + # source://mini_mime//lib/mini_mime.rb#173 + def initialize; end + + # source://mini_mime//lib/mini_mime.rb#182 + def lookup_by_content_type(content_type); end + + # source://mini_mime//lib/mini_mime.rb#178 + def lookup_by_extension(extension); end + + class << self + # source://mini_mime//lib/mini_mime.rb#66 + def lookup_by_content_type(content_type); end + + # source://mini_mime//lib/mini_mime.rb#60 + def lookup_by_extension(extension); end + + # source://mini_mime//lib/mini_mime.rb#53 + def lookup_by_filename(filename); end + end +end + +# source://mini_mime//lib/mini_mime.rb#71 +class MiniMime::Db::Cache + # @return [Cache] a new instance of Cache + # + # source://mini_mime//lib/mini_mime.rb#72 + def initialize(size); end + + # source://mini_mime//lib/mini_mime.rb#77 + def []=(key, val); end + + # source://mini_mime//lib/mini_mime.rb#83 + def fetch(key, &blk); end +end + +# For Windows support +# +# source://mini_mime//lib/mini_mime.rb#89 +MiniMime::Db::PReadFile = File + +# source://mini_mime//lib/mini_mime.rb#114 +class MiniMime::Db::RandomAccessDb + # @return [RandomAccessDb] a new instance of RandomAccessDb + # + # source://mini_mime//lib/mini_mime.rb#117 + def initialize(path, sort_order); end + + # source://mini_mime//lib/mini_mime.rb#131 + def lookup(val); end + + # lifted from marcandre/backports + # + # source://mini_mime//lib/mini_mime.rb#147 + def lookup_uncached(val); end + + # source://mini_mime//lib/mini_mime.rb#168 + def resolve(row); end +end + +# source://mini_mime//lib/mini_mime.rb#115 +MiniMime::Db::RandomAccessDb::MAX_CACHED = T.let(T.unsafe(nil), Integer) + +# source://mini_mime//lib/mini_mime.rb#28 +class MiniMime::Info + # @return [Info] a new instance of Info + # + # source://mini_mime//lib/mini_mime.rb#33 + def initialize(buffer); end + + # source://mini_mime//lib/mini_mime.rb#37 + def [](idx); end + + # @return [Boolean] + # + # source://mini_mime//lib/mini_mime.rb#47 + def binary?; end + + # Returns the value of attribute content_type. + # + # source://mini_mime//lib/mini_mime.rb#31 + def content_type; end + + # Sets the attribute content_type + # + # @param value the value to set the attribute content_type to. + # + # source://mini_mime//lib/mini_mime.rb#31 + def content_type=(_arg0); end + + # Returns the value of attribute encoding. + # + # source://mini_mime//lib/mini_mime.rb#31 + def encoding; end + + # Sets the attribute encoding + # + # @param value the value to set the attribute encoding to. + # + # source://mini_mime//lib/mini_mime.rb#31 + def encoding=(_arg0); end + + # Returns the value of attribute extension. + # + # source://mini_mime//lib/mini_mime.rb#31 + def extension; end + + # Sets the attribute extension + # + # @param value the value to set the attribute extension to. + # + # source://mini_mime//lib/mini_mime.rb#31 + def extension=(_arg0); end +end + +# source://mini_mime//lib/mini_mime.rb#29 +MiniMime::Info::BINARY_ENCODINGS = T.let(T.unsafe(nil), Array) + +# source://mini_mime//lib/mini_mime/version.rb#3 +MiniMime::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/mini_portile2@2.8.4.rbi b/sorbet/rbi/gems/mini_portile2@2.8.4.rbi new file mode 100644 index 0000000000..8029498f31 --- /dev/null +++ b/sorbet/rbi/gems/mini_portile2@2.8.4.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mini_portile2` gem. +# Please instead update this file by running `bin/tapioca gem mini_portile2`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/multi_xml@0.6.0.rbi b/sorbet/rbi/gems/multi_xml@0.6.0.rbi new file mode 100644 index 0000000000..7736e1aba3 --- /dev/null +++ b/sorbet/rbi/gems/multi_xml@0.6.0.rbi @@ -0,0 +1,101 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `multi_xml` gem. +# Please instead update this file by running `bin/tapioca gem multi_xml`. + +# source://multi_xml//lib/multi_xml.rb#8 +module MultiXml + class << self + # The default parser based on what you currently + # have loaded and installed. First checks to see + # if any parsers are already loaded, then checks + # to see which are installed if none are loaded. + # + # @raise [NoParserError] + # + # source://multi_xml//lib/multi_xml.rb#87 + def default_parser; end + + # Parse an XML string or IO into Ruby. + # + # Options + # + # :symbolize_keys :: If true, will use symbols instead of strings for the keys. + # + # :disallowed_types :: Types to disallow from being typecasted. Defaults to `['yaml', 'symbol']`. Use `[]` to allow all types. + # + # :typecast_xml_value :: If true, won't typecast values for parsed document + # + # source://multi_xml//lib/multi_xml.rb#133 + def parse(xml, options = T.unsafe(nil)); end + + # Get the current parser class. + # + # source://multi_xml//lib/multi_xml.rb#77 + def parser; end + + # Set the XML parser utilizing a symbol, string, or class. + # Supported by default are: + # + # * :libxml + # * :nokogiri + # * :ox + # * :rexml + # * :oga + # + # source://multi_xml//lib/multi_xml.rb#112 + def parser=(new_parser); end + + private + + # TODO: Add support for other encodings + # + # source://multi_xml//lib/multi_xml.rb#174 + def parse_binary(binary, entity); end + + # source://multi_xml//lib/multi_xml.rb#183 + def parse_file(file, entity); end + + # source://multi_xml//lib/multi_xml.rb#191 + def symbolize_keys(params); end + + # source://multi_xml//lib/multi_xml.rb#218 + def typecast_xml_value(value, disallowed_types = T.unsafe(nil)); end + + # source://multi_xml//lib/multi_xml.rb#204 + def undasherize_keys(params); end + end +end + +# source://multi_xml//lib/multi_xml.rb#27 +MultiXml::CONTENT_ROOT = T.let(T.unsafe(nil), String) + +# source://multi_xml//lib/multi_xml.rb#69 +MultiXml::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://multi_xml//lib/multi_xml.rb#67 +MultiXml::DISALLOWED_XML_TYPES = T.let(T.unsafe(nil), Array) + +# source://multi_xml//lib/multi_xml.rb#11 +class MultiXml::DisallowedTypeError < ::StandardError + # @return [DisallowedTypeError] a new instance of DisallowedTypeError + # + # source://multi_xml//lib/multi_xml.rb#12 + def initialize(type); end +end + +# source://multi_xml//lib/multi_xml.rb#10 +class MultiXml::NoParserError < ::StandardError; end + +# source://multi_xml//lib/multi_xml.rb#33 +MultiXml::PARSING = T.let(T.unsafe(nil), Hash) + +# source://multi_xml//lib/multi_xml.rb#9 +class MultiXml::ParseError < ::StandardError; end + +# source://multi_xml//lib/multi_xml.rb#18 +MultiXml::REQUIREMENT_MAP = T.let(T.unsafe(nil), Array) + +# source://multi_xml//lib/multi_xml.rb#52 +MultiXml::TYPE_NAMES = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/netrc@0.11.0.rbi b/sorbet/rbi/gems/netrc@0.11.0.rbi new file mode 100644 index 0000000000..062a5577c9 --- /dev/null +++ b/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -0,0 +1,158 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `netrc` gem. +# Please instead update this file by running `bin/tapioca gem netrc`. + +# source://netrc//lib/netrc.rb#3 +class Netrc + # @return [Netrc] a new instance of Netrc + # + # source://netrc//lib/netrc.rb#166 + def initialize(path, data); end + + # source://netrc//lib/netrc.rb#180 + def [](k); end + + # source://netrc//lib/netrc.rb#188 + def []=(k, info); end + + # source://netrc//lib/netrc.rb#200 + def delete(key); end + + # source://netrc//lib/netrc.rb#211 + def each(&block); end + + # source://netrc//lib/netrc.rb#196 + def length; end + + # source://netrc//lib/netrc.rb#215 + def new_item(m, l, p); end + + # Returns the value of attribute new_item_prefix. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix; end + + # Sets the attribute new_item_prefix + # + # @param value the value to set the attribute new_item_prefix to. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix=(_arg0); end + + # source://netrc//lib/netrc.rb#219 + def save; end + + # source://netrc//lib/netrc.rb#233 + def unparse; end + + class << self + # source://netrc//lib/netrc.rb#42 + def check_permissions(path); end + + # source://netrc//lib/netrc.rb#33 + def config; end + + # @yield [self.config] + # + # source://netrc//lib/netrc.rb#37 + def configure; end + + # source://netrc//lib/netrc.rb#10 + def default_path; end + + # source://netrc//lib/netrc.rb#14 + def home_path; end + + # source://netrc//lib/netrc.rb#85 + def lex(lines); end + + # source://netrc//lib/netrc.rb#29 + def netrc_filename; end + + # Returns two values, a header and a list of items. + # Each item is a tuple, containing some or all of: + # - machine keyword (including trailing whitespace+comments) + # - machine name + # - login keyword (including surrounding whitespace+comments) + # - login + # - password keyword (including surrounding whitespace+comments) + # - password + # - trailing chars + # This lets us change individual fields, then write out the file + # with all its original formatting. + # + # source://netrc//lib/netrc.rb#129 + def parse(ts); end + + # Reads path and parses it as a .netrc file. If path doesn't + # exist, returns an empty object. Decrypt paths ending in .gpg. + # + # source://netrc//lib/netrc.rb#51 + def read(path = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://netrc//lib/netrc.rb#112 + def skip?(s); end + end +end + +# source://netrc//lib/netrc.rb#8 +Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) + +# source://netrc//lib/netrc.rb#244 +class Netrc::Entry < ::Struct + # Returns the value of attribute login + # + # @return [Object] the current value of login + def login; end + + # Sets the attribute login + # + # @param value [Object] the value to set the attribute login to. + # @return [Object] the newly set value + def login=(_); end + + # Returns the value of attribute password + # + # @return [Object] the current value of password + def password; end + + # Sets the attribute password + # + # @param value [Object] the value to set the attribute password to. + # @return [Object] the newly set value + def password=(_); end + + def to_ary; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://netrc//lib/netrc.rb#250 +class Netrc::Error < ::StandardError; end + +# source://netrc//lib/netrc.rb#68 +class Netrc::TokenArray < ::Array + # source://netrc//lib/netrc.rb#76 + def readto; end + + # source://netrc//lib/netrc.rb#69 + def take; end +end + +# source://netrc//lib/netrc.rb#4 +Netrc::VERSION = T.let(T.unsafe(nil), String) + +# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows +# +# source://netrc//lib/netrc.rb#7 +Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/nokogiri@1.15.4.rbi b/sorbet/rbi/gems/nokogiri@1.15.4.rbi new file mode 100644 index 0000000000..c9acaf41de --- /dev/null +++ b/sorbet/rbi/gems/nokogiri@1.15.4.rbi @@ -0,0 +1,7317 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `nokogiri` gem. +# Please instead update this file by running `bin/tapioca gem nokogiri`. + +# Nokogiri parses and searches XML/HTML very quickly, and also has +# correctly implemented CSS3 selector support as well as XPath 1.0 +# support. +# +# Parsing a document returns either a Nokogiri::XML::Document, or a +# Nokogiri::HTML4::Document depending on the kind of document you parse. +# +# Here is an example: +# +# require 'nokogiri' +# require 'open-uri' +# +# # Get a Nokogiri::HTML4::Document for the page we’re interested in... +# +# doc = Nokogiri::HTML4(URI.open('http://www.google.com/search?q=tenderlove')) +# +# # Do funky things with it using Nokogiri::XML::Node methods... +# +# #### +# # Search for nodes by css +# doc.css('h3.r a.l').each do |link| +# puts link.content +# end +# +# See also: +# +# - Nokogiri::XML::Searchable#css for more information about CSS searching +# - Nokogiri::XML::Searchable#xpath for more information about XPath searching +# +# source://nokogiri//lib/nokogiri.rb#38 +module Nokogiri + class << self + # source://nokogiri//lib/nokogiri/html4.rb#10 + def HTML(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # :call-seq: + # HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) → Nokogiri::HTML4::Document + # + # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#10 + def HTML4(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Since v1.12.0 + # + # ⚠ HTML5 functionality is not available when running JRuby. + # + # Parse an HTML5 document. Convenience method for {Nokogiri::HTML5::Document.parse} + # + # source://nokogiri//lib/nokogiri/html5.rb#30 + def HTML5(input, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # Parse a document and add the Slop decorator. The Slop decorator + # implements method_missing such that methods may be used instead of CSS + # or XPath. For example: + # + # doc = Nokogiri::Slop(<<-eohtml) + # + # + #

first

+ #

second

+ # + # + # eohtml + # assert_equal('second', doc.html.body.p[1].text) + # + # source://nokogiri//lib/nokogiri.rb#91 + def Slop(*args, &block); end + + # Parse XML. Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#7 + def XML(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Create a Nokogiri::XSLT::Stylesheet with +stylesheet+. + # + # Example: + # + # xslt = Nokogiri::XSLT(File.read(ARGV[0])) + # + # source://nokogiri//lib/nokogiri/xslt.rb#13 + def XSLT(stylesheet, modules = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri.rb#96 + def install_default_aliases; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#205 + def jruby?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#210 + 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#200 + def uses_gumbo?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#192 + def uses_libxml?(requirement = T.unsafe(nil)); end + end +end + +# Translate a CSS selector into an XPath 1.0 query +# +# source://nokogiri//lib/nokogiri/css.rb#6 +module Nokogiri::CSS + class << self + # TODO: Deprecate this method ahead of 2.0 and delete it in 2.0. + # It is not used by Nokogiri and shouldn't be part of the public API. + # + # source://nokogiri//lib/nokogiri/css.rb#10 + def parse(selector); end + + # :call-seq: + # xpath_for(selector) → String + # xpath_for(selector [, prefix:] [, visitor:] [, ns:]) → String + # + # Translate a CSS selector to the equivalent XPath query. + # + # [Parameters] + # - +selector+ (String) The CSS selector to be translated into XPath + # + # - +prefix:+ (String) + # + # The XPath prefix for the query, see Nokogiri::XML::XPath for some options. Default is + # +XML::XPath::GLOBAL_SEARCH_PREFIX+. + # + # - +visitor:+ (Nokogiri::CSS::XPathVisitor) + # + # The visitor class to use to transform the AST into XPath. Default is + # +Nokogiri::CSS::XPathVisitor.new+. + # + # - +ns:+ (Hash) + # + # The namespaces that are referenced in the query, if any. This is a hash where the keys are + # the namespace prefix and the values are the namespace URIs. Default is an empty Hash. + # + # [Returns] (String) The equivalent XPath query for +selector+ + # + # 💡 Note that translated queries are cached for performance concerns. + # + # @raise [TypeError] + # + # source://nokogiri//lib/nokogiri/css.rb#42 + def xpath_for(selector, options = T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#5 +class Nokogiri::CSS::Node + # Create a new Node with +type+ and +value+ + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/css/node.rb#14 + def initialize(type, value); end + + # Accept +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#20 + def accept(visitor); end + + # Find a node by type using +types+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#32 + def find_by_type(types); end + + # Convert to array + # + # source://nokogiri//lib/nokogiri/css/node.rb#49 + def to_a; end + + # Convert to_type + # + # source://nokogiri//lib/nokogiri/css/node.rb#42 + def to_type; end + + # Convert this CSS node to xpath with +prefix+ using +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#26 + def to_xpath(prefix, visitor); end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type; end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type=(_arg0); end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value; end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#6 +Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7 +class Nokogiri::CSS::Parser < ::Racc::Parser + # Create a new CSS parser with respect to +namespaces+ + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#60 + def initialize(namespaces = T.unsafe(nil)); end + + # reduce 0 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#361 + def _reduce_1(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#407 + def _reduce_10(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#412 + def _reduce_11(val, _values, result); end + + # reduce 12 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#424 + def _reduce_13(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#429 + def _reduce_14(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#434 + def _reduce_15(val, _values, result); end + + # reduce 16 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#441 + def _reduce_17(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#446 + def _reduce_18(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#451 + def _reduce_19(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#367 + def _reduce_2(val, _values, result); end + + # reduce 20 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#458 + def _reduce_21(val, _values, result); end + + # reduce 22 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#465 + def _reduce_23(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#470 + def _reduce_24(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#475 + def _reduce_25(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#482 + def _reduce_26(val, _values, result); end + + # reduce 27 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#489 + def _reduce_28(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#495 + def _reduce_29(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#372 + def _reduce_3(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#501 + def _reduce_30(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#507 + def _reduce_31(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#512 + def _reduce_32(val, _values, result); end + + # reduce 33 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#519 + def _reduce_34(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#525 + def _reduce_35(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#531 + def _reduce_36(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#537 + def _reduce_37(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#543 + def _reduce_38(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#549 + def _reduce_39(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#377 + def _reduce_4(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#554 + def _reduce_40(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#559 + def _reduce_41(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#564 + def _reduce_42(val, _values, result); end + + # reduce 44 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#573 + def _reduce_45(val, _values, result); end + + # reduce 46 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#590 + def _reduce_47(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#600 + def _reduce_48(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#616 + def _reduce_49(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#382 + def _reduce_5(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#636 + def _reduce_50(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#642 + def _reduce_51(val, _values, result); end + + # reduce 53 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#651 + def _reduce_54(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#657 + def _reduce_55(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#663 + def _reduce_56(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#669 + def _reduce_57(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#675 + def _reduce_58(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#387 + def _reduce_6(val, _values, result); end + + # reduce 63 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#691 + def _reduce_64(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#696 + def _reduce_65(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#701 + def _reduce_66(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#706 + def _reduce_67(val, _values, result); end + + # reduce 68 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#713 + def _reduce_69(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#392 + def _reduce_7(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#718 + def _reduce_70(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#723 + def _reduce_71(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#728 + def _reduce_72(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#733 + def _reduce_73(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#738 + def _reduce_74(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#743 + def _reduce_75(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#748 + def _reduce_76(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#397 + def _reduce_8(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#402 + def _reduce_9(val, _values, result); end + + # reduce 81 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#764 + def _reduce_none(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#89 + def cache_key(query, prefix, visitor); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#71 + def next_token; end + + # On CSS parser error, raise an exception + # + # @raise [SyntaxError] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#84 + def on_error(error_token_id, error_value, value_stack); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#66 + def parse(string); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#26 + def unescape_css_identifier(identifier); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#30 + def unescape_css_string(str); end + + # Get the xpath for +string+ using +options+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#76 + def xpath_for(string, prefix, visitor); end + + class << self + # Get the css selector in +string+ from the cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#25 + def [](string); end + + # Set the css selector in +string+ in the cache to +value+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#32 + def []=(string, value); end + + # Return a thread-local boolean indicating whether the CSS-to-XPath cache is active. (Default is `true`.) + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#15 + def cache_on?; end + + # Clear the cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#39 + def clear_cache(create_new_object = T.unsafe(nil)); end + + # Set a thread-local boolean to turn cacheing on and off. Truthy values turn the cache on, falsey values turn the cache off. + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#20 + def set_cache(value); end + + # Execute +block+ without cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#50 + def without_cache(&block); end + end +end + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#8 +Nokogiri::CSS::Parser::CACHE_SWITCH_NAME = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/parser.rb#279 +Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser.rb#355 +Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://nokogiri//lib/nokogiri/css/parser.rb#295 +Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/syntax_error.rb#6 +class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11 +class Nokogiri::CSS::Tokenizer + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57 + def _next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26 + def action; end + + # Returns the value of attribute filename. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17 + def filename; end + + # Returns the value of attribute lineno. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16 + def lineno; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36 + def load_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49 + def next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43 + def scan_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20 + def scan_setup(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan_str(str); end + + # Returns the value of attribute state. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14 +class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end + +# When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor +# class allows for changing some of the behaviors related to builtin xpath functions and quirks +# of HTML5. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9 +class Nokogiri::CSS::XPathVisitor + # :call-seq: + # new() → XPathVisitor + # new(builtins:, doctype:) → XPathVisitor + # + # [Parameters] + # - +builtins:+ (BuiltinsConfig) Determine when to use Nokogiri's built-in xpath functions for performance improvements. + # - +doctype:+ (DoctypeConfig) Make document-type-specific accommodations for CSS queries. + # + # [Returns] XPathVisitor + # + # @return [XPathVisitor] a new instance of XPathVisitor + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#57 + def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267 + def accept(node); end + + # :call-seq: config() → Hash + # + # [Returns] + # a Hash representing the configuration of the XPathVisitor, suitable for use as + # part of the CSS cache key. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#74 + def config; end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#263 + def visit_attrib_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#154 + def visit_attribute_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_child_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#215 + def visit_class_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#219 + def visit_combinator(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#240 + def visit_conditional_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_descendant_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_direct_adjacent_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#245 + def visit_element_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_following_selector(node); end + + # :stopdoc: + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#79 + def visit_function(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#149 + def visit_id(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#140 + def visit_not(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#190 + def visit_pseudo_class(node); end + + private + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#328 + def css_class(hay, needle); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#273 + def html5_element_name_needs_namespace_handling(node); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#318 + def is_of_type_pseudo_class?(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#280 + def nth(node, options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304 + def read_a_and_positive_b(values); end +end + +# Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13 +module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end + +# Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol) + +# Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is +# the default when calling Nokogiri::CSS.xpath_for directly. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol) + +# Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is +# the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or +# node. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array) + +# Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document +# being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or +# node will choose the correct option automatically. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33 +module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end + +# The document being searched is an HTML4 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol) + +# The document being searched is an HTML5 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array) + +# The document being searched is an XML document. This is the default. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10 +Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#339 +module Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins + class << self + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#340 + def new; end + end +end + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#349 +module Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins + class << self + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#350 + def new; end + end +end + +# Some classes in Nokogiri are namespaced as a group, for example +# Document, DocumentFragment, and Builder. +# +# It's sometimes necessary to look up the related class, e.g.: +# +# XML::Builder → XML::Document +# HTML4::Builder → HTML4::Document +# HTML5::Document → HTML5::DocumentFragment +# +# This module is included into those key classes who need to do this. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#19 +module Nokogiri::ClassResolver + # :call-seq: + # related_class(class_name) → Class + # + # Find a class constant within the + # + # Some examples: + # + # Nokogiri::XML::Document.new.related_class("DocumentFragment") + # # => Nokogiri::XML::DocumentFragment + # Nokogiri::HTML4::Document.new.related_class("DocumentFragment") + # # => Nokogiri::HTML4::DocumentFragment + # + # Note this will also work for subclasses that follow the same convention, e.g.: + # + # Loofah::HTML::Document.new.related_class("DocumentFragment") + # # => Loofah::HTML::DocumentFragment + # + # And even if it's a subclass, this will iterate through the superclasses: + # + # class ThisIsATopLevelClass < Nokogiri::HTML4::Builder ; end + # ThisIsATopLevelClass.new.related_class("Document") + # # => Nokogiri::HTML4::Document + # + # source://nokogiri//lib/nokogiri/class_resolver.rb#46 + def related_class(class_name); end +end + +# #related_class restricts matching namespaces to those matching this set. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#21 +Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set) + +# source://nokogiri//lib/nokogiri/decorators/slop.rb#4 +module Nokogiri::Decorators; end + +# The Slop decorator implements method missing such that a methods may be +# used instead of XPath or CSS. See Nokogiri.Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#8 +module Nokogiri::Decorators::Slop + # look for node with +name+. See Nokogiri.Slop + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#14 + def method_missing(name, *args, &block); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#37 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# The default XPath search context for Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#10 +Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/encoding_handler.rb#5 +class Nokogiri::EncodingHandler + # Returns the value of attribute name. + def name; end + + class << self + def [](_arg0); end + def alias(_arg0, _arg1); end + def clear_aliases!; end + def delete(_arg0); end + + # source://nokogiri//lib/nokogiri/encoding_handler.rb#15 + def install_default_aliases; end + end +end + +# Popular encoding aliases not known by all iconv implementations that Nokogiri should support. +# +# source://nokogiri//lib/nokogiri/encoding_handler.rb#7 +Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/gumbo.rb#4 +module Nokogiri::Gumbo + class << self + def fragment(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + def parse(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + end +end + +# The default maximum number of attributes per element. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#6 +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# The default maximum number of errors for parsing a document or a fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#9 +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer) + +# The default maximum depth of the DOM tree produced by parsing a document +# or fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#13 +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer) + +# 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0, +# Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related +# classes. +# +# source://nokogiri//lib/nokogiri/html.rb#8 +Nokogiri::HTML = Nokogiri::HTML4 + +# Since v1.12.0 +# +# 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace +# for parsing HTML. +# +# source://nokogiri//lib/nokogiri/html4.rb#19 +module Nokogiri::HTML4 + class << self + # Parse a fragment from +string+ in to a NodeSet. + # + # source://nokogiri//lib/nokogiri/html4.rb#29 + def fragment(string, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#23 + def parse(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# Nokogiri HTML builder is used for building HTML documents. It is very +# similar to the Nokogiri::XML::Builder. In fact, you should go read the +# documentation for Nokogiri::XML::Builder before reading this +# documentation. +# +# == Synopsis: +# +# Create an HTML document with a body that has an onload attribute, and a +# span tag with a class of "bold" that has content of "Hello world". +# +# builder = Nokogiri::HTML4::Builder.new do |doc| +# doc.html { +# doc.body(:onload => 'some_func();') { +# doc.span.bold { +# doc.text "Hello world" +# } +# } +# } +# end +# puts builder.to_html +# +# The HTML builder inherits from the XML builder, so make sure to read the +# Nokogiri::XML::Builder documentation. +# +# source://nokogiri//lib/nokogiri/html.rb#31 +class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder + # Convert the builder to HTML + # + # source://nokogiri//lib/nokogiri/html4/builder.rb#32 + def to_html; end +end + +# source://nokogiri//lib/nokogiri/html4/document.rb#11 +class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/html4/document.rb#149 + def fragment(tags = T.unsafe(nil)); end + + # Get the meta tag encoding for this document. If there is no meta tag, + # then nil is returned. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#12 + def meta_encoding; end + + # Set the meta tag encoding for this document. + # + # If an meta encoding tag is already present, its content is + # replaced with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, and before any text node or + # content element (typically ) if any. + # + # The result when trying to set an encoding that is different + # from the document encoding is undefined. + # + # Beware in CRuby, that libxml2 automatically inserts a meta tag + # into a head element. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#36 + def meta_encoding=(encoding); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) + # + # or + # + # node.serialize(:encoding => 'UTF-8') do |config| + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/html4/document.rb#142 + def serialize(options = T.unsafe(nil)); end + + # Get the title string of this document. Return nil if there is + # no title tag. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#70 + def title; end + + # Set the title string of this document. + # + # If a title element is already present, its content is replaced + # with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, right after a meta + # encoding/charset tag if any, and before any text node or + # content element (typically ) if any. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#85 + def title=(text); end + + def type; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#159 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/html4/document.rb#60 + def meta_content_type; end + + # source://nokogiri//lib/nokogiri/html4/document.rb#103 + def set_metadata_element(element); end + + class << self + def new(*_arg0); end + + # Parse HTML. +string_or_io+ may be a String, or any object that + # responds to _read_ and _close_ such as an IO, or StringIO. + # +url+ is resource where this document is located. +encoding+ is the + # encoding that should be used when processing the document. +options+ + # is a number that sets options in the parser, such as + # Nokogiri::XML::ParseOptions::RECOVER. See the constants in + # Nokogiri::XML::ParseOptions. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document.rb#172 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + def read_io(_arg0, _arg1, _arg2, _arg3); end + def read_memory(_arg0, _arg1, _arg2, _arg3); end + end +end + +# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#7 +class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#27 + def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + class << self + # Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+ + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#8 + def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description.rb#5 +class Nokogiri::HTML4::ElementDescription + # Is this element a block element? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#8 + def block?; end + + def default_sub_element; end + + # @return [Boolean] + def deprecated?; end + + def deprecated_attributes; end + def description; end + def empty?; end + + # @return [Boolean] + def implied_end_tag?; end + + # @return [Boolean] + def implied_start_tag?; end + + def inline?; end + + # Inspection information + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#20 + def inspect; end + + def name; end + def optional_attributes; end + def required_attributes; end + + # @return [Boolean] + def save_end_tag?; end + + def sub_elements; end + + # Convert this description to a string + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#14 + def to_s; end + + private + + # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#32 + def default_desc; end + + class << self + def [](_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#436 +Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#423 +Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239 +Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246 +Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258 +Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212 +Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221 +Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268 +Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#546 +Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171 +Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#437 +Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271 +Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#270 +Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272 +Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#280 +Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#213 +Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#214 +Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#242 +Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#292 +Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#293 +Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#297 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#295 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#439 +Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#199 +Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#218 +Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217 +Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#549 +Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#296 +Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array) + +# This is filled in down below. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#30 +Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash) + +# Methods are defined protected by method_defined? because at +# this point the C-library or Java library is already loaded, +# and we don't want to clobber any methods that have been +# defined there. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11 +Nokogiri::HTML4::ElementDescription::Desc = Struct + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#294 +Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#377 +Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192 +Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#201 +Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#299 +Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190 +Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245 +Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array) + +# Attributes defined and categorized +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#136 +Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#300 +Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170 +Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#318 +Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#301 +Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#339 +Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#340 +Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#328 +Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168 +Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#341 +Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#342 +Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#241 +Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#352 +Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#216 +Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197 +Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#354 +Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194 +Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195 +Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196 +Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200 +Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#219 +Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#355 +Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#368 +Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189 +Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243 +Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#398 +Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#298 +Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#421 +Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#484 +Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#422 +Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#424 +Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169 +Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#547 +Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#434 +Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#438 +Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191 +Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#435 +Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#441 +Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#443 +Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#442 +Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#459 +Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#460 +Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#462 +Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#463 +Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#461 +Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#464 +Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167 +Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#137 +Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#466 +Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#420 +Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#269 +Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238 +Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#483 +Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#486 +Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#485 +Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149 +Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240 +Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#497 +Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#498 +Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#510 +Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#509 +Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#520 +Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237 +Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#533 +Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#522 +Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#521 +Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#545 +Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#519 +Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#440 +Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#548 +Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#353 +Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#465 +Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14 +class Nokogiri::HTML4::EncodingReader + # @return [EncodingReader] a new instance of EncodingReader + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82 + def initialize(io); end + + # This method is used by the C extension so that + # Nokogiri::HTML4::Document#read_io() does not leak memory when + # EncodingFound is raised. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91 + def encoding_found; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93 + def read(len); end + + class << self + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59 + def detect_encoding(chunk); end + end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15 +class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError + # @return [EncodingFound] a new instance of EncodingFound + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18 + def initialize(encoding); end + + # Returns the value of attribute found_encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16 + def found_encoding; end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46 +class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler + # @return [JumpSAXHandler] a new instance of JumpSAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47 + def initialize(jumptag); end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24 +class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document + # @return [SAXHandler] a new instance of SAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27 + def initialize; end + + # Returns the value of attribute encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25 + def encoding; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5 +class Nokogiri::HTML4::EntityDescription < ::Struct; end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7 +class Nokogiri::HTML4::EntityLookup + # Look up entity with +name+ + # + # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10 + def [](name); end + + def get(_arg0); end +end + +# Instance of Nokogiri::HTML4::EntityLookup +# +# source://nokogiri//lib/nokogiri/html4.rb#35 +Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityLookup) + +# Nokogiri lets you write a SAX parser to process HTML but get HTML correction features. +# +# See Nokogiri::HTML4::SAX::Parser for a basic example of using a SAX parser with HTML. +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#5 +module Nokogiri::HTML4::SAX; end + +# This class lets you perform SAX style parsing on HTML with HTML error correction. +# +# Here is a basic usage example: +# +# class MyDoc < Nokogiri::XML::SAX::Document +# def start_element name, attributes = [] +# puts "found a #{name}" +# end +# end +# +# parser = Nokogiri::HTML4::SAX::Parser.new(MyDoc.new) +# parser.parse(File.read(ARGV[0], mode: 'rb')) +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#29 +class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser + # Parse a file with +filename+ + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#51 + def parse_file(filename, encoding = T.unsafe(nil)); end + + # Parse given +io+ + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#41 + def parse_io(io, encoding = T.unsafe(nil)); end + + # Parse html stored in +data+ using +encoding+ + # + # @raise [TypeError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#30 + def parse_memory(data, encoding = T.unsafe(nil)); end +end + +# Context for HTML SAX parsers. This class is usually not instantiated by the user. Instead, +# you should be looking at Nokogiri::HTML4::SAX::Parser +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#9 +class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext + def parse_with(_arg0); end + + class << self + def file(_arg0, _arg1); end + def memory(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#10 + def new(thing, encoding = T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6 +class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document; end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::HTML4::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31 + def finish; end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + def initialize_native(_arg0, _arg1, _arg2); end + def native_write(_arg0, _arg1); end +end + +# == Usage +# +# ⚠ HTML5 functionality is not available when running JRuby. +# +# Parse an HTML5 document: +# +# doc = Nokogiri.HTML5(string) +# +# Parse an HTML5 fragment: +# +# fragment = Nokogiri::HTML5.fragment(string) +# +# == Parsing options +# +# The document and fragment parsing methods support options that are different from Nokogiri's. +# +# - Nokogiri.HTML5(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5.parse(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5::Document.parse(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5.fragment(html, encoding = nil, options = {}) +# - Nokogiri::HTML5::DocumentFragment.parse(html, encoding = nil, options = {}) +# +# The three currently supported options are +:max_errors+, +:max_tree_depth+ and +# +:max_attributes+, described below. +# +# === Error reporting +# +# Nokogiri contains an experimental HTML5 parse error reporting facility. By default, no parse +# errors are reported but this can be configured by passing the +:max_errors+ option to +# {HTML5.parse} or {HTML5.fragment}. +# +# For example, this script: +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts(err) +# end +# +# Emits: +# +# 1:1: ERROR: Expected a doctype token +# Hi there! +# ^ +# 1:1: ERROR: Start tag of nonvoid HTML element ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag contains attributes. +# Hi there! +# ^ +# +# Using max_errors: -1 results in an unlimited number of errors being returned. +# +# The errors returned by {HTML5::Document#errors} are instances of {Nokogiri::XML::SyntaxError}. +# +# The {https://html.spec.whatwg.org/multipage/parsing.html#parse-errors HTML standard} defines a +# number of standard parse error codes. These error codes only cover the "tokenization" stage of +# parsing HTML. The parse errors in the "tree construction" stage do not have standardized error +# codes (yet). +# +# As a convenience to Nokogiri users, the defined error codes are available via +# {Nokogiri::XML::SyntaxError#str1} method. +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts("#{err.line}:#{err.column}: #{err.str1}") +# end +# # => 1:1: generic-parser +# # 1:1: non-void-html-element-start-tag-with-trailing-solidus +# # 1:17: end-tag-with-trailing-solidus +# # 1:17: end-tag-with-attributes +# +# Note that the first error is +generic-parser+ because it's an error from the tree construction +# stage and doesn't have a standardized error code. +# +# For the purposes of semantic versioning, the error messages, error locations, and error codes +# are not part of Nokogiri's public API. That is, these are subject to change without Nokogiri's +# major version number changing. These may be stabilized in the future. +# +# === Maximum tree depth +# +# The maximum depth of the DOM tree parsed by the various parsing methods is configurable by the +# +:max_tree_depth+ option. If the depth of the tree would exceed this limit, then an +# {::ArgumentError} is thrown. +# +# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = 400) can be +# removed by giving the option max_tree_depth: -1. +# +# html = '' + '
' * 1000 +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Document tree depth limit exceeded +# doc = Nokogiri.HTML5(html, max_tree_depth: -1) +# +# === Attribute limit per element +# +# The maximum number of attributes per DOM element is configurable by the +:max_attributes+ +# option. If a given element would exceed this limit, then an {::ArgumentError} is thrown. +# +# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = 400) can be +# removed by giving the option max_attributes: -1. +# +# html = '
' +# # "
" +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Attributes per element limit exceeded +# doc = Nokogiri.HTML5(html, max_attributes: -1) +# +# == HTML Serialization +# +# After parsing HTML, it may be serialized using any of the {Nokogiri::XML::Node} serialization +# methods. In particular, {XML::Node#serialize}, {XML::Node#to_html}, and {XML::Node#to_s} will +# serialize a given node and its children. (This is the equivalent of JavaScript's +# +Element.outerHTML+.) Similarly, {XML::Node#inner_html} will serialize the children of a given +# node. (This is the equivalent of JavaScript's +Element.innerHTML+.) +# +# doc = Nokogiri::HTML5("Hello world!") +# puts doc.serialize +# # => Hello world! +# +# Due to quirks in how HTML is parsed and serialized, it's possible for a DOM tree to be +# serialized and then re-parsed, resulting in a different DOM. Mostly, this happens with DOMs +# produced from invalid HTML. Unfortunately, even valid HTML may not survive serialization and +# re-parsing. +# +# In particular, a newline at the start of +pre+, +listing+, and +textarea+ elements is ignored by +# the parser. +# +# doc = Nokogiri::HTML5(<<-EOF) +# +#
+#   Content
+# EOF +# puts doc.at('/html/body/pre').serialize +# # =>
Content
+# +# In this case, the original HTML is semantically equivalent to the serialized version. If the +# +pre+, +listing+, or +textarea+ content starts with two newlines, the first newline will be +# stripped on the first parse and the second newline will be stripped on the second, leading to +# semantically different DOMs. Passing the parameter preserve_newline: true will cause +# two or more newlines to be preserved. (A single leading newline will still be removed.) +# +# doc = Nokogiri::HTML5(<<-EOF) +# +# +# +# Content +# EOF +# puts doc.at('/html/body/listing').serialize(preserve_newline: true) +# # => +# # +# # Content +# +# == Encodings +# +# Nokogiri always parses HTML5 using {https://en.wikipedia.org/wiki/UTF-8 UTF-8}; however, the +# encoding of the input can be explicitly selected via the optional +encoding+ parameter. This is +# most useful when the input comes not from a string but from an IO object. +# +# When serializing a document or node, the encoding of the output string can be specified via the +# +:encoding+ options. Characters that cannot be encoded in the selected encoding will be encoded +# as {https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references HTML numeric +# entities}. +# +# frag = Nokogiri::HTML5.fragment('아는 길도 물어가라') +# puts html +# # => 아는 길도 물어가라 +# frag = Nokogiri::HTML5.fragment(html) +# puts frag.serialize +# # => 아는 길도 물어가라 +# +# (There's a {https://bugs.ruby-lang.org/issues/15033 bug} in all current versions of Ruby that +# can cause the entity encoding to fail. Of the mandated supported encodings for HTML, the only +# encoding I'm aware of that has this bug is 'ISO-2022-JP'. We recommend avoiding this +# encoding.) +# +# == Notes +# +# * The {Nokogiri::HTML5.fragment} function takes a string and parses it +# as a HTML5 document. The ++, ++, and ++ elements are +# removed from this document, and any children of these elements that remain +# are returned as a {Nokogiri::HTML5::DocumentFragment}. +# +# * The {Nokogiri::HTML5.parse} function takes a string and passes it to the +# gumbo_parse_with_options method, using the default options. +# The resulting Gumbo parse tree is then walked. +# +# * Instead of uppercase element names, lowercase element names are produced. +# +# * Instead of returning +unknown+ as the element name for unknown tags, the +# original tag name is returned verbatim. +# +# Since v1.12.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#23 +module Nokogiri::HTML5 + class << self + # Parse a fragment from +string+. Convenience method for + # {Nokogiri::HTML5::DocumentFragment.parse}. + # + # source://nokogiri//lib/nokogiri/html5.rb#238 + def fragment(string, encoding = T.unsafe(nil), **options); end + + # Fetch and parse a HTML document from the web, following redirects, + # handling https, and determining the character encoding using HTML5 + # rules. +uri+ may be a +String+ or a +URI+. +options+ contains + # http headers and special options. Everything which is not a + # special option is considered a header. Special options include: + # * :follow_limit => number of redirects which are followed + # * :basic_auth => [username, password] + # + # source://nokogiri//lib/nokogiri/html5.rb#249 + def get(uri, options = T.unsafe(nil)); end + + # Parse an HTML 5 document. Convenience method for {Nokogiri::HTML5::Document.parse} + # + # source://nokogiri//lib/nokogiri/html5.rb#232 + def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # source://nokogiri//lib/nokogiri/html5.rb#260 + def read_and_encode(string, encoding); end + + private + + # source://nokogiri//lib/nokogiri/html5.rb#286 + def get_impl(uri, options = T.unsafe(nil)); end + + # 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#347 + def reencode(body, content_type = T.unsafe(nil)); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document.rb#41 +class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/html5/document.rb#129 + def initialize(*args); end + + # :call-seq: + # fragment() → Nokogiri::HTML5::DocumentFragment + # fragment(markup) → Nokogiri::HTML5::DocumentFragment + # + # Parse a HTML5 document fragment from +markup+, returning a Nokogiri::HTML5::DocumentFragment. + # + # [Properties] + # - +markup+ (String) The HTML5 markup fragment to be parsed + # + # [Returns] + # Nokogiri::HTML5::DocumentFragment. This object's children will be empty if `markup` is not passed, is empty, or is `nil`. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#147 + def fragment(markup = T.unsafe(nil)); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::Document.new`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document.rb#49 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document.rb#151 + def to_xml(options = T.unsafe(nil), &block); end + + # Get the url name for this document, as passed into Document.parse, Document.read_io, or + # Document.read_memory + # + # source://nokogiri//lib/nokogiri/html5/document.rb#42 + def url; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See CSS::XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#163 + def xpath_doctype; end + + class << self + # :call-seq: + # parse(input) + # parse(input, url=nil, encoding=nil, **options) + # parse(input, url=nil, encoding=nil) { |options| ... } + # + # Parse HTML5 input. + # + # [Parameters] + # - +input+ may be a String, or any object that responds to _read_ and _close_ such as an + # IO, or StringIO. + # + # - +url+ (optional) is a String indicating the canonical URI where this document is located. + # + # - +encoding+ (optional) is the encoding that should be used when processing + # the document. + # + # - +options+ (optional) is a configuration Hash (or keyword arguments) to set options + # during parsing. The three currently supported options are +:max_errors+, + # +:max_tree_depth+ and +:max_attributes+, described at Nokogiri::HTML5. + # + # ⚠ Note that these options are different than those made available by + # Nokogiri::XML::Document and Nokogiri::HTML4::Document. + # + # - +block+ (optional) is passed a configuration Hash on which parse options may be set. See + # Nokogiri::HTML5 for more information and usage. + # + # [Returns] Nokogiri::HTML5::Document + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#80 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # Create a new document from an IO object. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#101 + def read_io(io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end + + # Create a new document from a String. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#110 + def read_memory(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end + + private + + # source://nokogiri//lib/nokogiri/html5/document.rb#118 + def do_parse(string_or_io, url, encoding, options); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27 +class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment + # Create a document fragment. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#39 + def initialize(doc, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28 + def document; end + + # Sets the attribute document + # + # @param value the value to set the attribute document to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28 + def document=(_arg0); end + + # Returns the value of attribute errors. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29 + def errors; end + + # Sets the attribute errors + # + # @param value the value to set the attribute errors to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29 + def errors=(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#65 + def extract_params(params); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::DocumentFragment.new(doc)`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#36 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#51 + def serialize(options = T.unsafe(nil), &block); end + + class << self + # Parse a document fragment from +tags+, returning a Nodeset. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#58 + def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/node.rb#30 +module Nokogiri::HTML5::Node + # source://nokogiri//lib/nokogiri/html5/node.rb#70 + def fragment(tags); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#31 + def inner_html(options = T.unsafe(nil)); end + + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#39 + def write_to(io, *options); end + + private + + # HTML elements can have attributes that contain colons. + # Nokogiri::XML::Node#[]= treats names with colons as a prefixed QName + # and tries to create an attribute in a namespace. This is especially + # annoying with attribute names like xml:lang since libxml2 will + # actually create the xml namespace if it doesn't exist already. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#83 + def add_child_node_and_reparent_attrs(node); end +end + +# Enum for the HTML5 parser quirks mode values. Values returned by HTML5::Document#quirks_mode +# +# See https://dom.spec.whatwg.org/#concept-document-quirks for more information on HTML5 quirks +# mode. +# +# Since v1.14.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#30 +module Nokogiri::HTML5::QuirksMode; end + +# The document was parsed in "limited-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#33 +Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "no-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#31 +Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#32 +Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer) + +Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::LIBXML_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_DATETIME_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String) +Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) +Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) + +# source://nokogiri//lib/nokogiri/syntax_error.rb#4 +class Nokogiri::SyntaxError < ::StandardError; end + +module Nokogiri::Test + class << self + def __foreign_error_handler; end + end +end + +# The version of Nokogiri you are using +# +# source://nokogiri//lib/nokogiri/version/constant.rb#5 +Nokogiri::VERSION = T.let(T.unsafe(nil), String) + +# Detailed version info about Nokogiri and the installed extension dependencies. +# +# source://nokogiri//lib/nokogiri/version/info.rb#222 +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#180 + def to_markdown; end + + # source://nokogiri//lib/nokogiri/version/info.rb#72 + def warnings; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#14 + def windows?; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml.rb#12 +module Nokogiri::XML + class << self + # Parse an XML document using the Nokogiri::XML::Reader API. See + # Nokogiri::XML::Reader for mor information + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml.rb#23 + def Reader(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+. + # See Nokogiri::XML::RelaxNG for an example. + # + # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#9 + def RelaxNG(string_or_io, options = T.unsafe(nil)); end + + # Create a new Nokogiri::XML::Schema object using a +string_or_io+ + # object. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#9 + def Schema(string_or_io, options = T.unsafe(nil)); end + + # Parse a fragment from +string+ in to a NodeSet. + # + # source://nokogiri//lib/nokogiri/xml.rb#42 + def fragment(string, options = T.unsafe(nil), &block); end + + # Parse XML. Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#36 + def parse(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/attr.rb#6 +class Nokogiri::XML::Attr < ::Nokogiri::XML::Node + def content=(_arg0); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Attr, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of the attribute. + # - +value+ → (String) The value of the attribute. + # - +namespace+ → (Namespace, nil) The Namespace of the attribute, or +nil+ if there is no namespace. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *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" + # # })} + # + # source://nokogiri//lib/nokogiri/xml/attr.rb#55 + def deconstruct_keys(keys); end + + def to_s; end + def value; end + def value=(_arg0); end + + private + + # source://nokogiri//lib/nokogiri/xml/attr.rb#61 + def inspect_attributes; end + + class << self + def new(*_arg0); end + end +end + +# Represents an attribute declaration in a DTD +# +# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7 +class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node + def attribute_type; end + def default; end + def enumeration; end + + private + + # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#17 + def inspect_attributes; end +end + +# Nokogiri builder can be used for building XML and HTML documents. +# +# == Synopsis: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.products { +# xml.widget { +# xml.id_ "10" +# xml.name "Awesome widget" +# } +# } +# } +# end +# puts builder.to_xml +# +# Will output: +# +# +# +# +# +# 10 +# Awesome widget +# +# +# +# +# +# === Builder scope +# +# The builder allows two forms. When the builder is supplied with a block +# that has a parameter, the outside scope is maintained. This means you +# can access variables that are outside your builder. If you don't need +# outside scope, you can use the builder without the "xml" prefix like +# this: +# +# builder = Nokogiri::XML::Builder.new do +# root { +# products { +# widget { +# id_ "10" +# name "Awesome widget" +# } +# } +# } +# end +# +# == Special Tags +# +# The builder works by taking advantage of method_missing. Unfortunately +# some methods are defined in ruby that are difficult or dangerous to +# remove. You may want to create tags with the name "type", "class", and +# "id" for example. In that case, you can use an underscore to +# disambiguate your tag name from the method call. +# +# Here is an example of using the underscore to disambiguate tag names from +# ruby methods: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object { +# xml.type_ o.type +# xml.class_ o.class.name +# xml.id_ o.id +# } +# end +# } +# } +# end +# puts builder.to_xml +# +# The underscore may be used with any tag name, and the last underscore +# will just be removed. This code will output the following XML: +# +# +# +# +# +# Object +# Object +# 48390 +# +# +# Object +# Object +# 48380 +# +# +# Object +# Object +# 48370 +# +# +# +# +# == Tag Attributes +# +# Tag attributes may be supplied as method arguments. Here is our +# previous example, but using attributes rather than tags: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object(:type => o.type, :class => o.class, :id => o.id) +# end +# } +# } +# end +# puts builder.to_xml +# +# === Tag Attribute Short Cuts +# +# A couple attribute short cuts are available when building tags. The +# short cuts are available by special method calls when building a tag. +# +# This example builds an "object" tag with the class attribute "classy" +# and the id of "thing": +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# xml.object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Which will output: +# +# +# +# +# +# +# +# +# All other options are still supported with this syntax, including +# blocks and extra tag attributes. +# +# == Namespaces +# +# Namespaces are added similarly to attributes. Nokogiri::XML::Builder +# assumes that when an attribute starts with "xmlns", it is meant to be +# a namespace: +# +# builder = Nokogiri::XML::Builder.new { |xml| +# xml.root('xmlns' => 'default', 'xmlns:foo' => 'bar') do +# xml.tenderlove +# end +# } +# puts builder.to_xml +# +# Will output XML like this: +# +# +# +# +# +# +# === Referencing declared namespaces +# +# Tags that reference non-default namespaces (i.e. a tag "foo:bar") can be +# built by using the Nokogiri::XML::Builder#[] method. +# +# For example: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root('xmlns:foo' => 'bar') { +# xml.objects { +# xml['foo'].object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Will output this XML: +# +# +# +# +# +# +# +# +# Note the "foo:object" tag. +# +# === Namespace inheritance +# +# In the Builder context, children will inherit their parent's namespace. This is the same +# behavior as if the underlying {XML::Document} set +namespace_inheritance+ to +true+: +# +# result = Nokogiri::XML::Builder.new do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# end +# end +# result.doc.to_xml +# # => +# # +# # +# # +# +# Users may turn this behavior off by passing a keyword argument +namespace_inheritance:false+ +# to the initializer: +# +# result = Nokogiri::XML::Builder.new(namespace_inheritance: false) do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# xml["soapenv"].Body # users may explicitly opt into the namespace +# end +# end +# result.doc.to_xml +# # => +# # +# #
+# # +# # +# +# For more information on namespace inheritance, please see {XML::Document#namespace_inheritance} +# +# +# == Document Types +# +# To create a document type (DTD), use the Builder#doc method to get +# the current context document. Then call Node#create_internal_subset to +# create the DTD node. +# +# For example, this Ruby: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.doc.create_internal_subset( +# 'html', +# "-//W3C//DTD HTML 4.01 Transitional//EN", +# "http://www.w3.org/TR/html4/loose.dtd" +# ) +# xml.root do +# xml.foo +# end +# end +# +# puts builder.to_xml +# +# Will output this xml: +# +# +# +# +# +# +# +# source://nokogiri//lib/nokogiri/xml/builder.rb#264 +class Nokogiri::XML::Builder + include ::Nokogiri::ClassResolver + + # Create a new Builder object. +options+ are sent to the top level + # Document that is being built. + # + # Building a document with a particular encoding for example: + # + # Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| + # ... + # end + # + # @return [Builder] a new instance of Builder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#307 + def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end + + # Append the given raw XML +string+ to the document + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#390 + def <<(string); end + + # Build a tag that is associated with namespace +ns+. Raises an + # ArgumentError if +ns+ has not been defined higher in the tree. + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#358 + def [](ns); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity; end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity=(_arg0); end + + # Create a CDATA Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#345 + def cdata(string); end + + # Create a Comment Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#351 + def comment(string); end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context; end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context=(_arg0); end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc; end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#394 + def method_missing(method, *args, &block); end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent; end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent=(_arg0); end + + # Create a Text Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#339 + def text(string); end + + # Convert this Builder object to XML + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#377 + def to_xml(*args); end + + private + + # Insert +node+ as a child of the current Node + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#423 + def insert(node, &block); end + + class << self + # Create a builder with an existing root object. This is for use when + # you have an existing document that you would like to augment with + # builder methods. The builder context created will start with the + # given +root+ node. + # + # For example: + # + # doc = Nokogiri::XML(File.read('somedoc.xml')) + # Nokogiri::XML::Builder.with(doc.at_css('some_tag')) do |xml| + # # ... Use normal builder methods here ... + # xml.awesome # add the "awesome" tag below "some_tag" + # end + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#294 + def with(root, &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/builder.rb#267 +Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/xml/builder.rb#442 +class Nokogiri::XML::Builder::NodeBuilder + # @return [NodeBuilder] a new instance of NodeBuilder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#443 + def initialize(node, doc_builder); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#452 + def [](k); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#448 + def []=(k, v); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#456 + def method_missing(method, *args, &block); end +end + +# source://nokogiri//lib/nokogiri/xml/cdata.rb#7 +class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text + # Get the name of this CDATA node + # + # source://nokogiri//lib/nokogiri/xml/cdata.rb#8 + def name; end + + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/character_data.rb#5 +class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node + include ::Nokogiri::XML::PP::CharacterData +end + +class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/dtd.rb#5 +class Nokogiri::XML::DTD < ::Nokogiri::XML::Node + def attributes; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#17 + def each; end + + def elements; end + def entities; end + def external_id; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#27 + def html5_dtd?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#23 + def html_dtd?; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#13 + def keys; end + + def notations; end + def system_id; end + def validate(_arg0); end +end + +# Nokogiri::XML::Document is the main entry point for dealing with XML documents. The Document +# is created by parsing an XML document. See Nokogiri::XML::Document.parse for more information +# on parsing. +# +# For searching a Document, see Nokogiri::XML::Searchable#css and +# Nokogiri::XML::Searchable#xpath +# +# source://nokogiri//lib/nokogiri/xml/document.rb#17 +class Nokogiri::XML::Document < ::Nokogiri::XML::Node + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/xml/document.rb#178 + def initialize(*args); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#394 + def <<(node_or_tags); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#394 + def add_child(node_or_tags); end + + def canonicalize(*_arg0); end + def clone(*_arg0); end + + # :call-seq: + # collect_namespaces() → Hash + # + # Recursively get all namespaces from this node and its subtree and return them as a + # hash. + # + # ⚠ This method will not handle duplicate namespace prefixes, since the return value is a hash. + # + # Note that this method does an xpath lookup for nodes with namespaces, and as a result the + # order (and which duplicate prefix "wins") may be dependent on the implementation of the + # underlying XML library. + # + # *Example:* Basic usage + # + # Given this document: + # + # + # + # + # + # This method will return: + # + # {"xmlns:foo"=>"bar", "xmlns"=>"default", "xmlns:hello"=>"world"} + # + # *Example:* Duplicate prefixes + # + # Given this document: + # + # + # + # + # + # The hash returned will be something like: + # + # {"xmlns:foo" => "baz"} + # + # source://nokogiri//lib/nokogiri/xml/document.rb#317 + def collect_namespaces; end + + # Create a CDATA Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#262 + def create_cdata(string, &block); end + + # Create a Comment Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#267 + 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#232 + def create_element(name, *contents_or_attrs, &block); end + + def create_entity(*_arg0); end + + # Create a Text Node with +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#257 + 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. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *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} + # + # source://nokogiri//lib/nokogiri/xml/document.rb#458 + def deconstruct_keys(keys); end + + # Apply any decorators to +node+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#365 + def decorate(node); end + + # Get the list of decorators given +key+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#324 + def decorators(key); end + + # A reference to +self+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#277 + def document; end + + def dup(*_arg0); end + def encoding; end + def encoding=(_arg0); end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#128 + def errors; end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#128 + def errors=(_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # Returns an empty fragment if +tags+ is nil. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#386 + def fragment(tags = T.unsafe(nil)); end + + # The name of this document. Always returns "document" + # + # source://nokogiri//lib/nokogiri/xml/document.rb#272 + def name; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#175 + def namespace_inheritance; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#175 + def namespace_inheritance=(_arg0); end + + # Get the hash of namespaces on the root Nokogiri::XML::Node + # + # source://nokogiri//lib/nokogiri/xml/document.rb#379 + def namespaces; end + + def remove_namespaces!; end + def root; end + def root=(_arg0); end + + # Explore a document with shortcut methods. See Nokogiri::Slop for details. + # + # Note that any nodes that have been instantiated before #slop! + # is called will not be decorated with sloppy behavior. So, if you're in + # irb, the preferred idiom is: + # + # irb> doc = Nokogiri::Slop my_markup + # + # and not + # + # irb> doc = Nokogiri::HTML my_markup + # ... followed by irb's implicit inspect (and therefore instantiation of every node) ... + # irb> doc.slop! + # ... which does absolutely nothing. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#354 + def slop!; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1280 + def to_xml(*args, &block); end + + def url; end + + # Validate this Document against it's DTD. Returns a list of errors on + # the document or +nil+ when there is no DTD. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#332 + def validate; end + + def version; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#414 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/xml/document.rb#466 + def inspect_attributes; end + + class << self + def new(*_arg0); end + + # Parse an XML file. + # + # +string_or_io+ may be a String, or any object that responds to + # _read_ and _close_ such as an IO, or StringIO. + # + # +url+ (optional) is the URI where this document is located. + # + # +encoding+ (optional) is the encoding that should be used when processing + # the document. + # + # +options+ (optional) is a configuration object that sets options during + # parsing, such as Nokogiri::XML::ParseOptions::RECOVER. See the + # Nokogiri::XML::ParseOptions for more information. + # + # +block+ (optional) is passed a configuration object on which + # parse options may be set. + # + # By default, Nokogiri treats documents as untrusted, and so + # does not attempt to load DTDs or access the network. See + # Nokogiri::XML::ParseOptions for a complete list of options; + # and that module's DEFAULT_XML constant for what's set (and not + # set) by default. + # + # Nokogiri.XML() is a convenience method which will call this method. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#48 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + def read_io(_arg0, _arg1, _arg2, _arg3); end + def read_memory(_arg0, _arg1, _arg2, _arg3); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#83 + def empty_doc?(string_or_io); end + end +end + +# source://nokogiri//lib/nokogiri/xml/document.rb#464 +Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/document.rb#19 +Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document.rb#20 +Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp) + +# See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. Note that we're not +# attempting to handle unicode characters partly because libxml2 doesn't handle unicode +# characters in NCNAMEs. +# +# source://nokogiri//lib/nokogiri/xml/document.rb#18 +Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document_fragment.rb#8 +class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node + # Create a new DocumentFragment from +tags+. + # + # If +ctx+ is present, it is used as a context node for the + # subtree created, e.g., namespaces will be resolved relative + # to +ctx+. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#19 + def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this fragment for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#102 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the root nodes of this document fragment as an array, to use in pattern matching. + # + # 💡 Note that text nodes are returned as well as elements. If you wish to operate only on + # root elements, you should deconstruct the array returned by + # DocumentFragment#elements. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *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")] })] + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#190 + def deconstruct; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#42 + def dup; end + + # A list of Nokogiri::XML::SyntaxError found when parsing a document + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#136 + def errors; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#140 + def errors=(things); end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#144 + def fragment(data); end + + # return the name for DocumentFragment + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#54 + def name; end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this fragment for +paths+. +paths+ must be one or more XPath or CSS queries. + # + # For more information see Nokogiri::XML::Searchable#search + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#121 + def search(*rules); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60 + def serialize; end + + # Convert this DocumentFragment to html + # See Nokogiri::XML::NodeSet#to_html + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#67 + def to_html(*args); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60 + def to_s; end + + # Convert this DocumentFragment to xhtml + # See Nokogiri::XML::NodeSet#to_xhtml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#79 + def to_xhtml(*args); end + + # Convert this DocumentFragment to xml + # See Nokogiri::XML::NodeSet#to_xml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#91 + def to_xml(*args); end + + private + + # fix for issue 770 + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#197 + def namespace_declarations(ctx); end + + class << self + def new(*_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#9 + def parse(tags, options = T.unsafe(nil), &block); end + end +end + +class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end + +# Represents the allowed content in an Element Declaration inside a DTD: +# +# +# +# ]> +# +# +# ElementContent represents the binary tree inside the tag shown above that lists the +# possible content for the div1 tag. +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#16 +class Nokogiri::XML::ElementContent + include ::Nokogiri::XML::PP::Node + + # Get the children of this ElementContent node + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#35 + def children; end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#31 + def document; end + + def name; end + def occur; end + def prefix; end + def type; end + + private + + def c1; end + def c2; end + + # source://nokogiri//lib/nokogiri/xml/element_content.rb#41 + def inspect_attributes; end +end + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#21 +Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#28 +Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer) + +# Possible content occurrences +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#26 +Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#27 +Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#23 +Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer) + +# Possible definitions of type +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#20 +Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#29 +Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#22 +Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_decl.rb#5 +class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node + def content; end + def element_type; end + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/element_decl.rb#12 + def inspect_attributes; end +end + +# source://nokogiri//lib/nokogiri/xml/entity_decl.rb#5 +class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node + def content; end + def entity_type; end + def external_id; end + def original_content; end + def system_id; end + + private + + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#18 + def inspect_attributes; end + + class << self + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#12 + def new(name, doc, *args); end + end +end + +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/entity_reference.rb#5 +class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#6 + def children; end + + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#15 + def inspect_attributes; end + + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/namespace.rb#6 +class Nokogiri::XML::Namespace + include ::Nokogiri::XML::PP::Node + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Namespace, to use in pattern matching. + # + # Valid keys and their values: + # - +prefix+ → (String, nil) The namespace's prefix, or +nil+ if there is no prefix (e.g., default namespace). + # - +href+ → (String) The namespace's URI + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *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"} + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#47 + def deconstruct_keys(keys); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#8 + def document; end + + def href; end + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/namespace.rb#53 + def inspect_attributes; end +end + +# Nokogiri::XML::Node is the primary API you'll use to interact with your Document. +# +# == Attributes +# +# A Nokogiri::XML::Node may be treated similarly to a hash with regard to attributes. For +# example: +# +# node = Nokogiri::XML::DocumentFragment.parse("link").at_css("a") +# node.to_html # => "link" +# node['href'] # => "#foo" +# node.keys # => ["href", "id"] +# node.values # => ["#foo", "link"] +# node['class'] = 'green' # => "green" +# node.to_html # => "link" +# +# See the method group entitled Node@Working+With+Node+Attributes for the full set of methods. +# +# == Navigation +# +# Nokogiri::XML::Node also has methods that let you move around your tree: +# +# [#parent, #children, #next, #previous] +# Navigate up, down, or through siblings. +# +# See the method group entitled Node@Traversing+Document+Structure for the full set of methods. +# +# == Serialization +# +# When printing or otherwise emitting a document or a node (and its subtree), there are a few +# methods you might want to use: +# +# [#content, #text, #inner_text, #to_str] +# These methods will all **emit plaintext**, +# meaning that entities will be replaced (e.g., +<+ will be replaced with +<+), meaning +# that any sanitizing will likely be un-done in the output. +# +# [#to_s, #to_xml, #to_html, #inner_html] +# These methods will all **emit properly-escaped markup**, meaning that it's suitable for +# consumption by browsers, parsers, etc. +# +# See the method group entitled Node@Serialization+and+Generating+Output for the full set of methods. +# +# == Searching +# +# You may search this node's subtree using methods like #xpath and #css. +# +# See the method group entitled Node@Searching+via+XPath+or+CSS+Queries for the full set of methods. +# +# source://nokogiri//lib/nokogiri/xml/node.rb#56 +class Nokogiri::XML::Node + include ::Nokogiri::HTML5::Node + include ::Nokogiri::XML::PP::Node + include ::Nokogiri::XML::Searchable + include ::Nokogiri::ClassResolver + include ::Enumerable + + # :call-seq: + # new(name, document) -> Nokogiri::XML::Node + # new(name, document) { |node| ... } -> Nokogiri::XML::Node + # + # Create a new node with +name+ that belongs to +document+. + # + # If you intend to add a node to a document tree, it's likely that you will prefer one of the + # Nokogiri::XML::Node methods like #add_child, #add_next_sibling, #replace, etc. which will + # both create an element (or subtree) and place it in the document tree. + # + # Another alternative, if you are concerned about performance, is + # Nokogiri::XML::Document#create_element which accepts additional arguments for contents or + # attributes but (like this method) avoids parsing markup. + # + # [Parameters] + # - +name+ (String) + # - +document+ (Nokogiri::XML::Document) The document to which the the returned node will belong. + # [Yields] Nokogiri::XML::Node + # [Returns] Nokogiri::XML::Node + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#126 + def initialize(name, document); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls (e.g., root << child1 << child2) + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#256 + def <<(node_or_tags); end + + # Compare two Node objects with respect to their Document. Nodes from + # different documents cannot be compared. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1256 + def <=>(other); end + + # Test to see if this Node is equal to +other+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1246 + def ==(other); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def [](name); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def []=(name, value); end + + # Accept a visitor. This method calls "visit" on +visitor+ with self. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1240 + def accept(visitor); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +<<+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#148 + def add_child(node_or_tags); end + + # :call-seq: add_class(names) → self + # + # Ensure HTML CSS classes are present on +self+. Any CSS classes in +names+ that already exist + # in the "class" attribute are _not_ added. Note that any existing duplicates in the + # "class" attribute are not removed. Compare with #append_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_add("class", names) + # + # See related: #kwattr_add, #classes, #append_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be added to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. Any class names already present + # will not be added. Any class names not present will be added. If no "class" attribute + # exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Ensure that the node has CSS class "section" + # + # node # =>
+ # node.add_class("section") # =>
+ # node.add_class("section") # =>
# duplicate not added + # + # *Example:* Ensure that the node has CSS classes "section" and "header", via a String argument + # + # Note that the CSS class "section" is not added because it is already present. + # Note also that the pre-existing duplicate CSS class "section" is not removed. + # + # node # =>
+ # node.add_class("section header") # =>
+ # + # *Example:* Ensure that the node has CSS classes "section" and "header", via an Array argument + # + # node # =>
+ # node.add_class(["section", "header"]) # =>
+ # + # source://nokogiri//lib/nokogiri/xml/node.rb#715 + def add_class(names); end + + def add_namespace(_arg0, _arg1); end + def add_namespace_definition(_arg0, _arg1); end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#288 + def add_next_sibling(node_or_tags); end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#271 + def add_previous_sibling(node_or_tags); end + + # Insert +node_or_tags+ after this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_next_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#318 + def after(node_or_tags); end + + # Get a list of ancestor Node for this Node. If +selector+ is given, + # the ancestors must match +selector+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1209 + def ancestors(selector = T.unsafe(nil)); end + + # :call-seq: append_class(names) → self + # + # Add HTML CSS classes to +self+, regardless of duplication. Compare with #add_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_append("class", names) + # + # See related: #kwattr_append, #classes, #add_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be appended to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. All class names passed in will be + # appended to the "class" attribute even if they are already present in the attribute + # value. If no "class" attribute exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "section" to the node's CSS "class" attribute + # + # node # =>
+ # node.append_class("section") # =>
+ # node.append_class("section") # =>
# duplicate added! + # + # *Example:* Append "section" and "header" to the noded's CSS "class" attribute, via a String argument + # + # Note that the CSS class "section" is appended even though it is already present + # + # node # =>
+ # node.append_class("section header") # =>
+ # + # *Example:* Append "section" and "header" to the node's CSS "class" attribute, via an Array argument + # + # node # =>
+ # node.append_class(["section", "header"]) # =>
+ # node.append_class(["section", "header"]) # =>
+ # + # source://nokogiri//lib/nokogiri/xml/node.rb#759 + def append_class(names); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def attr(name); end + + def attribute(_arg0); end + def attribute_nodes; end + def attribute_with_ns(_arg0, _arg1); end + + # :call-seq: attributes() → Hash + # + # Fetch this node's attributes. + # + # ⚠ Because the keys do not include any namespace information for the attribute, in case of a + # simple name collision, not all attributes will be returned. In this case, you will need to + # use #attribute_nodes. + # + # [Returns] + # Hash containing attributes belonging to +self+. The hash keys are String attribute + # names (without the namespace), and the hash values are Nokogiri::XML::Attr. + # + # *Example* with no namespaces: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=>#(Attr:0x550 { name = "size", value = "large" }), + # # "class"=>#(Attr:0x564 { name = "class", value = "big wide tall" })} + # + # *Example* with a namespace: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "desc", + # # href = "http://example.com/sizes" + # # }), + # # value = "large" + # # })} + # + # *Example* with an attribute name collision: + # + # ⚠ Note that only one of the attributes is returned in the Hash. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "height", + # # href = "http://example.com/heights" + # # }), + # # value = "tall" + # # })} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#609 + def attributes; end + + # Insert +node_or_tags+ before this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_previous_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#304 + def before(node_or_tags); end + + def blank?; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1407 + 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#1130 + def cdata?; end + + def child; end + def children; end + + # Set the content for this Node +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Also see related method +inner_html=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#349 + def children=(node_or_tags); end + + # :call-seq: classes() → Array + # + # Fetch CSS class names of a Node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_values("class") + # + # See related: #kwattr_values, #add_class, #append_class, #remove_class + # + # [Returns] + # The CSS classes (Array of String) present in the Node's "class" attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example* + # + # node # =>
+ # node.classes # => ["section", "title", "header"] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#669 + def classes; end + + def clone(*_arg0); end + + # Returns true if this is a Comment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1125 + def comment?; end + + def content; end + + # Set the Node's content to a Text node containing +string+. The string gets XML escaped, not + # interpreted as markup. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#411 + def content=(string); end + + def create_external_subset(_arg0, _arg1, _arg2); end + def create_internal_subset(_arg0, _arg1, _arg2); end + + # Get the path to this node as a CSS expression + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1200 + def css_path; end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Node, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of this node, or "text" if it is a Text node. + # - +namespace+ → (Namespace, nil) The namespace of this node, or nil if there is no namespace. + # - +attributes+ → (Array) The attributes of this node. + # - +children+ → (Array) The children of this node. 💡 Note this includes text nodes. + # - +elements+ → (Array) The child elements of this node. 💡 Note this does not include text nodes. + # - +content+ → (String) The contents of all the text nodes in this node's subtree. See #content. + # - +inner_html+ → (String) The inner markup for the children of this node. See #inner_html. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *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" + # # })]} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1468 + def deconstruct_keys(keys); end + + # Decorate this node with the decorators set up in this node's Document + # + # source://nokogiri//lib/nokogiri/xml/node.rb#132 + def decorate!; end + + # Adds a default namespace supplied as a string +url+ href, to self. + # The consequence is as an xmlns attribute with supplied argument were + # present in parsed XML. A default namespace set with this method will + # now show up in #attributes, but when this node is serialized to XML an + # "xmlns" attribute will appear. See also #namespace and #namespace= + # + # source://nokogiri//lib/nokogiri/xml/node.rb#427 + def default_namespace=(url); end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#643 + def delete(name); end + + # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns + # nil on XML documents and on unknown tags. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1167 + def description; end + + # Do xinclude substitution on the subtree below node. If given a block, a + # Nokogiri::XML::ParseOptions object initialized from +options+, will be + # passed to it, allowing more convenient modification of the parser options. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#454 + def do_xinclude(options = T.unsafe(nil)); end + + def document; end + + # Returns true if this is a Document + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1145 + def document?; end + + def dup(*_arg0); end + + # Iterate over each attribute name and value pair for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#635 + def each; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + def elem?; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + def element?; end + + def element_children; end + def elements; end + def encode_special_chars(_arg0); end + def external_subset; end + def first_element_child; end + + # Create a DocumentFragment containing +tags+ that is relative to _this_ + # context node. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#70 + def fragment(tags); end + + # Returns true if this is a DocumentFragment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1160 + def fragment?; end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def get_attribute(name); end + + def has_attribute?(_arg0); end + + # Returns true if this is an HTML4::Document or HTML5::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1140 + def html?; end + + # Get the inner_html for this node's Node#children + # + # source://nokogiri//lib/nokogiri/html5/node.rb#31 + def inner_html(options = T.unsafe(nil)); end + + # Set the content for this Node to +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # ⚠ Please note that despite the name, this method will *not* always parse a String argument + # as HTML. A String argument will be parsed with the +DocumentFragment+ parser related to this + # node's document. + # + # For example, if the document is an HTML4::Document then the string will be parsed as HTML4 + # using HTML4::DocumentFragment; but if the document is an XML::Document then it will + # parse the string as XML using XML::DocumentFragment. + # + # Also see related method +children=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#338 + def inner_html=(node_or_tags); end + + # :section: + def inner_text; end + + def internal_subset; end + def key?(_arg0); end + + # Get the attribute names for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#629 + def keys; end + + # :call-seq: + # kwattr_add(attribute_name, keywords) → self + # + # Ensure that values are present in a keyword attribute. + # + # Any values in +keywords+ that already exist in the Node's attribute values are _not_ + # added. Note that any existing duplicates in the attribute values are not removed. Compare + # with #kwattr_append. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #add_class, #kwattr_values, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. Any values already present will + # not be added. Any values not present will be added. If the named attribute does not exist, + # it is created. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example:* Ensure that a +Node+ has "nofollow" in its +rel+ attribute. + # + # Note that duplicates are not added. + # + # node # => + # node.kwattr_add("rel", "nofollow") # => + # node.kwattr_add("rel", "nofollow") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via a + # String argument. + # + # Note that "nofollow" is not added because it is already present. Note also that the + # pre-existing duplicate "nofollow" is not removed. + # + # node # => + # node.kwattr_add("rel", "nofollow noreferrer") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via + # an Array argument. + # + # node # => + # node.kwattr_add("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#892 + def kwattr_add(attribute_name, keywords); end + + # :call-seq: + # kwattr_append(attribute_name, keywords) → self + # + # Add keywords to a Node's keyword attribute, regardless of duplication. Compare with + # #kwattr_add. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #append_class, #kwattr_values, #kwattr_add, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. All values passed in will be + # appended to the named attribute even if they are already present in the attribute. If the + # named attribute does not exist, it is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "nofollow" to the +rel+ attribute. + # + # Note that duplicates are added. + # + # node # => + # node.kwattr_append("rel", "nofollow") # => + # node.kwattr_append("rel", "nofollow") # => + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via a String argument. + # + # Note that "nofollow" is appended even though it is already present. + # + # node # => + # node.kwattr_append("rel", "nofollow noreferrer") # => + # + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via an Array argument. + # + # node # => + # node.kwattr_append("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#945 + def kwattr_append(attribute_name, keywords); end + + # :call-seq: + # kwattr_remove(attribute_name, keywords) → self + # + # Remove keywords from a keyword attribute. Any matching keywords that exist in the named + # attribute are removed, including any multiple entries. + # + # If no keywords remain after this operation, or if +keywords+ is +nil+, the attribute is + # deleted from the node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #remove_class, #kwattr_values, #kwattr_add, #kwattr_append + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be removed from the attribute named +attribute_name+. May be a string + # containing whitespace-delimited values, or an Array of String values. Any keywords present + # in the named attribute will be removed. If no keywords remain, or if +keywords+ is nil, + # the attribute is deleted. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* + # + # Note that the +rel+ attribute is deleted when empty. + # + # node # => link + # node.kwattr_remove("rel", "nofollow") # => link + # node.kwattr_remove("rel", "noreferrer") # => link + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#988 + def kwattr_remove(attribute_name, keywords); end + + # :call-seq: + # kwattr_values(attribute_name) → Array + # + # Fetch values from a keyword attribute of a Node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #classes, #kwattr_add, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be inspected. + # + # [Returns] + # (Array) The values present in the Node's +attribute_name+ attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example:* + # + # node # => link + # node.kwattr_values("rel") # => ["nofollow", "noopener", "external"] + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#838 + def kwattr_values(attribute_name); end + + def lang; end + def lang=(_arg0); end + def last_element_child; end + def line; end + def line=(_arg0); end + + # Returns true if this Node matches +selector+ + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1015 + def matches?(selector); end + + def name; end + def name=(_arg0); end + def namespace; end + + # Set the default namespace on this node (as would be defined with an + # "xmlns=" attribute in XML source), as a Namespace object +ns+. Note that + # a Namespace added this way will NOT be serialized as an xmlns attribute + # for this node. You probably want #default_namespace= instead, or perhaps + # #add_namespace_definition with a nil prefix argument. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#437 + def namespace=(ns); end + + def namespace_definitions; end + def namespace_scopes; end + def namespaced_key?(_arg0, _arg1); end + + # :call-seq: + # namespaces() → Hash + # + # Fetch all the namespaces on this node and its ancestors. + # + # Note that the keys in this hash XML attributes that would be used to define this namespace, + # such as "xmlns:prefix", not just the prefix. + # + # The default namespace for this node will be included with key "xmlns". + # + # See also #namespace_scopes + # + # [Returns] + # Hash containing all the namespaces on this node and its ancestors. The hash keys are the + # namespace prefix, and the hash value for each key is the namespace URI. + # + # *Example:* + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # + # + # EOF + # doc.at_xpath("//root:first", "root" => "http://example.com/root").namespaces + # # => {"xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//child:second", "child" => "http://example.com/child").namespaces + # # => {"xmlns"=>"http://example.com/child", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//root:third", "root" => "http://example.com/root").namespaces + # # => {"xmlns:foo"=>"http://example.com/foo", + # # "xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1116 + def namespaces; end + + def native_content=(_arg0); end + def next; end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#288 + def next=(node_or_tags); end + + def next_element; end + def next_sibling; end + def node_name; end + def node_name=(_arg0); end + def node_type; end + def parent; end + + # Set the parent Node for this Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#417 + def parent=(parent_node); end + + # Parse +string_or_io+ as a document fragment within the context of + # *this* node. Returns a XML::NodeSet containing the nodes parsed from + # +string_or_io+. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1030 + def parse(string_or_io, options = T.unsafe(nil)); end + + def path; end + def pointer_id; end + + # Add +node_or_tags+ as the first child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#168 + def prepend_child(node_or_tags); end + + def previous; end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#271 + def previous=(node_or_tags); end + + def previous_element; end + def previous_sibling; end + + # Returns true if this is a ProcessingInstruction node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1150 + def processing_instruction?; end + + # Is this a read only node? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1175 + def read_only?; end + + def remove; end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#643 + def remove_attribute(name); end + + # :call-seq: + # remove_class(css_classes) → self + # + # Remove HTML CSS classes from this node. Any CSS class names in +css_classes+ that exist in + # this node's "class" attribute are removed, including any multiple entries. + # + # If no CSS classes remain after this operation, or if +css_classes+ is +nil+, the "class" + # attribute is deleted from the node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_remove("class", css_classes) + # + # Also see #kwattr_remove, #classes, #add_class, #append_class + # + # [Parameters] + # - +css_classes+ (String, Array) + # + # CSS class names to be removed from the Node's + # "class" attribute. May be a string containing whitespace-delimited names, or an Array of + # String names. Any class names already present will be removed. If no CSS classes remain, + # the "class" attribute is deleted. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example*: Deleting a CSS class + # + # Note that all instances of the class "section" are removed from the "class" attribute. + # + # node # =>
+ # node.remove_class("section") # =>
+ # + # *Example*: Deleting the only remaining CSS class + # + # Note that the attribute is removed once there are no remaining classes. + # + # node # =>
+ # node.remove_class("section") # =>
+ # + # *Example*: Deleting multiple CSS classes + # + # Note that the "class" attribute is deleted once it's empty. + # + # node # =>
+ # node.remove_class(["section", "float"]) # =>
+ # + # source://nokogiri//lib/nokogiri/xml/node.rb#809 + def remove_class(names = T.unsafe(nil)); end + + # Replace this Node with +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +swap+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#369 + def replace(node_or_tags); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # + # or + # + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1280 + def serialize(*args, &block); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def set_attribute(name, value); end + + # Swap this Node for +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # Containing markup. + # + # Returns self, to support chaining of calls. + # + # Also see related method +replace+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#403 + def swap(node_or_tags); end + + def text; end + + # Returns true if this is a Text node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1155 + 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#1306 + 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#1190 + def to_s; end + + def to_str; end + + # Serialize this Node to XHTML using +options+ + # + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1327 + 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#1316 + 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#1233 + def traverse(&block); end + + def type; end + def unlink; end + + # Does this Node's attributes include + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#623 + def value?(value); end + + # Get the attribute values for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#617 + def values; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap this Node with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed and used as the wrapper. This node's parent, if it exists, is used + # as the context node for parsing; otherwise the associated document is used. If the parsed + # fragment has multiple roots, the first root node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # Also see NodeSet#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap("
") + # doc.to_html + # # => + # # + # # + # + # *Example* with a +Node+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap(doc.create_element("div")) + # doc.to_html + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node.rb#223 + def wrap(node_or_tags); end + + # Write Node as HTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1384 + def write_html_to(io, options = T.unsafe(nil)); end + + # :call-seq: + # write_to(io, *options) + # + # Serialize this node or document to +io+. + # + # [Parameters] + # - +io+ (IO) An IO-like object to which the serialized content will be written. + # - +options+ (Hash) See below + # + # [Options] + # * +:encoding+ (String or Encoding) specify the encoding of the output (defaults to document encoding) + # * +:indent_text+ (String) the indentation text (defaults to " ") + # * +:indent+ (Integer) the number of +:indent_text+ to use (defaults to +2+) + # * +:save_with+ (Integer) a combination of SaveOptions constants + # + # To save with UTF-8 indented twice: + # + # + # To save indented with two dashes: + # + # node.write_to(io, indent_text: '-', indent: 2) + # + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#39 + def write_to(io, *options); end + + # Write Node as XHTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1392 + 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#1402 + 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#1135 + def xml?; end + + protected + + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1482 + def coerce(data); end + + private + + def add_child_node(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#83 + def add_child_node_and_reparent_attrs(node); end + + def add_next_sibling_node(_arg0); end + def add_previous_sibling_node(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1516 + def add_sibling(next_or_previous, node_or_tags); end + + def compare(_arg0); end + def dump_html; end + def get(_arg0); end + def html_standard_serialize(_arg0); end + def in_context(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1555 + def inspect_attributes; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1504 + def keywordify(keywords); end + + def native_write_to(_arg0, _arg1, _arg2, _arg3); end + def prepend_newline?; end + def process_xincludes(_arg0); end + def replace_node(_arg0); end + def set(_arg0, _arg1); end + def set_namespace(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1541 + def to_format(save_option, options); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1548 + def write_format_to(save_option, io, options); end + + class << self + def new(*_arg0); end + end +end + +# Attribute declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#93 +Nokogiri::XML::Node::ATTRIBUTE_DECL = T.let(T.unsafe(nil), Integer) + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#65 +Nokogiri::XML::Node::ATTRIBUTE_NODE = T.let(T.unsafe(nil), Integer) + +# CDATA node type, see Nokogiri::XML::Node#cdata? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#69 +Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) + +# Comment node type, see Nokogiri::XML::Node#comment? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#77 +Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1415 +Nokogiri::XML::Node::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1416 +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#1559 +Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Namespace declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#97 +Nokogiri::XML::Node::NAMESPACE_DECL = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#85 +Nokogiri::XML::Node::NOTATION_NODE = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#75 +Nokogiri::XML::Node::PI_NODE = T.let(T.unsafe(nil), Integer) + +# Save options for serializing nodes. +# See the method group entitled Node@Serialization+and+Generating+Output for usage. +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#9 +class Nokogiri::XML::Node::SaveOptions + # Create a new SaveOptions object with +options+ + # + # @return [SaveOptions] a new instance of SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#47 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def format; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def format?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#66 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_declaration; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_declaration?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_empty_tags; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_empty_tags?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_xhtml?; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def options; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def to_i; end +end + +# Save as HTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#23 +Nokogiri::XML::Node::SaveOptions::AS_HTML = T.let(T.unsafe(nil), Integer) + +# Save as XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#19 +Nokogiri::XML::Node::SaveOptions::AS_XHTML = T.let(T.unsafe(nil), Integer) + +# Save as XML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#21 +Nokogiri::XML::Node::SaveOptions::AS_XML = T.let(T.unsafe(nil), Integer) + +# the default for HTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#38 +Nokogiri::XML::Node::SaveOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# the default for XHTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#40 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML = T.let(T.unsafe(nil), Integer) + +# the default for XML documents +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#36 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# Format serialized xml +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#11 +Nokogiri::XML::Node::SaveOptions::FORMAT = T.let(T.unsafe(nil), Integer) + +# Do not include declarations +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#13 +Nokogiri::XML::Node::SaveOptions::NO_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Do not include empty tags +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#15 +Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS = T.let(T.unsafe(nil), Integer) + +# Do not save XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#17 +Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) + +# Text node type, see Nokogiri::XML::Node#text? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#67 +Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1538 +Nokogiri::XML::Node::USING_LIBXML_WITH_BROKEN_SERIALIZATION = T.let(T.unsafe(nil), FalseClass) + +# XInclude end type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#101 +Nokogiri::XML::Node::XINCLUDE_END = T.let(T.unsafe(nil), Integer) + +# XInclude start type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#99 +Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) + +# A NodeSet contains a list of Nokogiri::XML::Node objects. Typically +# a NodeSet is return as a result of searching a Document via +# Nokogiri::XML::Searchable#css or Nokogiri::XML::Searchable#xpath +# +# source://nokogiri//lib/nokogiri/xml/node_set.rb#10 +class Nokogiri::XML::NodeSet + include ::Nokogiri::XML::Searchable + include ::Enumerable + + # Create a NodeSet with +document+ defaulting to +list+ + # + # @return [NodeSet] a new instance of NodeSet + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::NodeSet] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#20 + def initialize(document, list = T.unsafe(nil)); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#119 + def %(*args); end + + def &(_arg0); end + def +(_arg0); end + def -(_arg0); end + def <<(_arg0); end + + # Equality -- Two NodeSets are equal if the contain the same number + # of elements and if each element is equal to the corresponding + # element in the other NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#393 + def ==(other); end + + def [](*_arg0); end + + # Add the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#add_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#139 + def add_class(name); end + + # Insert +datum+ after the last Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#69 + def after(datum); end + + # Append the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#append_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#151 + def append_class(name); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#119 + def at(*args); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def attr(key, value = T.unsafe(nil), &block); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def attribute(key, value = T.unsafe(nil), &block); end + + # Insert +datum+ before the first Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#63 + def before(datum); end + + # Returns a new NodeSet containing all the children of all the nodes in + # the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#406 + def children; end + + def clone; end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this node set for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#83 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the members of this NodeSet as an array, to use in pattern matching. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#440 + def deconstruct; end + + def delete(_arg0); end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#15 + def document; end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#15 + def document=(_arg0); end + + def dup; end + + # Iterate over each node, yielding to +block+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#231 + def each; end + + # Is this NodeSet empty? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#45 + def empty?; end + + # Filter this list for nodes that match +expr+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#130 + def filter(expr); end + + # Get the first element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#29 + def first(n = T.unsafe(nil)); end + + def include?(_arg0); end + + # Returns the index of the first node in self that is == to +node+ or meets the given block. Returns nil if no match is found. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#51 + def index(node = T.unsafe(nil)); end + + # Get the inner html of all contained Node objects + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#260 + def inner_html(*args); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#253 + def inner_text; end + + # Return a nicely formated string representation + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#427 + def inspect; end + + # Get the last element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#39 + def last; end + + def length; end + + # Removes the last element from set and returns it, or +nil+ if + # the set is empty + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#374 + def pop; end + + def push(_arg0); end + def remove; end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#223 + def remove_attr(name); end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#223 + def remove_attribute(name); end + + # Remove the class attribute +name+ from all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#remove_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#163 + def remove_class(name = T.unsafe(nil)); end + + # Returns a new NodeSet containing all the nodes in the NodeSet + # in reverse order + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#417 + def reverse; end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def set(key, value = T.unsafe(nil), &block); end + + # Returns the first element of the NodeSet and removes it. Returns + # +nil+ if the set is empty. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#383 + def shift; end + + def size; end + def slice(*_arg0); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#253 + def text; end + + def to_a; end + def to_ary; end + + # Convert this NodeSet to HTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#341 + def to_html(*args); end + + # Convert this NodeSet to a string. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#335 + def to_s; end + + # Convert this NodeSet to XHTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#358 + def to_xhtml(*args); end + + # Convert this NodeSet to XML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#364 + def to_xml(*args); end + + def unlink; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap each member of this NodeSet with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed, once per member of the NodeSet, and used as the wrapper. Each + # node's parent, if it exists, is used as the context node for parsing; otherwise the + # associated document is used. If the parsed fragment has multiple roots, the first root + # node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # ⚠ Note that if a +String+ is passed, the markup will be parsed once per node in the + # NodeSet. You can avoid this overhead in cases where you know exactly the wrapper you wish to + # use by passing a +Node+ instead. + # + # Also see Node#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap("
") + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # *Example* with a +Node+ argument + # + # 💡 Note that this is faster than the equivalent call passing a +String+ because it avoids + # having to reparse the wrapper markup for each node. + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap(doc.create_element("div")) + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#328 + def wrap(node_or_tags); end + + # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] + # + # Search this node set for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # For more information see Nokogiri::XML::Searchable#xpath + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#99 + def xpath(*args); end + + def |(_arg0); end +end + +# source://nokogiri//lib/nokogiri/xml/node_set.rb#444 +Nokogiri::XML::NodeSet::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Struct representing an {XML Schema Notation}[https://www.w3.org/TR/xml/#Notations] +# +# source://nokogiri//lib/nokogiri/xml/notation.rb#7 +class Nokogiri::XML::Notation < ::Struct; end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#6 +module Nokogiri::XML::PP; end + +# source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#7 +module Nokogiri::XML::PP::CharacterData + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#15 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#8 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#7 +module Nokogiri::XML::PP::Node + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#10 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#27 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#8 +Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) + +# Options that control the parsing behavior for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# These options directly expose libxml2's parse options, which are all boolean in the sense that +# an option is "on" or "off". +# +# 💡 Note that HTML5 parsing has a separate, orthogonal set of options due to the nature of the +# HTML5 specification. See Nokogiri::HTML5. +# +# ⚠ Not all parse options are supported on JRuby. Nokogiri will attempt to invoke the equivalent +# behavior in Xerces/NekoHTML on JRuby when it's possible. +# +# == Setting and unsetting parse options +# +# You can build your own combinations of parse options by using any of the following methods: +# +# [ParseOptions method chaining] +# +# Every option has an equivalent method in lowercase. You can chain these methods together to +# set various combinations. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# Every option has an equivalent no{option} method in lowercase. You can call these +# methods on an instance of ParseOptions to unset the option. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# +# # later we want to modify the options +# po.nohuge # Unset the HUGE option +# po.nopedantic # Unset the PEDANTIC option +# +# 💡 Note that some options begin with "no" leading to the logical but perhaps unintuitive +# double negative: +# +# po.nocdata # Set the NOCDATA parse option +# po.nonocdata # Unset the NOCDATA parse option +# +# 💡 Note that negation is not available for STRICT, which is itself a negation of all other +# features. +# +# +# [Using Ruby Blocks] +# +# Most parsing methods will accept a block for configuration of parse options, and we +# recommend chaining the setter methods: +# +# doc = Nokogiri::XML::Document.parse(xml) { |config| config.huge.pedantic } +# +# +# [ParseOptions constants] +# +# You can also use the constants declared under Nokogiri::XML::ParseOptions to set various +# combinations. They are bits in a bitmask, and so can be combined with bitwise operators: +# +# po = Nokogiri::XML::ParseOptions.new(Nokogiri::XML::ParseOptions::HUGE | Nokogiri::XML::ParseOptions::PEDANTIC) +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#67 +class Nokogiri::XML::ParseOptions + # @return [ParseOptions] a new instance of ParseOptions + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#165 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#198 + def ==(other); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def big_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def big_lines?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def compact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def compact?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_schema?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_xslt?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdattr?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdload?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdvalid?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def huge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def huge?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#204 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nobasefix?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nobig_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noblanks?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nocdata?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nocompact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nodict?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noent?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noerror?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nohuge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nonet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nonet?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nononet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def noold10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nopedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def norecover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nosax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nowarning?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def noxinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noxincnode?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nsclean?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def old10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def old10?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def pedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def pedantic?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def recover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def recover?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def sax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def sax1?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#189 + def strict; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#194 + def strict?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def to_i; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def xinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def xinclude?; end +end + +# Support line numbers up to long int (default is a short int). On +# by default for for XML::Document, XML::DocumentFragment, HTML4::Document, +# HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#149 +Nokogiri::XML::ParseOptions::BIG_LINES = T.let(T.unsafe(nil), Integer) + +# Compact small text nodes. Off by default. +# +# ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to +# modify the tree. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#133 +Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#158 +Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XML::Schema +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#161 +Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) + +# The options mask used by default for parsing XML::Document and XML::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#152 +Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XSLT::Stylesheet +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#155 +Nokogiri::XML::ParseOptions::DEFAULT_XSLT = T.let(T.unsafe(nil), Integer) + +# Default DTD attributes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#88 +Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) + +# Load external subsets. On by default for XSLT::Stylesheet. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#85 +Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) + +# Validate with the DTD. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#91 +Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) + +# Relax any hardcoded limit from the parser. Off by default. +# +# ⚠ There may be a performance penalty when this option is set. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#144 +Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) + +# Do not fixup XInclude xml:base uris. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#139 +Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) + +# Remove blank nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#103 +Nokogiri::XML::ParseOptions::NOBLANKS = T.let(T.unsafe(nil), Integer) + +# Merge CDATA as text nodes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#124 +Nokogiri::XML::ParseOptions::NOCDATA = T.let(T.unsafe(nil), Integer) + +# Do not reuse the context dictionary. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#118 +Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) + +# Substitute entities. Off by default. +# +# ⚠ This option enables entity substitution, contrary to what the name implies. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#80 +Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) + +# Suppress error reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#94 +Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) + +# Forbid network access. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# ⚠ It is UNSAFE to unset this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#115 +Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) + +# Suppress warning reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#97 +Nokogiri::XML::ParseOptions::NOWARNING = T.let(T.unsafe(nil), Integer) + +# Do not generate XInclude START/END nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#127 +Nokogiri::XML::ParseOptions::NOXINCNODE = T.let(T.unsafe(nil), Integer) + +# Remove redundant namespaces declarations. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#121 +Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) + +# Parse using XML-1.0 before update 5. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#136 +Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) + +# Enable pedantic error reporting. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#100 +Nokogiri::XML::ParseOptions::PEDANTIC = T.let(T.unsafe(nil), Integer) + +# Recover from errors. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#73 +Nokogiri::XML::ParseOptions::RECOVER = T.let(T.unsafe(nil), Integer) + +# Use the SAX1 interface internally. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#106 +Nokogiri::XML::ParseOptions::SAX1 = T.let(T.unsafe(nil), Integer) + +# Strict parsing +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#69 +Nokogiri::XML::ParseOptions::STRICT = T.let(T.unsafe(nil), Integer) + +# Implement XInclude substitution. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#109 +Nokogiri::XML::ParseOptions::XINCLUDE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#5 +class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node + # @return [ProcessingInstruction] a new instance of ProcessingInstruction + # + # source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#6 + def initialize(document, name, content); end + + class << self + def new(*_arg0); end + end +end + +# Nokogiri::XML::Reader parses an XML document similar to the way a cursor +# would move. The Reader is given an XML document, and yields nodes +# to an each block. +# +# Here is an example of usage: +# +# reader = Nokogiri::XML::Reader(<<-eoxml) +# +# snuggles! +# +# eoxml +# +# reader.each do |node| +# +# # node is an instance of Nokogiri::XML::Reader +# puts node.name +# +# end +# +# Note that Nokogiri::XML::Reader#each can only be called once!! Once +# the cursor moves through the entire document, you must parse the +# document again. So make sure that you capture any information you +# need during the first iteration. +# +# The Reader parser is good for when you need the speed of a SAX parser, +# but do not want to write a Document handler. +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#32 +class Nokogiri::XML::Reader + include ::Enumerable + + # @return [Reader] a new instance of Reader + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#79 + def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end + + def attribute(_arg0); end + def attribute_at(_arg0); end + def attribute_count; end + def attribute_hash; end + def attribute_nodes; 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#92 + def attributes; end + + def attributes?; end + def base_uri; end + def default?; end + def depth; end + + # Move the cursor through the document yielding the cursor to the block + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#98 + def each; end + + def empty_element?; end + def encoding; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#72 + def errors; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#72 + def errors=(_arg0); end + + def inner_xml; end + def lang; end + def local_name; end + def name; end + def namespace_uri; end + def namespaces; end + def node_type; end + def outer_xml; end + def prefix; end + def read; end + def self_closing?; end + + # The XML source + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#75 + def source; end + + def state; end + def value; end + def value?; end + def xml_version; end + + class << self + def from_io(*_arg0); end + def from_memory(*_arg0); end + end +end + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#39 +Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) + +# CDATA node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#43 +Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) + +# Comment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#51 +Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) + +# Document node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#53 +Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) + +# Document Fragment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#57 +Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) + +# Document Type node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#55 +Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) + +# Element node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#37 +Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Element end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#65 +Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Entity end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#67 +Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#47 +Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity Reference node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#45 +Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/reader.rb#35 +Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#59 +Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#49 +Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) + +# Significant Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#63 +Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# Text node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#41 +Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) + +# Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#61 +Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# XML Declaration node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#69 +Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Nokogiri::XML::RelaxNG is used for validating XML against a +# RelaxNG schema. +# +# == Synopsis +# +# Validate an XML document against a RelaxNG schema. Loop over the errors +# that are returned and print them out: +# +# schema = Nokogiri::XML::RelaxNG(File.open(ADDRESS_SCHEMA_FILE)) +# doc = Nokogiri::XML(File.open(ADDRESS_XML_FILE)) +# +# schema.validate(doc).each do |error| +# puts error.message +# end +# +# The list of errors are Nokogiri::XML::SyntaxError objects. +# +# NOTE: RelaxNG input is always treated as TRUSTED documents, meaning that they will cause the +# underlying parsing libraries to access network resources. This is counter to Nokogiri's +# "untrusted by default" security policy, but is a limitation of the underlying libraries. +# +# source://nokogiri//lib/nokogiri/xml/relax_ng.rb#35 +class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema + private + + def validate_document(_arg0); end + + class << self + def from_document(*_arg0); end + def read_memory(*_arg0); end + end +end + +# SAX Parsers are event driven parsers. Nokogiri provides two different event based parsers when +# dealing with XML. If you want to do SAX style parsing using HTML, check out +# Nokogiri::HTML4::SAX. +# +# The basic way a SAX style parser works is by creating a parser, telling the parser about the +# events we're interested in, then giving the parser some XML to process. The parser will notify +# you when it encounters events you said you would like to know about. +# +# To register for events, you simply subclass Nokogiri::XML::SAX::Document, and implement the +# methods for which you would like notification. +# +# For example, if I want to be notified when a document ends, and when an element starts, I +# would write a class like this: +# +# class MyDocument < Nokogiri::XML::SAX::Document +# def end_document +# puts "the document has ended" +# end +# +# def start_element name, attributes = [] +# puts "#{name} started" +# end +# end +# +# Then I would instantiate a SAX parser with this document, and feed the parser some XML +# +# # Create a new parser +# parser = Nokogiri::XML::SAX::Parser.new(MyDocument.new) +# +# # Feed the parser some XML +# parser.parse(File.open(ARGV[0])) +# +# Now my document handler will be called when each node starts, and when then document ends. To +# see what kinds of events are available, take a look at Nokogiri::XML::SAX::Document. +# +# Two SAX parsers for XML are available, a parser that reads from a string or IO object as it +# feels necessary, and a parser that lets you spoon feed it XML. If you want to let Nokogiri +# deal with reading your XML, use the Nokogiri::XML::SAX::Parser. If you want to have fine grain +# control over the XML input, use the Nokogiri::XML::SAX::PushParser. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#45 +module Nokogiri::XML::SAX; end + +# This class is used for registering types of events you are interested in handling. All of +# the methods on this class are available as possible events while parsing an XML document. To +# register for any particular event, just subclass this class and implement the methods you +# are interested in knowing about. +# +# To only be notified about start and end element events, write a class like this: +# +# class MyDocument < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "#{name} started!" +# end +# +# def end_element name +# puts "#{name} ended" +# end +# end +# +# You can use this event handler for any SAX style parser included with Nokogiri. See +# Nokogiri::XML::SAX, and Nokogiri::HTML4::SAX. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#66 +class Nokogiri::XML::SAX::Document + # Called when cdata blocks are found + # +string+ contains the cdata content + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#155 + def cdata_block(string); end + + # Characters read between a tag. This method might be called multiple + # times given one contiguous string of characters. + # + # +string+ contains the character data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#131 + def characters(string); end + + # Called when comments are encountered + # +string+ contains the comment data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#137 + def comment(string); end + + # Called when document ends parsing + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#79 + def end_document; end + + # Called at the end of an element + # +name+ is the tag name + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#93 + def end_element(name); end + + # Called at the end of an element + # +name+ is the element's name + # +prefix+ is the namespace prefix associated with the element + # +uri+ is the associated namespace URI + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#120 + def end_element_namespace(name, prefix = T.unsafe(nil), uri = T.unsafe(nil)); end + + # Called on document errors + # +string+ contains the error + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#149 + def error(string); end + + # Called when processing instructions are found + # +name+ is the target of the instruction + # +content+ is the value of the instruction + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#162 + def processing_instruction(name, content); end + + # Called when document starts parsing + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#74 + def start_document; end + + # Called at the beginning of an element + # * +name+ is the name of the tag + # * +attrs+ are an assoc list of namespaces and attributes, e.g.: + # [ ["xmlns:foo", "http://sample.net"], ["size", "large"] ] + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#87 + def start_element(name, attrs = T.unsafe(nil)); end + + # Called at the beginning of an element + # +name+ is the element name + # +attrs+ is a list of attributes + # +prefix+ is the namespace prefix for the element + # +uri+ is the associated namespace URI + # +ns+ is a hash of namespace prefix:urls associated with the element + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#103 + def start_element_namespace(name, attrs = T.unsafe(nil), prefix = T.unsafe(nil), uri = T.unsafe(nil), ns = T.unsafe(nil)); end + + # Called on document warnings + # +string+ contains the warning + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#143 + def warning(string); end + + # Called when an XML declaration is parsed + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#69 + def xmldecl(version, encoding, standalone); end +end + +# This parser is a SAX style parser that reads it's input as it +# deems necessary. The parser takes a Nokogiri::XML::SAX::Document, +# an optional encoding, then given an XML input, sends messages to +# the Nokogiri::XML::SAX::Document. +# +# Here is an example of using this parser: +# +# # Create a subclass of Nokogiri::XML::SAX::Document and implement +# # the events we care about: +# class MyDoc < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "starting: #{name}" +# end +# +# def end_element name +# puts "ending: #{name}" +# end +# end +# +# # Create our parser +# parser = Nokogiri::XML::SAX::Parser.new(MyDoc.new) +# +# # Send some XML to the parser +# parser.parse(File.open(ARGV[0])) +# +# For more information about SAX parsers, see Nokogiri::XML::SAX. Also +# see Nokogiri::XML::SAX::Document for the available events. +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#34 +class Nokogiri::XML::SAX::Parser + # Create a new Parser with +doc+ and +encoding+ + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#72 + def initialize(doc = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#66 + def document; end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#66 + def document=(_arg0); end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#69 + def encoding; end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#69 + def encoding=(_arg0); end + + # Parse given +thing+ which may be a string containing xml, or an + # IO object. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#81 + def parse(thing, &block); end + + # Parse a file with +filename+ + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#99 + def parse_file(filename); end + + # Parse given +io+ + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#91 + def parse_io(io, encoding = T.unsafe(nil)); end + + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#109 + def parse_memory(data); end + + private + + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#117 + def check_encoding(encoding); end +end + +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#35 +class Nokogiri::XML::SAX::Parser::Attribute < ::Struct; end + +# Encodinds this parser supports +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#39 +Nokogiri::XML::SAX::Parser::ENCODINGS = T.let(T.unsafe(nil), Hash) + +# Context for XML SAX parsers. This class is usually not instantiated +# by the user. Instead, you should be looking at +# Nokogiri::XML::SAX::Parser +# +# source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#10 +class Nokogiri::XML::SAX::ParserContext + def column; end + def line; end + def parse_with(_arg0); end + def recovery; end + def recovery=(_arg0); end + def replace_entities; end + def replace_entities=(_arg0); end + + class << self + def file(_arg0); end + def io(_arg0, _arg1); end + def memory(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#11 + def new(thing, encoding = T.unsafe(nil)); end + end +end + +# PushParser can parse a document that is fed to it manually. It +# must be given a SAX::Document object which will be called with +# SAX events as the document is being parsed. +# +# Calling PushParser#<< writes XML to the parser, calling any SAX +# callbacks it can. +# +# PushParser#finish tells the parser that the document is finished +# and calls the end_document SAX method. +# +# Example: +# +# parser = PushParser.new(Class.new(XML::SAX::Document) { +# def start_document +# puts "start document called" +# end +# }.new) +# parser << "
hello<" +# parser << "/div>" +# parser.finish +# +# source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#27 +class Nokogiri::XML::SAX::PushParser + # Create a new PushParser with +doc+ as the SAX Document, providing + # an optional +file_name+ and +encoding+ + # + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#35 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document; end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::XML::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#55 + def finish; end + + def options; end + def options=(_arg0); end + def replace_entities; end + def replace_entities=(_arg0); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + def initialize_native(_arg0, _arg1); end + def native_write(_arg0, _arg1); end +end + +# Nokogiri::XML::Schema is used for validating XML against a schema +# (usually from an xsd file). +# +# == Synopsis +# +# Validate an XML document against a Schema. Loop over the errors that +# are returned and print them out: +# +# xsd = Nokogiri::XML::Schema(File.read(PO_SCHEMA_FILE)) +# doc = Nokogiri::XML(File.read(PO_XML_FILE)) +# +# xsd.validate(doc).each do |error| +# puts error.message +# end +# +# The list of errors are Nokogiri::XML::SyntaxError objects. +# +# NOTE: As of v1.11.0, Schema treats inputs as UNTRUSTED by default, and so external entities +# are not resolved from the network (`http://` or `ftp://`). Previously, parsing treated +# documents as "trusted" by default which was counter to Nokogiri's "untrusted by default" +# security policy. If a document is trusted, then the caller may turn off the NONET option via +# the ParseOptions to re-enable external entity resolution over a network connection. +# +# source://nokogiri//lib/nokogiri/xml/schema.rb#37 +class Nokogiri::XML::Schema + # Errors while parsing the schema file + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#39 + def errors; end + + # Errors while parsing the schema file + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#39 + def errors=(_arg0); end + + # The Nokogiri::XML::ParseOptions used to parse the schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#41 + def parse_options; end + + # The Nokogiri::XML::ParseOptions used to parse the schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#41 + def parse_options=(_arg0); end + + # Returns true if +thing+ is a valid Nokogiri::XML::Document or + # file. + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#68 + def valid?(thing); end + + # Validate +thing+ against this schema. +thing+ can be a + # Nokogiri::XML::Document object, or a filename. An Array of + # Nokogiri::XML::SyntaxError objects found while validating the + # +thing+ is returned. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#55 + def validate(thing); end + + private + + def validate_document(_arg0); end + def validate_file(_arg0); end + + class << self + def from_document(*_arg0); end + + # Create a new Nokogiri::XML::Schema object using a +string_or_io+ + # object. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#46 + def new(string_or_io, options = T.unsafe(nil)); end + + def read_memory(*_arg0); end + end +end + +# The Searchable module declares the interface used for searching your DOM. +# +# It implements the public methods #search, #css, and #xpath, +# as well as allowing specific implementations to specialize some +# of the important behaviors. +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#13 +module Nokogiri::XML::Searchable + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + def %(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define, which will be in the + # `nokogiri` namespace in XPath queries. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + def /(*args); end + + # :call-seq: + # >(selector) → NodeSet + # + # Search this node's immediate children using CSS selector +selector+ + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#201 + def >(selector); end + + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + def at(*args); end + + # call-seq: + # at_css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+, and return only the first + # match. +rules+ must be one or more CSS selectors. + # + # See Searchable#css for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#143 + def at_css(*args); end + + # call-seq: + # at_xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+, and return only the first + # match. +paths+ must be one or more XPath queries. + # + # See Searchable#xpath for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#193 + def at_xpath(*args); end + + # call-seq: + # css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # node.css('title') + # node.css('body h1.bold') + # node.css('div + p.green', 'div#one') + # + # A hash of namespace bindings may be appended. For example: + # + # node.css('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # 💡 Custom CSS pseudo classes may also be defined which are mapped to a custom XPath + # function. To define custom pseudo classes, create a class and implement the custom pseudo + # class you want defined. The first argument to the method will be the matching context + # NodeSet. Any other arguments are ones that you pass in. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.css('title:regex("\w+")', handler) + # + # 💡 Some XPath syntax is supported in CSS queries. For example, to query for an attribute: + # + # node.css('img > @href') # returns all +href+ attributes on an +img+ element + # node.css('img / @href') # same + # + # # ⚠ this returns +class+ attributes from all +div+ elements AND THEIR CHILDREN! + # node.css('div @class') + # + # node.css + # + # 💡 Array-like syntax is supported in CSS queries as an alternative to using +:nth-child()+. + # + # ⚠ NOTE that indices are 1-based like +:nth-child+ and not 0-based like Ruby Arrays. For + # example: + # + # # equivalent to 'li:nth-child(2)' + # node.css('li[2]') # retrieve the second li element in a list + # + # ⚠ NOTE that the CSS query string is case-sensitive with regards to your document type. HTML + # tags will match only lowercase CSS queries, so if you search for "H1" in an HTML document, + # you'll never find anything. However, "H1" might be found in an XML document, where tags + # names are case-sensitive (e.g., "H1" is distinct from "h1"). + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#129 + def css(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define, which will be in the + # `nokogiri` namespace in XPath queries. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + def search(*args); end + + # call-seq: + # xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # node.xpath('.//title') + # + # A hash of namespace bindings may be appended. For example: + # + # node.xpath('.//foo:name', {'foo' => 'http://example.org/'}) + # node.xpath('.//xmlns:name', node.root.namespaces) + # + # A hash of variable bindings may also be appended to the namespace bindings. For example: + # + # node.xpath('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions may also be defined. To define custom functions create a class and + # implement the function you want to define, which will be in the `nokogiri` namespace. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.xpath('.//title[nokogiri:regex(., "\w+")]', handler) + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#179 + def xpath(*args); end + + private + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#210 + def css_internal(node, rules, handler, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#241 + def css_rules_to_xpath(rules, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#259 + def extract_params(params); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#229 + def xpath_impl(node, path, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#214 + def xpath_internal(node, paths, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#245 + def xpath_query_from_css_rule(rule, ns); end +end + +# Regular expression used by Searchable#search to determine if a query +# string is CSS or XPath +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#16 +Nokogiri::XML::Searchable::LOOKS_LIKE_XPATH = T.let(T.unsafe(nil), Regexp) + +# This class provides information about XML SyntaxErrors. These +# exceptions are typically stored on Nokogiri::XML::Document#errors. +# +# source://nokogiri//lib/nokogiri/xml/syntax_error.rb#8 +class Nokogiri::XML::SyntaxError < ::Nokogiri::SyntaxError + # Returns the value of attribute code. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#10 + def code; end + + # Returns the value of attribute column. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#18 + def column; end + + # Returns the value of attribute domain. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#9 + def domain; end + + # return true if this is an error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#34 + def error?; end + + # return true if this error is fatal + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#40 + def fatal?; end + + # Returns the value of attribute file. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#12 + def file; end + + # Returns the value of attribute int1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#17 + def int1; end + + # Returns the value of attribute level. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#11 + def level; end + + # Returns the value of attribute line. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#13 + def line; end + + # return true if this is a non error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#22 + def none?; end + + # Returns the value of attribute str1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#14 + def str1; end + + # Returns the value of attribute str2. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#15 + def str2; end + + # Returns the value of attribute str3. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#16 + def str3; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#44 + def to_s; end + + # return true if this is a warning + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#28 + def warning?; end + + private + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#53 + def level_to_s; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#65 + def location_to_s; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#61 + def nil_or_zero?(attribute); end +end + +# source://nokogiri//lib/nokogiri/xml/text.rb#5 +class Nokogiri::XML::Text < ::Nokogiri::XML::CharacterData + # source://nokogiri//lib/nokogiri/xml/text.rb#6 + def content=(string); end + + class << self + def new(*_arg0); end + end +end + +# Original C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#14 +Nokogiri::XML::XML_C14N_1_0 = T.let(T.unsafe(nil), Integer) + +# C14N 1.1 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#18 +Nokogiri::XML::XML_C14N_1_1 = T.let(T.unsafe(nil), Integer) + +# Exclusive C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#16 +Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/xpath.rb#5 +module Nokogiri::XML::XPath; end + +# The XPath search prefix to search direct descendants of the current element, +./+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#13 +Nokogiri::XML::XPath::CURRENT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search globally, +//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#7 +Nokogiri::XML::XPath::GLOBAL_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search direct descendants of the root element, +/+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#10 +Nokogiri::XML::XPath::ROOT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search anywhere in the current element's subtree, +.//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#16 +Nokogiri::XML::XPath::SUBTREE_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#6 +class Nokogiri::XML::XPath::SyntaxError < ::Nokogiri::XML::SyntaxError + # source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#7 + def to_s; end +end + +# source://nokogiri//lib/nokogiri/xml/xpath_context.rb#5 +class Nokogiri::XML::XPathContext + def evaluate(*_arg0); end + + # Register namespaces in +namespaces+ + # + # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#8 + def register_namespaces(namespaces); end + + def register_ns(_arg0, _arg1); end + def register_variable(_arg0, _arg1); end + + class << self + def new(_arg0); end + end +end + +# See Nokogiri::XSLT::Stylesheet for creating and manipulating +# Stylesheet object. +# +# source://nokogiri//lib/nokogiri/xslt.rb#21 +module Nokogiri::XSLT + class << self + # :call-seq: + # parse(xsl) → Nokogiri::XSLT::Stylesheet + # parse(xsl, modules) → Nokogiri::XSLT::Stylesheet + # + # Parse the stylesheet in +xsl+, registering optional +modules+ as custom class handlers. + # + # [Parameters] + # - +xsl+ (String) XSL content to be parsed into a stylesheet + # - +modules+ (Hash) A hash of URI-to-handler relations for linking a + # namespace to a custom function handler. + # + # ⚠ The XSLT handler classes are registered *globally*. + # + # Also see Nokogiri::XSLT.register + # + # *Example* + # + # xml = Nokogiri.XML(<<~XML) + # + # Foo + # Bar + # + # XML + # + # handler = Class.new do + # def reverse(node) + # node.text.reverse + # end + # end + # + # xsl = <<~XSL + # + # + # + # + # + # + # + # + # + # XSL + # + # xsl = Nokogiri.XSLT(xsl, "http://nokogiri.org/xslt/myfuncs" => handler) + # xsl.transform(xml).to_xml + # # => "\n" + + # # "\n" + + # # " ooF\n" + + # # " raB\n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xslt.rb#76 + def parse(string, modules = T.unsafe(nil)); end + + # :call-seq: + # quote_params(params) → Array + # + # Quote parameters in +params+ for stylesheet safety. + # See Nokogiri::XSLT::Stylesheet.transform for example usage. + # + # [Parameters] + # - +params+ (Hash, Array) XSLT parameters (key->value, or tuples of [key, value]) + # + # [Returns] Array of string parameters, with quotes correctly escaped for use with XSLT::Stylesheet.transform + # + # source://nokogiri//lib/nokogiri/xslt.rb#100 + def quote_params(params); end + + def register(_arg0, _arg1); end + end +end + +# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation +# is done through Nokogiri.XSLT. Here is an example of transforming +# an XML::Document with a Stylesheet: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# +# puts xslt.transform(doc) +# +# See Nokogiri::XSLT::Stylesheet#transform for more transformation +# information. +# +# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#17 +class Nokogiri::XSLT::Stylesheet + # Apply an XSLT stylesheet to an XML::Document. + # +params+ is an array of strings used as XSLT parameters. + # returns serialized document + # + # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#22 + def apply_to(document, params = T.unsafe(nil)); end + + def serialize(_arg0); end + def transform(*_arg0); end + + class << self + def parse_stylesheet_doc(_arg0); end + end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://nokogiri//lib/nokogiri.rb#108 + def Nokogiri(*args, &block); end +end diff --git a/sorbet/rbi/gems/octokit@6.1.1.rbi b/sorbet/rbi/gems/octokit@6.1.1.rbi new file mode 100644 index 0000000000..811376e69d --- /dev/null +++ b/sorbet/rbi/gems/octokit@6.1.1.rbi @@ -0,0 +1,10851 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `octokit` gem. +# Please instead update this file by running `bin/tapioca gem octokit`. + +# Ruby toolkit for the GitHub API +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#11 +module Octokit + extend ::Octokit::Configurable + + class << self + # API client based on configured options {Configurable} + # + # @return [Octokit::Client] API wrapper + # + # source://octokit//lib/octokit.rb#16 + def client; end + + # EnterpriseAdminClient client based on configured options {Configurable} + # + # @return [Octokit::EnterpriseAdminClient] API wrapper + # + # source://octokit//lib/octokit.rb#25 + def enterprise_admin_client; end + + # EnterpriseManagementConsoleClient client based on configured options {Configurable} + # + # @return [Octokit::EnterpriseManagementConsoleClient] API wrapper + # + # source://octokit//lib/octokit.rb#36 + def enterprise_management_console_client; end + + private + + # source://octokit//lib/octokit.rb#52 + def method_missing(method_name, *args, &block); end + + # @return [Boolean] + # + # source://octokit//lib/octokit.rb#46 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + end +end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'abuse' +# +# source://octokit//lib/octokit/error.rb#278 +class Octokit::AbuseDetected < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'account was suspended' +# +# source://octokit//lib/octokit/error.rb#290 +class Octokit::AccountSuspended < ::Octokit::Forbidden; end + +# Raised when a method requires an application client_id +# and secret but none is provided +# +# source://octokit//lib/octokit/error.rb#357 +class Octokit::ApplicationCredentialsRequired < ::StandardError; end + +# Extracts options from method arguments +# +# @private +# +# source://octokit//lib/octokit/arguments.rb#6 +class Octokit::Arguments < ::Array + # @return [Arguments] a new instance of Arguments + # + # source://octokit//lib/octokit/arguments.rb#9 + def initialize(args); end + + # Returns the value of attribute options. + # + # source://octokit//lib/octokit/arguments.rb#7 + def options; end +end + +# Authentication methods for {Octokit::Client} +# +# source://octokit//lib/octokit/authentication.rb#5 +module Octokit::Authentication + # Indicates if the client has OAuth Application + # client_id and secret credentials to make anonymous + # requests at a higher rate limit + # + # @return [Boolean] + # @see https://developer.github.com/v3/#unauthenticated-rate-limited-requests + # + # source://octokit//lib/octokit/authentication.rb#55 + def application_authenticated?; end + + # Indicates if the client was supplied Basic Auth + # username and password + # + # @return [Boolean] + # @see https://developer.github.com/v3/#authentication + # + # source://octokit//lib/octokit/authentication.rb#19 + def basic_authenticated?; end + + # Indicates if the client was supplied a bearer token + # + # @return [Boolean] + # @see https://developer.github.com/early-access/integrations/authentication/#as-an-integration + # + # source://octokit//lib/octokit/authentication.rb#36 + def bearer_authenticated?; end + + # Indicates if the client was supplied an OAuth + # access token + # + # @return [Boolean] + # @see https://developer.github.com/v3/#authentication + # + # source://octokit//lib/octokit/authentication.rb#28 + def token_authenticated?; end + + # Indicates if the client was supplied an OAuth + # access token or Basic Auth username and password + # + # @return [Boolean] + # @see https://developer.github.com/v3/#authentication + # + # source://octokit//lib/octokit/authentication.rb#45 + def user_authenticated?; end + + private + + # source://octokit//lib/octokit/authentication.rb#61 + def login_from_netrc; end +end + +# In Faraday 2.x, the authorization middleware uses new interface +# +# source://octokit//lib/octokit/authentication.rb#7 +Octokit::Authentication::FARADAY_BASIC_AUTH_KEYS = T.let(T.unsafe(nil), Array) + +# Raised when GitHub returns a 502 HTTP status code +# +# source://octokit//lib/octokit/error.rb#347 +class Octokit::BadGateway < ::Octokit::ServerError; end + +# Raised when GitHub returns a 400 HTTP status code +# +# source://octokit//lib/octokit/error.rb#229 +class Octokit::BadRequest < ::Octokit::ClientError; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'billing issue' +# +# source://octokit//lib/octokit/error.rb#294 +class Octokit::BillingIssue < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 404 HTTP status code +# and body matches 'Branch not protected' +# +# source://octokit//lib/octokit/error.rb#309 +class Octokit::BranchNotProtected < ::Octokit::ClientError; end + +# Client for the GitHub API +# +# @see https://developer.github.com +# +# source://octokit//lib/octokit/client/actions_artifacts.rb#4 +class Octokit::Client + include ::Octokit::Authentication + include ::Octokit::Configurable + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::Client::ActionsArtifacts + include ::Octokit::Client::ActionsSecrets + include ::Octokit::Client::Checks + include ::Octokit::Client::Commits + include ::Octokit::Client::CommitComments + include ::Octokit::Client::CommitPulls + include ::Octokit::Client::CommitBranches + include ::Octokit::Client::CommunityProfile + include ::Octokit::Client::Contents + include ::Octokit::Client::Deployments + include ::Octokit::Client::Downloads + include ::Octokit::Client::Environments + include ::Octokit::Client::Emojis + include ::Octokit::Client::Events + include ::Octokit::Client::Feeds + include ::Octokit::Client::Gists + include ::Octokit::Client::Gitignore + include ::Octokit::Client::Hooks + include ::Octokit::Client::ActionsWorkflows + include ::Octokit::Client::ActionsWorkflowJobs + include ::Octokit::Client::ActionsWorkflowRuns + include ::Octokit::Client::Apps + include ::Octokit::Client::Issues + include ::Octokit::Client::Labels + include ::Octokit::Client::LegacySearch + include ::Octokit::Client::Licenses + include ::Octokit::Client::Meta + include ::Octokit::Client::Markdown + include ::Octokit::Client::Marketplace + include ::Octokit::Client::Milestones + include ::Octokit::Client::Notifications + include ::Octokit::Client::OauthApplications + include ::Octokit::Client::Objects + include ::Octokit::Client::Organizations + include ::Octokit::Client::Pages + include ::Octokit::Client::Projects + include ::Octokit::Client::PubSubHubbub + include ::Octokit::Client::PullRequests + include ::Octokit::Client::RateLimit + include ::Octokit::Client::Reactions + include ::Octokit::Client::Refs + include ::Octokit::Client::Releases + include ::Octokit::Client::Repositories + include ::Octokit::Client::RepositoryInvitations + include ::Octokit::Client::Reviews + include ::Octokit::Client::Say + include ::Octokit::Client::Search + include ::Octokit::Client::ServiceStatus + include ::Octokit::Client::SourceImport + include ::Octokit::Client::Stats + include ::Octokit::Client::Statuses + include ::Octokit::Client::Tokens + include ::Octokit::Client::Traffic + include ::Octokit::Client::Users + + # @return [Client] a new instance of Client + # + # source://octokit//lib/octokit/client.rb#137 + def initialize(options = T.unsafe(nil)); end + + # Set OAuth access token for authentication + # + # @param value [String] 40 character GitHub OAuth access token + # + # source://octokit//lib/octokit/client.rb#222 + def access_token=(value); end + + # Duplicate client using client_id and client_secret as + # Basic Authentication credentials. + # + # @example + # Octokit.client_id = "foo" + # Octokit.client_secret = "bar" + # + # # GET https://api.github.com/?client_id=foo&client_secret=bar + # Octokit.get "/" + # + # Octokit.client.as_app do |client| + # # GET https://foo:bar@api.github.com/ + # client.get "/" + # end + # @yield [app_client] + # + # source://octokit//lib/octokit/client.rb#190 + def as_app(key = T.unsafe(nil), secret = T.unsafe(nil)); end + + # Set Bearer Token for authentication + # + # @param value [String] JWT + # + # source://octokit//lib/octokit/client.rb#230 + def bearer_token=(value); end + + # Set OAuth app client_id + # + # @param value [String] 20 character GitHub OAuth app client_id + # + # source://octokit//lib/octokit/client.rb#238 + def client_id=(value); end + + # Set OAuth app client_secret + # + # @param value [String] 40 character GitHub OAuth app client_secret + # + # source://octokit//lib/octokit/client.rb#246 + def client_secret=(value); end + + # source://octokit//lib/octokit/client.rb#251 + def client_without_redirects(options = T.unsafe(nil)); end + + # Text representation of the client, masking tokens and passwords + # + # @return [String] + # + # source://octokit//lib/octokit/client.rb#157 + def inspect; end + + # Set username for authentication + # + # @param value [String] GitHub username + # + # source://octokit//lib/octokit/client.rb#206 + def login=(value); end + + # Set password for authentication + # + # @param value [String] GitHub password + # + # source://octokit//lib/octokit/client.rb#214 + def password=(value); end + + private + + # convenience method for constructing a user specific path, if the user is logged in + # + # source://octokit//lib/octokit/client/users.rb#427 + def user_path(user, path); end +end + +# Methods for the Actions Artifacts API +# +# @see https://developer.github.com/v3/actions/artifacts +# +# source://octokit//lib/octokit/client/actions_artifacts.rb#8 +module Octokit::Client::ActionsArtifacts + # Get an artifact + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of an artifact + # @return [Sawyer::Resource] Artifact information + # @see https://docs.github.com/en/rest/actions/artifacts#get-an-artifact + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#41 + def artifact(repo, id, options = T.unsafe(nil)); end + + # Get a download URL for an artifact + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of an artifact + # @return [String] URL to the .zip archive of the artifact + # @see https://docs.github.com/en/rest/actions/artifacts#download-an-artifact + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#52 + def artifact_download_url(repo, id, options = T.unsafe(nil)); end + + # Delete an artifact + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of an artifact + # @return [Boolean] Return true if the artifact was successfully deleted + # @see https://docs.github.com/en/rest/actions/artifacts#delete-an-artifact + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#66 + def delete_artifact(repo, id, options = T.unsafe(nil)); end + + # List all artifacts for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] the total count and an array of artifacts + # @see https://developer.github.com/v3/actions/artifacts#list-artifacts-for-a-repository + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#15 + def repository_artifacts(repo, options = T.unsafe(nil)); end + + # List all artifacts for a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param workflow_run_id [Integer] Id of a workflow run + # @return [Sawyer::Resource] the total count and an array of artifacts + # @see https://docs.github.com/en/rest/actions/artifacts#list-workflow-run-artifacts + # + # source://octokit//lib/octokit/client/actions_artifacts.rb#28 + def workflow_run_artifacts(repo, workflow_run_id, options = T.unsafe(nil)); end +end + +# Methods for the Actions Secrets API +# +# @see https://developer.github.com/v3/actions/secrets/ +# +# source://octokit//lib/octokit/client/actions_secrets.rb#8 +module Octokit::Client::ActionsSecrets + # Create or update secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @param options [Hash] encrypted_value and key_id + # @see https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository + # + # source://octokit//lib/octokit/client/actions_secrets.rb#45 + def create_or_update_secret(repo, name, options); end + + # Delete a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @see https://developer.github.com/v3/actions/secrets/#delete-a-secret-from-a-repository + # + # source://octokit//lib/octokit/client/actions_secrets.rb#54 + def delete_secret(repo, name); end + + # Get public key for secrets encryption + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] key_id and key + # @see https://developer.github.com/v3/actions/secrets/#get-your-public-key + # + # source://octokit//lib/octokit/client/actions_secrets.rb#14 + def get_public_key(repo); end + + # Get a secret + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] Name of secret + # @return [Hash] name, created_at and updated_at + # @see https://developer.github.com/v3/actions/secrets/#get-a-secret + # + # source://octokit//lib/octokit/client/actions_secrets.rb#35 + def get_secret(repo, name); end + + # List secrets + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at) + # @see https://developer.github.com/v3/actions/secrets/#list-secrets-for-a-repository + # + # source://octokit//lib/octokit/client/actions_secrets.rb#23 + def list_secrets(repo); end +end + +# Methods for the Actions Workflows jobs API +# +# @see https://docs.github.com/rest/actions/workflow-jobs +# +# source://octokit//lib/octokit/client/actions_workflow_jobs.rb#8 +module Octokit::Client::ActionsWorkflowJobs + # List jobs for a workflow run attempt + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param attempt_number [Integer, String] Attempt number of the workflow run + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#42 + def list_workflow_run_attempt_jobs(repo, run_id, attempt_number, options = T.unsafe(nil)); end + + # List jobs for a workflow run + # + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#57 + def list_workflow_run_jobs(repo, run_id, options = T.unsafe(nil)); end + + # List jobs for a workflow run attempt + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param attempt_number [Integer, String] Attempt number of the workflow run + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run-attempt + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#42 + def workflow_run_attempt_jobs(repo, run_id, attempt_number, options = T.unsafe(nil)); end + + # Get a job for a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param job_id [Integer, String] Id of the job + # @return [Sawyer::Resource] Job information + # @see https://docs.github.com/rest/actions/workflow-jobs#get-a-job-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#16 + def workflow_run_job(repo, job_id, options = T.unsafe(nil)); end + + # Download job logs for a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param job_id [Integer, String] Id of the job + # @return [String] URL to the archived log files of the job + # @see https://docs.github.com/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#27 + def workflow_run_job_logs(repo, job_id, options = T.unsafe(nil)); end + + # List jobs for a workflow run + # + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param run_id [Integer, String] Id of the workflow run + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Jobs information + # @see https://docs.github.com/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_jobs.rb#57 + def workflow_run_jobs(repo, run_id, options = T.unsafe(nil)); end +end + +# Methods for the Actions Workflows runs API +# +# @see https://docs.github.com/rest/actions/workflow-runs +# +# source://octokit//lib/octokit/client/actions_workflow_runs.rb#8 +module Octokit::Client::ActionsWorkflowRuns + # Cancels a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the cancellation was accepted + # @see https://developer.github.com/v3/actions/workflow-runs/#cancel-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#73 + def cancel_workflow_run(repo, id, options = T.unsafe(nil)); end + + # Deletes a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the run is deleted + # @see https://docs.github.com/en/rest/reference/actions#delete-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#84 + def delete_workflow_run(repo, id, options = T.unsafe(nil)); end + + # Delete all log files of a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the logs are deleted + # @see https://developer.github.com/v3/actions/workflow-runs/#delete-workflow-run-logs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#109 + def delete_workflow_run_logs(repo, id, options = T.unsafe(nil)); end + + # List all workflow runs for a repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#37 + def list_repository_workflow_runs(repo, options = T.unsafe(nil)); end + + # List all runs for a repository workflow + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param workflow [Integer, String] Id or file name of the workflow + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#20 + def list_workflow_runs(repo, workflow, options = T.unsafe(nil)); end + + # List all workflow runs for a repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-repository-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#37 + def repository_workflow_runs(repo, options = T.unsafe(nil)); end + + # Re-runs a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Boolean] Returns true if the re-run request was accepted + # @see https://developer.github.com/v3/actions/workflow-runs/#re-run-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#62 + def rerun_workflow_run(repo, id, options = T.unsafe(nil)); end + + # Get a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Sawyer::Resource] Run information + # @see https://developer.github.com/v3/actions/workflow-runs/#get-a-workflow-run + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#51 + def workflow_run(repo, id, options = T.unsafe(nil)); end + + # Get a download url for archived log files of a workflow run + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [String] URL to the archived log files of the run + # @see https://developer.github.com/v3/actions/workflow-runs/#download-workflow-run-logs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#95 + def workflow_run_logs(repo, id, options = T.unsafe(nil)); end + + # Get workflow run usage + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] Id of a workflow run + # @return [Sawyer::Resource] Run usage + # @see https://developer.github.com/v3/actions/workflow-runs/#get-workflow-run-usage + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#120 + def workflow_run_usage(repo, id, options = T.unsafe(nil)); end + + # List all runs for a repository workflow + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param workflow [Integer, String] Id or file name of the workflow + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs + # + # source://octokit//lib/octokit/client/actions_workflow_runs.rb#20 + def workflow_runs(repo, workflow, options = T.unsafe(nil)); end +end + +# Methods for the Actions Workflows API +# +# @see https://developer.github.com/v3/actions/workflows +# +# source://octokit//lib/octokit/client/actions_workflows.rb#8 +module Octokit::Client::ActionsWorkflows + # Get the workflows in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflows/#list-repository-workflows + # + # source://octokit//lib/octokit/client/actions_workflows.rb#15 + def list_workflows(repo, options = T.unsafe(nil)); end + + # Get single workflow in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @return [Sawyer::Resource] A single workflow + # @see https://developer.github.com/v3/actions/workflows/#get-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflows.rb#29 + def workflow(repo, id, options = T.unsafe(nil)); end + + # Disable a workflow + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @return [Boolean] True if workflow was disabled, false otherwise + # @see https://docs.github.com/en/rest/actions/workflows#disable-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflows.rb#63 + def workflow_disable(repo, id, options = T.unsafe(nil)); end + + # Create a workflow dispatch event + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @param ref [String] A SHA, branch name, or tag name + # @return [Boolean] True if event was dispatched, false otherwise + # @see https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event + # + # source://octokit//lib/octokit/client/actions_workflows.rb#41 + def workflow_dispatch(repo, id, ref, options = T.unsafe(nil)); end + + # Enable a workflow + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Id or file name of the workflow + # @return [Boolean] True if workflow was enabled, false otherwise + # @see https://docs.github.com/en/rest/actions/workflows#enable-a-workflow + # + # source://octokit//lib/octokit/client/actions_workflows.rb#52 + def workflow_enable(repo, id, options = T.unsafe(nil)); end + + # Get the workflows in a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] the total count and an array of workflows + # @see https://developer.github.com/v3/actions/workflows/#list-repository-workflows + # + # source://octokit//lib/octokit/client/actions_workflows.rb#15 + def workflows(repo, options = T.unsafe(nil)); end +end + +# Methods for the Apps API +# +# source://octokit//lib/octokit/client/apps.rb#6 +module Octokit::Client::Apps + # Add a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#add-repository-to-installation + # + # source://octokit//lib/octokit/client/apps.rb#156 + def add_repo_to_installation(installation, repo, options = T.unsafe(nil)); end + + # Add a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#add-repository-to-installation + # + # source://octokit//lib/octokit/client/apps.rb#156 + def add_repository_to_app_installation(installation, repo, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#161 + def add_repository_to_integration_installation(installation, repo, options = T.unsafe(nil)); end + + # Get the authenticated App + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] App information + # @see https://developer.github.com/v3/apps/#get-the-authenticated-app + # + # source://octokit//lib/octokit/client/apps.rb#14 + def app(options = T.unsafe(nil)); end + + # Create a new installation token + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [] An installation token + # @see https://developer.github.com/v3/apps/#create-a-new-installation-token + # + # source://octokit//lib/octokit/client/apps.rb#72 + def create_app_installation_access_token(installation, options = T.unsafe(nil)); end + + # Create a new installation token + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [] An installation token + # @see https://developer.github.com/v3/apps/#create-a-new-installation-token + # + # source://octokit//lib/octokit/client/apps.rb#72 + def create_installation_access_token(installation, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#77 + def create_integration_installation_access_token(installation, options = T.unsafe(nil)); end + + # Delete an installation and uninstall a GitHub App + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/#delete-an-installation + # + # source://octokit//lib/octokit/client/apps.rb#217 + def delete_installation(installation, options = T.unsafe(nil)); end + + # Find all installations that belong to an App + # + # @param options [Hash] A customizable set of options + # @return [Array] the total_count and an array of installations + # @see https://developer.github.com/v3/apps/#list-installations + # + # source://octokit//lib/octokit/client/apps.rb#25 + def find_app_installations(options = T.unsafe(nil)); end + + # List repositories accessible to the user for an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of repositories + # @see https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation + # + # source://octokit//lib/octokit/client/apps.rb#203 + def find_installation_repositories_for_user(installation, options = T.unsafe(nil)); end + + # Find all installations that belong to an App + # + # @param options [Hash] A customizable set of options + # @return [Array] the total_count and an array of installations + # @see https://developer.github.com/v3/apps/#list-installations + # + # source://octokit//lib/octokit/client/apps.rb#25 + def find_installations(options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#30 + def find_integration_installations(options = T.unsafe(nil)); end + + # Enables an app to find the organization's installation information. + # + # @param organization [String] Organization GitHub login + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-an-organization-installation + # + # source://octokit//lib/octokit/client/apps.rb#95 + def find_organization_installation(organization, options = T.unsafe(nil)); end + + # Enables an app to find the repository's installation information. + # + # @param repo [String] A GitHub repository + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-a-repository-installation + # + # source://octokit//lib/octokit/client/apps.rb#107 + def find_repository_installation(repo, options = T.unsafe(nil)); end + + # Enables an app to find the user's installation information. + # + # @param user [String] GitHub user login + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-a-user-installation + # + # source://octokit//lib/octokit/client/apps.rb#119 + def find_user_installation(user, options = T.unsafe(nil)); end + + # Find all installations that are accessible to the authenticated user + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of installations + # @see https://developer.github.com/v3/apps/installations/#list-installations-for-a-user + # + # source://octokit//lib/octokit/client/apps.rb#47 + def find_user_installations(options = T.unsafe(nil)); end + + # Get a single installation + # + # @param id [Integer] Installation id + # @return [Sawyer::Resource] Installation information + # @see https://developer.github.com/v3/apps/#get-an-installation + # + # source://octokit//lib/octokit/client/apps.rb#60 + def installation(id, options = T.unsafe(nil)); end + + # List repositories that are accessible to the authenticated installation + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of repositories + # @see https://developer.github.com/v3/apps/installations/#list-repositories + # + # source://octokit//lib/octokit/client/apps.rb#130 + def list_app_installation_repositories(options = T.unsafe(nil)); end + + # List repositories that are accessible to the authenticated installation + # + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] the total_count and an array of repositories + # @see https://developer.github.com/v3/apps/installations/#list-repositories + # + # source://octokit//lib/octokit/client/apps.rb#130 + def list_installation_repos(options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#137 + def list_integration_installation_repositories(options = T.unsafe(nil)); end + + # Remove a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#remove-repository-from-installation + # + # source://octokit//lib/octokit/client/apps.rb#180 + def remove_repo_from_installation(installation, repo, options = T.unsafe(nil)); end + + # Remove a single repository to an installation + # + # @param installation [Integer] The id of a GitHub App Installation + # @param repo [Integer] The id of the GitHub repository + # @param options [Hash] A customizable set of options + # @return [Boolean] Success + # @see https://developer.github.com/v3/apps/installations/#remove-repository-from-installation + # + # source://octokit//lib/octokit/client/apps.rb#180 + def remove_repository_from_app_installation(installation, repo, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/apps.rb#185 + def remove_repository_from_integration_installation(installation, repo, options = T.unsafe(nil)); end +end + +# Header keys that can be passed in options hash to {#get},{#head} +# +# source://octokit//lib/octokit/client.rb#135 +Octokit::Client::CONVENIENCE_HEADERS = T.let(T.unsafe(nil), Set) + +# Methods for the Checks API +# +# @see https://developer.github.com/v3/checks/ +# +# source://octokit//lib/octokit/client/checks.rb#8 +module Octokit::Client::Checks + # Get a single check run + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check run + # @return [Sawyer::Resource] A hash representing the check run + # @see https://developer.github.com/v3/checks/runs/#get-a-single-check-run + # + # source://octokit//lib/octokit/client/checks.rb#100 + def check_run(repo, id, options = T.unsafe(nil)); end + + # List annotations for a check run + # + # @example List annotations for a check run + # annotations = @client.check_run_annotations("octocat/Hello-World", 51295429) + # annotations.count # => 1 + # annotations[0].path # => "README.md" + # annotations[0].message # => "Looks good!" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check run + # @return [Array] An array of hashes representing check run annotations + # @see https://developer.github.com/v3/checks/runs/#list-annotations-for-a-check-run + # + # source://octokit//lib/octokit/client/checks.rb#115 + def check_run_annotations(repo, id, options = T.unsafe(nil)); end + + # List check runs in a check suite + # + # @example List check runs in a check suite + # result = @client.check_runs_for_check_suite("octocat/Hello-World", 50440400, status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].check_suite.id # => 50440400 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#86 + def check_runs_for_check_suite(repo, id, options = T.unsafe(nil)); end + + # List check runs for a specific ref + # + # @example List check runs for a specific ref + # result = @client.check_runs_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].id # => 51295429 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param ref [String] A SHA, branch name, or tag name + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#62 + def check_runs_for_ref(repo, ref, options = T.unsafe(nil)); end + + # Get a single check suite + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @return [Sawyer::Resource] A hash representing the check suite + # @see https://developer.github.com/v3/checks/suites/#get-a-single-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#129 + def check_suite(repo, id, options = T.unsafe(nil)); end + + # List check suites for a specific ref + # + # @example List check suites for a specific ref + # result = @client.check_suites_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", app_id: 76765) + # result.total_count # => 1 + # result.check_suites.count # => 1 + # result.check_suites[0].id # => 50440400 + # result.check_suites[0].app.id # => 76765 + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param ref [String] A SHA, branch name, or tag name + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check suites + # @see https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#148 + def check_suites_for_ref(repo, ref, options = T.unsafe(nil)); end + + # Create a check run + # + # @example Create a check run + # check_run = @client.create_check_run("octocat/Hello-World", "my-check", "7638417db6d59f3c431d3e1f261cc637155684cd") + # check_run.name # => "my-check" + # check_run.head_sha # => "7638417db6d59f3c431d3e1f261cc637155684cd" + # check_run.status # => "queued" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param name [String] The name of the check + # @param head_sha [String] The SHA of the commit to check + # @return [Sawyer::Resource] A hash representing the new check run + # @see https://developer.github.com/v3/checks/runs/#create-a-check-run + # + # source://octokit//lib/octokit/client/checks.rb#25 + def create_check_run(repo, name, head_sha, options = T.unsafe(nil)); end + + # Create a check suite + # + # @example Create a check suite + # check_suite = @client.create_check_suite("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd") + # check_suite.head_sha # => "7638417db6d59f3c431d3e1f261cc637155684cd" + # check_suite.status # => "queued" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param head_sha [String] The SHA of the commit to check + # @return [Sawyer::Resource] A hash representing the new check suite + # @see https://developer.github.com/v3/checks/suites/#create-a-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#182 + def create_check_suite(repo, head_sha, options = T.unsafe(nil)); end + + # List check runs in a check suite + # + # @example List check runs in a check suite + # result = @client.check_runs_for_check_suite("octocat/Hello-World", 50440400, status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].check_suite.id # => 50440400 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#86 + def list_check_runs_for_check_suite(repo, id, options = T.unsafe(nil)); end + + # List check runs for a specific ref + # + # @example List check runs for a specific ref + # result = @client.check_runs_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", status: "in_progress") + # result.total_count # => 1 + # result.check_runs.count # => 1 + # result.check_runs[0].id # => 51295429 + # result.check_runs[0].status # => "in_progress" + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param ref [String] A SHA, branch name, or tag name + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check runs + # @see https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#62 + def list_check_runs_for_ref(repo, ref, options = T.unsafe(nil)); end + + # List check suites for a specific ref + # + # @example List check suites for a specific ref + # result = @client.check_suites_for_ref("octocat/Hello-World", "7638417db6d59f3c431d3e1f261cc637155684cd", app_id: 76765) + # result.total_count # => 1 + # result.check_suites.count # => 1 + # result.check_suites[0].id # => 50440400 + # result.check_suites[0].app.id # => 76765 + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param ref [String] A SHA, branch name, or tag name + # @param options [Hash] A set of optional filters + # @return [Sawyer::Resource] A hash representing a collection of check suites + # @see https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref + # + # source://octokit//lib/octokit/client/checks.rb#148 + def list_check_suites_for_ref(repo, ref, options = T.unsafe(nil)); end + + # Rerequest check suite + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check suite + # @return [Boolean] True if successful, raises an error otherwise + # @see https://developer.github.com/v3/checks/suites/#rerequest-check-suite + # + # source://octokit//lib/octokit/client/checks.rb#194 + def rerequest_check_suite(repo, id, options = T.unsafe(nil)); end + + # Set preferences for check suites on a repository + # + # @example Set preferences for check suites on a repository + # result = @client.set_check_suite_preferences("octocat/Hello-World", auto_trigger_checks: [{ app_id: 76765, setting: false }]) + # result.preferences.auto_trigger_checks.count # => 1 + # result.preferences.auto_trigger_checks[0].app_id # => 76765 + # result.preferences.auto_trigger_checks[0].setting # => false + # result.repository.full_name # => "octocat/Hello-World" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Preferences to set + # @return [Sawyer::Resource] A hash representing the repository's check suite preferences + # @see https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository + # + # source://octokit//lib/octokit/client/checks.rb#168 + def set_check_suite_preferences(repo, options = T.unsafe(nil)); end + + # Update a check run + # + # @example Update a check run + # check_run = @client.update_check_run("octocat/Hello-World", 51295429, status: "in_progress") + # check_run.id # => 51295429 + # check_run.status # => "in_progress" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The ID of the check run + # @return [Sawyer::Resource] A hash representing the updated check run + # @see https://developer.github.com/v3/checks/runs/#update-a-check-run + # + # source://octokit//lib/octokit/client/checks.rb#42 + def update_check_run(repo, id, options = T.unsafe(nil)); end +end + +# Methods for the Branches for HEAD API +# +# @see https://developer.github.com/v3/repos/commits/ +# +# source://octokit//lib/octokit/client/commit_branches.rb#8 +module Octokit::Client::CommitBranches + # List branches for a single HEAD commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit whose branches will be fetched + # @return [Array] List of branches + # @see https://developer.github.com/v3/repos/commits/#list-branches-for-head-commit + # + # source://octokit//lib/octokit/client/commit_branches.rb#15 + def commit_branches(repo, sha, options = T.unsafe(nil)); end +end + +# Methods for the Commit Comments API +# +# @see https://developer.github.com/v3/repos/comments/ +# +# source://octokit//lib/octokit/client/commit_comments.rb#8 +module Octokit::Client::CommitComments + # Get a single commit comment + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [String] The ID of the comment to fetch + # @return [Sawyer::Resource] Commit comment + # @see https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#34 + def commit_comment(repo, id, options = T.unsafe(nil)); end + + # List comments for a single commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit whose comments will be fetched + # @return [Array] List of commit comments + # @see https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit + # + # source://octokit//lib/octokit/client/commit_comments.rb#24 + def commit_comments(repo, sha, options = T.unsafe(nil)); end + + # Create a commit comment + # + # @example Create a commit comment + # comment = Octokit.create_commit_comment("octocat/Hello-World", "827efc6d56897b048c772eb4087f854f46256132", "My comment message", "README.md", 10, 1) + # comment.commit_id # => "827efc6d56897b048c772eb4087f854f46256132" + # comment.id # => 54321 + # comment.body # => "My comment message" + # comment.path # => "README.md" + # comment.line # => 10 + # comment.position # => 1 + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] Sha of the commit to comment on + # @param body [String] Message + # @param path [String] Relative path of file to comment on + # @param line [Integer] Line number in the file to comment on + # @param position [Integer] Line index in the diff to comment on + # @return [Sawyer::Resource] Commit comment + # @see https://developer.github.com/v3/repos/comments/#create-a-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#56 + def create_commit_comment(repo, sha, body, path = T.unsafe(nil), line = T.unsafe(nil), position = T.unsafe(nil), options = T.unsafe(nil)); end + + # Delete a commit comment + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [String] The ID of the comment to delete + # @return [Boolean] Success + # @see https://developer.github.com/v3/repos/comments/#delete-a-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#90 + def delete_commit_comment(repo, id, options = T.unsafe(nil)); end + + # List all commit comments + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Array] List of commit comments + # @see https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository + # + # source://octokit//lib/octokit/client/commit_comments.rb#14 + def list_commit_comments(repo, options = T.unsafe(nil)); end + + # Update a commit comment + # + # @example Update a commit comment + # comment = Octokit.update_commit_comment("octocat/Hello-World", "860296", "Updated commit comment") + # comment.id # => 860296 + # comment.body # => "Updated commit comment" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [String] The ID of the comment to update + # @param body [String] Message + # @return [Sawyer::Resource] Updated commit comment + # @see https://developer.github.com/v3/repos/comments/#update-a-commit-comment + # + # source://octokit//lib/octokit/client/commit_comments.rb#77 + def update_commit_comment(repo, id, body, options = T.unsafe(nil)); end +end + +# Methods for the Commit Pulls API +# +# @see https://developer.github.com/v3/repos/comments/ +# +# source://octokit//lib/octokit/client/commit_pulls.rb#8 +module Octokit::Client::CommitPulls + # List pulls for a single commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit whose pulls will be fetched + # @return [Array] List of commit pulls + # @see https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit + # + # source://octokit//lib/octokit/client/commit_pulls.rb#15 + def commit_pulls(repo, sha, options = T.unsafe(nil)); end +end + +# Methods for the Commits API +# +# @see https://developer.github.com/v3/repos/commits/ +# +# source://octokit//lib/octokit/client/commits.rb#10 +module Octokit::Client::Commits + # Get a single commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit to fetch + # @return [Sawyer::Resource] A hash representing the commit + # @see https://developer.github.com/v3/repos/commits/#get-a-single-commit + # + # source://octokit//lib/octokit/client/commits.rb#143 + def commit(repo, sha, options = T.unsafe(nil)); end + + # List commits + # + # @overload commits + # @overload commits + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#23 + def commits(*args); end + + # Get commits before a specified date + # + # @example + # Octokit.commits_before('octokit/octokit.rb', '2012-10-01') + # @overload commits_before + # @overload commits_before + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#71 + def commits_before(*args); end + + # Get commits made between two nominated dates + # + # @example + # Octokit.commits_between('octokit/octokit.rb', '2012-10-01', '2012-11-01') + # @overload commits_between + # @overload commits_between + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#122 + def commits_between(*args); end + + # Get commits on a specified date + # + # @example + # Octokit.commits_on('octokit/octokit.rb', '2012-10-01') + # @overload commits_on + # @overload commits_on + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#95 + def commits_on(*args); end + + # Get commits after a specified date + # + # @example + # Octokit.commits_since('octokit/octokit.rb', '2012-10-01') + # @overload commits_since + # @overload commits_since + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#47 + def commits_since(*args); end + + # Compare two commits + # + # When using auto_pagination, commits from all pages will be concatenated + # into the commits attribute of the first page's response. + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param start [String] The sha of the starting commit + # @param endd [String] The sha of the ending commit + # @return [Sawyer::Resource] A hash representing the comparison + # @see https://developer.github.com/v3/repos/commits/#compare-two-commits + # + # source://octokit//lib/octokit/client/commits.rb#192 + def compare(repo, start, endd, options = T.unsafe(nil)); end + + # Create a commit + # + # Optionally pass author and committer hashes in options + # if you'd like manual control over those parameters. If absent, details will be + # inferred from the authenticated user. See GitHub's documentation + # for details about how to format committer identities. + # + # @example Create a commit + # commit = Octokit.create_commit("octocat/Hello-World", "My commit message", "827efc6d56897b048c772eb4087f854f46256132", "7d1b31e74ee336d15cbd21741bc88a537ed063a0") + # commit.sha # => "7638417db6d59f3c431d3e1f261cc637155684cd" + # commit.tree.sha # => "827efc6d56897b048c772eb4087f854f46256132" + # commit.message # => "My commit message" + # commit.committer # => { "name" => "Wynn Netherland", "email" => "wynn@github.com", ... } + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param message [String] The commit message + # @param tree [String] The SHA of the tree object the new commit will point to + # @param parents [String, Array] One SHA (for a normal commit) or an array of SHAs (for a merge) of the new commit's parent commits. If ommitted or empty, a root commit will be created + # @return [Sawyer::Resource] A hash representing the new commit + # @see https://developer.github.com/v3/git/commits/#create-a-commit + # + # source://octokit//lib/octokit/client/commits.rb#176 + def create_commit(repo, message, tree, parents = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get a detailed git commit + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param sha [String] The SHA of the commit to fetch + # @return [Sawyer::Resource] A hash representing the commit + # @see https://developer.github.com/v3/git/commits/#get-a-commit + # + # source://octokit//lib/octokit/client/commits.rb#153 + def git_commit(repo, sha, options = T.unsafe(nil)); end + + # List commits + # + # @overload commits + # @overload commits + # @return [Array] An array of hashes representing commits + # @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + # + # source://octokit//lib/octokit/client/commits.rb#23 + def list_commits(*args); end + + # Merge a branch or sha + # + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param base [String] The name of the base branch to merge into + # @param head [String] The branch or SHA1 to merge + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A hash representing the comparison + # @see https://developer.github.com/v3/repos/merging/#perform-a-merge + # + # source://octokit//lib/octokit/client/commits.rb#206 + def merge(repo, base, head, options = T.unsafe(nil)); end + + protected + + # source://octokit//lib/octokit/client/commits.rb#216 + def iso8601(date); end + + # Parses the given string representation of a date, throwing a meaningful exception + # (containing the date that failed to parse) in case of failure. + # + # @param date [String] String representation of a date + # @return [DateTime] + # + # source://octokit//lib/octokit/client/commits.rb#229 + def parse_date(date); end +end + +# Methods for the Community Profile API +# +# @see https://developer.github.com/v3/repos/community/ +# +# source://octokit//lib/octokit/client/community_profile.rb#8 +module Octokit::Client::CommunityProfile + # Get community profile metrics for a repository + # + # @example Get community profile metrics for octokit/octokit.rb + # @client.community_profile('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Community profile metrics + # @see https://developer.github.com/v3/repos/community/#retrieve-community-profile-metrics + # + # source://octokit//lib/octokit/client/community_profile.rb#16 + def community_profile(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repo Contents API +# +# @see https://developer.github.com/v3/repos/contents/ +# +# source://octokit//lib/octokit/client/contents.rb#10 +module Octokit::Client::Contents + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#61 + def add_content(*args); end + + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#61 + def add_contents(*args); end + + # This method will provide a URL to download a tarball or zipball archive for a repository. + # + # @example Get archive link for octokit/octokit.rb + # Octokit.archive_link("octokit/octokit.rb") + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [String] Location of the download + # @see https://developer.github.com/v3/repos/contents/#get-archive-link + # + # source://octokit//lib/octokit/client/contents.rb#157 + def archive_link(repo, options = T.unsafe(nil)); end + + # Receive a listing of a repository folder or the contents of a file + # + # @example List the contents of lib/octokit.rb + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb') + # @example Lists the contents of lib /octokit.rb on a particular branch + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb', :query => {:ref => 'some-other-branch'}) + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The contents of a file or list of the files in the folder + # @see https://developer.github.com/v3/repos/contents/#get-contents + # + # source://octokit//lib/octokit/client/contents.rb#36 + def content(repo, options = T.unsafe(nil)); end + + # Receive a listing of a repository folder or the contents of a file + # + # @example List the contents of lib/octokit.rb + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb') + # @example Lists the contents of lib /octokit.rb on a particular branch + # Octokit.contents("octokit/octokit.rb", :path => 'lib/octokit.rb', :query => {:ref => 'some-other-branch'}) + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The contents of a file or list of the files in the folder + # @see https://developer.github.com/v3/repos/contents/#get-contents + # + # source://octokit//lib/octokit/client/contents.rb#36 + def contents(repo, options = T.unsafe(nil)); end + + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#61 + def create_content(*args); end + + # Add content to a repository + # + # @example Add content at lib/octokit.rb + # Octokit.create_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Adding content", + # "File content", + # :branch => "my-new-feature") + # @overload create_contents + # @raise [ArgumentError] + # @return [Sawyer::Resource] The contents and commit info for the addition + # @see https://developer.github.com/v3/repos/contents/#create-a-file + # + # source://octokit//lib/octokit/client/contents.rb#61 + def create_contents(*args); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param path [String] A path for the content to delete + # @param message [String] A commit message for deleting the content + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#138 + def delete_content(repo, path, message, sha, options = T.unsafe(nil)); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param path [String] A path for the content to delete + # @param message [String] A commit message for deleting the content + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#138 + def delete_contents(repo, path, message, sha, options = T.unsafe(nil)); end + + # Receive the default Readme for a repository + # + # @example Get the readme file for a repo + # Octokit.readme("octokit/octokit.rb") + # @example Get the readme file for a particular branch of the repo + # Octokit.readme("octokit/octokit.rb", :query => {:ref => 'some-other-branch'}) + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The detail of the readme + # @see https://developer.github.com/v3/repos/contents/#get-the-readme + # + # source://octokit//lib/octokit/client/contents.rb#21 + def readme(repo, options = T.unsafe(nil)); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param path [String] A path for the content to delete + # @param message [String] A commit message for deleting the content + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#138 + def remove_content(repo, path, message, sha, options = T.unsafe(nil)); end + + # Delete content in a repository + # + # @example Delete content at lib/octokit.rb + # Octokit.delete_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Deleting content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # :branch => "my-new-feature") + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param path [String] A path for the content to delete + # @param message [String] A commit message for deleting the content + # @param sha [String] The _blob sha_ of the content to delete + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The commit info for the delete + # @see https://developer.github.com/v3/repos/contents/#delete-a-file + # + # source://octokit//lib/octokit/client/contents.rb#138 + def remove_contents(repo, path, message, sha, options = T.unsafe(nil)); end + + # Update content in a repository + # + # @example Update content at lib/octokit.rb + # Octokit.update_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Updating content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # "File content", + # :branch => "my-new-feature") + # @overload update_contents + # @return [Sawyer::Resource] The contents and commit info for the update + # @see https://developer.github.com/v3/repos/contents/#update-a-file + # + # source://octokit//lib/octokit/client/contents.rb#111 + def update_content(*args); end + + # Update content in a repository + # + # @example Update content at lib/octokit.rb + # Octokit.update_contents("octokit/octokit.rb", + # "lib/octokit.rb", + # "Updating content", + # "7eb95f97e1a0636015df3837478d3f15184a5f49", + # "File content", + # :branch => "my-new-feature") + # @overload update_contents + # @return [Sawyer::Resource] The contents and commit info for the update + # @see https://developer.github.com/v3/repos/contents/#update-a-file + # + # source://octokit//lib/octokit/client/contents.rb#111 + def update_contents(*args); end +end + +# Methods for the Deployments API +# +# @see https://developer.github.com/v3/repos/commits/deployments/ +# +# source://octokit//lib/octokit/client/deployments.rb#8 +module Octokit::Client::Deployments + # Create a deployment for a ref + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref to deploy + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A deployment + # @see https://developer.github.com/v3/repos/deployments/#create-a-deployment + # + # source://octokit//lib/octokit/client/deployments.rb#41 + def create_deployment(repo, ref, options = T.unsafe(nil)); end + + # Create a deployment status for a Deployment + # + # @option options + # @option options + # @param deployment_url [String] A URL for a deployment resource + # @param state [String] The state: pending, success, failure, error + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A deployment status + # @see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status + # + # source://octokit//lib/octokit/client/deployments.rb#75 + def create_deployment_status(deployment_url, state, options = T.unsafe(nil)); end + + # Delete a Deployment + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param deployment_id [Integer, String, Repository, Hash] A GitHub repository + # @return [No Content] + # @see https://developer.github.com/v3/repos/deployments/#delete-a-deployment + # + # source://octokit//lib/octokit/client/deployments.rb#52 + def delete_deployment(repo, deployment_id, options = T.unsafe(nil)); end + + # Fetch a single deployment for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param deployment_id [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] A single deployment + # @see https://developer.github.com/v3/repos/deployments/#get-a-single-deployment + # + # source://octokit//lib/octokit/client/deployments.rb#15 + def deployment(repo, deployment_id, options = T.unsafe(nil)); end + + # List all statuses for a Deployment + # + # @param deployment_url [String] A URL for a deployment resource + # @return [Array] A list of deployment statuses + # @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses + # + # source://octokit//lib/octokit/client/deployments.rb#61 + def deployment_statuses(deployment_url, options = T.unsafe(nil)); end + + # List all deployments for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of deployments + # @see https://developer.github.com/v3/repos/deployments/#list-deployments + # + # source://octokit//lib/octokit/client/deployments.rb#24 + def deployments(repo, options = T.unsafe(nil)); end + + # List all statuses for a Deployment + # + # @param deployment_url [String] A URL for a deployment resource + # @return [Array] A list of deployment statuses + # @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses + # + # source://octokit//lib/octokit/client/deployments.rb#61 + def list_deployment_statuses(deployment_url, options = T.unsafe(nil)); end + + # List all deployments for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of deployments + # @see https://developer.github.com/v3/repos/deployments/#list-deployments + # + # source://octokit//lib/octokit/client/deployments.rb#24 + def list_deployments(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repo Downloads API +# +# @see https://developer.github.com/v3/repos/downloads/ +# +# source://octokit//lib/octokit/client/downloads.rb#8 +module Octokit::Client::Downloads + # Delete a single download for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example Get the "Robawt" download from Github/Hubot + # Octokit.delete_download("github/hubot", 1234) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] ID of the download + # @return [Boolean] Status + # @see https://developer.github.com/v3/repos/downloads/#delete-a-download + # + # source://octokit//lib/octokit/client/downloads.rb#44 + def delete_download(repo, id, options = T.unsafe(nil)); end + + # Get single download for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example Get the "Robawt" download from Github/Hubot + # Octokit.download("github/hubot") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer] ID of the download + # @return [Sawyer::Resource] A single download from the repository + # @see https://developer.github.com/v3/repos/downloads/#get-a-single-download + # + # source://octokit//lib/octokit/client/downloads.rb#31 + def download(repo, id, options = T.unsafe(nil)); end + + # List available downloads for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example List all downloads for Github/Hubot + # Octokit.downloads("github/hubot") + # @param repo [Integer, String, Repository, Hash] A Github Repository + # @return [Array] A list of available downloads + # @see https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository + # + # source://octokit//lib/octokit/client/downloads.rb#17 + def downloads(repo, options = T.unsafe(nil)); end + + # List available downloads for a repository + # + # @deprecated As of December 11th, 2012: https://github.com/blog/1302-goodbye-uploads + # @example List all downloads for Github/Hubot + # Octokit.downloads("github/hubot") + # @param repo [Integer, String, Repository, Hash] A Github Repository + # @return [Array] A list of available downloads + # @see https://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository + # + # source://octokit//lib/octokit/client/downloads.rb#17 + def list_downloads(repo, options = T.unsafe(nil)); end +end + +# Methods for the Emojis API +# +# source://octokit//lib/octokit/client/emojis.rb#6 +module Octokit::Client::Emojis + # List all emojis used on GitHub + # + # @example List all emojis + # Octokit.emojis + # @return [Sawyer::Resource] A list of all emojis on GitHub + # @see https://developer.github.com/v3/emojis/#emojis + # + # source://octokit//lib/octokit/client/emojis.rb#13 + def emojis(options = T.unsafe(nil)); end +end + +# Methods for the Environments API +# +# @see https://docs.github.com/en/rest/deployments/environments +# +# source://octokit//lib/octokit/client/environments.rb#8 +module Octokit::Client::Environments + # Create or update an environment with protection rules, such as required reviewers + # + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param environment_name [String] The name of the environment + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] An environment + # @see https://docs.github.com/en/rest/deployments/environments#create-or-update-an-environment + # + # source://octokit//lib/octokit/client/environments.rb#40 + def create_or_update_environment(repo, environment_name, options = T.unsafe(nil)); end + + # Delete an Environment + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param environment_name [String] The name of the environment + # @return [No Content] + # @see https://docs.github.com/en/rest/deployments/environments#delete-an-environment + # + # source://octokit//lib/octokit/client/environments.rb#50 + def delete_environment(repo, environment_name, options = T.unsafe(nil)); end + + # Fetch a single environment for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param environment_name [String] The name of the environment + # @return [Sawyer::Resource] A single environment + # @see https://docs.github.com/en/rest/deployments/environments#get-an-environment + # + # source://octokit//lib/octokit/client/environments.rb#15 + def environment(repo, environment_name, options = T.unsafe(nil)); end + + # Lists the environments for a repository + # + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Total count of environments and list of environments + # @see https://docs.github.com/en/rest/deployments/environments#list-environments + # + # source://octokit//lib/octokit/client/environments.rb#26 + def environments(repo, options = T.unsafe(nil)); end + + # Lists the environments for a repository + # + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Total count of environments and list of environments + # @see https://docs.github.com/en/rest/deployments/environments#list-environments + # + # source://octokit//lib/octokit/client/environments.rb#26 + def list_environments(repo, options = T.unsafe(nil)); end +end + +# Method for the Events API +# +# @see https://developer.github.com/v3/activity/events/ +# @see https://developer.github.com/v3/issues/events/ +# +# source://octokit//lib/octokit/client/events.rb#9 +module Octokit::Client::Events + # Get information on a single Issue Event + # + # @example Get Event information for ID 3094334 (a pull request was closed) + # Octokit.issue_event("octokit/octokit.rb", 3094334) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Event number + # @return [Sawyer::Resource] A single Event for an Issue + # @see https://developer.github.com/v3/issues/events/#get-a-single-event + # + # source://octokit//lib/octokit/client/events.rb#146 + def issue_event(repo, number, options = T.unsafe(nil)); end + + # List events for an Issue + # + # @example List all issues events for issue #38 on octokit/octokit.rb + # Octokit.issue_events("octokit/octokit.rb", 38) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @return [Array] Array of events for that issue + # @see https://developer.github.com/v3/issues/events/#list-events-for-an-issue + # + # source://octokit//lib/octokit/client/events.rb#133 + def issue_events(repo, number, options = T.unsafe(nil)); end + + # List all events for an organization + # + # Requires authenticated client. + # + # @example List events for the lostisland organization + # @client.organization_events("lostisland") + # @param org [String] Organization GitHub handle + # @return [Array] List of all events from a GitHub organization + # @see https://developer.github.com/v3/activity/events/#list-events-for-an-organization + # + # source://octokit//lib/octokit/client/events.rb#95 + def organization_events(org, options = T.unsafe(nil)); end + + # List an organization's public events + # + # @example List public events for GitHub + # Octokit.organization_public_events("GitHub") + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] List of public events from a GitHub organization + # @see https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization + # + # source://octokit//lib/octokit/client/events.rb#106 + def organization_public_events(org, options = T.unsafe(nil)); end + + # List all public events for GitHub + # + # @example List all pubilc events + # Octokit.public_events + # @return [Array] A list of all public events from GitHub + # @see https://developer.github.com/v3/activity/events/#list-public-events + # + # source://octokit//lib/octokit/client/events.rb#16 + def public_events(options = T.unsafe(nil)); end + + # List events that a user has received + # + # @example List all user received events + # Octokit.received_events("sferik") + # @param user [Integer, String] GitHub user login or id + # @return [Array] A list of all user received events + # @see https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received + # + # source://octokit//lib/octokit/client/events.rb#49 + def received_events(user, options = T.unsafe(nil)); end + + # List public events a user has received + # + # @example List public user received events + # Octokit.received_public_events("sferik") + # @param user [Integer, String] GitHub user login or id + # @return [Array] A list of public user received events + # @see https://developer.github.com/v3/activity/events/#list-public-events-that-a-user-has-received + # + # source://octokit//lib/octokit/client/events.rb#60 + def received_public_events(user, options = T.unsafe(nil)); end + + # Get all Issue Events for a given Repository + # + # @example Get all Issue Events for Octokit + # Octokit.repository_issue_events("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] Array of all Issue Events for this Repository + # @see https://developer.github.com/v3/issues/events/#list-events-for-a-repository + # @see https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository + # + # source://octokit//lib/octokit/client/events.rb#119 + def repo_issue_events(repo, options = T.unsafe(nil)); end + + # List events for a repository + # + # @example List events for a repository + # Octokit.repository_events("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of events for a repository + # @see https://developer.github.com/v3/activity/events/#list-repository-events + # + # source://octokit//lib/octokit/client/events.rb#71 + def repository_events(repo, options = T.unsafe(nil)); end + + # Get all Issue Events for a given Repository + # + # @example Get all Issue Events for Octokit + # Octokit.repository_issue_events("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] Array of all Issue Events for this Repository + # @see https://developer.github.com/v3/issues/events/#list-events-for-a-repository + # @see https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository + # + # source://octokit//lib/octokit/client/events.rb#119 + def repository_issue_events(repo, options = T.unsafe(nil)); end + + # List public events for a repository's network + # + # @example List events for a repository's network + # Octokit.repository_network_events("sferik/rails_admin") + # @param repo [String, Repository, Hash] A GitHub repository + # @return [Array] A list of events for a repository's network + # @see https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories + # + # source://octokit//lib/octokit/client/events.rb#82 + def repository_network_events(repo, options = T.unsafe(nil)); end + + # List all user events + # + # @example List all user events + # Octokit.user_events("sferik") + # @param user [Integer, String] GitHub user login or id. + # @return [Array] A list of all user events + # @see https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user + # + # source://octokit//lib/octokit/client/events.rb#27 + def user_events(user, options = T.unsafe(nil)); end + + # List public user events + # + # @example List public user events + # Octokit.user_events("sferik") + # @param user [Integer, String] GitHub user login or id + # @return [Array] A list of public user events + # @see https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user + # + # source://octokit//lib/octokit/client/events.rb#38 + def user_public_events(user, options = T.unsafe(nil)); end +end + +# Methods for the Feeds API +# +# @see https://developer.github.com/v3/activity/feeds/ +# +# source://octokit//lib/octokit/client/feeds.rb#8 +module Octokit::Client::Feeds + # Get a Feed by name + # + # @param name [Symbol, String] Name of feed to retrieve. + # @return [Feed] Parsed feed in the format returned by the configured + # parser. + # + # source://octokit//lib/octokit/client/feeds.rb#25 + def feed(name, options = T.unsafe(nil)); end + + # List Feeds + # + # The feeds returned depend on authentication, see the GitHub API docs + # for more information. + # + # @return [Array] list of feeds + # @see https://developer.github.com/v3/activity/feeds/#list-feeds + # + # source://octokit//lib/octokit/client/feeds.rb#16 + def feeds; end +end + +# Methods for the Gists API +# +# @see https://developer.github.com/v3/gists/ +# +# source://octokit//lib/octokit/client/gists.rb#8 +module Octokit::Client::Gists + # Create a gist + # + # @option options + # @option options + # @option options + # @param options [Hash] Gist information. + # @return [Sawyer::Resource] Newly created gist info + # @see https://developer.github.com/v3/gists/#create-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#71 + def create_gist(options = T.unsafe(nil)); end + + # Create gist comment + # + # Requires authenticated client. + # + # @example + # @client.create_gist_comment('3528645', 'This is very helpful.') + # @param gist_id [String] Id of the gist. + # @param comment [String] Comment contents. + # @return [Sawyer::Resource] Hash representing the new comment. + # @see https://developer.github.com/v3/gists/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/gists.rb#198 + def create_gist_comment(gist_id, comment, options = T.unsafe(nil)); end + + # Delete a gist + # + # @param gist [String] Gist ID + # @return [Boolean] Indicating success of deletion + # @see https://developer.github.com/v3/gists/#delete-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#161 + def delete_gist(gist, options = T.unsafe(nil)); end + + # Delete gist comment + # + # Requires authenticated client. + # + # @example + # @client.delete_gist_comment('208sdaz3', '586399') + # @param gist_id [String] Id of the gist. + # @param gist_comment_id [Integer] Id of the gist comment to delete. + # @return [Boolean] True if comment deleted, false otherwise. + # @see https://developer.github.com/v3/gists/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/gists.rb#229 + def delete_gist_comment(gist_id, gist_comment_id, options = T.unsafe(nil)); end + + # Edit a gist + # + # @example Update a gist + # @client.edit_gist('some_id', { + # :files => {"boo.md" => {"content" => "updated stuff"}} + # }) + # @option options + # @option options + # @param options [Hash] Gist information. + # @return [Sawyer::Resource] Newly created gist info + # @see https://developer.github.com/v3/gists/#edit-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#93 + def edit_gist(gist, options = T.unsafe(nil)); end + + # Fork a gist + # + # @param gist [String] Gist ID + # @return [Sawyer::Resource] Data for the new gist + # @see https://developer.github.com/v3/gists/#fork-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#141 + def fork_gist(gist, options = T.unsafe(nil)); end + + # Get a single gist + # + # @option options + # @param gist [String] ID of gist to fetch + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Gist information + # @see https://developer.github.com/v3/gists/#get-a-single-gist + # @see https://developer.github.com/v3/gists/#get-a-specific-revision-of-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#52 + def gist(gist, options = T.unsafe(nil)); end + + # Get gist comment + # + # @example + # Octokit.gist_comment('208sdaz3', 1451398) + # @param gist_id [String] Id of the gist. + # @param gist_comment_id [Integer] Id of the gist comment. + # @return [Sawyer::Resource] Hash representing gist comment. + # @see https://developer.github.com/v3/gists/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/gists.rb#184 + def gist_comment(gist_id, gist_comment_id, options = T.unsafe(nil)); end + + # List gist comments + # + # @example + # Octokit.gist_comments('3528ae645') + # @param gist_id [String] Gist Id. + # @return [Array] Array of hashes representing comments. + # @see https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#172 + def gist_comments(gist_id, options = T.unsafe(nil)); end + + # List gist commits + # + # @example List commits for a gist + # @client.gist_commits('some_id') + # @param gist [String] Gist ID + # @return [Array] List of commits to the gist + # @see https://developer.github.com/v3/gists/#list-gist-commits + # + # source://octokit//lib/octokit/client/gists.rb#104 + def gist_commits(gist, options = T.unsafe(nil)); end + + # List gist forks + # + # @example List gist forks + # @client.gist_forks('some-id') + # @param gist [String] Gist ID + # @return [Array] List of gist forks + # @see https://developer.github.com/v3/gists/#list-gist-forks + # + # source://octokit//lib/octokit/client/gists.rb#152 + def gist_forks(gist, options = T.unsafe(nil)); end + + # Check if a gist is starred + # + # @param gist [String] Gist ID + # @return [Boolean] Indicates if gist is starred + # @see https://developer.github.com/v3/gists/#check-if-a-gist-is-starred + # + # source://octokit//lib/octokit/client/gists.rb#132 + def gist_starred?(gist, options = T.unsafe(nil)); end + + # List gists for a user or all public gists + # + # @example Fetch all gists for defunkt + # Octokit.gists('defunkt') + # @example Fetch all public gists + # Octokit.gists + # @param user [String] An optional user to filter listing + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#18 + def gists(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List gists for a user or all public gists + # + # @example Fetch all gists for defunkt + # Octokit.gists('defunkt') + # @example Fetch all public gists + # Octokit.gists + # @param user [String] An optional user to filter listing + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#18 + def list_gists(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List public gists + # + # @example Fetch all public gists + # Octokit.public_gists + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#33 + def public_gists(options = T.unsafe(nil)); end + + # Star a gist + # + # @param gist [String] Gist ID + # @return [Boolean] Indicates if gist is starred successfully + # @see https://developer.github.com/v3/gists/#star-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#114 + def star_gist(gist, options = T.unsafe(nil)); end + + # List the authenticated user’s starred gists + # + # @return [Array] A list of gists + # @see https://developer.github.com/v3/gists/#list-gists + # + # source://octokit//lib/octokit/client/gists.rb#41 + def starred_gists(options = T.unsafe(nil)); end + + # Unstar a gist + # + # @param gist [String] Gist ID + # @return [Boolean] Indicates if gist is unstarred successfully + # @see https://developer.github.com/v3/gists/#unstar-a-gist + # + # source://octokit//lib/octokit/client/gists.rb#123 + def unstar_gist(gist, options = T.unsafe(nil)); end + + # Update gist comment + # + # Requires authenticated client + # + # @example + # @client.update_gist_comment('208sdaz3', '3528645', ':heart:') + # @param gist_id [String] Id of the gist. + # @param gist_comment_id [Integer] Id of the gist comment to update. + # @param comment [String] Updated comment contents. + # @return [Sawyer::Resource] Hash representing the updated comment. + # @see https://developer.github.com/v3/gists/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/gists.rb#214 + def update_gist_comment(gist_id, gist_comment_id, comment, options = T.unsafe(nil)); end +end + +# Methods for the Gitignore API +# +# @see https://developer.github.com/v3/gitignore/ +# +# source://octokit//lib/octokit/client/gitignore.rb#8 +module Octokit::Client::Gitignore + # Get a gitignore template. + # + # Use the raw {http://developer.github.com/v3/media/ media type} to get + # the raw contents. + # + # @example Get the Ruby gitignore template + # @client.gitignore_template('Ruby') + # @param template_name [String] Name of the template. Template names are + # case sensitive, make sure to use a valid name from the + # .gitignore_templates list. + # @return [Sawyer::Resource] Gitignore template + # @see https://developer.github.com/v3/gitignore/#get-a-single-template + # + # source://octokit//lib/octokit/client/gitignore.rb#38 + def gitignore_template(template_name, options = T.unsafe(nil)); end + + # Listing available gitignore templates. + # + # These templates can be passed option when creating a repository. + # + # @example Git all the gitignore templates + # @client.gitignore_templates + # @return [Array] List of templates. + # @see https://developer.github.com/v3/gitignore/#listing-available-templates + # + # source://octokit//lib/octokit/client/gitignore.rb#19 + def gitignore_templates(options = T.unsafe(nil)); end +end + +# Methods for the Hooks API +# +# source://octokit//lib/octokit/client/hooks.rb#6 +module Octokit::Client::Hooks + # Create a hook + # + # Requires authenticated client. + # + # @example + # @client.create_hook( + # 'octokit/octokit.rb', + # 'web', + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param name [String] The name of the service that is being called. See + # {https://api.github.com/hooks Hooks} for the possible names. + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. These settings vary between the services and + # are defined in the {https://github.com/github/github-services github-services} repo. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://github.com/github/github-services + # @see https://developer.github.com/v3/repos/hooks/#create-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#65 + def create_hook(repo, name, config, options = T.unsafe(nil)); end + + # Create an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.create_org_hook( + # 'octokit', + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://developer.github.com/v3/orgs/hooks/#create-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#209 + def create_org_hook(org, config, options = T.unsafe(nil)); end + + # Edit a hook + # + # Requires authenticated client. + # + # @example + # @client.edit_hook( + # 'octokit/octokit.rb', + # 100000, + # 'web', + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :add_events => ['status'], + # :remove_events => ['pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook being updated. + # @param name [String] The name of the service that is being called. See + # {https://api.github.com/hooks Hooks} for the possible names. + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. These settings vary between the services and + # are defined in the {https://github.com/github/github-services github-services} repo. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the updated hook + # @see https://api.github.com/hooks + # @see https://github.com/github/github-services + # @see https://developer.github.com/v3/repos/hooks/#edit-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#108 + def edit_hook(repo, id, name, config, options = T.unsafe(nil)); end + + # Update an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.edit_org_hook( + # 'octokit', + # 123, + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://developer.github.com/v3/orgs/hooks/#edit-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#242 + def edit_org_hook(org, id, config, options = T.unsafe(nil)); end + + # Get single hook + # + # Requires authenticated client. + # + # @example + # @client.hook('octokit/octokit.rb', 100000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to get. + # @return [Sawyer::Resource] Hash representing hook. + # @see https://developer.github.com/v3/repos/hooks/#get-single-hook + # + # source://octokit//lib/octokit/client/hooks.rb#30 + def hook(repo, id, options = T.unsafe(nil)); end + + # List repo hooks + # + # Requires authenticated client. + # + # @example + # @client.hooks('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing hooks. + # @see https://developer.github.com/v3/repos/hooks/#list-hooks + # + # source://octokit//lib/octokit/client/hooks.rb#16 + def hooks(repo, options = T.unsafe(nil)); end + + # List org hooks + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.org_hooks('octokit') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing hooks. + # @see https://developer.github.com/v3/orgs/hooks/#list-hooks + # + # source://octokit//lib/octokit/client/hooks.rb#164 + def list_org_hooks(org, options = T.unsafe(nil)); end + + # Get an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.org_hook('octokit', 123) + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to get. + # @return [Sawyer::Resource] Hash representing hook. + # @see https://developer.github.com/v3/orgs/hooks/#get-single-hook + # + # source://octokit//lib/octokit/client/hooks.rb#179 + def org_hook(org, id, options = T.unsafe(nil)); end + + # List org hooks + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.org_hooks('octokit') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing hooks. + # @see https://developer.github.com/v3/orgs/hooks/#list-hooks + # + # source://octokit//lib/octokit/client/hooks.rb#164 + def org_hooks(org, options = T.unsafe(nil)); end + + # Parse payload string + # + # @param payload_string [String] The payload + # @return [Sawyer::Resource] The payload object + # @see https://developer.github.com/v3/activity/events/types/ + # + # source://octokit//lib/octokit/client/hooks.rb#281 + def parse_payload(payload_string); end + + # Ping hook + # + # Requires authenticated client. + # + # @example + # @client.ping_hook('octokit/octokit.rb', 1000000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to send a ping. + # @return [Boolean] Ping requested? + # @see https://developer.github.com/v3/repos/hooks/#ping-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#151 + def ping_hook(repo, id, options = T.unsafe(nil)); end + + # Ping org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.ping_org_hook('octokit', 1000000) + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @return [Boolean] Success + # @see https://developer.github.com/v3/orgs/hooks/#ping-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#258 + def ping_org_hook(org, id, options = T.unsafe(nil)); end + + # Delete hook + # + # Requires authenticated client. + # + # @example + # @client.remove_hook('octokit/octokit.rb', 1000000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to remove. + # @return [Boolean] True if hook removed, false otherwise. + # @see https://developer.github.com/v3/repos/hooks/#delete-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#123 + def remove_hook(repo, id, options = T.unsafe(nil)); end + + # Remove org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.remove_org_hook('octokit', 1000000) + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @return [Boolean] True if hook removed, false otherwise. + # @see https://developer.github.com/v3/orgs/hooks/#delete-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#272 + def remove_org_hook(org, id, options = T.unsafe(nil)); end + + # Test hook + # + # Requires authenticated client. + # + # @example + # @client.test_hook('octokit/octokit.rb', 1000000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the hook to test. + # @return [Boolean] Success + # @see https://developer.github.com/v3/repos/hooks/#test-a-push-hook + # + # source://octokit//lib/octokit/client/hooks.rb#137 + def test_hook(repo, id, options = T.unsafe(nil)); end + + # Update an org hook + # + # Requires client authenticated as admin for the org. + # + # @example + # @client.edit_org_hook( + # 'octokit', + # 123, + # { + # :url => 'http://something.com/webhook', + # :content_type => 'json' + # }, + # { + # :events => ['push', 'pull_request'], + # :active => true + # } + # ) + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] Id of the hook to update. + # @param config [Hash] A Hash containing key/value pairs to provide + # settings for this hook. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hook info for the new hook + # @see https://api.github.com/hooks + # @see https://developer.github.com/v3/orgs/hooks/#edit-a-hook + # + # source://octokit//lib/octokit/client/hooks.rb#242 + def update_org_hook(org, id, config, options = T.unsafe(nil)); end +end + +# Methods for the Issues API +# +# @see https://developer.github.com/v3/issues/ +# +# source://octokit//lib/octokit/client/issues.rb#8 +module Octokit::Client::Issues + # Add assignees to an issue + # + # @example Add assignees "pengwynn" and "joeyw" to Issue #23 on octokit/octokit.rb + # Octokit.add_assignees("octokit/octokit.rb", 23, ["pengwynn", "joeyw"]) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @param assignees [Array] Assignees to be added + # @return [Sawyer::Resource] Issue + # @see https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#344 + def add_assignees(repo, number, assignees, options = T.unsafe(nil)); end + + # Add a comment to an issue + # + # @example Add the comment "Almost to v1" to Issue #23 on octokit/octokit.rb + # Octokit.add_comment("octokit/octokit.rb", 23, "Almost to v1") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @param comment [String] Comment to be added + # @return [Sawyer::Resource] Comment + # @see https://developer.github.com/v3/issues/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/issues.rb#283 + def add_comment(repo, number, comment, options = T.unsafe(nil)); end + + # Close an issue + # + # @example Close Issue #25 from octokit/octokit.rb + # Octokit.close_issue("octokit/octokit.rb", "25") + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] The updated Issue + # @see https://developer.github.com/v3/issues/#edit-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#131 + def close_issue(repo, number, options = T.unsafe(nil)); end + + # Create an issue for a repository + # + # @example Create a new Issues for a repository + # Octokit.create_issue("sferik/rails_admin", 'Updated Docs', 'Added some extra links') + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param title [String] A descriptive title + # @param body [String] An optional concise description + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] Your newly created issue + # @see https://developer.github.com/v3/issues/#create-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#91 + def create_issue(repo, title, body = T.unsafe(nil), options = T.unsafe(nil)); end + + # Delete a single comment + # + # @example Delete the comment #1194549 on an issue on octokit/octokit.rb + # Octokit.delete_comment("octokit/octokit.rb", 1194549) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Comment number + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/issues.rb#308 + def delete_comment(repo, number, options = T.unsafe(nil)); end + + # Get a single issue from a repository + # + # @example Get issue #25 from octokit/octokit.rb + # Octokit.issue("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Sawyer::Resource] The issue you requested, if it exists + # @see https://developer.github.com/v3/issues/#get-a-single-issue + # + # source://octokit//lib/octokit/client/issues.rb#114 + def issue(repo, number, options = T.unsafe(nil)); end + + # Get a single comment attached to an issue + # + # @example Get comment #1194549 from an issue on octokit/octokit.rb + # Octokit.issue_comment("octokit/octokit.rb", 1194549) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the comment + # @return [Sawyer::Resource] The specific comment in question + # @see https://developer.github.com/v3/issues/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/issues.rb#270 + def issue_comment(repo, number, options = T.unsafe(nil)); end + + # Get all comments attached to an issue + # + # @example Get comments for issue #25 from octokit/octokit.rb + # Octokit.issue_comments("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Array] Array of comments that belong to an issue + # @see https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#258 + def issue_comments(repo, number, options = T.unsafe(nil)); end + + # Get the timeline for an issue + # + # @example Get timeline for issue #1435 on octokit/octokit.rb + # Octokit.issue_timeline("octokit/octokit.rb", 1435) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the comment + # @return [Sawyer::Resource] The timeline for this issue + # @see https://developer.github.com/v3/issues/timeline/ + # + # source://octokit//lib/octokit/client/issues.rb#320 + def issue_timeline(repo, number, options = T.unsafe(nil)); end + + # List issues for the authenticated user or repository + # + # @example List issues for a repository + # Octokit.list_issues("sferik/rails_admin") + # @example List issues for the authenticated user across repositories + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.list_issues + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository. + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues for a repository. + # @see https://developer.github.com/v3/issues/#list-issues-for-a-repository + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#30 + def issues(repository = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get all comments attached to issues for the repository + # + # By default, Issue Comments are ordered by ascending ID. + # + # @example Get the comments for issues in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @example Get issues comments, sort by updated descending since a time + # @client.issues_comments("octokit/octokit.rb", { + # :sort => 'desc', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of issues comments. + # @see https://developer.github.com/v3/issues/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/issues.rb#246 + def issues_comments(repo, options = T.unsafe(nil)); end + + # Lists the available assignees for issues in a repository. + # + # @example Get available assignees on repository octokit/octokit.rb + # Octokit.list_assignees("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of GitHub users. + # @see https://developer.github.com/v3/issues/assignees/#list-assignees + # + # source://octokit//lib/octokit/client/issues.rb#331 + def list_assignees(repo, options = T.unsafe(nil)); end + + # List issues for the authenticated user or repository + # + # @example List issues for a repository + # Octokit.list_issues("sferik/rails_admin") + # @example List issues for the authenticated user across repositories + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.list_issues + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository. + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues for a repository. + # @see https://developer.github.com/v3/issues/#list-issues-for-a-repository + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#30 + def list_issues(repository = T.unsafe(nil), options = T.unsafe(nil)); end + + # Lock an issue's conversation, limiting it to collaborators + # + # @example Lock Issue #25 from octokit/octokit.rb + # Octokit.lock_issue("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/#lock-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#160 + def lock_issue(repo, number, options = T.unsafe(nil)); end + + # Create an issue for a repository + # + # @example Create a new Issues for a repository + # Octokit.create_issue("sferik/rails_admin", 'Updated Docs', 'Added some extra links') + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param title [String] A descriptive title + # @param body [String] An optional concise description + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] Your newly created issue + # @see https://developer.github.com/v3/issues/#create-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#91 + def open_issue(repo, title, body = T.unsafe(nil), options = T.unsafe(nil)); end + + # List all issues for a given organization for the authenticated user + # + # @example List all issues for a given organization for the authenticated user + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.org_issues("octokit") + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues. + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#73 + def org_issues(org, options = T.unsafe(nil)); end + + # Remove assignees from an issue + # + # @example Remove assignees "pengwynn" and "joeyw" from Issue #23 on octokit/octokit.rb + # Octokit.remove_assignees("octokit/octokit.rb", 23, ["pengwynn", "joeyw"]) + # @example Remove assignees "pengwynn" from Issue #23 on octokit/octokit.rb + # Octokit.remove_assignees("octokit/octokit.rb", 23, ["pengwynn"], + # :accept => "application/vnd.github.v3+json") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Issue number + # @param assignees [Array] Assignees to be removed + # @param options [Hash] Header params for request + # @return [Sawyer::Resource] Issue + # @see https://developer.github.com/v3/issues/assignees/#remove-assignees-from-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#362 + def remove_assignees(repo, number, assignees, options = T.unsafe(nil)); end + + # Reopen an issue + # + # @example Reopen Issue #25 from octokit/octokit.rb + # Octokit.reopen_issue("octokit/octokit.rb", "25") + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] The updated Issue + # @see https://developer.github.com/v3/issues/#edit-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#148 + def reopen_issue(repo, number, options = T.unsafe(nil)); end + + # Unlock an issue's conversation, opening it to all viewers + # + # @example Unlock Issue #25 from octokit/octokit.rb + # Octokit.close_issue("octokit/octokit.rb", "25") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/#unlock-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#172 + def unlock_issue(repo, number, options = T.unsafe(nil)); end + + # Update a single comment on an issue + # + # @example Update the comment #1194549 with body "I've started this on my 25-issue-comments-v3 fork" on an issue on octokit/octokit.rb + # Octokit.update_comment("octokit/octokit.rb", 1194549, "Almost to v1, added this on my fork") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Comment number + # @param comment [String] Body of the comment which will replace the existing body. + # @return [Sawyer::Resource] Comment + # @see https://developer.github.com/v3/issues/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/issues.rb#296 + def update_comment(repo, number, comment, options = T.unsafe(nil)); end + + # Update an issue + # + # @example Change the title of Issue #25 + # Octokit.update_issue("octokit/octokit.rb", "25", "A new title", "the same body") + # @example Change only the assignee of Issue #25 + # Octokit.update_issue("octokit/octokit.rb", "25", :assignee => "pengwynn") + # @option options + # @overload update_issue + # @overload update_issue + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The updated Issue + # @see https://developer.github.com/v3/issues/#edit-an-issue + # + # source://octokit//lib/octokit/client/issues.rb#209 + def update_issue(repo, number, *args); end + + # List all issues across owned and member repositories for the authenticated user + # + # @example List issues for the authenticated user across owned and member repositories + # @client = Octokit::Client.new(:login => 'foo', :password => 'bar') + # @client.user_issues + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Sawyer::Resource] A customizable set of options. + # @return [Array] A list of issues for a repository. + # @see https://developer.github.com/v3/issues/#list-issues + # + # source://octokit//lib/octokit/client/issues.rb#52 + def user_issues(options = T.unsafe(nil)); end +end + +# Methods for the Issue Labels API +# +# @see https://developer.github.com/v3/issues/labels/ +# +# source://octokit//lib/octokit/client/labels.rb#10 +module Octokit::Client::Labels + # Add a label to a repository + # + # @example Add a new label "Version 1.0" with color "#cccccc" + # Octokit.add_label("octokit/octokit.rb", "Version 1.0", "cccccc") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param label [String] A new label + # @param color [String] A color, in hex, without the leading # + # @return [Sawyer::Resource] The new label + # @see https://developer.github.com/v3/issues/labels/#create-a-label + # + # source://octokit//lib/octokit/client/labels.rb#43 + def add_label(repo, label, color = T.unsafe(nil), options = T.unsafe(nil)); end + + # Add label(s) to an Issue + # + # @example Add two labels for octokit/octokit.rb + # Octokit.add_labels_to_an_issue("octokit/octokit.rb", 10, ['V3 Transition', 'Improvement']) + # @param repo [Integer, String, Repository, Hash] A Github repository + # @param number [Integer] Number ID of the issue + # @param labels [Array] An array of labels to apply to this Issue + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#126 + def add_labels_to_an_issue(repo, number, labels); end + + # Delete a label from a repository. + # + # This deletes the label from the repository, and removes it from all issues. + # + # @example Delete the label "Version 1.0" from the repository. + # Octokit.delete_label!("octokit/octokit.rb", "Version 1.0") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param label [String] String name of the label + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/labels/#delete-a-label + # + # source://octokit//lib/octokit/client/labels.rb#72 + def delete_label!(repo, label, options = T.unsafe(nil)); end + + # Get single label for a repository + # + # @example Get the "V3 Addition" label from octokit/octokit.rb + # Octokit.label("octokit/octokit.rb", "V3 Addition") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param name [String] Name of the label + # @return [Sawyer::Resource] A single label from the repository + # @see https://developer.github.com/v3/issues/labels/#get-a-single-label + # + # source://octokit//lib/octokit/client/labels.rb#30 + def label(repo, name, options = T.unsafe(nil)); end + + # List available labels for a repository + # + # @example List labels for octokit/octokit.rb + # Octokit.labels("octokit/octokit.rb") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of the labels across the repository + # @see https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository + # + # source://octokit//lib/octokit/client/labels.rb#18 + def labels(repo, options = T.unsafe(nil)); end + + # List labels for a given issue + # + # @example List labels for octokit/octokit.rb, issue # 1 + # Octokit.labels_for_issue("octokit/octokit.rb", 1) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#113 + def labels_for_issue(repo, number, options = T.unsafe(nil)); end + + # Get labels for every issue in a milestone + # + # @example List all labels for milestone #2 on octokit/octokit.rb + # Octokit.labels_for_milestone("octokit/octokit.rb", 2) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the milestone + # @return [Array] A list of the labels across the milestone + # @see http://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone + # + # source://octokit//lib/octokit/client/labels.rb#151 + def labels_for_milestone(repo, number, options = T.unsafe(nil)); end + + # Remove all label from an Issue + # + # This removes the label from the Issue + # + # @example Remove all labels from Issue #23 + # Octokit.remove_all_labels("octokit/octokit.rb", 23) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @return [Boolean] Success of operation + # @see https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#101 + def remove_all_labels(repo, number, options = T.unsafe(nil)); end + + # Remove a label from an Issue + # + # This removes the label from the Issue + # + # @example Remove the label "Version 1.0" from the repository. + # Octokit.remove_label("octokit/octokit.rb", 23, "Version 1.0") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param number [Integer] Number ID of the issue + # @param label [String] String name of the label + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#87 + def remove_label(repo, number, label, options = T.unsafe(nil)); end + + # Replace all labels on an Issue + # + # @example Replace labels for octokit/octokit.rb Issue #10 + # Octokit.replace_all_labels("octokit/octokit.rb", 10, ['V3 Transition', 'Improvement']) + # @param repo [Integer, String, Repository, Hash] A Github repository + # @param number [Integer] Number ID of the issue + # @param labels [Array] An array of labels to use as replacement + # @return [Array] A list of the labels currently on the issue + # @see https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue + # + # source://octokit//lib/octokit/client/labels.rb#139 + def replace_all_labels(repo, number, labels, _options = T.unsafe(nil)); end + + # Update a label + # + # @example Update the label "Version 1.0" with new color "#cceeaa" + # Octokit.update_label("octokit/octokit.rb", "Version 1.0", {:color => "cceeaa"}) + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param label [String] The name of the label which will be updated + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] The updated label + # @see https://developer.github.com/v3/issues/labels/#update-a-label + # + # source://octokit//lib/octokit/client/labels.rb#58 + def update_label(repo, label, options = T.unsafe(nil)); end +end + +# Methods for the Legacy Search API +# +# @see https://developer.github.com/v3/search/ +# +# source://octokit//lib/octokit/client/legacy_search.rb#8 +module Octokit::Client::LegacySearch + # Legacy search issues within a repository + # + # @example Search for 'test' in the open issues for sferik/rails_admin + # Octokit.search_issues("sferik/rails_admin", 'test', 'open') + # @param repo [String, Repository, Hash] A GitHub repository + # @param search_term [String] The term to search for + # @param state [String] :state (open) open or closed. + # @return [Array] A list of issues matching the search term and state + # + # source://octokit//lib/octokit/client/legacy_search.rb#26 + def legacy_search_issues(repo, search_term, state = T.unsafe(nil), options = T.unsafe(nil)); end + + # Legacy repository search + # + # @param q [String] Search keyword + # @return [Array] List of repositories found + # @see https://developer.github.com/v3/search/#search-repositories + # + # source://octokit//lib/octokit/client/legacy_search.rb#14 + def legacy_search_repositories(q, options = T.unsafe(nil)); end + + # Search for user. + # + # @example + # Octokit.search_users('pengwynn') + # @param search [String] User to search for. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/search/#search-users + # + # source://octokit//lib/octokit/client/legacy_search.rb#37 + def legacy_search_users(search, options = T.unsafe(nil)); end +end + +# source://octokit//lib/octokit/client/licenses.rb#7 +module Octokit::Client::Licenses + # source://octokit//lib/octokit/client/licenses.rb#25 + def license(license_name, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/licenses.rb#14 + def licenses(options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/client/licenses.rb#37 + def repository_license_contents(repo, options = T.unsafe(nil)); end +end + +# Methods for the Markdown API +# +# @see https://developer.github.com/v3/markdown/ +# +# source://octokit//lib/octokit/client/markdown.rb#8 +module Octokit::Client::Markdown + # Render an arbitrary Markdown document + # + # @example Render some GFM + # Octokit.markdown('Fixed in #111', :mode => "gfm", :context => "octokit/octokit.rb") + # @option options + # @option options + # @param text [String] Markdown source + # @param options [Hash] a customizable set of options + # @return [String] HTML renderization + # @see https://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document + # + # source://octokit//lib/octokit/client/markdown.rb#18 + def markdown(text, options = T.unsafe(nil)); end +end + +# Methods for the Marketplace Listing API +# +# @see https://developer.github.com/v3/apps/marketplace/ +# +# source://octokit//lib/octokit/client/marketplace.rb#8 +module Octokit::Client::Marketplace + # List all GitHub accounts on a specific plan + # + # @param plan_id [Integer] The id of the GitHub plan + # @param options [Hash] A customizable set of options + # @return [Array] A list of accounts + # @see https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan + # + # source://octokit//lib/octokit/client/marketplace.rb#28 + def list_accounts_for_plan(plan_id, options = T.unsafe(nil)); end + + # List all plans for an app's marketplace listing + # + # @param options [Hash] A customizable set of options + # @return [Array] A list of plans + # @see https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing + # + # source://octokit//lib/octokit/client/marketplace.rb#16 + def list_plans(options = T.unsafe(nil)); end + + # Get user's Marketplace purchases + # + # @param options [Hash] A customizable set of options + # @return [Array] A list of Marketplace purchases + # @see https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases + # + # source://octokit//lib/octokit/client/marketplace.rb#51 + def marketplace_purchases(options = T.unsafe(nil)); end + + # Get the plan associated with a given GitHub account + # + # @param account_id [Integer] The id of the GitHub account + # @param options [Hash] A customizable set of options + # @return [Sawyer::Resource] Account with plan details, or nil + # @see https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing + # + # source://octokit//lib/octokit/client/marketplace.rb#40 + def plan_for_account(account_id, options = T.unsafe(nil)); end +end + +# Methods for the Meta API +# +# @see https://developer.github.com/v3/meta/ +# +# source://octokit//lib/octokit/client/meta.rb#8 +module Octokit::Client::Meta + # Get meta information about GitHub.com, the service. + # + # @example Get GitHub meta information + # @client.github_meta + # @return [Sawyer::Resource] Hash with meta information. + # @see https://developer.github.com/v3/meta/#meta + # + # source://octokit//lib/octokit/client/meta.rb#14 + def github_meta(options = T.unsafe(nil)); end + + # Get meta information about GitHub.com, the service. + # + # @example Get GitHub meta information + # @client.github_meta + # @return [Sawyer::Resource] Hash with meta information. + # @see https://developer.github.com/v3/meta/#meta + # + # source://octokit//lib/octokit/client/meta.rb#14 + def meta(options = T.unsafe(nil)); end +end + +# Methods for the Issues Milestones API +# +# @see https://developer.github.com/v3/issues/milestones/ +# +# source://octokit//lib/octokit/client/milestones.rb#8 +module Octokit::Client::Milestones + # Create a milestone for a repository + # + # @example Create a milestone for a repository + # Octokit.create_milestone("octokit/octokit.rb", "0.7.0", {:description => 'Add support for v3 of Github API'}) + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param title [String] A unique title. + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone object + # @see https://developer.github.com/v3/issues/milestones/#create-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#51 + def create_milestone(repository, title, options = T.unsafe(nil)); end + + # Delete a single milestone for a repository + # + # @example Delete a single milestone from a repository + # Octokit.delete_milestone("octokit/octokit.rb", 1) + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Boolean] Success + # @see https://developer.github.com/v3/issues/milestones/#delete-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#82 + def delete_milestone(repository, number, options = T.unsafe(nil)); end + + # Update a milestone for a repository + # + # @example Update a milestone for a repository + # Octokit.update_milestone("octokit/octokit.rb", 1, {:description => 'Add support for v3 of Github API'}) + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param number [String, Integer] ID of the milestone + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone object + # @see https://developer.github.com/v3/issues/milestones/#update-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#68 + def edit_milestone(repository, number, options = T.unsafe(nil)); end + + # List milestones for a repository + # + # @example List milestones for a repository + # Octokit.list_milestones("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Array] A list of milestones for a repository. + # @see https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository + # + # source://octokit//lib/octokit/client/milestones.rb#21 + def list_milestones(repository, options = T.unsafe(nil)); end + + # Get a single milestone for a repository + # + # @example Get a single milestone for a repository + # Octokit.milestone("octokit/octokit.rb", 1) + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone from a repository. + # @see https://developer.github.com/v3/issues/milestones/#get-a-single-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#35 + def milestone(repository, number, options = T.unsafe(nil)); end + + # List milestones for a repository + # + # @example List milestones for a repository + # Octokit.list_milestones("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] A customizable set of options. + # @return [Array] A list of milestones for a repository. + # @see https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository + # + # source://octokit//lib/octokit/client/milestones.rb#21 + def milestones(repository, options = T.unsafe(nil)); end + + # Update a milestone for a repository + # + # @example Update a milestone for a repository + # Octokit.update_milestone("octokit/octokit.rb", 1, {:description => 'Add support for v3 of Github API'}) + # @option options + # @option options + # @option options + # @option options + # @param repository [Integer, String, Repository, Hash] A GitHub repository + # @param number [String, Integer] ID of the milestone + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] A single milestone object + # @see https://developer.github.com/v3/issues/milestones/#update-a-milestone + # + # source://octokit//lib/octokit/client/milestones.rb#68 + def update_milestone(repository, number, options = T.unsafe(nil)); end +end + +# Methods for the Notifications API +# +# @see https://developer.github.com/v3/activity/notifications/ +# +# source://octokit//lib/octokit/client/notifications.rb#8 +module Octokit::Client::Notifications + # Delete a thread subscription + # + # @example + # @client.delete_thread_subscription(1) + # @param thread_id [Integer] Id of the thread. + # @return [Boolean] True if delete successful, false otherwise. + # @see https://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription + # + # source://octokit//lib/octokit/client/notifications.rb#162 + def delete_thread_subscription(thread_id, options = T.unsafe(nil)); end + + # Mark notifications as read + # + # @example + # @client.mark_notifications_as_read + # @option options + # @option options + # @option options + # @param options [Hash] Optional parameters + # @return [Boolean] True if marked as read, false otherwise + # @see https://developer.github.com/v3/activity/notifications/#mark-as-read + # + # source://octokit//lib/octokit/client/notifications.rb#68 + def mark_notifications_as_read(options = T.unsafe(nil)); end + + # Mark notifications from a specific repository as read + # + # @example + # @client.mark_notifications_as_read("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Boolean] True if marked as read, false otherwise + # @see https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#89 + def mark_repo_notifications_as_read(repo, options = T.unsafe(nil)); end + + # Mark notifications from a specific repository as read + # + # @example + # @client.mark_notifications_as_read("octokit/octokit.rb") + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Boolean] True if marked as read, false otherwise + # @see https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#89 + def mark_repository_notifications_as_read(repo, options = T.unsafe(nil)); end + + # Mark thread as read + # + # @example + # @client.mark_thread_as_read(1, :read => false) + # @param thread_id [Integer] Id of the thread to update. + # @return [Boolean] True if updated, false otherwise. + # @see https://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read + # + # source://octokit//lib/octokit/client/notifications.rb#115 + def mark_thread_as_read(thread_id, options = T.unsafe(nil)); end + + # List your notifications + # + # @example Get users notifications + # @client.notifications + # @example Get all notifications since a certain time. + # @client.notifications({all: true, since: '2012-10-09T23:39:01Z'}) + # @option options + # @option options + # @option options + # @param options [Hash] Optional parameters + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#list-your-notifications + # + # source://octokit//lib/octokit/client/notifications.rb#26 + def notifications(options = T.unsafe(nil)); end + + # List your notifications in a repository + # + # @example Get your notifications for octokit/octokit.rb + # @client.repository_notifications('octokit/octokit.rb') + # @example Get your notifications for octokit/octokit.rb since a time. + # @client.repository_notifications({since: '2012-10-09T23:39:01Z'}) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#48 + def repo_notifications(repo, options = T.unsafe(nil)); end + + # List your notifications in a repository + # + # @example Get your notifications for octokit/octokit.rb + # @client.repository_notifications('octokit/octokit.rb') + # @example Get your notifications for octokit/octokit.rb since a time. + # @client.repository_notifications({since: '2012-10-09T23:39:01Z'}) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository + # + # source://octokit//lib/octokit/client/notifications.rb#48 + def repository_notifications(repo, options = T.unsafe(nil)); end + + # List notifications for a specific thread + # + # @example + # @client.notification_thread(1000) + # @param thread_id [Integer] Id of the thread. + # @return [Array] Array of notifications. + # @see https://developer.github.com/v3/activity/notifications/#view-a-single-thread + # + # source://octokit//lib/octokit/client/notifications.rb#104 + def thread_notifications(thread_id, options = T.unsafe(nil)); end + + # Get thread subscription + # + # @example + # @client.thread_subscription(1) + # @param thread_id [Integer] Id of the thread. + # @return [Sawyer::Resource] Subscription. + # @see https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription + # + # source://octokit//lib/octokit/client/notifications.rb#128 + def thread_subscription(thread_id, options = T.unsafe(nil)); end + + # Update thread subscription + # + # This lets you subscribe to a thread, or ignore it. Subscribing to a + # thread is unnecessary if the user is already subscribed to the + # repository. Ignoring a thread will mute all future notifications (until + # you comment or get @mentioned). + # + # @example Subscribe to notifications + # @client.update_thread_subscription(1, :subscribed => true) + # @example Ignore notifications from a repo + # @client.update_thread_subscription(1, :ignored => true) + # @option options + # @option options + # @param thread_id [Integer] Id of the thread. + # @param options + # @return [Sawyer::Resource] Updated subscription. + # @see https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription + # + # source://octokit//lib/octokit/client/notifications.rb#151 + def update_thread_subscription(thread_id, options = T.unsafe(nil)); end +end + +# Methods for the OauthApplications API +# +# @see https://developer.github.com/v3/apps/oauth_applications +# +# source://octokit//lib/octokit/client/oauth_applications.rb#8 +module Octokit::Client::OauthApplications + # Check if a token is valid. + # + # Applications can check if a token is valid without rate limits. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.check_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#check-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#21 + def check_application_authorization(access_token, options = T.unsafe(nil)); end + + # Check if a token is valid. + # + # Applications can check if a token is valid without rate limits. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.check_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#check-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#21 + def check_token(access_token, options = T.unsafe(nil)); end + + # Delete an app authorization + # + # OAuth application owners can revoke a grant for their OAuth application and a specific user. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_app_authorization('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#99 + def delete_app_authorization(access_token, options = T.unsafe(nil)); end + + # Delete an app token + # + # Applications can revoke (delete) a token + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#69 + def delete_app_token(access_token, options = T.unsafe(nil)); end + + # Delete an app token + # + # Applications can revoke (delete) a token + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#69 + def delete_application_authorization(access_token, options = T.unsafe(nil)); end + + # Reset a token + # + # Applications can reset a token without requiring a user to re-authorize. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.reset_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#reset-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#45 + def reset_application_authorization(access_token, options = T.unsafe(nil)); end + + # Reset a token + # + # Applications can reset a token without requiring a user to re-authorize. + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.reset_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Sawyer::Resource] A single authorization for the authenticated user + # @see https://developer.github.com/v3/apps/oauth_applications/#reset-a-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#45 + def reset_token(access_token, options = T.unsafe(nil)); end + + # Delete an app token + # + # Applications can revoke (delete) a token + # + # @example + # client = Octokit::Client.new(:client_id => 'abcdefg12345', :client_secret => 'secret') + # client.delete_token('deadbeef1234567890deadbeef987654321') + # @param access_token [String] 40 character GitHub OAuth access token + # @return [Boolean] Result + # @see https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-token + # + # source://octokit//lib/octokit/client/oauth_applications.rb#69 + def revoke_application_authorization(access_token, options = T.unsafe(nil)); end +end + +# Methods for the Git Data API +# +# @see https://developer.github.com/v3/git/ +# +# source://octokit//lib/octokit/client/objects.rb#8 +module Octokit::Client::Objects + # Get a single blob, fetching its content and encoding + # + # @example Fetch a blob and inspect its contents + # blob = Octokit.blob("octocat/Hello-World", "827efc6d56897b048c772eb4087f854f46256132") + # blob.encoding # => "utf-8" + # blob.content # => "Foo bar baz" + # @example Fetch a base64-encoded blob and inspect its contents + # require "base64" + # blob = Octokit.blob("octocat/Hello-World", "827efc6d56897b048c772eb4087f854f46256132") + # blob.encoding # => "base64" + # blob.content # => "Rm9vIGJhciBiYXo=" + # Base64.decode64(blob.content) # => "Foo bar baz" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param blob_sha [String] The SHA of the blob to fetch + # @return [Sawyer::Resource] A hash representing the fetched blob + # @see https://developer.github.com/v3/git/blobs/#get-a-blob + # + # source://octokit//lib/octokit/client/objects.rb#61 + def blob(repo, blob_sha, options = T.unsafe(nil)); end + + # Create a blob + # + # @example Create a blob containing foo bar baz + # Octokit.create_blob("octocat/Hello-World", "foo bar baz") + # @example Create a blob containing foo bar baz, encoded using base64 + # require "base64" + # Octokit.create_blob("octocat/Hello-World", Base64.encode64("foo bar baz"), "base64") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param content [String] Content of the blob + # @param encoding [String] The content's encoding. utf-8 and base64 are accepted. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it + # @return [String] The new blob's SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @see https://developer.github.com/v3/git/blobs/#create-a-blob + # + # source://octokit//lib/octokit/client/objects.rb#77 + def create_blob(repo, content, encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a tag + # + # Requires authenticated client. + # + # @example + # @client.create_tag( + # "octokit/octokit.rb", + # "v9000.0.0", + # "Version 9000\n", + # "f4cdf6eb734f32343ce3f27670c17b35f54fd82e", + # "commit", + # "Wynn Netherland", + # "wynn.netherland@gmail.com", + # "2012-06-03T17:03:11-07:00" + # ) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param tag [String] Tag string. + # @param message [String] Tag message. + # @param object_sha [String] SHA of the git object this is tagging. + # @param type [String] Type of the object we're tagging. Normally this is + # a `commit` but it can also be a `tree` or a `blob`. + # @param tagger_name [String] Name of the author of the tag. + # @param tagger_email [String] Email of the author of the tag. + # @param tagger_date [string] Timestamp of when this object was tagged. + # @return [Sawyer::Resource] Hash representing new tag. + # @see https://developer.github.com/v3/git/tags/#create-a-tag-object + # + # source://octokit//lib/octokit/client/objects.rb#125 + def create_tag(repo, tag, message, object_sha, type, tagger_name, tagger_email, tagger_date, options = T.unsafe(nil)); end + + # Create a tree + # + # Pass :base_tree => "827efc6..." in options to update an existing tree with new data. + # + # @example Create a tree containing one file + # tree = Octokit.create_tree("octocat/Hello-World", [ { :path => "file.rb", :mode => "100644", :type => "blob", :sha => "44b4fc6d56897b048c772eb4087f854f46256132" } ]) + # tree.sha # => "cd8274d15fa3ae2ab983129fb037999f264ba9a7" + # tree.tree.first.path # => "file.rb" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param tree [Array] An array of hashes representing a tree structure + # @return [Sawyer::Resource] A hash representing the new tree + # @see https://developer.github.com/v3/git/trees/#create-a-tree + # + # source://octokit//lib/octokit/client/objects.rb#40 + def create_tree(repo, tree, options = T.unsafe(nil)); end + + # Get a tag + # + # @example Fetch a tag + # Octokit.tag('octokit/octokit.rb', '23aad20633f4d2981b1c7209a800db3014774e96') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param tag_sha [String] The SHA of the tag to fetch. + # @return [Sawyer::Resource] Hash representing the tag. + # @see https://developer.github.com/v3/git/tags/#get-a-tag + # + # source://octokit//lib/octokit/client/objects.rb#95 + def tag(repo, tag_sha, options = T.unsafe(nil)); end + + # Get a single tree, fetching information about its root-level objects + # + # Pass :recursive => true in options to fetch information about all of the tree's objects, including those in subdirectories. + # + # @example Fetch a tree and inspect the path of one of its files + # tree = Octokit.tree("octocat/Hello-World", "9fb037999f264ba9a7fc6274d15fa3ae2ab98312") + # tree.tree.first.path # => "file.rb" + # @example Fetch a tree recursively + # tree = Octokit.tree("octocat/Hello-World", "fc6274d15fa3ae2ab983129fb037999f264ba9a7", :recursive => true) + # tree.tree.first.path # => "subdir/file.txt" + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param tree_sha [String] The SHA of the tree to fetch + # @return [Sawyer::Resource] A hash representing the fetched tree + # @see https://developer.github.com/v3/git/trees/#get-a-tree + # @see https://developer.github.com/v3/git/trees/#get-a-tree-recursively + # + # source://octokit//lib/octokit/client/objects.rb#24 + def tree(repo, tree_sha, options = T.unsafe(nil)); end +end + +# Methods for the Organizations API +# +# @see https://developer.github.com/v3/orgs/ +# +# source://octokit//lib/octokit/client/organizations.rb#8 +module Octokit::Client::Organizations + # Add team member + # + # Requires authenticated organization owner or member with team + # `admin` permission. + # + # @example + # @client.add_team_member(100000, 'pengwynn') + # @example + # # Opt-in to future behavior for this endpoint. Adds the member to the + # # team if they're already an org member. If not, the method will return + # # 422 and indicate the user should call the new Team Membership endpoint. + # @client.add_team_member \ + # 100000, + # 'pengwynn', + # :accept => "application/vnd.github.the-wasp-preview+json" + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of new team member. + # @return [Boolean] True on successful addition, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#add-team-member + # @see https://developer.github.com/changes/2014-08-05-team-memberships-api/ + # + # source://octokit//lib/octokit/client/organizations.rb#458 + def add_team_member(team_id, user, options = T.unsafe(nil)); end + + # Add or invite a user to a team + # + # @example Check if a user has a membership for a team + # @client.add_team_membership(1234, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to invite. + # @return [Sawyer::Resource] Hash of team membership info + # @see https://developer.github.com/v3/orgs/teams/#add-or-update-team-membership + # + # source://octokit//lib/octokit/client/organizations.rb#679 + def add_team_membership(team_id, user, options = T.unsafe(nil)); end + + # Add team repository + # + # This can also be used to update the permission of an existing team + # + # Requires authenticated user to be an owner of the organization that the + # team is associated with. Also, the repo must be owned by the + # organization, or a direct form of a repo owned by the organization. + # + # @example + # @client.add_team_repository(100000, 'github/developer.github.com') + # @example + # @client.add_team_repo(100000, 'github/developer.github.com') + # @example Add a team with admin permissions + # @client.add_team_repository(100000, 'github/developer.github.com', permission: 'admin') + # @option options + # @param team_id [Integer] Team id. + # @param repo [String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if successful, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#add-or-update-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#570 + def add_team_repo(team_id, repo, options = T.unsafe(nil)); end + + # Add team repository + # + # This can also be used to update the permission of an existing team + # + # Requires authenticated user to be an owner of the organization that the + # team is associated with. Also, the repo must be owned by the + # organization, or a direct form of a repo owned by the organization. + # + # @example + # @client.add_team_repository(100000, 'github/developer.github.com') + # @example + # @client.add_team_repo(100000, 'github/developer.github.com') + # @example Add a team with admin permissions + # @client.add_team_repository(100000, 'github/developer.github.com', permission: 'admin') + # @option options + # @param team_id [Integer] Team id. + # @param repo [String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if successful, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#add-or-update-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#570 + def add_team_repository(team_id, repo, options = T.unsafe(nil)); end + + # List all GitHub organizations + # + # This provides a list of every organization, in the order that they + # were created. + # + # Organization that you’ve seen. + # + # @option options + # @param options [Hash] Optional options. + # @return [Array] List of GitHub organizations. + # @see https://developer.github.com/v3/orgs/#list-all-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#116 + def all_organizations(options = T.unsafe(nil)); end + + # List all GitHub organizations + # + # This provides a list of every organization, in the order that they + # were created. + # + # Organization that you’ve seen. + # + # @option options + # @param options [Hash] Optional options. + # @return [Array] List of GitHub organizations. + # @see https://developer.github.com/v3/orgs/#list-all-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#116 + def all_orgs(options = T.unsafe(nil)); end + + # Get GitHub Actions billing for an organization + # + # Requires authenticated organization owner. + # + # @example + # @client.billing_actions('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing GitHub Actions billing for an organization. + # @see https://docs.github.com/en/rest/reference/billing#get-github-actions-billing-for-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#839 + def billing_actions(org); end + + # List child teams + # + # Requires authenticated organization member. + # + # @example + # @client.child_teams(100000, :accept => "application/vnd.github.hellcat-preview+json") + # @param team_id [Integer] Team id. + # @return [Sawyer::Resource] Hash representing team. + # @see https://developer.github.com/v3/orgs/teams/#list-child-teams + # + # source://octokit//lib/octokit/client/organizations.rb#384 + def child_teams(team_id, options = T.unsafe(nil)); end + + # Conceal a user's membership of an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.unpublicize_membership('github', 'pengwynn') + # @example + # @client.conceal_membership('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to unpublicize. + # @return [Boolean] True of unpublicization successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#conceal-a-users-membership + # + # source://octokit//lib/octokit/client/organizations.rb#640 + def conceal_membership(org, user, options = T.unsafe(nil)); end + + # Converts an organization member to an outside collaborator + # + # Requires authenticated organization members. + # + # @example + # @client.convert_to_outside_collaborator('github', 'lizzhale') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username to be removed as outside collaborator + # @return [Boolean] Return true if outside collaborator removed from organization, false otherwise. + # @see https://developer.github.com/v3/orgs/outside-collaborators/#convert-member-to-outside-collaborator + # + # source://octokit//lib/octokit/client/organizations.rb#284 + def convert_to_outside_collaborator(org, user, options = T.unsafe(nil)); end + + # Create team + # + # Requires authenticated organization owner. + # + # @example + # @client.create_team('github', { + # :name => 'Designers', + # :repo_names => ['github/dotfiles'] + # }) + # @option options + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing new team. + # @see https://developer.github.com/v3/orgs/teams/#create-team + # + # source://octokit//lib/octokit/client/organizations.rb#320 + def create_team(org, options = T.unsafe(nil)); end + + # Deletes a previous migration archive. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#delete-an-organization-migration-archive + # + # source://octokit//lib/octokit/client/organizations.rb#813 + def delete_migration_archive(org, id, options = T.unsafe(nil)); end + + # Delete an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.delete_organization("my-org") + # @example + # @client.delete_org("my-org") + # @param org [String, Integer] Organization login or ID. + # @return [Boolean] True if deletion successful, otherwise false. + # @see https://docs.github.com/rest/orgs/orgs#delete-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#64 + def delete_org(org); end + + # Delete an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.delete_organization("my-org") + # @example + # @client.delete_org("my-org") + # @param org [String, Integer] Organization login or ID. + # @return [Boolean] True if deletion successful, otherwise false. + # @see https://docs.github.com/rest/orgs/orgs#delete-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#64 + def delete_organization(org); end + + # Delete team + # + # Requires authenticated organization owner. + # + # @example + # @client.delete_team(100000) + # @param team_id [Integer] Team id. + # @return [Boolean] True if deletion successful, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#delete-team + # + # source://octokit//lib/octokit/client/organizations.rb#420 + def delete_team(team_id, options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenicated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def list_organizations(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenicated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def list_orgs(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Fetches the URL to a migration archive. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#download-an-organization-migration-archive + # + # source://octokit//lib/octokit/client/organizations.rb#799 + def migration_archive_url(org, id, options = T.unsafe(nil)); end + + # Fetches the status of a migration. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#get-an-organization-migration-status + # + # source://octokit//lib/octokit/client/organizations.rb#788 + def migration_status(org, id, options = T.unsafe(nil)); end + + # Lists the most recent migrations. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of migration resources. + # @see https://docs.github.com/en/rest/reference/migrations#list-organization-migrations + # + # source://octokit//lib/octokit/client/organizations.rb#777 + def migrations(org, options = T.unsafe(nil)); end + + # Get an organization + # + # @example + # Octokit.organization('github') + # @example + # Octokit.org('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#get-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#18 + def org(org, options = T.unsafe(nil)); end + + # List pending organization invitations + # + # Requires authenticated organization member. + # + # @example + # @client.organization_invitations('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing invitations. + # @see https://developer.github.com/v3/orgs/members/#list-pending-organization-invitations + # + # source://octokit//lib/octokit/client/organizations.rb#239 + def org_invitations(org, options = T.unsafe(nil)); end + + # Check if a user is a member of an organization. + # + # Use this to check if another user is a member of an organization that + # you are a member. If you are not in the organization you are checking, + # use .organization_public_member? instead. + # + # @example Check if a user is in your organization + # @client.organization_member?('your_organization', 'pengwynn') + # => false + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a member? + # @see https://developer.github.com/v3/orgs/members/#check-membership + # + # source://octokit//lib/octokit/client/organizations.rb#199 + def org_member?(org, user, options = T.unsafe(nil)); end + + # Get organization members + # + # Public members of the organization are returned by default. An + # authenticated client that is a member of the GitHub organization + # is required to get private members. + # + # @example + # Octokit.organization_members('github') + # @example + # Octokit.org_members('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#members-list + # + # source://octokit//lib/octokit/client/organizations.rb#160 + def org_members(org, options = T.unsafe(nil)); end + + # Get an organization membership + # + # @option options + # @param org [Integer, String] The GitHub Organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the organization membership. + # @see https://developer.github.com/v3/orgs/members/#get-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#get-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#711 + def org_membership(org, options = T.unsafe(nil)); end + + # List all organizations memberships for the authenticated user + # + # @return [Array] Array of organizations memberships. + # @see https://developer.github.com/v3/orgs/members/#list-your-organization-memberships + # + # source://octokit//lib/octokit/client/organizations.rb#699 + def org_memberships(options = T.unsafe(nil)); end + + # Check if a user is a public member of an organization. + # + # If you are checking for membership of a user of an organization that + # you are in, use .organization_member? instead. + # + # @example Check if a user is a hubbernaut + # @client.organization_public_member?('github', 'pengwynn') + # => true + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a public member? + # @see https://developer.github.com/v3/orgs/members/#check-public-membership + # + # source://octokit//lib/octokit/client/organizations.rb#224 + def org_public_member?(org, user, options = T.unsafe(nil)); end + + # Get organization public members + # + # Lists the public members of an organization + # + # @example + # Octokit.organization_public_members('github') + # @example + # Octokit.org_public_members('github') + # @param org [String] Organization GitHub username. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#public-members-list + # + # source://octokit//lib/octokit/client/organizations.rb#178 + def org_public_members(org, options = T.unsafe(nil)); end + + # List organization repositories + # + # Public repositories are available without authentication. Private repos + # require authenticated organization member. + # + # @example + # Octokit.organization_repositories('github') + # @example + # Octokit.org_repositories('github') + # @example + # Octokit.org_repos('github') + # @example + # @client.org_repos('github', {:type => 'private'}) + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to list repos. + # @param options [Hash] a customizable set of options + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-organization-repositories + # + # source://octokit//lib/octokit/client/organizations.rb#141 + def org_repos(org, options = T.unsafe(nil)); end + + # List organization repositories + # + # Public repositories are available without authentication. Private repos + # require authenticated organization member. + # + # @example + # Octokit.organization_repositories('github') + # @example + # Octokit.org_repositories('github') + # @example + # Octokit.org_repos('github') + # @example + # @client.org_repos('github', {:type => 'private'}) + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to list repos. + # @param options [Hash] a customizable set of options + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-organization-repositories + # + # source://octokit//lib/octokit/client/organizations.rb#141 + def org_repositories(org, options = T.unsafe(nil)); end + + # List teams + # + # Requires authenticated organization member. + # + # @example + # @client.organization_teams('github') + # @example + # @client.org_teams('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/orgs/teams/#list-teams + # + # source://octokit//lib/octokit/client/organizations.rb#299 + def org_teams(org, options = T.unsafe(nil)); end + + # Get an organization + # + # @example + # Octokit.organization('github') + # @example + # Octokit.org('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#get-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#18 + def organization(org, options = T.unsafe(nil)); end + + # Get organization audit log. + # + # Gets the audit log for an organization. + # + # To list oldest events first, specify asc. + # + # @example + # Octokit.organization_audit_log('github', {include: 'all', phrase: 'action:org.add_member created:>2022-08-29 user:octocat'}) + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to retrieve the audit log. + # @param options [Hash] a customizable set of options + # @return [Array] List of events + # @see https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/orgs#get-the-audit-log-for-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#859 + def organization_audit_log(org, options = T.unsafe(nil)); end + + # List pending organization invitations + # + # Requires authenticated organization member. + # + # @example + # @client.organization_invitations('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing invitations. + # @see https://developer.github.com/v3/orgs/members/#list-pending-organization-invitations + # + # source://octokit//lib/octokit/client/organizations.rb#239 + def organization_invitations(org, options = T.unsafe(nil)); end + + # Check if a user is a member of an organization. + # + # Use this to check if another user is a member of an organization that + # you are a member. If you are not in the organization you are checking, + # use .organization_public_member? instead. + # + # @example Check if a user is in your organization + # @client.organization_member?('your_organization', 'pengwynn') + # => false + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a member? + # @see https://developer.github.com/v3/orgs/members/#check-membership + # + # source://octokit//lib/octokit/client/organizations.rb#199 + def organization_member?(org, user, options = T.unsafe(nil)); end + + # Get organization members + # + # Public members of the organization are returned by default. An + # authenticated client that is a member of the GitHub organization + # is required to get private members. + # + # @example + # Octokit.organization_members('github') + # @example + # Octokit.org_members('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#members-list + # + # source://octokit//lib/octokit/client/organizations.rb#160 + def organization_members(org, options = T.unsafe(nil)); end + + # Get an organization membership + # + # @option options + # @param org [Integer, String] The GitHub Organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the organization membership. + # @see https://developer.github.com/v3/orgs/members/#get-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#get-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#711 + def organization_membership(org, options = T.unsafe(nil)); end + + # List all organizations memberships for the authenticated user + # + # @return [Array] Array of organizations memberships. + # @see https://developer.github.com/v3/orgs/members/#list-your-organization-memberships + # + # source://octokit//lib/octokit/client/organizations.rb#699 + def organization_memberships(options = T.unsafe(nil)); end + + # Check if a user is a public member of an organization. + # + # If you are checking for membership of a user of an organization that + # you are in, use .organization_member? instead. + # + # @example Check if a user is a hubbernaut + # @client.organization_public_member?('github', 'pengwynn') + # => true + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a public member? + # @see https://developer.github.com/v3/orgs/members/#check-public-membership + # + # source://octokit//lib/octokit/client/organizations.rb#224 + def organization_public_member?(org, user, options = T.unsafe(nil)); end + + # Get organization public members + # + # Lists the public members of an organization + # + # @example + # Octokit.organization_public_members('github') + # @example + # Octokit.org_public_members('github') + # @param org [String] Organization GitHub username. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/members/#public-members-list + # + # source://octokit//lib/octokit/client/organizations.rb#178 + def organization_public_members(org, options = T.unsafe(nil)); end + + # List organization repositories + # + # Public repositories are available without authentication. Private repos + # require authenticated organization member. + # + # @example + # Octokit.organization_repositories('github') + # @example + # Octokit.org_repositories('github') + # @example + # Octokit.org_repos('github') + # @example + # @client.org_repos('github', {:type => 'private'}) + # @option options + # @param org [String, Integer] Organization GitHub login or id for which + # to list repos. + # @param options [Hash] a customizable set of options + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-organization-repositories + # + # source://octokit//lib/octokit/client/organizations.rb#141 + def organization_repositories(org, options = T.unsafe(nil)); end + + # List teams + # + # Requires authenticated organization member. + # + # @example + # @client.organization_teams('github') + # @example + # @client.org_teams('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/orgs/teams/#list-teams + # + # source://octokit//lib/octokit/client/organizations.rb#299 + def organization_teams(org, options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenicated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def organizations(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get organizations for a user. + # + # Nonauthenticated calls to this method will return organizations that + # the user is a public member. + # + # Use an authenicated client to get both public and private organizations + # for a user. + # + # Calling this method on a `@client` will return that users organizations. + # Private organizations are included only if the `@client` is authenticated. + # + # @example + # Octokit.organizations('pengwynn') + # @example + # @client.organizations('pengwynn') + # @example + # Octokit.orgs('pengwynn') + # @example + # Octokit.list_organizations('pengwynn') + # @example + # Octokit.list_orgs('pengwynn') + # @example + # @client.organizations + # @param user [Integer, String] GitHub user login or id of the user to get + # list of organizations. + # @return [Array] Array of hashes representing organizations. + # @see https://developer.github.com/v3/orgs/#list-your-organizations + # @see https://developer.github.com/v3/orgs/#list-user-organizations + # + # source://octokit//lib/octokit/client/organizations.rb#97 + def orgs(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List outside collaborators for an organization + # + # Requires authenticated organization members. + # + # @example + # @client.outside_collaborators('github') + # @param org [String, Integer] Organization GitHub login or id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators + # + # source://octokit//lib/octokit/client/organizations.rb#254 + def outside_collaborators(org, options = T.unsafe(nil)); end + + # Publicize a user's membership of an organization + # + # Requires authenticated organization owner. + # + # @example + # @client.publicize_membership('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to publicize. + # @return [Boolean] True if publicization successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#publicize-a-users-membership + # + # source://octokit//lib/octokit/client/organizations.rb#624 + def publicize_membership(org, user, options = T.unsafe(nil)); end + + # Remove organization member + # + # Requires authenticated organization owner or member with team `admin` access. + # + # @example + # @client.remove_organization_member('github', 'pengwynn') + # @example + # @client.remove_org_member('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to remove. + # @return [Boolean] True if removal is successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#remove-a-member + # + # source://octokit//lib/octokit/client/organizations.rb#607 + def remove_org_member(org, user, options = T.unsafe(nil)); end + + # Remove an organization membership + # + # @param org [String, Integer] Organization GitHub login or id. + # @return [Boolean] Success + # @see https://developer.github.com/v3/orgs/members/#remove-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#747 + def remove_org_membership(org, options = T.unsafe(nil)); end + + # Remove organization member + # + # Requires authenticated organization owner or member with team `admin` access. + # + # @example + # @client.remove_organization_member('github', 'pengwynn') + # @example + # @client.remove_org_member('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to remove. + # @return [Boolean] True if removal is successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#remove-a-member + # + # source://octokit//lib/octokit/client/organizations.rb#607 + def remove_organization_member(org, user, options = T.unsafe(nil)); end + + # Remove an organization membership + # + # @param org [String, Integer] Organization GitHub login or id. + # @return [Boolean] Success + # @see https://developer.github.com/v3/orgs/members/#remove-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#747 + def remove_organization_membership(org, options = T.unsafe(nil)); end + + # Remove outside collaborator from an organization + # + # Requires authenticated organization members. + # + # @example + # @client.remove_outside_collaborator('github', 'lizzhale') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username to be removed as outside collaborator + # @return [Boolean] Return true if outside collaborator removed from organization, false otherwise. + # @see https://developer.github.com/v3/orgs/outside-collaborators/#remove-outside-collaborator + # + # source://octokit//lib/octokit/client/organizations.rb#269 + def remove_outside_collaborator(org, user, options = T.unsafe(nil)); end + + # Remove team member + # + # Requires authenticated organization owner or member with team + # `admin` permission. + # + # @example + # @client.remove_team_member(100000, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to boot. + # @return [Boolean] True if user removed, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#remove-team-member + # + # source://octokit//lib/octokit/client/organizations.rb#476 + def remove_team_member(team_id, user, options = T.unsafe(nil)); end + + # Remove team membership + # + # @example + # @client.remove_team_membership(100000, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to boot. + # @return [Boolean] True if user removed, false otherwise. + # @see https://developer.github.com/v3/orgs/teams/#remove-team-membership + # + # source://octokit//lib/octokit/client/organizations.rb#691 + def remove_team_membership(team_id, user, options = T.unsafe(nil)); end + + # Remove team repository + # + # Removes repository from team. Does not delete the repository. + # + # Requires authenticated organization owner. + # + # @example + # @client.remove_team_repository(100000, 'github/developer.github.com') + # @example + # @client.remove_team_repo(100000, 'github/developer.github.com') + # @param team_id [Integer] Team id. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] Return true if repo removed from team, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#remove-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#590 + def remove_team_repo(team_id, repo, _options = T.unsafe(nil)); end + + # Remove team repository + # + # Removes repository from team. Does not delete the repository. + # + # Requires authenticated organization owner. + # + # @example + # @client.remove_team_repository(100000, 'github/developer.github.com') + # @example + # @client.remove_team_repo(100000, 'github/developer.github.com') + # @param team_id [Integer] Team id. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] Return true if repo removed from team, false otherwise. + # @see Octokit::Repository + # @see https://developer.github.com/v3/orgs/teams/#remove-team-repository + # + # source://octokit//lib/octokit/client/organizations.rb#590 + def remove_team_repository(team_id, repo, _options = T.unsafe(nil)); end + + # Initiates the generation of a migration archive. + # + # Requires authenticated organization owner. + # + # @example + # @client.start_migration('github', ['github/dotfiles']) + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param repositories [Array] :repositories Repositories for the organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the new migration. + # @see https://docs.github.com/en/rest/reference/migrations#start-an-organization-migration + # + # source://octokit//lib/octokit/client/organizations.rb#765 + def start_migration(org, repositories, options = T.unsafe(nil)); end + + # Get team + # + # Requires authenticated organization member. + # + # @example + # @client.team(100000) + # @param team_id [Integer] Team id. + # @return [Sawyer::Resource] Hash representing team. + # @see https://developer.github.com/v3/orgs/teams/#get-team + # + # source://octokit//lib/octokit/client/organizations.rb#336 + def team(team_id, options = T.unsafe(nil)); end + + # Get team by name and org + # + # Requires authenticated organization member. + # + # @example + # @client.team_by_name("github", "justice-league") + # @param org [String, Integer] Organization GitHub login or id. + # @param team_slug [String] Team slug. + # @return [Sawyer::Resource] Hash representing team. + # @see https://developer.github.com/v3/teams/#get-team-by-name + # + # source://octokit//lib/octokit/client/organizations.rb#350 + def team_by_name(org, team_slug, options = T.unsafe(nil)); end + + # List pending team invitations + # + # Requires authenticated organization member. + # + # @example + # @client.team_invitations('github') + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing invitations. + # @see https://developer.github.com/v3/orgs/teams/#list-pending-team-invitations + # + # source://octokit//lib/octokit/client/organizations.rb#509 + def team_invitations(team_id, options = T.unsafe(nil)); end + + # Check if a user is a member of a team. + # + # Use this to check if another user is a member of a team that + # you are a member. + # + # @example Check if a user is in your team + # @client.team_member?(100000, 'pengwynn') + # => false + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to check. + # @return [Boolean] Is a member? + # @see https://developer.github.com/v3/orgs/teams/#get-team-member + # + # source://octokit//lib/octokit/client/organizations.rb#495 + def team_member?(team_id, user, options = T.unsafe(nil)); end + + # List team members + # + # Requires authenticated organization member. + # + # @example + # @client.team_members(100000) + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/orgs/teams/#list-team-members + # + # source://octokit//lib/octokit/client/organizations.rb#433 + def team_members(team_id, options = T.unsafe(nil)); end + + # Check if a user has a team membership. + # + # @example Check if a user has a membership for a team + # @client.team_membership(1234, 'pengwynn') + # @param team_id [Integer] Team id. + # @param user [String] GitHub username of the user to check. + # @return [Sawyer::Resource] Hash of team membership info + # @see https://developer.github.com/v3/orgs/teams/#get-team-membership + # + # source://octokit//lib/octokit/client/organizations.rb#664 + def team_membership(team_id, user, options = T.unsafe(nil)); end + + # Check team permissions for a repository + # + # Requires authenticated organization member. + # + # @example + # # Check whether the team has any permissions with the repository + # @client.team_permissions_for_repo("github", "justice-league", "octocat", "hello-world") + # @example + # # Get the full repository object including the permissions level and role for the team + # @client.team_permissions_for_repo("github", "justice-league", "octocat", "hello-world", :accept => 'application/vnd.github.v3.repository+json') + # @param org [String, Integer] Organization GitHub login or id. + # @param team_slug_or_id [String, Integer] Team slug or Team ID. + # @param owner [String] Owner name for the repository. + # @param repo [String] Name of the repo to check permissions against. + # @return [String, Sawyer::Resource] Depending on options it may be an empty string or a resource. + # @see https://docs.github.com/en/rest/teams/teams#check-team-permissions-for-a-repository + # + # source://octokit//lib/octokit/client/organizations.rb#371 + def team_permissions_for_repo(org, team_slug_or_id, owner, repo, options = T.unsafe(nil)); end + + # Check if a repo is managed by a specific team + # + # @example + # @client.team_repository?(8675309, 'octokit/octokit.rb') + # @example + # @client.team_repo?(8675309, 'octokit/octokit.rb') + # @param team_id [Integer] Team ID. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if managed by a team. False if not managed by + # the team OR the requesting user does not have authorization to access + # the team information. + # @see https://developer.github.com/v3/orgs/teams/#check-if-a-team-manages-a-repository + # + # source://octokit//lib/octokit/client/organizations.rb#541 + def team_repo?(team_id, repo, _options = T.unsafe(nil)); end + + # List team repositories + # + # Requires authenticated organization member. + # + # @example + # @client.team_repositories(100000) + # @example + # @client.team_repos(100000) + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing repositories. + # @see https://developer.github.com/v3/orgs/teams/#list-team-repos + # + # source://octokit//lib/octokit/client/organizations.rb#524 + def team_repos(team_id, options = T.unsafe(nil)); end + + # List team repositories + # + # Requires authenticated organization member. + # + # @example + # @client.team_repositories(100000) + # @example + # @client.team_repos(100000) + # @param team_id [Integer] Team id. + # @return [Array] Array of hashes representing repositories. + # @see https://developer.github.com/v3/orgs/teams/#list-team-repos + # + # source://octokit//lib/octokit/client/organizations.rb#524 + def team_repositories(team_id, options = T.unsafe(nil)); end + + # Check if a repo is managed by a specific team + # + # @example + # @client.team_repository?(8675309, 'octokit/octokit.rb') + # @example + # @client.team_repo?(8675309, 'octokit/octokit.rb') + # @param team_id [Integer] Team ID. + # @param repo [String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if managed by a team. False if not managed by + # the team OR the requesting user does not have authorization to access + # the team information. + # @see https://developer.github.com/v3/orgs/teams/#check-if-a-team-manages-a-repository + # + # source://octokit//lib/octokit/client/organizations.rb#541 + def team_repository?(team_id, repo, _options = T.unsafe(nil)); end + + # Unlock a previous migration archive. + # + # Requires authenticated organization owner. + # + # @param org [String, Integer] Organization GitHub login or id. + # @param id [Integer] ID number of the migration. + # @param repo [String] Name of the repository. + # @see https://docs.github.com/en/rest/reference/migrations#unlock-an-organization-repository + # + # source://octokit//lib/octokit/client/organizations.rb#825 + def unlock_repository(org, id, repo, options = T.unsafe(nil)); end + + # Conceal a user's membership of an organization. + # + # Requires authenticated organization owner. + # + # @example + # @client.unpublicize_membership('github', 'pengwynn') + # @example + # @client.conceal_membership('github', 'pengwynn') + # @param org [String, Integer] Organization GitHub login or id. + # @param user [String] GitHub username of user to unpublicize. + # @return [Boolean] True of unpublicization successful, false otherwise. + # @see https://developer.github.com/v3/orgs/members/#conceal-a-users-membership + # + # source://octokit//lib/octokit/client/organizations.rb#640 + def unpublicize_membership(org, user, options = T.unsafe(nil)); end + + # Update an organization. + # + # Requires authenticated client with proper organization permissions. + # + # @example + # @client.update_organization('github', { + # :billing_email => 'support@github.com', + # :company => 'GitHub', + # :email => 'support@github.com', + # :location => 'San Francisco', + # :name => 'github' + # }) + # @example + # @client.update_org('github', {:company => 'Unicorns, Inc.'}) + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @param org [String, Integer] Organization GitHub login or id. + # @param values [Hash] The updated organization attributes. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#edit-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#48 + def update_org(org, values, options = T.unsafe(nil)); end + + # Edit an organization membership + # + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the updated organization membership. + # @see https://developer.github.com/v3/orgs/members/#edit-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#730 + def update_org_membership(org, options = T.unsafe(nil)); end + + # Update an organization. + # + # Requires authenticated client with proper organization permissions. + # + # @example + # @client.update_organization('github', { + # :billing_email => 'support@github.com', + # :company => 'GitHub', + # :email => 'support@github.com', + # :location => 'San Francisco', + # :name => 'github' + # }) + # @example + # @client.update_org('github', {:company => 'Unicorns, Inc.'}) + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @option values + # @param org [String, Integer] Organization GitHub login or id. + # @param values [Hash] The updated organization attributes. + # @return [Sawyer::Resource] Hash representing GitHub organization. + # @see https://developer.github.com/v3/orgs/#edit-an-organization + # + # source://octokit//lib/octokit/client/organizations.rb#48 + def update_organization(org, values, options = T.unsafe(nil)); end + + # Edit an organization membership + # + # @option options + # @option options + # @option options + # @param org [String, Integer] Organization GitHub login or id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the updated organization membership. + # @see https://developer.github.com/v3/orgs/members/#edit-your-organization-membership + # @see https://developer.github.com/v3/orgs/members/#add-or-update-organization-membership + # + # source://octokit//lib/octokit/client/organizations.rb#730 + def update_organization_membership(org, options = T.unsafe(nil)); end + + # Update team + # + # Requires authenticated organization owner. + # + # @example + # @client.update_team(100000, { + # :name => 'Front-end Designers', + # :permission => 'push' + # }) + # @option options + # @option options + # @option options + # @param team_id [Integer] Team id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing updated team. + # @see https://developer.github.com/v3/orgs/teams/#edit-team + # + # source://octokit//lib/octokit/client/organizations.rb#407 + def update_team(team_id, options = T.unsafe(nil)); end + + # List all teams for the authenticated user across all their orgs + # + # @return [Array] Array of team resources. + # @see https://developer.github.com/v3/orgs/teams/#list-user-teams + # + # source://octokit//lib/octokit/client/organizations.rb#649 + def user_teams(options = T.unsafe(nil)); end +end + +# Methods for the Pages API +# +# @see https://developer.github.com/v3/repos/pages/ +# +# source://octokit//lib/octokit/client/pages.rb#8 +module Octokit::Client::Pages + # List the latest Pages build information for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return Sawyer::Resource A GitHub Pages resource about a build + # @see https://developer.github.com/v3/repos/pages/#list-latest-pages-build + # + # source://octokit//lib/octokit/client/pages.rb#45 + def latest_pages_build(repo, options = T.unsafe(nil)); end + + # List Pages builds for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of build history for a repository. + # @see https://developer.github.com/v3/repos/pages/#list-pages-builds + # + # source://octokit//lib/octokit/client/pages.rb#35 + def list_pages_builds(repo, options = T.unsafe(nil)); end + + # List Pages information for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return Sawyer::Resource A GitHub Pages resource + # @see https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site + # + # source://octokit//lib/octokit/client/pages.rb#14 + def pages(repo, options = T.unsafe(nil)); end + + # Get a specific Pages build by ID + # + # @example + # Octokit.pages_build("github/developer.github.com", 5472601) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param id [Integer, String] Build ID + # @return [Sawyer::Resource] Pages build information + # @see https://developer.github.com/v3/repos/pages/#list-a-specific-pages-build + # + # source://octokit//lib/octokit/client/pages.rb#26 + def pages_build(repo, id, options = T.unsafe(nil)); end + + # List Pages builds for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of build history for a repository. + # @see https://developer.github.com/v3/repos/pages/#list-pages-builds + # + # source://octokit//lib/octokit/client/pages.rb#35 + def pages_builds(repo, options = T.unsafe(nil)); end + + # Request a page build for the latest revision of the default branch + # + # You can only request builds for your repositories + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] Request result + # @see https://developer.github.com/v3/repos/pages/#request-a-page-build + # + # source://octokit//lib/octokit/client/pages.rb#56 + def request_page_build(repo, options = T.unsafe(nil)); end +end + +# Methods for Projects API +# +# @see https://docs.github.com/en/rest/projects +# +# source://octokit//lib/octokit/client/projects.rb#8 +module Octokit::Client::Projects + # List columns cards + # + # Requires authenticated client + # + # @example + # @client.column_cards(30294) + # @param id [Integer] Project column id + # @return [Array] Cards in the column + # @see https://developer.github.com/v3/projects/cards/#list-project-cards + # + # source://octokit//lib/octokit/client/projects.rb#204 + def column_cards(id, options = T.unsafe(nil)); end + + # Create organization project + # + # Requires authenticated client + # + # @example Create with only a name + # @client.create_org_project("octocat", "make more octocats") + # @example Create a project with name and body + # @client.create_org_project("octokit", "octocan", body: 'Improve clients') + # @option options + # @param org [String] A GitHub organization + # @param name [String] Project name + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Organization project + # @see https://developer.github.com/v3/projects/#create-an-organization-project + # + # source://octokit//lib/octokit/client/projects.rb#68 + def create_org_project(org, name, options = T.unsafe(nil)); end + + # Create organization project + # + # Requires authenticated client + # + # @example Create with only a name + # @client.create_org_project("octocat", "make more octocats") + # @example Create a project with name and body + # @client.create_org_project("octokit", "octocan", body: 'Improve clients') + # @option options + # @param org [String] A GitHub organization + # @param name [String] Project name + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Organization project + # @see https://developer.github.com/v3/projects/#create-an-organization-project + # + # source://octokit//lib/octokit/client/projects.rb#68 + def create_organization_project(org, name, options = T.unsafe(nil)); end + + # Create a project + # + # Requires authenticated client + # + # @example Create project with only a name + # @client.create_project('octokit/octokit.rb', 'implement new APIs') + # @example Create project with name and body + # @client.create_project('octokit/octokit.rb', 'bugs be gone', body: 'Fix all the bugs @joeyw creates') + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param name [String] Project name + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Fresh new project + # @see https://developer.github.com/v3/projects/#create-a-repository-project + # + # source://octokit//lib/octokit/client/projects.rb#36 + def create_project(repo, name, options = T.unsafe(nil)); end + + # Create project card + # + # Requires authenticated client + # + # @example Create a project card with a note + # @client.create_project_card(123495, note: 'New note card') + # @example Create a project card for an repository issue + # @client.create_project_card(123495, content_id: 1, content_type: 'Issue') + # @note If :note is supplied, :content_id and :content_type must be + # excluded. Similarly, if :content_id is supplied, :content_type must + # be set and :note must not be included. + # @option options + # @option options + # @option options + # @param id [Integer] Project column id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Newly created card + # @see https://developer.github.com/v3/projects/cards/#create-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#226 + def create_project_card(id, options = T.unsafe(nil)); end + + # Create a project column + # + # Requires authenticated client + # + # @example + # @client.create_project_column(123942, "To Dones") + # @param id [Integer] Project column id + # @param name [String] New column name + # @return [Sawyer::Resource] Newly created column + # @see https://developer.github.com/v3/projects/columns/#create-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#134 + def create_project_column(id, name, options = T.unsafe(nil)); end + + # Delete a project + # + # Requires authenticated client + # + # @example + # @client.delete_project(123942) + # @param id [Integer] Project id + # @return [Boolean] Result of deletion + # @see https://developer.github.com/v3/projects/#delete-a-project + # + # source://octokit//lib/octokit/client/projects.rb#109 + def delete_project(id, options = T.unsafe(nil)); end + + # Delete a project card + # + # Requires authenticated client + # + # @example + # @client.delete_project_card(123495) + # @param id [Integer] Project card id + # @return [Boolean] True of deleted, false otherwise + # @see https://developer.github.com/v3/projects/cards/#delete-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#289 + def delete_project_card(id, options = T.unsafe(nil)); end + + # Delete a project column + # + # Requires authenticated client + # + # @example + # @client.delete_project_column(30294) + # @param id [Integer] Project column id + # @return [Boolean] Result of deletion request, true when deleted + # @see https://developer.github.com/v3/projects/columns/#delete-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#174 + def delete_project_column(id, options = T.unsafe(nil)); end + + # Move a project card + # + # Requires authenticated client + # + # @example Move a card to the bottom of the same column + # @client.move_project_card(123495, 'bottom') + # @example Move a card to the top of another column + # @client.move_project_card(123495, 'top', column_id: 59402) + # @option options + # @param id [Integer] Project card id + # @param position [String] Can be one of top, bottom, + # or after:, where is the id value of a + # card in the same column, or in the new column specified by column_id. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Empty sawyer resource + # @see https://developer.github.com/v3/projects/cards/#move-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#275 + def move_project_card(id, position, options = T.unsafe(nil)); end + + # Move a project column + # + # Requires authenticated client + # + # @example + # @client.move_project_column(30294, "last") + # @param id [Integer] Project column id + # @param position [String] New position for the column. Can be one of + # first, last, or after:, where + # is the id value of a column in the same project. + # @return [Sawyer::Resource] Result + # @see https://developer.github.com/v3/projects/columns/#move-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#190 + def move_project_column(id, position, options = T.unsafe(nil)); end + + # List organization projects + # + # Requires authenticated client + # + # @example + # @client.org_projects("octokit") + # @param org [String] A GitHub organization + # @return [Array] Organization projects + # @see https://developer.github.com/v3/projects/#list-organization-projects + # + # source://octokit//lib/octokit/client/projects.rb#50 + def org_projects(org, options = T.unsafe(nil)); end + + # List organization projects + # + # Requires authenticated client + # + # @example + # @client.org_projects("octokit") + # @param org [String] A GitHub organization + # @return [Array] Organization projects + # @see https://developer.github.com/v3/projects/#list-organization-projects + # + # source://octokit//lib/octokit/client/projects.rb#50 + def organization_projects(org, options = T.unsafe(nil)); end + + # Get a project by id + # + # @example + # Octokit.project(123942) + # @param id [Integer] Project id + # @return [Sawyer::Resource] Project + # @see https://developer.github.com/v3/projects/#get-a-project + # + # source://octokit//lib/octokit/client/projects.rb#81 + def project(id, options = T.unsafe(nil)); end + + # Get a project card + # + # Requires authenticated client + # + # @example + # @client.project_card(123495) + # @param id [Integer] Project card id + # @return [Sawyer::Resource] Project card + # @see https://developer.github.com/v3/projects/cards/#get-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#239 + def project_card(id, options = T.unsafe(nil)); end + + # Get a project column by ID + # + # @example + # Octokit.project_column(30294) + # @param id [Integer] Project column id + # @return [Sawyer::Resource] Project column + # @see https://developer.github.com/v3/projects/columns/#get-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#146 + def project_column(id, options = T.unsafe(nil)); end + + # List project columns + # + # @example + # @client.project_columns(123942) + # @param id [Integer] Project id + # @return [Array] List of project columns + # @see https://developer.github.com/v3/projects/columns/#list-project-columns + # + # source://octokit//lib/octokit/client/projects.rb#120 + def project_columns(id, options = T.unsafe(nil)); end + + # List projects for a repository + # + # Requires authenticated client + # + # @example + # @client.projects('octokit/octokit.rb') + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] Repository projects + # @see https://developer.github.com/v3/projects/#list-repository-projects + # + # source://octokit//lib/octokit/client/projects.rb#18 + def projects(repo, options = T.unsafe(nil)); end + + # Update a project + # + # Requires authenticated client + # + # @example Update project name + # @client.update_project(123942, name: 'New name') + # @option options + # @option options + # @param id [Integer] Project id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Project + # @see https://developer.github.com/v3/projects/#update-a-project + # + # source://octokit//lib/octokit/client/projects.rb#96 + def update_project(id, options = T.unsafe(nil)); end + + # Update a project card + # + # Requires authenticated client + # + # @example + # @client.update_project_card(12345, note: 'new note') + # @option options + # @param id [Integer] Project card id + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Updated project card + # @see https://developer.github.com/v3/projects/cards/#update-a-project-card + # + # source://octokit//lib/octokit/client/projects.rb#255 + def update_project_card(id, options = T.unsafe(nil)); end + + # Update a project column + # + # Requires authenticated client + # + # @example + # @client.update_project_column(30294, "new column name") + # @param id [Integer] Project column id + # @param name [String] New column name + # @return [Sawyer::Resource] Updated column + # @see https://developer.github.com/v3/projects/columns/#update-a-project-column + # + # source://octokit//lib/octokit/client/projects.rb#160 + def update_project_column(id, name, options = T.unsafe(nil)); end +end + +# Methods for the PubSubHubbub API +# +# @see https://developer.github.com/v3/repos/hooks/#pubsubhubbub +# +# source://octokit//lib/octokit/client/pub_sub_hubbub.rb#8 +module Octokit::Client::PubSubHubbub + # Subscribe to a pubsub topic + # + # @example Subscribe to push events from one of your repositories, having an email sent when fired + # client = Octokit::Client.new(:oauth_token = "token") + # client.subscribe("https://github.com/joshk/devise_imapable/events/push", "github://Email?address=josh.kalderimis@gmail.com") + # @param topic [String] A recoginized and supported pubsub topic + # @param callback [String] A callback url to be posted to when the topic event is fired + # @param secret [String] An optional shared secret used to generate a SHA1 HMAC of the outgoing body content + # @return [Boolean] true if the subscribe was successful, otherwise an error is raised + # @see https://developer.github.com/v3/repos/hooks/#subscribing + # + # source://octokit//lib/octokit/client/pub_sub_hubbub.rb#19 + def subscribe(topic, callback, secret = T.unsafe(nil)); end + + # Subscribe to a repository through pubsub + # + # @example Subscribe to push events to one of your repositories to Travis-CI + # client = Octokit::Client.new(:oauth_token = "token") + # client.subscribe_service_hook('joshk/device_imapable', 'Travis', { :token => "test", :domain => "domain", :user => "user" }) + # @param repo [String, Repository, Hash] A GitHub repository + # @param service_name [String] service name owner + # @param service_arguments [Hash] params that will be passed by subscribed hook. + # List of services is available @ https://github.com/github/github-services/tree/master/docs. + # Please refer Data node for complete list of arguments. + # @param secret [String] An optional shared secret used to generate a SHA1 HMAC of the outgoing body content + # @return [Boolean] True if subscription successful, false otherwise + # @see https://developer.github.com/v3/repos/hooks/#subscribing + # + # source://octokit//lib/octokit/client/pub_sub_hubbub.rb#65 + def subscribe_service_hook(repo, service_name, service_arguments = T.unsafe(nil), secret = T.unsafe(nil)); end + + # Unsubscribe from a pubsub topic + # + # @example Unsubscribe to push events from one of your repositories, no longer having an email sent when fired + # client = Octokit::Client.new(:oauth_token = "token") + # client.unsubscribe("https://github.com/joshk/devise_imapable/events/push", "github://Email?address=josh.kalderimis@gmail.com") + # @param topic [String] A recoginized pubsub topic + # @param callback [String] A callback url to be unsubscribed from + # @return [Boolean] true if the unsubscribe was successful, otherwise an error is raised + # @see https://developer.github.com/v3/repos/hooks/#subscribing + # + # source://octokit//lib/octokit/client/pub_sub_hubbub.rb#41 + def unsubscribe(topic, callback); end + + # Unsubscribe repository through pubsub + # + # @example Subscribe to push events to one of your repositories to Travis-CI + # client = Octokit::Client.new(:oauth_token = "token") + # client.unsubscribe_service_hook('joshk/device_imapable', 'Travis') + # @param repo [String, Repository, Hash] A GitHub repository + # @param service_name [String] service name owner + # List of services is available @ https://github.com/github/github-services/tree/master/docs. + # @see https://developer.github.com/v3/repos/hooks/#subscribing + # + # source://octokit//lib/octokit/client/pub_sub_hubbub.rb#80 + def unsubscribe_service_hook(repo, service_name); end + + private + + # source://octokit//lib/octokit/client/pub_sub_hubbub.rb#88 + def pub_sub_hubbub_request(options = T.unsafe(nil)); end +end + +# Methods for the Pull Requests API +# +# @see https://developer.github.com/v3/pulls/ +# +# source://octokit//lib/octokit/client/pull_requests.rb#8 +module Octokit::Client::PullRequests + # Close a pull request + # + # @example + # @client.close_pull_request('octokit/octokit.rb', 67) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param number [Integer] Number of pull request to update. + # @return [Sawyer::Resource] Hash representing updated pull request. + # @see https://developer.github.com/v3/pulls/#update-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#119 + def close_pull_request(repo, number, options = T.unsafe(nil)); end + + # Create a pull request comment + # + # @example + # @client.create_pull_request_comment("octokit/octokit.rb", 163, ":shipit:", + # "2d3201e4440903d8b04a5487842053ca4883e5f0", "lib/octokit/request.rb", 47) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment content + # @param commit_id [String] Sha of the commit to comment on. + # @param path [String] Relative path of the file to comment on. + # @param position [Integer] Line index in the diff to comment on. + # @return [Sawyer::Resource] Hash representing the new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#206 + def create_pull_comment(repo, pull_id, body, commit_id, path, position, options = T.unsafe(nil)); end + + # Create reply to a pull request comment + # + # @example + # @client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment contents + # @param comment_id [Integer] Comment id to reply to + # @return [Sawyer::Resource] Hash representing new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#228 + def create_pull_reply(repo, pull_id, body, comment_id, options = T.unsafe(nil)); end + + # Create a pull request + # + # @example + # @client.create_pull_request("octokit/octokit.rb", "master", "feature-branch", + # "Pull Request title", "Pull Request body") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param base [String] The branch (or git ref) you want your changes + # pulled into. This should be an existing branch on the current + # repository. You cannot submit a pull request to one repo that requests + # a merge to a base of another repo. + # @param head [String] The branch (or git ref) where your changes are implemented. + # @param title [String] Title for the pull request + # @param body [String] The body for the pull request (optional). Supports GFM. + # @return [Sawyer::Resource] The newly created pull request + # @see https://developer.github.com/v3/pulls/#create-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#52 + def create_pull_request(repo, base, head, title, body = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a pull request comment + # + # @example + # @client.create_pull_request_comment("octokit/octokit.rb", 163, ":shipit:", + # "2d3201e4440903d8b04a5487842053ca4883e5f0", "lib/octokit/request.rb", 47) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment content + # @param commit_id [String] Sha of the commit to comment on. + # @param path [String] Relative path of the file to comment on. + # @param position [Integer] Line index in the diff to comment on. + # @return [Sawyer::Resource] Hash representing the new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#206 + def create_pull_request_comment(repo, pull_id, body, commit_id, path, position, options = T.unsafe(nil)); end + + # Create reply to a pull request comment + # + # @example + # @client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment contents + # @param comment_id [Integer] Comment id to reply to + # @return [Sawyer::Resource] Hash representing new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#228 + def create_pull_request_comment_reply(repo, pull_id, body, comment_id, options = T.unsafe(nil)); end + + # Create a pull request from existing issue + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param base [String] The branch (or git ref) you want your changes + # pulled into. This should be an existing branch on the current + # repository. You cannot submit a pull request to one repo that requests + # a merge to a base of another repo. + # @param head [String] The branch (or git ref) where your changes are implemented. + # @param issue [Integer] Number of Issue on which to base this pull request + # @return [Sawyer::Resource] The newly created pull request + # @see https://developer.github.com/v3/pulls/#alternative-input + # + # source://octokit//lib/octokit/client/pull_requests.rb#73 + def create_pull_request_for_issue(repo, base, head, issue, options = T.unsafe(nil)); end + + # Create reply to a pull request comment + # + # @example + # @client.create_pull_request_comment_reply("octokit/octokit.rb", 163, "done.", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment contents + # @param comment_id [Integer] Comment id to reply to + # @return [Sawyer::Resource] Hash representing new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#228 + def create_review_reply(repo, pull_id, body, comment_id, options = T.unsafe(nil)); end + + # Create a pull request comment + # + # @example + # @client.create_pull_request_comment("octokit/octokit.rb", 163, ":shipit:", + # "2d3201e4440903d8b04a5487842053ca4883e5f0", "lib/octokit/request.rb", 47) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param pull_id [Integer] Pull request id + # @param body [String] Comment content + # @param commit_id [String] Sha of the commit to comment on. + # @param path [String] Relative path of the file to comment on. + # @param position [Integer] Line index in the diff to comment on. + # @return [Sawyer::Resource] Hash representing the new comment + # @see https://developer.github.com/v3/pulls/comments/#create-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#206 + def create_view_comment(repo, pull_id, body, commit_id, path, position, options = T.unsafe(nil)); end + + # Delete pull request comment + # + # @example + # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to delete + # @return [Boolean] True if deleted, false otherwise + # @see https://developer.github.com/v3/pulls/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#262 + def delete_pull_comment(repo, comment_id, options = T.unsafe(nil)); end + + # Delete pull request comment + # + # @example + # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to delete + # @return [Boolean] True if deleted, false otherwise + # @see https://developer.github.com/v3/pulls/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#262 + def delete_pull_request_comment(repo, comment_id, options = T.unsafe(nil)); end + + # Delete pull request comment + # + # @example + # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to delete + # @return [Boolean] True if deleted, false otherwise + # @see https://developer.github.com/v3/pulls/comments/#delete-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#262 + def delete_review_comment(repo, comment_id, options = T.unsafe(nil)); end + + # Merge a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @param commit_message [String] Optional commit message for the merge commit + # @return [Array] Merge commit info if successful + # @see https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button + # + # source://octokit//lib/octokit/client/pull_requests.rb#297 + def merge_pull_request(repo, number, commit_message = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get a pull request + # + # @example + # Octokit.pull_request('rails/rails', 42, :state => 'closed') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of the pull request to fetch + # @return [Sawyer::Resource] Pull request info + # @see https://developer.github.com/v3/pulls/#get-a-single-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#32 + def pull(repo, number, options = T.unsafe(nil)); end + + # Get a pull request comment + # + # @example + # @client.pull_request_comment("pengwynn/octkit", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of comment to get + # @return [Sawyer::Resource] Hash representing the comment + # @see https://developer.github.com/v3/pulls/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#187 + def pull_comment(repo, comment_id, options = T.unsafe(nil)); end + + # List comments on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of comments + # @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#172 + def pull_comments(repo, number, options = T.unsafe(nil)); end + + # List commits on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of commits + # @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#130 + def pull_commits(repo, number, options = T.unsafe(nil)); end + + # List files on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of files + # @see https://developer.github.com/v3/pulls/#list-pull-requests-files + # + # source://octokit//lib/octokit/client/pull_requests.rb#274 + def pull_files(repo, number, options = T.unsafe(nil)); end + + # Check pull request merge status + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Boolean] True if the pull request has been merged + # @see https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged + # + # source://octokit//lib/octokit/client/pull_requests.rb#307 + def pull_merged?(repo, number, options = T.unsafe(nil)); end + + # Get a pull request + # + # @example + # Octokit.pull_request('rails/rails', 42, :state => 'closed') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of the pull request to fetch + # @return [Sawyer::Resource] Pull request info + # @see https://developer.github.com/v3/pulls/#get-a-single-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#32 + def pull_request(repo, number, options = T.unsafe(nil)); end + + # Get a pull request comment + # + # @example + # @client.pull_request_comment("pengwynn/octkit", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of comment to get + # @return [Sawyer::Resource] Hash representing the comment + # @see https://developer.github.com/v3/pulls/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#187 + def pull_request_comment(repo, comment_id, options = T.unsafe(nil)); end + + # List comments on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of comments + # @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#172 + def pull_request_comments(repo, number, options = T.unsafe(nil)); end + + # List commits on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of commits + # @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#130 + def pull_request_commits(repo, number, options = T.unsafe(nil)); end + + # List files on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of files + # @see https://developer.github.com/v3/pulls/#list-pull-requests-files + # + # source://octokit//lib/octokit/client/pull_requests.rb#274 + def pull_request_files(repo, number, options = T.unsafe(nil)); end + + # Check pull request merge status + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Boolean] True if the pull request has been merged + # @see https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged + # + # source://octokit//lib/octokit/client/pull_requests.rb#307 + def pull_request_merged?(repo, number, options = T.unsafe(nil)); end + + # List pull requests for a repository + # + # @example + # Octokit.pull_requests('rails/rails', :state => 'closed') + # @overload pull_requests + # @return [Array] Array of pulls + # @see https://developer.github.com/v3/pulls/#list-pull-requests + # + # source://octokit//lib/octokit/client/pull_requests.rb#19 + def pull_requests(repo, options = T.unsafe(nil)); end + + # List pull request comments for a repository + # + # By default, Review Comments are ordered by ascending ID. + # + # @example Get the pull request review comments in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @example Get review comments, sort by updated asc since a time + # @client.pull_requests_comments("octokit/octokit.rb", { + # :sort => 'updated', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of pull request review comments. + # @see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/pull_requests.rb#160 + def pull_requests_comments(repo, options = T.unsafe(nil)); end + + # List pull requests for a repository + # + # @example + # Octokit.pull_requests('rails/rails', :state => 'closed') + # @overload pull_requests + # @return [Array] Array of pulls + # @see https://developer.github.com/v3/pulls/#list-pull-requests + # + # source://octokit//lib/octokit/client/pull_requests.rb#19 + def pulls(repo, options = T.unsafe(nil)); end + + # List pull request comments for a repository + # + # By default, Review Comments are ordered by ascending ID. + # + # @example Get the pull request review comments in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @example Get review comments, sort by updated asc since a time + # @client.pull_requests_comments("octokit/octokit.rb", { + # :sort => 'updated', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of pull request review comments. + # @see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/pull_requests.rb#160 + def pulls_comments(repo, options = T.unsafe(nil)); end + + # Get a pull request comment + # + # @example + # @client.pull_request_comment("pengwynn/octkit", 1903950) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of comment to get + # @return [Sawyer::Resource] Hash representing the comment + # @see https://developer.github.com/v3/pulls/comments/#get-a-single-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#187 + def review_comment(repo, comment_id, options = T.unsafe(nil)); end + + # List comments on a pull request + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @return [Array] List of comments + # @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#172 + def review_comments(repo, number, options = T.unsafe(nil)); end + + # List pull request comments for a repository + # + # By default, Review Comments are ordered by ascending ID. + # + # @example Get the pull request review comments in the octokit repository + # @client.issues_comments("octokit/octokit.rb") + # @example Get review comments, sort by updated asc since a time + # @client.pull_requests_comments("octokit/octokit.rb", { + # :sort => 'updated', + # :direction => 'asc', + # :since => '2010-05-04T23:45:02Z' + # }) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param options [Hash] Optional parameters + # @return [Array] List of pull request review comments. + # @see https://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository + # + # source://octokit//lib/octokit/client/pull_requests.rb#160 + def reviews_comments(repo, options = T.unsafe(nil)); end + + # Update pull request comment + # + # @example + # @client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to update + # @param body [String] Updated comment content + # @return [Sawyer::Resource] Hash representing the updated comment + # @see https://developer.github.com/v3/pulls/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#247 + def update_pull_comment(repo, comment_id, body, options = T.unsafe(nil)); end + + # Update a pull request + # + # @example + # @client.update_pull_request('octokit/octokit.rb', 67, 'new title', 'updated body', 'closed') + # @example Passing nil for optional attributes to update specific attributes. + # @client.update_pull_request('octokit/octokit.rb', 67, nil, nil, 'open') + # @example Empty body by passing empty string + # @client.update_pull_request('octokit/octokit.rb', 67, nil, '') + # @overload update_pull_request + # @overload update_pull_request + # @return [Sawyer::Resource] Hash representing updated pull request. + # @see https://developer.github.com/v3/pulls/#update-a-pull-request + # + # source://octokit//lib/octokit/client/pull_requests.rb#104 + def update_pull_request(*args); end + + # Update a pull request branch + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number of pull request + # @param options [Hash] Optional parameters (e.g. expected_head_sha) + # @return [Boolean] True if the pull request branch has been updated + # @see https://developer.github.com/v3/pulls/#update-a-pull-request-branch + # + # source://octokit//lib/octokit/client/pull_requests.rb#286 + def update_pull_request_branch(repo, number, options = T.unsafe(nil)); end + + # Update pull request comment + # + # @example + # @client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to update + # @param body [String] Updated comment content + # @return [Sawyer::Resource] Hash representing the updated comment + # @see https://developer.github.com/v3/pulls/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#247 + def update_pull_request_comment(repo, comment_id, body, options = T.unsafe(nil)); end + + # Update pull request comment + # + # @example + # @client.update_pull_request_comment("octokit/octokit.rb", 1903950, ":shipit:") + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param comment_id [Integer] Id of the comment to update + # @param body [String] Updated comment content + # @return [Sawyer::Resource] Hash representing the updated comment + # @see https://developer.github.com/v3/pulls/comments/#edit-a-comment + # + # source://octokit//lib/octokit/client/pull_requests.rb#247 + def update_review_comment(repo, comment_id, body, options = T.unsafe(nil)); end +end + +# Methods for API rate limiting info +# +# @see https://developer.github.com/v3/#rate-limiting +# +# source://octokit//lib/octokit/client/rate_limit.rb#8 +module Octokit::Client::RateLimit + # Get rate limit info from last response if available + # or make a new request to fetch rate limit + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#14 + def rate_limit(_options = T.unsafe(nil)); end + + # Refresh rate limit info by making a new request + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#35 + def rate_limit!(_options = T.unsafe(nil)); end + + # Get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#25 + def rate_limit_remaining(_options = T.unsafe(nil)); end + + # Refresh rate limit info and get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#45 + def rate_limit_remaining!(_options = T.unsafe(nil)); end + + # Get rate limit info from last response if available + # or make a new request to fetch rate limit + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#14 + def ratelimit(_options = T.unsafe(nil)); end + + # Refresh rate limit info by making a new request + # + # @return [Octokit::RateLimit] Rate limit info + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#35 + def ratelimit!(_options = T.unsafe(nil)); end + + # Get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#25 + def ratelimit_remaining(_options = T.unsafe(nil)); end + + # Refresh rate limit info and get number of rate limted requests remaining + # + # @return [Integer] Number of requests remaining in this period + # @see https://developer.github.com/v3/rate_limit/#rate-limit + # + # source://octokit//lib/octokit/client/rate_limit.rb#45 + def ratelimit_remaining!(_options = T.unsafe(nil)); end +end + +# Methods for the Reacions API +# +# @see https://developer.github.com/v3/reactions/ +# +# source://octokit//lib/octokit/client/reactions.rb#8 +module Octokit::Client::Reactions + # List reactions for a commit comment + # + # @example + # @client.commit_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The id of the commit comment + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment + # + # source://octokit//lib/octokit/client/reactions.rb#19 + def commit_comment_reactions(repo, id, options = T.unsafe(nil)); end + + # Create a reaction for a commit comment + # + # @example + # @client.create_commit_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The id of the commit comment + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction + # @see https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#35 + def create_commit_comment_reaction(repo, id, reaction, options = T.unsafe(nil)); end + + # Create reaction for an issue comment + # + # @example + # @client.create_issue_comment_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @param reaction [String] The Reaction + # @return [] Hashes representing the reaction. + # @see https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#100 + def create_issue_comment_reaction(repo, id, reaction, options = T.unsafe(nil)); end + + # Create reaction for an issue + # + # @example + # @client.create_issue_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] The Issue number + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction. + # @see https://developer.github.com/v3/reactions/#create-reaction-for-an-issue + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#67 + def create_issue_reaction(repo, number, reaction, options = T.unsafe(nil)); end + + # Create reaction for a pull request review comment + # + # @example + # @client.create_pull_request_reiew_comment_reaction("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @param reaction [String] The Reaction + # @return [] Hash representing the reaction. + # @see https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + # @see https://developer.github.com/v3/reactions/#reaction-types + # + # source://octokit//lib/octokit/client/reactions.rb#133 + def create_pull_request_review_comment_reaction(repo, id, reaction, options = T.unsafe(nil)); end + + # Delete a reaction + # + # @example + # @client.delete_reaction(1) + # @param id [Integer] Reaction id + # @return [Boolean] Return true if reaction was deleted, false otherwise. + # @see https://developer.github.com/v3/reactions/#delete-a-reaction + # + # source://octokit//lib/octokit/client/reactions.rb#148 + def delete_reaction(id, options = T.unsafe(nil)); end + + # List reactions for an issue comment + # + # @example + # @client.issue_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment + # + # source://octokit//lib/octokit/client/reactions.rb#83 + def issue_comment_reactions(repo, id, options = T.unsafe(nil)); end + + # List reactions for an issue + # + # @example + # @client.issue_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] The Issue number + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + # + # source://octokit//lib/octokit/client/reactions.rb#50 + def issue_reactions(repo, number, options = T.unsafe(nil)); end + + # List reactions for a pull request review comment + # + # @example + # @client.pull_request_review_comment_reactions("octokit/octokit.rb", 1) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The Issue comment id + # @return [Array] Array of Hashes representing the reactions. + # @see https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + # + # source://octokit//lib/octokit/client/reactions.rb#116 + def pull_request_review_comment_reactions(repo, id, options = T.unsafe(nil)); end +end + +# Methods for References for Git Data API +# +# @see https://developer.github.com/v3/git/refs/ +# +# source://octokit//lib/octokit/client/refs.rb#8 +module Octokit::Client::Refs + # Create a reference + # + # @example Create refs/heads/master for octocat/Hello-World with sha 827efc6d56897b048c772eb4087f854f46256132 + # Octokit.create_ref("octocat/Hello-World", "heads/master", "827efc6d56897b048c772eb4087f854f46256132") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @return [Array] The list of references, already containing the new one + # @see https://developer.github.com/v3/git/refs/#create-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#60 + def create_ref(repo, ref, sha, options = T.unsafe(nil)); end + + # Create a reference + # + # @example Create refs/heads/master for octocat/Hello-World with sha 827efc6d56897b048c772eb4087f854f46256132 + # Octokit.create_ref("octocat/Hello-World", "heads/master", "827efc6d56897b048c772eb4087f854f46256132") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @return [Array] The list of references, already containing the new one + # @see https://developer.github.com/v3/git/refs/#create-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#60 + def create_reference(repo, ref, sha, options = T.unsafe(nil)); end + + # Delete a single branch + # + # @example Delete uritemplate for sigmavirus24/github3.py + # Octokit.delete_branch("sigmavirus24/github3.py", "uritemplate") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param branch [String] The branch, e.g. fix-refs + # @return [Boolean] Success + # @see https://developer.github.com/v3/git/refs/#delete-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#113 + def delete_branch(repo, branch, options = T.unsafe(nil)); end + + # Delete a single reference + # + # @example Delete tags/v0.0.3 for sferik/rails_admin + # Octokit.delete_ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Boolean] Success + # @see https://developer.github.com/v3/git/refs/#delete-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#125 + def delete_ref(repo, ref, options = T.unsafe(nil)); end + + # Delete a single reference + # + # @example Delete tags/v0.0.3 for sferik/rails_admin + # Octokit.delete_ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Boolean] Success + # @see https://developer.github.com/v3/git/refs/#delete-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#125 + def delete_reference(repo, ref, options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def list_references(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def list_refs(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # Fetch matching refs + # + # @example Fetch refs matching tags/v2 for sferik/rails_admin + # Octokit.ref("sferik/rails_admin","tags/v2") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 or heads/rails-3 + # @return [Array] The reference matching the given repo and the ref id + # @see https://developer.github.com/v3/git/refs/#list-matching-references + # + # source://octokit//lib/octokit/client/refs.rb#34 + def matching_refs(repo, ref, options = T.unsafe(nil)); end + + # Fetch a given reference + # + # @example Fetch tags/v0.0.3 for sferik/rails_admin + # Octokit.ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Sawyer::Resource] The reference matching the given repo and the ref id + # @see https://developer.github.com/v3/git/refs/#get-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#46 + def ref(repo, ref, options = T.unsafe(nil)); end + + # Fetch a given reference + # + # @example Fetch tags/v0.0.3 for sferik/rails_admin + # Octokit.ref("sferik/rails_admin","tags/v0.0.3") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @return [Sawyer::Resource] The reference matching the given repo and the ref id + # @see https://developer.github.com/v3/git/refs/#get-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#46 + def reference(repo, ref, options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def references(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # List all refs for a given user and repo + # + # @example Fetch all refs for sferik/rails_admin + # Octokit.refs("sferik/rails_admin") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param namespace [String] The ref namespace, e.g. tag or heads + # @return [Array] A list of references matching the repo and the namespace + # @see https://developer.github.com/v3/git/refs/#get-all-references + # + # source://octokit//lib/octokit/client/refs.rb#17 + def refs(repo, namespace = T.unsafe(nil), options = T.unsafe(nil)); end + + # Update a branch + # + # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_branch("octocat/Hello-World", "sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd") + # @example Fast-forward update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_branch("octocat/Hello-World", "sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd", false) + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param branch [String] The ref, e.g. feature/new-shiny + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @param force [Boolean] A flag indicating whether to force the update or to make sure the update is a fast-forward update. + # @return [Array] The list of references updated + # @see https://developer.github.com/v3/git/refs/#update-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#101 + def update_branch(repo, branch, sha, force = T.unsafe(nil), options = T.unsafe(nil)); end + + # Update a reference + # + # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_ref("octocat/Hello-World", "heads/sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @param force [Boolean] A flag indicating whether to force the update or to make sure the update is a fast-forward update. + # @return [Array] The list of references updated + # @see https://developer.github.com/v3/git/refs/#update-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#80 + def update_ref(repo, ref, sha, force = T.unsafe(nil), options = T.unsafe(nil)); end + + # Update a reference + # + # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd + # Octokit.update_ref("octocat/Hello-World", "heads/sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd") + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param ref [String] The ref, e.g. tags/v0.0.3 + # @param sha [String] A SHA, e.g. 827efc6d56897b048c772eb4087f854f46256132 + # @param force [Boolean] A flag indicating whether to force the update or to make sure the update is a fast-forward update. + # @return [Array] The list of references updated + # @see https://developer.github.com/v3/git/refs/#update-a-reference + # + # source://octokit//lib/octokit/client/refs.rb#80 + def update_reference(repo, ref, sha, force = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Methods for the Releases API +# +# @see https://developer.github.com/v3/repos/releases/ +# +# source://octokit//lib/octokit/client/releases.rb#8 +module Octokit::Client::Releases + # Create a release + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param tag_name [String] Git tag from which to create release + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#create-a-release + # + # source://octokit//lib/octokit/client/releases.rb#30 + def create_release(repo, tag_name, options = T.unsafe(nil)); end + + # Delete a release + # + # @param url [String] URL for the release as returned from .releases + # @return [Boolean] Success or failure + # @see https://developer.github.com/v3/repos/releases/#delete-a-release + # + # source://octokit//lib/octokit/client/releases.rb#65 + def delete_release(url, options = T.unsafe(nil)); end + + # Delete a release asset + # + # @param asset_url [String] URL for the asset as returned from .release_assets + # @return [Boolean] Success or failure + # @see https://developer.github.com/v3/repos/releases/#delete-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#128 + def delete_release_asset(asset_url, options = T.unsafe(nil)); end + + # Update a release + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [String] URL for the release as returned from .releases + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#edit-a-release + # + # source://octokit//lib/octokit/client/releases.rb#55 + def edit_release(url, options = T.unsafe(nil)); end + + # Update a release asset + # + # @option options + # @option options + # @param asset_url [String] URL for the asset as returned from .release_assets + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#edit-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#118 + def edit_release_asset(asset_url, options = T.unsafe(nil)); end + + # Get the latest release + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#get-the-latest-release + # + # source://octokit//lib/octokit/client/releases.rb#147 + def latest_release(repo, options = T.unsafe(nil)); end + + # List releases for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of releases + # @see https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository + # + # source://octokit//lib/octokit/client/releases.rb#14 + def list_releases(repo, options = T.unsafe(nil)); end + + # Get a release + # + # @param url [String] URL for the release as returned from .releases + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#get-a-single-release + # + # source://octokit//lib/octokit/client/releases.rb#40 + def release(url, options = T.unsafe(nil)); end + + # Get a single release asset + # + # @param asset_url [String] URL for the asset as returned from .release_assets + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#get-a-single-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#107 + def release_asset(asset_url, options = T.unsafe(nil)); end + + # List release assets + # + # @param release_url [String] URL for the release as returned from .releases + # @return [Array] A list of release assets + # @see https://developer.github.com/v3/repos/releases/#list-assets-for-a-release + # + # source://octokit//lib/octokit/client/releases.rb#74 + def release_assets(release_url, options = T.unsafe(nil)); end + + # Get the release for a given tag + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param tag_name [String] the name for a tag + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name + # + # source://octokit//lib/octokit/client/releases.rb#138 + def release_for_tag(repo, tag_name, options = T.unsafe(nil)); end + + # List releases for a repository + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of releases + # @see https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository + # + # source://octokit//lib/octokit/client/releases.rb#14 + def releases(repo, options = T.unsafe(nil)); end + + # Update a release + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [String] URL for the release as returned from .releases + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release + # @see https://developer.github.com/v3/repos/releases/#edit-a-release + # + # source://octokit//lib/octokit/client/releases.rb#55 + def update_release(url, options = T.unsafe(nil)); end + + # Update a release asset + # + # @option options + # @option options + # @param asset_url [String] URL for the asset as returned from .release_assets + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#edit-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#118 + def update_release_asset(asset_url, options = T.unsafe(nil)); end + + # Upload a release asset + # + # @option options + # @option options + # @param release_url [String] URL for the release as returned from .releases + # @param path_or_file [String] Path to file to upload + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The release asset + # @see https://developer.github.com/v3/repos/releases/#upload-a-release-asset + # + # source://octokit//lib/octokit/client/releases.rb#86 + def upload_asset(release_url, path_or_file, options = T.unsafe(nil)); end + + private + + # source://octokit//lib/octokit/client/releases.rb#153 + def content_type_from_file(file); end +end + +# Methods for the Repositories API +# +# @see https://developer.github.com/v3/repos/ +# +# source://octokit//lib/octokit/client/repositories.rb#8 +module Octokit::Client::Repositories + # Add collaborator to repo + # + # This can also be used to update the permission of an existing collaborator + # + # Requires authenticated client. + # + # @example + # @client.add_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.add_collab('octokit/octokit.rb', 'holman') + # @example Add a collaborator with admin permissions + # @client.add_collaborator('octokit/octokit.rb', 'holman', permission: 'admin') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to add. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if collaborator added, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#345 + def add_collab(repo, collaborator, options = T.unsafe(nil)); end + + # Add collaborator to repo + # + # This can also be used to update the permission of an existing collaborator + # + # Requires authenticated client. + # + # @example + # @client.add_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.add_collab('octokit/octokit.rb', 'holman') + # @example Add a collaborator with admin permissions + # @client.add_collaborator('octokit/octokit.rb', 'holman', permission: 'admin') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to add. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if collaborator added, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#345 + def add_collaborator(repo, collaborator, options = T.unsafe(nil)); end + + # Add deploy key to a repo + # + # Requires authenticated client. + # + # @example + # @client.add_deploy_key('octokit/octokit.rb', 'Staging server', 'ssh-rsa AAA...') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param title [String] Title reference for the deploy key. + # @param key [String] Public key. + # @return [Sawyer::Resource] Hash representing newly added key. + # @see https://developer.github.com/v3/repos/keys/#add-a-new-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#266 + def add_deploy_key(repo, title, key, options = T.unsafe(nil)); end + + # List all repositories + # + # This provides a dump of every repository, in the order that they were + # created. + # + # @option options + # @param options [Hash] Optional options + # @return [Array] List of repositories. + # @see https://developer.github.com/v3/repos/#list-all-public-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#87 + def all_repositories(options = T.unsafe(nil)); end + + # Get a single branch from a repository + # + # @example Get branch 'master` from octokit/octokit.rb + # Octokit.branch("octokit/octokit.rb", "master") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource] The branch requested, if it exists + # @see https://developer.github.com/v3/repos/#get-branch + # + # source://octokit//lib/octokit/client/repositories.rb#566 + def branch(repo, branch, options = T.unsafe(nil)); end + + # Get branch protection summary + # + # @example + # @client.branch_protection('octokit/octokit.rb', 'master') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource, nil] Branch protection summary or nil if the branch + # is not protected + # @see https://developer.github.com/v3/repos/branches/#get-branch-protection + # + # source://octokit//lib/octokit/client/repositories.rb#606 + def branch_protection(repo, branch, options = T.unsafe(nil)); end + + # List branches + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.branches('octokit/octokit.rb') + # @example + # @client.branches('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing branches. + # @see https://developer.github.com/v3/repos/#list-branches + # + # source://octokit//lib/octokit/client/repositories.rb#554 + def branches(repo, options = T.unsafe(nil)); end + + # Check to see if a particular user is an assignee for a repository. + # + # @example + # Octokit.check_assignee('octokit/octokit.rb', 'andrew') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param assignee [String] User login to check + # @return [Boolean] True if assignable on project, false otherwise. + # @see https://developer.github.com/v3/issues/assignees/#check-assignee + # + # source://octokit//lib/octokit/client/repositories.rb#670 + def check_assignee(repo, assignee, options = T.unsafe(nil)); end + + # Checks if a user is a collaborator for a repo. + # + # Requires authenticated client. + # + # @example + # @client.collaborator?('octokit/octokit.rb', 'holman') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to check. + # @return [Boolean] True if user is a collaborator, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#377 + def collaborator?(repo, collaborator, options = T.unsafe(nil)); end + + # List collaborators + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.collaborators('octokit/octokit.rb') + # @example + # Octokit.collabs('octokit/octokit.rb') + # @example + # @client.collabs('octokit/octokit.rb') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Array] Array of hashes representing collaborating users. + # @see https://developer.github.com/v3/repos/collaborators/#list-collaborators + # + # source://octokit//lib/octokit/client/repositories.rb#320 + def collaborators(repo, options = T.unsafe(nil)); end + + # List collaborators + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.collaborators('octokit/octokit.rb') + # @example + # Octokit.collabs('octokit/octokit.rb') + # @example + # @client.collabs('octokit/octokit.rb') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Array] Array of hashes representing collaborating users. + # @see https://developer.github.com/v3/repos/collaborators/#list-collaborators + # + # source://octokit//lib/octokit/client/repositories.rb#320 + def collabs(repo, options = T.unsafe(nil)); end + + # List contributors to a repo + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.contributors('octokit/octokit.rb', true) + # @example + # Octokit.contribs('octokit/octokit.rb') + # @example + # @client.contribs('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param anon [Boolean] Set true to include anonymous contributors. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/repos/#list-contributors + # + # source://octokit//lib/octokit/client/repositories.rb#457 + def contribs(repo, anon = T.unsafe(nil), options = T.unsafe(nil)); end + + # List contributors to a repo + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.contributors('octokit/octokit.rb', true) + # @example + # Octokit.contribs('octokit/octokit.rb') + # @example + # @client.contribs('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param anon [Boolean] Set true to include anonymous contributors. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/repos/#list-contributors + # + # source://octokit//lib/octokit/client/repositories.rb#457 + def contributors(repo, anon = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a repository for a user or organization + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # @see https://developer.github.com/v3/repos/#create + # + # source://octokit//lib/octokit/client/repositories.rb#154 + def create(name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # @see https://developer.github.com/v3/repos/#create + # + # source://octokit//lib/octokit/client/repositories.rb#154 + def create_repo(name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization generated from a template repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub template repository + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # + # source://octokit//lib/octokit/client/repositories.rb#203 + def create_repo_from_template(repo, name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # @see https://developer.github.com/v3/repos/#create + # + # source://octokit//lib/octokit/client/repositories.rb#154 + def create_repository(name, options = T.unsafe(nil)); end + + # Create a repository for a user or organization generated from a template repository + # + # @option options + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub template repository + # @param name [String] Name of the new repo + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Repository info for the new repository + # + # source://octokit//lib/octokit/client/repositories.rb#203 + def create_repository_from_template(repo, name, options = T.unsafe(nil)); end + + # Delete repository + # + # Note: If OAuth is used, 'delete_repo' scope is required + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if repository was deleted + # @see https://developer.github.com/v3/repos/#delete-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#175 + def delete_repo(repo, options = T.unsafe(nil)); end + + # Delete repository + # + # Note: If OAuth is used, 'delete_repo' scope is required + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if repository was deleted + # @see https://developer.github.com/v3/repos/#delete-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#175 + def delete_repository(repo, options = T.unsafe(nil)); end + + # Delete a repository subscription + # + # @example + # @client.delete_subscription("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if subscription deleted, false otherwise. + # @see https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription + # + # source://octokit//lib/octokit/client/repositories.rb#721 + def delete_subscription(repo, options = T.unsafe(nil)); end + + # Get a single deploy key for a repo + # + # @example + # @client.deploy_key('octokit/octokit.rb', 8675309) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Deploy key ID. + # @return [Sawyer::Resource] Deploy key. + # @see https://developer.github.com/v3/repos/keys/#get-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#251 + def deploy_key(repo, id, options = T.unsafe(nil)); end + + # Get deploy keys on a repo + # + # Requires authenticated client. + # + # @example + # @client.deploy_keys('octokit/octokit.rb') + # @example + # @client.list_deploy_keys('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Array] Array of hashes representing deploy keys. + # @see https://developer.github.com/v3/repos/keys/#list-deploy-keys + # + # source://octokit//lib/octokit/client/repositories.rb#238 + def deploy_keys(repo, options = T.unsafe(nil)); end + + # Disable vulnerability alerts for a repository + # + # @example Disable vulnerability alerts for a repository + # @client.disable_vulnerability_alerts("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Boolean] True if vulnerability alerts disabled, false otherwise. + # @see https://docs.github.com/en/rest/reference/repos#disable-vulnerability-alerts + # + # source://octokit//lib/octokit/client/repositories.rb#774 + def disable_vulnerability_alerts(repo, options = T.unsafe(nil)); end + + # Create a repository dispatch event + # + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param event_type [String] A custom webhook event name. + # @param options [Hash] a customizable set of options + # @return [Boolean] True if event was dispatched, false otherwise. + # @see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event + # + # source://octokit//lib/octokit/client/repositories.rb#734 + def dispatch_event(repo, event_type, options = T.unsafe(nil)); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def edit(repo, options = T.unsafe(nil)); end + + # Edit a deploy key + # + # @deprecated This method is no longer supported in the API + # @example Update the key for a deploy key. + # @client.edit_deploy_key('octokit/octokit.rb', 8675309, :key => 'ssh-rsa BBB...') + # @example + # @client.update_deploy_key('octokit/octokit.rb', 8675309, :title => 'Uber', :key => 'ssh-rsa BBB...')) + # @option title + # @option key + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Deploy key ID. + # @param options [Hash] Attributes to edit. + # @param title [Hash] a customizable set of options + # @param key [Hash] a customizable set of options + # @return [Sawyer::Resource] Updated deploy key. + # @see https://developer.github.com/changes/2014-02-24-finer-grained-scopes-for-ssh-keys/ + # @see https://developer.github.com/v3/repos/keys/#edit-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#285 + def edit_deploy_key(repo, id, options); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def edit_repository(repo, options = T.unsafe(nil)); end + + # Enable vulnerability alerts for a repository + # + # @example Enable vulnerability alerts for a repository + # @client.enable_vulnerability_alerts("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Boolean] True if vulnerability alerts enabled, false otherwise. + # @see https://docs.github.com/en/rest/reference/repos#enable-vulnerability-alerts + # + # source://octokit//lib/octokit/client/repositories.rb#761 + def enable_vulnerability_alerts(repo, options = T.unsafe(nil)); end + + # Fork a repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Repository info for the new fork + # @see https://developer.github.com/v3/repos/forks/#create-a-fork + # + # source://octokit//lib/octokit/client/repositories.rb#134 + def fork(repo, options = T.unsafe(nil)); end + + # List forks + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.forks('octokit/octokit.rb') + # @example + # Octokit.network('octokit/octokit.rb') + # @example + # @client.forks('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing repos. + # @see https://developer.github.com/v3/repos/forks/#list-forks + # + # source://octokit//lib/octokit/client/repositories.rb#508 + def forks(repo, options = T.unsafe(nil)); end + + # Get a single branch from a repository + # + # @example Get branch 'master` from octokit/octokit.rb + # Octokit.branch("octokit/octokit.rb", "master") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource] The branch requested, if it exists + # @see https://developer.github.com/v3/repos/#get-branch + # + # source://octokit//lib/octokit/client/repositories.rb#566 + def get_branch(repo, branch, options = T.unsafe(nil)); end + + # List languages of code in the repo. + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.languages('octokit/octokit.rb') + # @example + # @client.languages('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of Hashes representing languages. + # @see https://developer.github.com/v3/repos/#list-languages + # + # source://octokit//lib/octokit/client/repositories.rb#524 + def languages(repo, options = T.unsafe(nil)); end + + # Get deploy keys on a repo + # + # Requires authenticated client. + # + # @example + # @client.deploy_keys('octokit/octokit.rb') + # @example + # @client.list_deploy_keys('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Array] Array of hashes representing deploy keys. + # @see https://developer.github.com/v3/repos/keys/#list-deploy-keys + # + # source://octokit//lib/octokit/client/repositories.rb#238 + def list_deploy_keys(repo, options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def list_repos(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def list_repositories(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List forks + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.forks('octokit/octokit.rb') + # @example + # Octokit.network('octokit/octokit.rb') + # @example + # @client.forks('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing repos. + # @see https://developer.github.com/v3/repos/forks/#list-forks + # + # source://octokit//lib/octokit/client/repositories.rb#508 + def network(repo, options = T.unsafe(nil)); end + + # Get a user's permission level for a repo. + # + # Requires authenticated client + # + # @example + # @client.permission_level('octokit/octokit.rb', 'lizzhale') + # @return [Sawyer::Resource] Hash representing the user's permission level for the given repository + # @see https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level + # + # source://octokit//lib/octokit/client/repositories.rb#389 + def permission_level(repo, collaborator, options = T.unsafe(nil)); end + + # Lock a single branch from a repository + # + # Requires authenticated client + # + # @example + # @client.protect_branch('octokit/octokit.rb', 'master', foo) + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] The protected branch + # @see https://developer.github.com/v3/repos/#enabling-and-disabling-branch-protection + # + # source://octokit//lib/octokit/client/repositories.rb#591 + def protect_branch(repo, branch, options = T.unsafe(nil)); end + + # Remove collaborator from repo. + # + # Requires authenticated client. + # + # @example + # @client.remove_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.remove_collab('octokit/octokit.rb', 'holman') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to remove. + # @return [Boolean] True if collaborator removed, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#362 + def remove_collab(repo, collaborator, options = T.unsafe(nil)); end + + # Remove collaborator from repo. + # + # Requires authenticated client. + # + # @example + # @client.remove_collaborator('octokit/octokit.rb', 'holman') + # @example + # @client.remove_collab('octokit/octokit.rb', 'holman') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param collaborator [String] Collaborator GitHub username to remove. + # @return [Boolean] True if collaborator removed, false otherwise. + # @see https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repositories.rb#362 + def remove_collaborator(repo, collaborator, options = T.unsafe(nil)); end + + # Remove deploy key from a repo + # + # Requires authenticated client. + # + # @example + # @client.remove_deploy_key('octokit/octokit.rb', 100000) + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Id of the deploy key to remove. + # @return [Boolean] True if key removed, false otherwise. + # @see https://developer.github.com/v3/repos/keys/#remove-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#300 + def remove_deploy_key(repo, id, options = T.unsafe(nil)); end + + # Rename a single branch from a repository + # + # Requires authenticated client + # + # @example + # @client.rename_branch('octokit/octokit.rb', 'master', 'main') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Current branch name + # @param new_name [String] New branch name + # @return [Sawyer::Resource] The renamed branch + # @see https://developer.github.com/v3/repos/#rename-a-branch + # + # source://octokit//lib/octokit/client/repositories.rb#637 + def rename_branch(repo, branch, new_name, options = T.unsafe(nil)); end + + # Replace all topics for a repository + # + # Requires authenticated client. + # + # @example Replace topics for octokit/octokit.rb + # client.replace_all_topics('octokit/octokit.rb', ['octocat', 'atom', 'electron', 'API']) + # @example Clear all topics for octokit/octokit.rb + # client.replace_all_topics('octokit/octokit.rb', []) + # @param repo [Integer, String, Repository, Hash] A Github repository + # @param names [Array] An array of topics to add to the repository. + # @return [Sawyer::Resource] representing the replaced topics for given repo + # @see https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#439 + def replace_all_topics(repo, names, options = T.unsafe(nil)); end + + # Get a single repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#get + # @see https://developer.github.com/v3/licenses/#get-a-repositorys-license + # + # source://octokit//lib/octokit/client/repositories.rb#26 + def repo(repo, options = T.unsafe(nil)); end + + # List users available for assigning to issues. + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.repository_assignees('octokit/octokit.rb') + # @example + # Octokit.repo_assignees('octokit/octokit.rb') + # @example + # @client.repository_assignees('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/issues/assignees/#list-assignees + # + # source://octokit//lib/octokit/client/repositories.rb#657 + def repo_assignees(repo, options = T.unsafe(nil)); end + + # List teams for a repo + # + # Requires authenticated client that is an owner or collaborator of the repo. + # + # @example + # @client.repository_teams('octokit/pengwynn') + # @example + # @client.repo_teams('octokit/pengwynn') + # @example + # @client.teams('octokit/pengwynn') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/repos/#list-teams + # + # source://octokit//lib/octokit/client/repositories.rb#406 + def repo_teams(repo, options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def repos(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # List user repositories + # + # If user is not supplied, repositories for the current + # authenticated user are returned. + # + # @note If the user provided is a GitHub organization, only the + # organization's public repositories will be listed. For retrieving + # organization repositories the {Organizations#organization_repositories} + # method should be used instead. + # @param user [Integer, String] Optional GitHub user login or id for which + # to list repos. + # @return [Array] List of repositories + # @see https://developer.github.com/v3/repos/#list-your-repositories + # @see https://developer.github.com/v3/repos/#list-user-repositories + # + # source://octokit//lib/octokit/client/repositories.rb#69 + def repositories(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get a single repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#get + # @see https://developer.github.com/v3/licenses/#get-a-repositorys-license + # + # source://octokit//lib/octokit/client/repositories.rb#26 + def repository(repo, options = T.unsafe(nil)); end + + # Check if a repository exists + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Boolean] + # @see https://developer.github.com/v3/repos/#get + # + # source://octokit//lib/octokit/client/repositories.rb#14 + def repository?(repo, options = T.unsafe(nil)); end + + # List users available for assigning to issues. + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.repository_assignees('octokit/octokit.rb') + # @example + # Octokit.repo_assignees('octokit/octokit.rb') + # @example + # @client.repository_assignees('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/issues/assignees/#list-assignees + # + # source://octokit//lib/octokit/client/repositories.rb#657 + def repository_assignees(repo, options = T.unsafe(nil)); end + + # List teams for a repo + # + # Requires authenticated client that is an owner or collaborator of the repo. + # + # @example + # @client.repository_teams('octokit/pengwynn') + # @example + # @client.repo_teams('octokit/pengwynn') + # @example + # @client.teams('octokit/pengwynn') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/repos/#list-teams + # + # source://octokit//lib/octokit/client/repositories.rb#406 + def repository_teams(repo, options = T.unsafe(nil)); end + + # Hide a public repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Updated repository info + # + # source://octokit//lib/octokit/client/repositories.rb#213 + def set_private(repo, options = T.unsafe(nil)); end + + # Unhide a private repository + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @return [Sawyer::Resource] Updated repository info + # + # source://octokit//lib/octokit/client/repositories.rb#222 + def set_public(repo, options = T.unsafe(nil)); end + + # Star a repository + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully starred + # @see https://developer.github.com/v3/activity/starring/#star-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#96 + def star(repo, options = T.unsafe(nil)); end + + # List stargazers of a repo + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.stargazers('octokit/octokit.rb') + # @example + # @client.stargazers('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/activity/starring/#list-stargazers + # + # source://octokit//lib/octokit/client/repositories.rb#474 + def stargazers(repo, options = T.unsafe(nil)); end + + # List watchers subscribing to notifications for a repo + # + # @example + # @client.subscribers("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of users watching. + # @see https://developer.github.com/v3/activity/watching/#list-watchers + # + # source://octokit//lib/octokit/client/repositories.rb#681 + def subscribers(repo, options = T.unsafe(nil)); end + + # Get a repository subscription + # + # @example + # @client.subscription("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Sawyer::Resource] Repository subscription. + # @see https://developer.github.com/v3/activity/watching/#get-a-repository-subscription + # + # source://octokit//lib/octokit/client/repositories.rb#692 + def subscription(repo, options = T.unsafe(nil)); end + + # List tags + # + # Requires authenticated client for private repos. + # + # @example + # Octokit.tags('octokit/octokit.rb') + # @example + # @client.tags('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing tags. + # @see https://developer.github.com/v3/repos/#list-tags + # + # source://octokit//lib/octokit/client/repositories.rb#539 + def tags(repo, options = T.unsafe(nil)); end + + # List teams for a repo + # + # Requires authenticated client that is an owner or collaborator of the repo. + # + # @example + # @client.repository_teams('octokit/pengwynn') + # @example + # @client.repo_teams('octokit/pengwynn') + # @example + # @client.teams('octokit/pengwynn') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing teams. + # @see https://developer.github.com/v3/repos/#list-teams + # + # source://octokit//lib/octokit/client/repositories.rb#406 + def teams(repo, options = T.unsafe(nil)); end + + # List all topics for a repository + # + # Requires authenticated client for private repos. + # + # @example List topics for octokit/octokit.rb + # Octokit.topics('octokit/octokit.rb') + # @example List topics for octokit/octokit.rb + # client.topics('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Sawyer::Resource] representing the topics for given repo + # @see https://developer.github.com/v3/repos/#list-all-topics-for-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#423 + def topics(repo, options = T.unsafe(nil)); end + + # Transfer repository + # + # Transfer a repository owned by your organization + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param new_owner [String] The username or organization name the repository will be transferred to. + # @param options [Array] :team_ids ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + # @return [Sawyer::Resource] Repository info for the transferred repository + # @see https://developer.github.com/v3/repos/#transfer-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#189 + def transfer_repo(repo, new_owner, options = T.unsafe(nil)); end + + # Transfer repository + # + # Transfer a repository owned by your organization + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param new_owner [String] The username or organization name the repository will be transferred to. + # @param options [Array] :team_ids ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + # @return [Sawyer::Resource] Repository info for the transferred repository + # @see https://developer.github.com/v3/repos/#transfer-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#189 + def transfer_repository(repo, new_owner, options = T.unsafe(nil)); end + + # Unlock a single branch from a repository + # + # Requires authenticated client + # + # @example + # @client.unprotect_branch('octokit/octokit.rb', 'master') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param branch [String] Branch name + # @return [Sawyer::Resource] The unprotected branch + # @see https://developer.github.com/v3/repos/#enabling-and-disabling-branch-protection + # + # source://octokit//lib/octokit/client/repositories.rb#622 + def unprotect_branch(repo, branch, options = T.unsafe(nil)); end + + # Unstar a repository + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully unstarred + # @see https://developer.github.com/v3/activity/starring/#unstar-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#105 + def unstar(repo, options = T.unsafe(nil)); end + + # Unwatch a repository + # + # @deprecated Use #unstar instead + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully unwatched + # @see https://developer.github.com/v3/activity/watching/#stop-watching-a-repository-legacy + # + # source://octokit//lib/octokit/client/repositories.rb#125 + def unwatch(repo, options = T.unsafe(nil)); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def update(repo, options = T.unsafe(nil)); end + + # Edit a deploy key + # + # @deprecated This method is no longer supported in the API + # @example Update the key for a deploy key. + # @client.edit_deploy_key('octokit/octokit.rb', 8675309, :key => 'ssh-rsa BBB...') + # @example + # @client.update_deploy_key('octokit/octokit.rb', 8675309, :title => 'Uber', :key => 'ssh-rsa BBB...')) + # @option title + # @option key + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param id [Integer] Deploy key ID. + # @param options [Hash] Attributes to edit. + # @param title [Hash] a customizable set of options + # @param key [Hash] a customizable set of options + # @return [Sawyer::Resource] Updated deploy key. + # @see https://developer.github.com/changes/2014-02-24-finer-grained-scopes-for-ssh-keys/ + # @see https://developer.github.com/v3/repos/keys/#edit-a-deploy-key + # + # source://octokit//lib/octokit/client/repositories.rb#285 + def update_deploy_key(repo, id, options); end + + # Edit a repository + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param repo [String, Hash, Repository] A GitHub repository + # @param options [Hash] Repository information to update + # @return [Sawyer::Resource] Repository information + # @see https://developer.github.com/v3/repos/#update-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#46 + def update_repository(repo, options = T.unsafe(nil)); end + + # Update repository subscription + # + # @example Subscribe to notifications for a repository + # @client.update_subscription("octokit/octokit.rb", {subscribed: true}) + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Sawyer::Resource] Updated repository subscription. + # @see https://developer.github.com/v3/activity/watching/#set-a-repository-subscription + # + # source://octokit//lib/octokit/client/repositories.rb#709 + def update_subscription(repo, options = T.unsafe(nil)); end + + # Check to see if vulnerability alerts are enabled for a repository + # + # The authenticated user must have admin access to the repository. + # + # @example + # @client.vulnerability_alerts_enabled?("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if vulnerability alerts are enabled, false otherwise. + # @see https://docs.github.com/en/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + # + # source://octokit//lib/octokit/client/repositories.rb#748 + def vulnerability_alerts_enabled?(repo, options = T.unsafe(nil)); end + + # Watch a repository + # + # @deprecated Use #star instead + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] `true` if successfully watched + # @see https://developer.github.com/v3/activity/watching/#watch-a-repository-legacy + # + # source://octokit//lib/octokit/client/repositories.rb#115 + def watch(repo, options = T.unsafe(nil)); end + + # List watchers of repo. + # + # Requires authenticated client for private repos. + # + # @deprecated Use {#stargazers} instead + # @example + # Octokit.watchers('octokit/octokit.rb') + # @example + # @client.watchers('octokit/octokit.rb') + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Array] Array of hashes representing users. + # @see https://developer.github.com/v3/repos/watching/#list-watchers + # + # source://octokit//lib/octokit/client/repositories.rb#491 + def watchers(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repository Invitations API +# +# @see https://developer.github.com/v3/repos/invitations/ +# +# source://octokit//lib/octokit/client/repository_invitations.rb#8 +module Octokit::Client::RepositoryInvitations + # Accept a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#78 + def accept_repo_invitation(invitation_id, options = T.unsafe(nil)); end + + # Accept a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#78 + def accept_repository_invitation(invitation_id, options = T.unsafe(nil)); end + + # Decline a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#90 + def decline_invitation(invitation_id, options = T.unsafe(nil)); end + + # Decline a repository invitation + # + # Requires authenticated client + # + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the acceptance of the invitation was successful + # @see https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#90 + def decline_repository_invitation(invitation_id, options = T.unsafe(nil)); end + + # Delete an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the invitation was successfully deleted + # @see https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#42 + def delete_repo_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # Delete an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Boolean] True if the invitation was successfully deleted + # @see https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#42 + def delete_repository_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # Invite a user to a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param user [String] User GitHub username to add + # @return [Sawyer::Resource] The repository invitation + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repository_invitations.rb#17 + def invite_user_to_repo(repo, user, options = T.unsafe(nil)); end + + # Invite a user to a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param user [String] User GitHub username to add + # @return [Sawyer::Resource] The repository invitation + # @see https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator + # + # source://octokit//lib/octokit/client/repository_invitations.rb#17 + def invite_user_to_repository(repo, user, options = T.unsafe(nil)); end + + # List all invitations for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of invitations + # @see https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository + # + # source://octokit//lib/octokit/client/repository_invitations.rb#29 + def repo_invitations(repo, options = T.unsafe(nil)); end + + # List all invitations for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] A list of invitations + # @see https://developer.github.com/v3/repos/invitations/#list-invitations-for-a-repository + # + # source://octokit//lib/octokit/client/repository_invitations.rb#29 + def repository_invitations(repo, options = T.unsafe(nil)); end + + # Update an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Sawyer::Resource] The updated repository invitation + # @see https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#55 + def update_repo_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # Update an invitation for a repository + # + # Requires authenticated client + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param invitation_id [Integer] The id of the invitation + # @return [Sawyer::Resource] The updated repository invitation + # @see https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation + # + # source://octokit//lib/octokit/client/repository_invitations.rb#55 + def update_repository_invitation(repo, invitation_id, options = T.unsafe(nil)); end + + # List all repository invitations for the user + # + # Requires authenticated client + # + # @return [Array] The users repository invitations + # @see https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations + # + # source://octokit//lib/octokit/client/repository_invitations.rb#66 + def user_repo_invitations(options = T.unsafe(nil)); end + + # List all repository invitations for the user + # + # Requires authenticated client + # + # @return [Array] The users repository invitations + # @see https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations + # + # source://octokit//lib/octokit/client/repository_invitations.rb#66 + def user_repository_invitations(options = T.unsafe(nil)); end +end + +# Methods for the Reviews API +# +# @see https://developer.github.com/v3/pulls/reviews/ +# +# source://octokit//lib/octokit/client/reviews.rb#8 +module Octokit::Client::Reviews + # Create a pull request review + # + # @example + # comments = [ + # { path: '.travis.yml', position: 10, body: 'ruby-head is under development that is not stable.' }, + # { path: '.travis.yml', position: 32, body: 'ruby-head is also required in thervm section.' }, + # ] + # options = { event: 'REQUEST_CHANGES', comments: comments } + # @client.create_pull_request_review('octokit/octokit.rb', 844, options) + # @option options + # @option options + # @option options + # @option comments + # @option comments + # @option comments + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param options [Hash] Method options + # @param comments [Hash] a customizable set of options + # @return [Sawyer::Resource] ] Hash respresenting the review + # @see https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#92 + def create_pull_request_review(repo, number, options = T.unsafe(nil)); end + + # Delete a pending review + # + # @example + # @client.delete_pull_request_review('octokit/octokit.rb', 825, 6505518) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @return [Sawyer::Resource] Hash representing the deleted review + # @see https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review + # + # source://octokit//lib/octokit/client/reviews.rb#49 + def delete_pull_request_review(repo, number, review, options = T.unsafe(nil)); end + + # Delete a review request + # + # @example + # options = { + # "reviewers" => [ "octocat", "hubot", "other_user" ], + # "team_reviewers" => [ "justice-league" ] + # } + # @client.delete_pull_request_review_request('octokit/octokit.rb', 2, options) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param id [Integer] The id of the pull request + # @param reviewers [Hash] :reviewers [Array] An array of user logins + # @param options [Hash] :team_reviewers [Array] An array of team slugs + # @return [Sawyer::Resource] ] Hash representing the pull request + # @see https://developer.github.com/v3/pulls/review_requests/#delete-a-review-request + # + # source://octokit//lib/octokit/client/reviews.rb#193 + def delete_pull_request_review_request(repo, id, reviewers = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dismiss a pull request review + # + # @example + # @client.dismiss_pull_request_review('octokit/octokit.rb', 825, 6505518, 'The message.') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @param message [String] The message for the pull request review dismissal + # @return [Sawyer::Resource] Hash representing the dismissed review + # @see https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#129 + def dismiss_pull_request_review(repo, number, review, message, options = T.unsafe(nil)); end + + # Get a single review + # + # @example + # @client.pull_request_review('octokit/octokit.rb', 825, 6505518) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @return [Sawyer::Resource] Hash representing the review + # @see https://developer.github.com/v3/pulls/reviews/#get-a-single-review + # + # source://octokit//lib/octokit/client/reviews.rb#34 + def pull_request_review(repo, number, review, options = T.unsafe(nil)); end + + # Get comments for a single review + # + # @example + # @client.pull_request_review_comments('octokit/octokit.rb', 825, 6505518) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @return [Array] Array of Hashes representing the review comments + # @see https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review + # + # source://octokit//lib/octokit/client/reviews.rb#64 + def pull_request_review_comments(repo, number, review, options = T.unsafe(nil)); end + + # List review requests + # + # @example + # @client.pull_request_review_requests('octokit/octokit.rb', 2) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @return [Array] Array of Hashes representing the review requests + # @see https://developer.github.com/v3/pulls/review_requests/#list-review-requests + # + # source://octokit//lib/octokit/client/reviews.rb#144 + def pull_request_review_requests(repo, number, options = T.unsafe(nil)); end + + # List reviews on a pull request + # + # @example + # @client.pull_request_reviews('octokit/octokit.rb', 2) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @return [Array] Array of Hashes representing the reviews + # @see https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request + # + # source://octokit//lib/octokit/client/reviews.rb#19 + def pull_request_reviews(repo, number, options = T.unsafe(nil)); end + + # Create a review request + # + # @example + # @client.request_pull_request_review('octokit/octokit.rb', 2, reviewers: ['soudy']) + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param reviewers [Hash] :reviewers [Array] An array of user logins + # @param options [Hash] :team_reviewers [Array] An array of team slugs + # @return [Sawyer::Resource] ] Hash respresenting the pull request + # @see https://developer.github.com/v3/pulls/review_requests/#create-a-review-request + # + # source://octokit//lib/octokit/client/reviews.rb#160 + def request_pull_request_review(repo, number, reviewers = T.unsafe(nil), options = T.unsafe(nil)); end + + # Submit a pull request review + # + # @example + # @client.submit_pull_request_review('octokit/octokit.rb', 825, 6505518, + # 'APPROVE', body: 'LGTM!') + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @param event [String] The review action (event) to perform; can be one of + # APPROVE, REQUEST_CHANGES, or COMMENT. + # @param options [Hash] Method options + # @return [Sawyer::Resource] Hash respresenting the review + # @see https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#112 + def submit_pull_request_review(repo, number, review, event, options = T.unsafe(nil)); end + + # Update a review request comment + # + # @example + # @client.update_pull_request_review('octokit/octokit.rb', 825, 6505518, 'This is close to perfect! Please address the suggested inline change. And add more about this.') + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param number [Integer] Number ID of the pull request + # @param review [Integer] The id of the review + # @param body [String] body text of the pull request review. + # @param options [Hash] Method options + # @return [Sawyer::Resource] Hash representing the review comment + # @see https://developer.github.com/v3/pulls/reviews/#update-a-pull-request-review + # + # source://octokit//lib/octokit/client/reviews.rb#221 + def update_pull_request_review(repo, number, review, body, options = T.unsafe(nil)); end +end + +# Methods for the unpublished Octocat API +# +# source://octokit//lib/octokit/client/say.rb#6 +module Octokit::Client::Say + # Return a nifty ASCII Octocat with GitHub wisdom + # or your own + # + # @return [String] + # + # source://octokit//lib/octokit/client/say.rb#11 + def octocat(text = T.unsafe(nil), options = T.unsafe(nil)); end + + # Return a nifty ASCII Octocat with GitHub wisdom + # or your own + # + # @return [String] + # + # source://octokit//lib/octokit/client/say.rb#11 + def say(text = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Methods for the Search API +# +# @see https://developer.github.com/v3/search/ +# +# source://octokit//lib/octokit/client/search.rb#8 +module Octokit::Client::Search + # Search code + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-code + # + # source://octokit//lib/octokit/client/search.rb#19 + def search_code(query, options = T.unsafe(nil)); end + + # Search commits + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search terms and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-commits + # + # source://octokit//lib/octokit/client/search.rb#33 + def search_commits(query, options = T.unsafe(nil)); end + + # Search issues + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-issues-and-pull-requests + # @see https://docs.github.com/en/rest/search#limitations-on-query-length + # + # source://octokit//lib/octokit/client/search.rb#48 + def search_issues(query, options = T.unsafe(nil)); end + + # Search repositories + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-repositories + # + # source://octokit//lib/octokit/client/search.rb#62 + def search_repos(query, options = T.unsafe(nil)); end + + # Search repositories + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-repositories + # + # source://octokit//lib/octokit/client/search.rb#62 + def search_repositories(query, options = T.unsafe(nil)); end + + # Search topics + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-topics + # + # source://octokit//lib/octokit/client/search.rb#77 + def search_topics(query, options = T.unsafe(nil)); end + + # Search users + # + # @option options + # @option options + # @option options + # @option options + # @param query [String] Search term and qualifiers + # @param options [Hash] Sort and pagination options + # @return [Sawyer::Resource] Search results object + # @see https://developer.github.com/v3/search/#search-users + # + # source://octokit//lib/octokit/client/search.rb#91 + def search_users(query, options = T.unsafe(nil)); end + + private + + # source://octokit//lib/octokit/client/search.rb#97 + def search(path, query, options = T.unsafe(nil)); end +end + +# Methods for the GitHub Status API +# +# @see https://status.github.com/api +# +# source://octokit//lib/octokit/client/service_status.rb#8 +module Octokit::Client::ServiceStatus + # Returns the current system status + # + # @return [Sawyer::Resource] GitHub status + # @see https://www.githubstatus.com/api#status + # + # source://octokit//lib/octokit/client/service_status.rb#27 + def github_status; end + + # Returns the last human communication, status, and timestamp. + # + # @return [Sawyer::Resource] GitHub status last message + # @see https://www.githubstatus.com/api/#components + # + # source://octokit//lib/octokit/client/service_status.rb#35 + def github_status_last_message; end + + # Returns the most recent human communications with status and timestamp. + # + # @return [Array] GitHub status messages + # @see https://www.githubstatus.com/api#components + # + # source://octokit//lib/octokit/client/service_status.rb#43 + def github_status_messages; end + + # Returns a summary with the current status and the last status messages. + # + # @return [] GitHub status summary + # @see https://www.githubstatus.com/api#summory + # + # source://octokit//lib/octokit/client/service_status.rb#19 + def github_status_summary; end +end + +# source://octokit//lib/octokit/client/service_status.rb#13 +Octokit::Client::ServiceStatus::COMPONENTS_ROOT = T.let(T.unsafe(nil), String) + +# source://octokit//lib/octokit/client/service_status.rb#12 +Octokit::Client::ServiceStatus::STATUS_ROOT = T.let(T.unsafe(nil), String) + +# Root for status API +# +# @private +# +# source://octokit//lib/octokit/client/service_status.rb#11 +Octokit::Client::ServiceStatus::SUMMARY_ROOT = T.let(T.unsafe(nil), String) + +# Methods for the Source Import API +# +# @see https://developer.github.com/v3/migration/source_imports +# +# source://octokit//lib/octokit/client/source_import.rb#8 +module Octokit::Client::SourceImport + # Stop an import for a repository. + # + # @example + # @client.cancel_source_import("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Boolean] True if the import has been cancelled, false otherwise. + # @see https://developer.github.com/v3/migration/source_imports/#cancel-an-import + # + # source://octokit//lib/octokit/client/source_import.rb#123 + def cancel_source_import(repo, options = T.unsafe(nil)); end + + # Update an author's identity for the import. + # + # @example + # author_url = "https://api.github.com/repos/octokit/octokit.rb/import/authors/1" + # @client.map_source_import_commit_author(author_url, { + # :email => "hubot@github.com", + # :name => "Hubot the Robot" + # }) + # @option values + # @option values + # @param author_url [String] The source import API url for the commit author + # @param values [Hash] The updated author attributes + # @return [Sawyer::Resource] Hash representing the updated commit author + # @see https://developer.github.com/v3/migration/source_imports/#map-a-commit-author + # + # source://octokit//lib/octokit/client/source_import.rb#110 + def map_source_import_commit_author(author_url, values, options = T.unsafe(nil)); end + + # Set preference for using Git LFS to import files over 100MB + # + # @example + # @client.opt_in_source_import_lfs("octokit/octokit.rb", "opt_in") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param use_lfs [String] Preference for using Git LFS to import large files. Can be one of "opt_in" or "opt_out" + # @return [Sawyer::Resource] Hash representing the repository import + # @see https://developer.github.com/v3/migration/source_imports/#set-git-lfs-preference + # + # source://octokit//lib/octokit/client/source_import.rb#150 + def set_source_import_lfs_preference(repo, use_lfs, options = T.unsafe(nil)); end + + # List source import commit authors + # + # @example + # @client.source_import_commit_authors("octokit/octokit.rb") + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Array] Array of hashes representing commit_authors. + # @see https://developer.github.com/v3/migration/source_imports/#get-commit-authors + # + # source://octokit//lib/octokit/client/source_import.rb#91 + def source_import_commit_authors(repo, options = T.unsafe(nil)); end + + # List source import large files + # + # @example + # @client.source_import_large_files("octokit/octokit.rb") + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] + # @return [Array] Array of hashes representing files over 100MB. + # @see https://developer.github.com/v3/migration/source_imports/#get-large-files + # + # source://octokit//lib/octokit/client/source_import.rb#137 + def source_import_large_files(repo, options = T.unsafe(nil)); end + + # View the progress of an import. + # + # @example + # @client.source_import_progress("octokit/octokit.rb") + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [Sawyer::Resource] Hash representing the progress of the import + # @see https://developer.github.com/v3/migration/source_imports/#get-import-progress + # + # source://octokit//lib/octokit/client/source_import.rb#57 + def source_import_progress(repo, options = T.unsafe(nil)); end + + # Start a source import to a GitHub repository using GitHub Importer. + # + # @example + # @client.start_source_import("octokit/octokit.rb", "http://svn.mycompany.com/svn/myproject", { + # :vcs => "subversion", + # :vcs_username" => "octocat", + # :vcs_password => "secret" + # }) + # @overload start_source_import + # @overload start_source_import + # @return [Sawyer::Resource] Hash representing the repository import + # @see https://developer.github.com/v3/migration/source_imports/#start-an-import + # + # source://octokit//lib/octokit/client/source_import.rb#37 + def start_source_import(*args); end + + # Update source import with authentication or project choice + # Restart source import if no options are passed + # + # https://developer.github.com/v3/migration/source_imports/#update-existing-import + # + # @example + # @client.update_source_import("octokit/octokit.rb", { + # :vcs_username" => "octocat", + # :vcs_password => "secret" + # }) + # @option options + # @option options + # @option options + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the repository import + # @see https://developer.github.com/v3/migration/source_imports/#update-existing-import + # + # source://octokit//lib/octokit/client/source_import.rb#77 + def update_source_import(repo, options = T.unsafe(nil)); end +end + +# Methods for the Repository Statistics API +# +# @see https://developer.github.com/v3/repos/statistics/ +# +# source://octokit//lib/octokit/client/stats.rb#8 +module Octokit::Client::Stats + # Get the number of additions and deletions per week + # + # @example Get code frequency stats for octokit + # @client.code_frequency_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Weekly aggregate of the number of additions + # and deletions pushed to a repository. + # @see https://developer.github.com/v3/repos/statistics/#get-the-number-of-additions-and-deletions-per-week + # + # source://octokit//lib/octokit/client/stats.rb#47 + def code_frequency_stats(repo, options = T.unsafe(nil)); end + + # Get the last year of commit activity data + # + # @example Get commit activity for octokit + # @client.commit_activity_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Array] The last year of commit activity grouped by + # week. The days array is a group of commits per day, starting on Sunday. + # @see https://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data + # + # source://octokit//lib/octokit/client/stats.rb#33 + def commit_activity_stats(repo, options = T.unsafe(nil)); end + + # Get contributors list with additions, deletions, and commit counts + # + # @example Get contributor stats for octokit + # @client.contributors_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Array of contributor stats + # @see https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts + # + # source://octokit//lib/octokit/client/stats.rb#18 + def contributor_stats(repo, options = T.unsafe(nil)); end + + # Get contributors list with additions, deletions, and commit counts + # + # @example Get contributor stats for octokit + # @client.contributors_stats('octokit/octokit.rb') + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Array of contributor stats + # @see https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts + # + # source://octokit//lib/octokit/client/stats.rb#18 + def contributors_stats(repo, options = T.unsafe(nil)); end + + # Get the weekly commit count for the repo owner and everyone else + # + # @example Get weekly commit counts for octokit + # @client.participation_stats("octokit/octokit.rb") + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Sawyer::Resource] Total commit counts for the owner and total commit + # counts in all. all is everyone combined, including the owner in the last + # 52 weeks. If you’d like to get the commit counts for non-owners, you can + # subtract all from owner. + # @see https://developer.github.com/v3/repos/statistics/#get-the-weekly-commit-count-for-the-repository-owner-and-everyone-else + # + # source://octokit//lib/octokit/client/stats.rb#63 + def participation_stats(repo, options = T.unsafe(nil)); end + + # Get the number of commits per hour in each day + # + # @example Get octokit punch card + # @octokit.punch_card_stats + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Arrays containing the day number, hour number, and + # number of commits + # @see https://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day + # + # source://octokit//lib/octokit/client/stats.rb#77 + def punch_card(repo, options = T.unsafe(nil)); end + + # Get the number of commits per hour in each day + # + # @example Get octokit punch card + # @octokit.punch_card_stats + # @option retry_timeout + # @option retry_wait + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param retry_timeout [Hash] a customizable set of options + # @param retry_wait [Hash] a customizable set of options + # @return [Array] Arrays containing the day number, hour number, and + # number of commits + # @see https://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day + # + # source://octokit//lib/octokit/client/stats.rb#77 + def punch_card_stats(repo, options = T.unsafe(nil)); end + + private + + # @param repo [Integer, String, Hash, Repository] A GitHub repository + # @param metric [String] The metrics you are looking for + # @private Get stats for a repository + # @return [Array or nil] Stats in metric-specific format, or nil if not yet calculated. + # @see https://developer.github.com/v3/repos/statistics/ + # + # source://octokit//lib/octokit/client/stats.rb#90 + def get_stats(repo, metric, options = T.unsafe(nil)); end +end + +# Methods for the Commit Statuses API +# +# @see https://developer.github.com/v3/repos/statuses/ +# +# source://octokit//lib/octokit/client/statuses.rb#8 +module Octokit::Client::Statuses + # Get the combined status for a ref + # + # @param repo [Integer, String, Repository, Hash] a GitHub repository + # @param ref [String] A Sha or Ref to fetch the status of + # @return [Sawyer::Resource] The combined status for the commit + # @see https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#26 + def combined_status(repo, ref, options = T.unsafe(nil)); end + + # Create status for a commit + # + # @option options + # @option options + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param sha [String] The SHA1 for the commit + # @param state [String] The state: pending, success, failure, error + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] A status + # @see https://developer.github.com/v3/repos/statuses/#create-a-status + # + # source://octokit//lib/octokit/client/statuses.rb#41 + def create_status(repo, sha, state, options = T.unsafe(nil)); end + + # List all statuses for a given commit + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param sha [String] The SHA1 for the commit + # @return [Array] A list of statuses + # @see https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#15 + def list_statuses(repo, sha, options = T.unsafe(nil)); end + + # Get the combined status for a ref + # + # @param repo [Integer, String, Repository, Hash] a GitHub repository + # @param ref [String] A Sha or Ref to fetch the status of + # @return [Sawyer::Resource] The combined status for the commit + # @see https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#26 + def status(repo, ref, options = T.unsafe(nil)); end + + # List all statuses for a given commit + # + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @param sha [String] The SHA1 for the commit + # @return [Array] A list of statuses + # @see https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref + # + # source://octokit//lib/octokit/client/statuses.rb#15 + def statuses(repo, sha, options = T.unsafe(nil)); end +end + +# Method to check scopes +# +# @see https://developer.github.com/v3/oauth_authorizations/#oauth-authorizations-api +# +# source://octokit//lib/octokit/client/tokens.rb#8 +module Octokit::Client::Tokens + # Check scopes for a token + # + # @param token [String] GitHub OAuth token + # @param options [Hash] Header params for request + # @raise [ArgumentError] + # @return [Array] OAuth scopes + # @see https://developer.github.com/v3/oauth/#scopes + # + # source://octokit//lib/octokit/client/tokens.rb#15 + def scopes(token = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Methods for the Traffic API +# +# @see https://developer.github.com/v3/repos/traffic/ +# +# source://octokit//lib/octokit/client/traffic.rb#8 +module Octokit::Client::Traffic + # Get the total number of clones and breakdown per day or week for the + # last 14 days + # + # @example Clones per day + # @client.clones('octokit/octokit.rb') + # @example Clones per week + # @client.clones('octokit/octokit.rb', per: 'week') + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub Repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Breakdown of clone stats + # @see https://developer.github.com/v3/repos/traffic/#clones + # + # source://octokit//lib/octokit/client/traffic.rb#59 + def clones(repo, options = T.unsafe(nil)); end + + # Get the top 10 popular contents over the last 14 days + # + # @example + # @client.top_paths('octokit/octokit.rb') + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of popular contents + # @see https://developer.github.com/v3/repos/traffic/#list-paths + # + # source://octokit//lib/octokit/client/traffic.rb#27 + def top_paths(repo, options = T.unsafe(nil)); end + + # Get the top 10 referrers over the last 14 days + # + # @example + # @client.top_referrers('octokit/octokit.rb') + # @param repo [Integer, String, Repository, Hash] A GitHub repository + # @return [Array] List of referrers and stats + # @see https://developer.github.com/v3/repos/traffic/#list-referrers + # + # source://octokit//lib/octokit/client/traffic.rb#16 + def top_referrers(repo, options = T.unsafe(nil)); end + + # Get the total number of views and breakdown per day or week for the + # last 14 days + # + # @example Views per day + # @client.views('octokit/octokit.rb') + # @example Views per week + # @client.views('octokit/octokit.rb', per: 'week') + # @option options + # @param repo [Integer, String, Repository, Hash] A GitHub Repository + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Breakdown of view stats + # @see https://developer.github.com/v3/repos/traffic/#views + # + # source://octokit//lib/octokit/client/traffic.rb#43 + def views(repo, options = T.unsafe(nil)); end +end + +# Methods for the Users API +# +# @see https://developer.github.com/v3/users/ +# +# source://octokit//lib/octokit/client/users.rb#8 +module Octokit::Client::Users + # Add email address to user. + # + # Requires authenticated client. + # + # @example + # @client.add_email('new_email@user.com') + # @param email [String] Email address to add to the user. + # @return [Array] Array of all email addresses of the user. + # @see https://developer.github.com/v3/users/emails/#add-email-addresses + # + # source://octokit//lib/octokit/client/users.rb#312 + def add_email(email, _options = T.unsafe(nil)); end + + # Add public key to user account. + # + # Requires authenticated client. + # + # @example + # @client.add_key('Personal projects key', 'ssh-rsa AAA...') + # @param title [String] Title to give reference to the public key. + # @param key [String] Public key. + # @return [Sawyer::Resource] Hash representing the newly added public key. + # @see https://developer.github.com/v3/users/keys/#create-a-public-key + # + # source://octokit//lib/octokit/client/users.rb#255 + def add_key(title, key, options = T.unsafe(nil)); end + + # List all GitHub users + # + # This provides a list of every user, in the order that they signed up + # for GitHub. + # + # @option options + # @param options [Hash] Optional options. + # @return [Array] List of GitHub users. + # @see https://developer.github.com/v3/users/#get-all-users + # + # source://octokit//lib/octokit/client/users.rb#21 + def all_users(options = T.unsafe(nil)); end + + # Deletes a previous migration archive. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#delete-a-user-migration-archive + # + # source://octokit//lib/octokit/client/users.rb#398 + def delete_user_migration_archive(id, options = T.unsafe(nil)); end + + # List email addresses for a user. + # + # Requires authenticated client. + # + # @example + # @client.emails + # @return [Array] Array of email addresses. + # @see https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user + # + # source://octokit//lib/octokit/client/users.rb#299 + def emails(options = T.unsafe(nil)); end + + # Retrieve the access_token. + # + # @example + # Octokit.exchange_code_for_token('aaaa', 'xxxx', 'yyyy', {:accept => 'application/json'}) + # @param code [String] Authorization code generated by GitHub. + # @param app_id [String] Client Id we received when our application was registered with GitHub. Defaults to client_id. + # @param app_secret [String] Client Secret we received when our application was registered with GitHub. Defaults to client_secret. + # @return [Sawyer::Resource] Hash holding the access token. + # @see https://developer.github.com/v3/oauth/#web-application-flow + # + # source://octokit//lib/octokit/client/users.rb#46 + def exchange_code_for_token(code, app_id = T.unsafe(nil), app_secret = T.unsafe(nil), options = T.unsafe(nil)); end + + # Follow a user. + # + # Requires authenticatied client. + # + # @example + # @client.follow('holman') + # @param user [String] Username of the user to follow. + # @return [Boolean] True if follow was successful, false otherwise. + # @see https://developer.github.com/v3/users/followers/#follow-a-user + # + # source://octokit//lib/octokit/client/users.rb#149 + def follow(user, options = T.unsafe(nil)); end + + # Get a user's followers. + # + # @example + # Octokit.followers('pengwynn') + # @param user [Integer, String] GitHub user login or id of the user whose + # list of followers you are getting. + # @return [Array] Array of hashes representing users + # followers. + # @see https://developer.github.com/v3/users/followers/#list-followers-of-a-user + # + # source://octokit//lib/octokit/client/users.rb#99 + def followers(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get list of users a user is following. + # + # @example + # Octokit.following('pengwynn') + # @param user [Intger, String] GitHub user login or id of the user who you + # are getting the list of the people they follow. + # @return [Array] Array of hashes representing users a + # user is following. + # @see https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user + # + # source://octokit//lib/octokit/client/users.rb#112 + def following(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Check if you are following a user. Alternatively, check if a given user + # is following a target user. + # + # Requries an authenticated client. + # + # @example + # @client.follows?('pengwynn') + # @example + # @client.follows?('catsby', 'pengwynn') + # @overload follows? + # @overload follows? + # @return [Boolean] True following target user, false otherwise. + # @see https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user + # @see https://developer.github.com/v3/users/followers/#check-if-one-user-follows-another + # + # source://octokit//lib/octokit/client/users.rb#134 + def follows?(*args); end + + # Get a public key. + # + # Note, when using dot notation to retrieve the values, ruby will return + # the hash key for the public keys value instead of the actual value, use + # symbol or key string to retrieve the value. See example. + # + # Requires authenticated client. + # + # @example + # @client.key(1) + # @example Retrieve public key contents + # public_key = @client.key(1) + # public_key.key + # # => Error + # + # public_key[:key] + # # => "ssh-rsa AAA..." + # + # public_key['key'] + # # => "ssh-rsa AAA..." + # @param key_id [Integer] Key to retreive. + # @return [Sawyer::Resource] Hash representing the key. + # @see https://developer.github.com/v3/users/keys/#get-a-single-public-key + # + # source://octokit//lib/octokit/client/users.rb#217 + def key(key_id, options = T.unsafe(nil)); end + + # Get list of public keys for user. + # + # Requires authenticated client. + # + # @example + # @client.keys + # @return [Array] Array of hashes representing public keys. + # @see https://developer.github.com/v3/users/keys/#list-your-public-keys + # + # source://octokit//lib/octokit/client/users.rb#229 + def keys(options = T.unsafe(nil)); end + + # Remove email from user. + # + # Requires authenticated client. + # + # @example + # @client.remove_email('old_email@user.com') + # @param email [String] Email address to remove. + # @return [Array] Array of all email addresses of the user. + # @see https://developer.github.com/v3/users/emails/#delete-email-addresses + # + # source://octokit//lib/octokit/client/users.rb#326 + def remove_email(email); end + + # Remove a public key from user account. + # + # Requires authenticated client. + # + # @example + # @client.remove_key(1) + # @param id [String] Id of the public key to remove. + # @return [Boolean] True if removal was successful, false otherwise. + # @see https://developer.github.com/v3/users/keys/#delete-a-public-key + # + # source://octokit//lib/octokit/client/users.rb#287 + def remove_key(id, options = T.unsafe(nil)); end + + # Get list of repos starred by a user. + # + # @example + # Octokit.starred('pengwynn') + # @option options + # @option options + # @param user [Integer, String] GitHub user login of the user to get the + # list of their starred repositories. + # @param options [Hash] Optional options + # @return [Array] Array of hashes representing repositories starred by user. + # @see https://developer.github.com/v3/activity/starring/#list-repositories-being-starred + # + # source://octokit//lib/octokit/client/users.rb#177 + def starred(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Check if you are starring a repo. + # + # Requires authenticated client. + # + # @example + # @client.starred?('pengwynn/octokit') + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Boolean] True if you are following the repo, false otherwise. + # @see https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository + # + # source://octokit//lib/octokit/client/users.rb#190 + def starred?(repo, options = T.unsafe(nil)); end + + # Initiates the generation of a migration archive. + # + # Requires authenticated user. + # + # @example + # @client.start_migration(['octocat/hello-world']) + # @option options + # @option options + # @param repositories [Array] :repositories Repositories for the organization. + # @param options [Hash] a customizable set of options + # @return [Sawyer::Resource] Hash representing the new migration. + # @see https://docs.github.com/en/rest/reference/migrations#start-a-user-migration + # + # source://octokit//lib/octokit/client/users.rb#354 + def start_user_migration(repositories, options = T.unsafe(nil)); end + + # List repositories being watched by a user. + # + # @example + # @client.subscriptions("pengwynn") + # @param user [Integer, String] GitHub user login or id. + # @return [Array] Array of repositories. + # @see https://developer.github.com/v3/activity/watching/#list-repositories-being-watched + # + # source://octokit//lib/octokit/client/users.rb#338 + def subscriptions(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Unfollow a user. + # + # Requires authenticated client. + # + # @example + # @client.unfollow('holman') + # @param user [String] Username of the user to unfollow. + # @return [Boolean] True if unfollow was successful, false otherwise. + # @see https://developer.github.com/v3/users/followers/#unfollow-a-user + # + # source://octokit//lib/octokit/client/users.rb#162 + def unfollow(user, options = T.unsafe(nil)); end + + # Unlock a user repository which has been locked by a migration. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @param repo [String] Name of the repository. + # @see https://docs.github.com/en/rest/reference/migrations#unlock-a-user-repository + # + # source://octokit//lib/octokit/client/users.rb#419 + def unlock_user_repository(id, repo, options = T.unsafe(nil)); end + + # Update a public key + # + # Requires authenticated client + # + # @deprecated This method is no longer supported in the API + # @example + # @client.update_key(1, :title => 'new title', :key => "ssh-rsa BBB") + # @option options + # @option options + # @param key_id [Integer] Id of key to update. + # @param options [Hash] Hash containing attributes to update. + # @return [Sawyer::Resource] Hash representing the updated public key. + # @see https://developer.github.com/v3/users/keys/#update-a-public-key + # @see https://developer.github.com/changes/2014-02-24-finer-grained-scopes-for-ssh-keys/ + # + # source://octokit//lib/octokit/client/users.rb#274 + def update_key(key_id, options = T.unsafe(nil)); end + + # Update the authenticated user + # + # @example + # Octokit.update_user(:name => "Erik Michaels-Ober", :email => "sferik@gmail.com", :company => "Code for America", :location => "San Francisco", :hireable => false) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] A customizable set of options. + # @return [Sawyer::Resource] + # @see https://developer.github.com/v3/users/#update-the-authenticated-user + # + # source://octokit//lib/octokit/client/users.rb#86 + def update_user(options); end + + # Get a single user + # + # @example + # Octokit.user("sferik") + # @param user [Integer, String] GitHub user login or id. + # @return [Sawyer::Resource] + # @see https://developer.github.com/v3/users/#get-a-single-user + # @see https://developer.github.com/v3/users/#get-the-authenticated-user + # + # source://octokit//lib/octokit/client/users.rb#33 + def user(user = T.unsafe(nil), options = T.unsafe(nil)); end + + # Get list of public keys for user. + # + # @example + # @client.user_keys('pengwynn') + # @param user [Integer, String] GitHub user login or id. + # @return [Array] Array of hashes representing public keys. + # @see https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user + # + # source://octokit//lib/octokit/client/users.rb#240 + def user_keys(user, options = T.unsafe(nil)); end + + # Fetches the URL to a migration archive. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#download-a-user-migration-archive + # + # source://octokit//lib/octokit/client/users.rb#385 + def user_migration_archive_url(id, options = T.unsafe(nil)); end + + # List repositories for a user migration. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#list-repositories-for-a-user-migration + # + # source://octokit//lib/octokit/client/users.rb#408 + def user_migration_repositories(id, options = T.unsafe(nil)); end + + # Fetches the status of a migration. + # + # Requires authenticated user. + # + # @param id [Integer] ID number of the migration. + # @see https://docs.github.com/en/rest/reference/migrations#get-a-user-migration-status + # + # source://octokit//lib/octokit/client/users.rb#375 + def user_migration_status(id, options = T.unsafe(nil)); end + + # Lists the most recent migrations. + # + # Requires authenticated user. + # + # @return [Array] Array of migration resources. + # @see https://docs.github.com/en/rest/reference/migrations#list-user-migrations + # + # source://octokit//lib/octokit/client/users.rb#365 + def user_migrations(options = T.unsafe(nil)); end + + # Validate user username and password + # + # @option options + # @option options + # @param options [Hash] User credentials + # @return [Boolean] True if credentials are valid + # + # source://octokit//lib/octokit/client/users.rb#66 + def validate_credentials(options = T.unsafe(nil)); end + + # List repositories being watched by a user. + # + # @example + # @client.subscriptions("pengwynn") + # @param user [Integer, String] GitHub user login or id. + # @return [Array] Array of repositories. + # @see https://developer.github.com/v3/activity/watching/#list-repositories-being-watched + # + # source://octokit//lib/octokit/client/users.rb#338 + def watched(user = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Raised on errors in the 400-499 range +# +# source://octokit//lib/octokit/error.rb#226 +class Octokit::ClientError < ::Octokit::Error; end + +# Raised when GitHub returns a 422 HTTP status code +# and body matches 'PullRequestReviewComment' and 'commit_id (or end_commit_oid) is not part of the pull request' +# +# source://octokit//lib/octokit/error.rb#328 +class Octokit::CommitIsNotPartOfPullRequest < ::Octokit::UnprocessableEntity; end + +# Configuration options for {Client}, defaulting to values +# in {Default} +# +# source://octokit//lib/octokit/configurable.rb#6 +module Octokit::Configurable + # Returns the value of attribute access_token. + # + # source://octokit//lib/octokit/configurable.rb#57 + def access_token; end + + # @return [String] OAuth2 access token for authentication + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#57 + def access_token=(_arg0); end + + # @return [String] Base URL for API requests. default: https://api.github.com/ + # + # source://octokit//lib/octokit/configurable.rb#121 + def api_endpoint; end + + # @return [String] Base URL for API requests. default: https://api.github.com/ + # + # source://octokit//lib/octokit/configurable.rb#61 + def api_endpoint=(_arg0); end + + # @return [Boolean] Auto fetch next page of results until rate limit reached + # + # source://octokit//lib/octokit/configurable.rb#57 + def auto_paginate; end + + # @return [Boolean] Auto fetch next page of results until rate limit reached + # + # source://octokit//lib/octokit/configurable.rb#57 + def auto_paginate=(_arg0); end + + # Returns the value of attribute bearer_token. + # + # source://octokit//lib/octokit/configurable.rb#57 + def bearer_token; end + + # @return [String] JWT bearer token for authentication + # @see https://developer.github.com/early-access/integrations/authentication/#as-an-integration + # + # source://octokit//lib/octokit/configurable.rb#57 + def bearer_token=(_arg0); end + + # @return [String] Configure OAuth app key + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#57 + def client_id; end + + # @return [String] Configure OAuth app key + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#57 + def client_id=(_arg0); end + + # Returns the value of attribute client_secret. + # + # source://octokit//lib/octokit/configurable.rb#57 + def client_secret; end + + # @return [String] Configure OAuth app secret + # @see https://developer.github.com/v3/oauth/ + # + # source://octokit//lib/octokit/configurable.rb#57 + def client_secret=(_arg0); end + + # Set configuration options using a block + # + # @yield [_self] + # @yieldparam _self [Octokit::Configurable] the object that the method was called on + # + # source://octokit//lib/octokit/configurable.rb#94 + def configure; end + + # @return [Hash] Configure connection options for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def connection_options; end + + # @return [Hash] Configure connection options for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def connection_options=(_arg0); end + + # @return [String] Configure preferred media type (for API versioning, for example) + # @see https://developer.github.com/v3/media/ + # + # source://octokit//lib/octokit/configurable.rb#57 + def default_media_type; end + + # @return [String] Configure preferred media type (for API versioning, for example) + # @see https://developer.github.com/v3/media/ + # + # source://octokit//lib/octokit/configurable.rb#57 + def default_media_type=(_arg0); end + + # @return [String] GitHub username for Basic Authentication + # + # source://octokit//lib/octokit/configurable.rb#136 + def login; end + + # @return [String] GitHub username for Basic Authentication + # + # source://octokit//lib/octokit/configurable.rb#61 + def login=(_arg0); end + + # @return [String] Base URL for API requests to the GitHub Enterprise management console + # + # source://octokit//lib/octokit/configurable.rb#125 + def management_console_endpoint; end + + # @return [String] Base URL for API requests to the GitHub Enterprise management console + # + # source://octokit//lib/octokit/configurable.rb#61 + def management_console_endpoint=(_arg0); end + + # @return [String] An admin password set up for your GitHub Enterprise management console + # + # source://octokit//lib/octokit/configurable.rb#61 + def management_console_password=(_arg0); end + + # @return [Faraday::Builder or Faraday::RackBuilder] Configure middleware for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def middleware; end + + # @return [Faraday::Builder or Faraday::RackBuilder] Configure middleware for Faraday + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def middleware=(_arg0); end + + # @return [Boolean] Instruct Octokit to get credentials from .netrc file + # + # source://octokit//lib/octokit/configurable.rb#57 + def netrc; end + + # @return [Boolean] Instruct Octokit to get credentials from .netrc file + # + # source://octokit//lib/octokit/configurable.rb#57 + def netrc=(_arg0); end + + # @return [Boolean] + # + # source://octokit//lib/octokit/configurable.rb#140 + def netrc?; end + + # @return [String] Path to .netrc file. default: ~/.netrc + # + # source://octokit//lib/octokit/configurable.rb#57 + def netrc_file; end + + # @return [String] Path to .netrc file. default: ~/.netrc + # + # source://octokit//lib/octokit/configurable.rb#57 + def netrc_file=(_arg0); end + + # @return [String] GitHub password for Basic Authentication + # + # source://octokit//lib/octokit/configurable.rb#61 + def password=(_arg0); end + + # @return [String] Configure page size for paginated results. API default: 30 + # + # source://octokit//lib/octokit/configurable.rb#57 + def per_page; end + + # @return [String] Configure page size for paginated results. API default: 30 + # + # source://octokit//lib/octokit/configurable.rb#57 + def per_page=(_arg0); end + + # @return [String] URI for proxy server + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def proxy; end + + # @return [String] URI for proxy server + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def proxy=(_arg0); end + + # Reset configuration options to default values + # + # source://octokit//lib/octokit/configurable.rb#99 + def reset!; end + + # Compares client options to a Hash of requested options + # + # @param opts [Hash] Options to compare with current client options + # @return [Boolean] + # + # source://octokit//lib/octokit/configurable.rb#117 + def same_options?(opts); end + + # Reset configuration options to default values + # + # source://octokit//lib/octokit/configurable.rb#99 + def setup; end + + # @return [String] SSL verify mode for ssl connections + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def ssl_verify_mode; end + + # @return [String] SSL verify mode for ssl connections + # @see https://github.com/lostisland/faraday + # + # source://octokit//lib/octokit/configurable.rb#57 + def ssl_verify_mode=(_arg0); end + + # @return [String] Configure User-Agent header for requests. + # + # source://octokit//lib/octokit/configurable.rb#57 + def user_agent; end + + # Sets the attribute user_agent + # + # @param value the value to set the attribute user_agent to. + # + # source://octokit//lib/octokit/configurable.rb#57 + def user_agent=(_arg0); end + + # Base URL for generated web URLs + # + # @return [String] Default: https://github.com/ + # + # source://octokit//lib/octokit/configurable.rb#132 + def web_endpoint; end + + # @return [String] Base URL for web URLs. default: https://github.com/ + # + # source://octokit//lib/octokit/configurable.rb#61 + def web_endpoint=(_arg0); end + + private + + # source://octokit//lib/octokit/configurable.rb#150 + def fetch_client_id_and_secret(overrides = T.unsafe(nil)); end + + # source://octokit//lib/octokit/configurable.rb#146 + def options; end + + class << self + # List of configurable keys for {Octokit::Client} + # + # @return [Array] of option keys + # + # source://octokit//lib/octokit/configurable.rb#67 + def keys; end + end +end + +# Raised when GitHub returns a 409 HTTP status code +# +# source://octokit//lib/octokit/error.rb#318 +class Octokit::Conflict < ::Octokit::ClientError; end + +# Network layer for API clients. +# +# source://octokit//lib/octokit/connection.rb#7 +module Octokit::Connection + include ::Octokit::Authentication + + # Hypermedia agent for the GitHub API + # + # @return [Sawyer::Agent] + # + # source://octokit//lib/octokit/connection.rb#104 + def agent; end + + # Make a HTTP DELETE request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#54 + def delete(url, options = T.unsafe(nil)); end + + # Make a HTTP GET request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#18 + def get(url, options = T.unsafe(nil)); end + + # Make a HTTP HEAD request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#63 + def head(url, options = T.unsafe(nil)); end + + # Response for last HTTP request + # + # @return [Sawyer::Response] + # + # source://octokit//lib/octokit/connection.rb#131 + def last_response; end + + # Make one or more HTTP GET requests, optionally fetching + # the next page of results from URL in Link response header based + # on value in {#auto_paginate}. + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Query and header params for request + # @param block [Block] Block to perform the data concatination of the + # multiple requests. The block is called with two parameters, the first + # contains the contents of the requests so far and the second parameter + # contains the latest response. + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#78 + def paginate(url, options = T.unsafe(nil)); end + + # Make a HTTP PATCH request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Body and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#45 + def patch(url, options = T.unsafe(nil)); end + + # Make a HTTP POST request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Body and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#27 + def post(url, options = T.unsafe(nil)); end + + # Make a HTTP PUT request + # + # @param url [String] The path, relative to {#api_endpoint} + # @param options [Hash] Body and header params for request + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#36 + def put(url, options = T.unsafe(nil)); end + + # Fetch the root resource for the API + # + # @return [Sawyer::Resource] + # + # source://octokit//lib/octokit/connection.rb#124 + def root; end + + protected + + # source://octokit//lib/octokit/connection.rb#137 + def endpoint; end + + private + + # Executes the request, checking if it was successful + # + # @return [Boolean] True on success, false otherwise + # + # source://octokit//lib/octokit/connection.rb#166 + def boolean_from_response(method, path, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/connection.rb#194 + def parse_query_and_convenience_headers(options); end + + # source://octokit//lib/octokit/connection.rb#147 + def request(method, path, data, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/connection.rb#143 + def reset_agent; end + + # source://octokit//lib/octokit/connection.rb#210 + def response_data_correctly_encoded(response); end + + # source://octokit//lib/octokit/connection.rb#173 + def sawyer_options; end +end + +# Header keys that can be passed in options hash to {#get},{#head} +# +# source://octokit//lib/octokit/connection.rb#11 +Octokit::Connection::CONVENIENCE_HEADERS = T.let(T.unsafe(nil), Set) + +# Default configuration options for {Client} +# +# source://octokit//lib/octokit/default.rb#19 +module Octokit::Default + class << self + # Default access token from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#59 + def access_token; end + + # Default API endpoint from ENV or {API_ENDPOINT} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#65 + def api_endpoint; end + + # Default pagination preference from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#71 + def auto_paginate; end + + # Default bearer token from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#77 + def bearer_token; end + + # Default OAuth app key from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#83 + def client_id; end + + # Default OAuth app secret from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#89 + def client_secret; end + + # Default options for Faraday::Connection + # + # @return [Hash] + # + # source://octokit//lib/octokit/default.rb#107 + def connection_options; end + + # Default media type from ENV or {MEDIA_TYPE} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#118 + def default_media_type; end + + # Default GitHub username for Basic Auth from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#124 + def login; end + + # Default management console endpoint from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#101 + def management_console_endpoint; end + + # Default management console password from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#95 + def management_console_password; end + + # Default middleware stack for Faraday::Connection + # from {MIDDLEWARE} + # + # @return [Faraday::RackBuilder or Faraday::Builder] + # + # source://octokit//lib/octokit/default.rb#131 + def middleware; end + + # Default behavior for reading .netrc file + # + # @return [Boolean] + # + # source://octokit//lib/octokit/default.rb#178 + def netrc; end + + # Default path for .netrc file + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#184 + def netrc_file; end + + # Configuration options + # + # @return [Hash] + # + # source://octokit//lib/octokit/default.rb#53 + def options; end + + # Default GitHub password for Basic Auth from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#137 + def password; end + + # Default pagination page size from ENV + # + # @return [Integer] Page size + # + # source://octokit//lib/octokit/default.rb#143 + def per_page; end + + # Default proxy server URI for Faraday connection from ENV + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#151 + def proxy; end + + # Default SSL verify mode from ENV + # + # @return [Integer] + # + # source://octokit//lib/octokit/default.rb#157 + def ssl_verify_mode; end + + # Default User-Agent header string from ENV or {USER_AGENT} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#166 + def user_agent; end + + # Default web endpoint from ENV or {WEB_ENDPOINT} + # + # @return [String] + # + # source://octokit//lib/octokit/default.rb#172 + def web_endpoint; end + end +end + +# Default API endpoint +# +# source://octokit//lib/octokit/default.rb#21 +Octokit::Default::API_ENDPOINT = T.let(T.unsafe(nil), String) + +# Default media type +# +# source://octokit//lib/octokit/default.rb#27 +Octokit::Default::MEDIA_TYPE = T.let(T.unsafe(nil), String) + +# Default Faraday middleware stack +# +# source://octokit//lib/octokit/default.rb#33 +Octokit::Default::MIDDLEWARE = T.let(T.unsafe(nil), Faraday::RackBuilder) + +# Default User Agent header string +# +# source://octokit//lib/octokit/default.rb#24 +Octokit::Default::USER_AGENT = T.let(T.unsafe(nil), String) + +# Default WEB endpoint +# +# source://octokit//lib/octokit/default.rb#30 +Octokit::Default::WEB_ENDPOINT = T.let(T.unsafe(nil), String) + +# EnterpriseAdminClient is only meant to be used by GitHub Enterprise Admins +# and provides access the Admin only API endpoints including Admin Stats, +# Management Console, and the Search Indexing API. +# +# @see Octokit::Client Use Octokit::Client for regular API use for GitHub +# and GitHub Enterprise. +# @see https://developer.github.com/v3/enterprise/ +# +# source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#4 +class Octokit::EnterpriseAdminClient + include ::Octokit::Configurable + include ::Octokit::Authentication + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::EnterpriseAdminClient::AdminStats + include ::Octokit::EnterpriseAdminClient::License + include ::Octokit::EnterpriseAdminClient::Orgs + include ::Octokit::EnterpriseAdminClient::SearchIndexing + include ::Octokit::EnterpriseAdminClient::Users + + # @return [EnterpriseAdminClient] a new instance of EnterpriseAdminClient + # + # source://octokit//lib/octokit/enterprise_admin_client.rb#30 + def initialize(options = T.unsafe(nil)); end +end + +# Methods for the Enterprise Admin Stats API +# +# @see https://developer.github.com/v3/enterprise-admin/admin_stats/ +# +# source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#8 +module Octokit::EnterpriseAdminClient::AdminStats + # Get only comment-related stats + # + # @example Get only comment-related stats + # @client.admin_comments_stats + # @return [Sawyer::Resource] Only comment-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#104 + def admin_comments_stats; end + + # Get only gist-related stats + # + # @example Get only gist-related stats + # @client.admin_gits_stats + # @return [Sawyer::Resource] Only only gist-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#95 + def admin_gists_stats; end + + # Get only hooks-related stats + # + # @example Get only hooks-related stats + # @client.admin_hooks_stats + # @return [Sawyer::Resource] Only hooks-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#32 + def admin_hooks_stats; end + + # Get only issue-related stats + # + # @example Get only issue-related stats + # @client.admin_issues_stats + # @return [Sawyer::Resource] Only issue-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#77 + def admin_issues_stats; end + + # Get only milestone-related stats + # + # @example Get only milestone-related stats + # @client.admin_milestones_stats + # @return [Sawyer::Resource] Only milestone-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#86 + def admin_milestones_stats; end + + # Get only organization-related stats + # + # @example Get only organization-related stats + # @client.admin_organization_stats + # @return [Sawyer::Resource] Only organization-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#50 + def admin_organization_stats; end + + # Get only pages-related stats + # + # @example Get only pages-related stats + # @client.admin_pages_stats + # @return [Sawyer::Resource] Only pages-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#41 + def admin_pages_stats; end + + # Get only pull request-related stats + # + # @example Get only pull request-related stats + # @client.admin_pull_requests_stats + # @return [Sawyer::Resource] Only pull request-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#68 + def admin_pull_requests_stats; end + + # Get only repository-related stats + # + # @example Get only repository-related stats + # @client.admin_repository_stats + # @return [Sawyer::Resource] Only repository-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#23 + def admin_repository_stats; end + + # Get all available stats + # + # @example Get all available stats + # @client.admin_stats + # @return [Sawyer::Resource] All available stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#14 + def admin_stats; end + + # Get only user-related stats + # + # @example Get only user-related stats + # @client.admin_users_stats + # @return [Sawyer::Resource] Only user-related stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#59 + def admin_users_stats; end + + private + + # @param metric [String] The metrics you are looking for + # @private Get enterprise stats + # @return [Sawyer::Resource] Magical unicorn stats + # + # source://octokit//lib/octokit/enterprise_admin_client/admin_stats.rb#114 + def get_admin_stats(metric); end +end + +# source://octokit//lib/octokit/enterprise_admin_client/license.rb#8 +module Octokit::EnterpriseAdminClient::License + # source://octokit//lib/octokit/enterprise_admin_client/license.rb#12 + def license_info; end +end + +# Methods for the Enterprise Orgs API +# +# @see https://developer.github.com/v3/enterprise-admin/orgs/ +# +# source://octokit//lib/octokit/enterprise_admin_client/orgs.rb#8 +module Octokit::EnterpriseAdminClient::Orgs + # Create a new organization on the instance. + # + # @example + # @admin_client.create_organization('SuchAGreatOrg', 'gjtorikian') + # @option options + # @param login [String] The organization's username. + # @param admin [String] The login of the user who will manage this organization. + # @param options [Hash] A set of options. + # @return [nil] + # @see https://developer.github.com/v3/enterprise-admin/orgs/#create-an-organization + # + # source://octokit//lib/octokit/enterprise_admin_client/orgs.rb#19 + def create_organization(login, admin, options = T.unsafe(nil)); end +end + +# Methods for the Enterprise Search Indexing API +# +# @see https://developer.github.com/v3/enterprise-admin/search_indexing/ +# +# source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#8 +module Octokit::EnterpriseAdminClient::SearchIndexing + # Queue a User or Organization to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#13 + def index_organization(user); end + + # Queue a user's or organization's repositories to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#46 + def index_organizations_repositories(user); end + + # Queue an index of all the code contained in all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#66 + def index_organizations_repositories_code(user); end + + # Queue an index of all the issues across all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#56 + def index_organizations_repositories_issues(user); end + + # Queue a Repository to be indexed + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#22 + def index_repository(repo); end + + # Queue a repository's code to be indexed + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#38 + def index_repository_code(repo); end + + # Queue a repository's Issues to be indexed + # + # @param repo [String, Hash, Repository] A GitHub repository + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#30 + def index_repository_issues(repo); end + + # Queue a User or Organization to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#13 + def index_user(user); end + + # Queue a user's or organization's repositories to be indexed + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#46 + def index_users_repositories(user); end + + # Queue an index of all the code contained in all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#66 + def index_users_repositories_code(user); end + + # Queue an index of all the issues across all of a user's or + # organization's repositories + # + # @param user [String] A GitHub Enterprise user or organization + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#56 + def index_users_repositories_issues(user); end + + private + + # @param target [String] Target to index + # @private Queue a target for indexing + # @return [Sawyer:Resource] Result of the queuing containing `:message` + # + # source://octokit//lib/octokit/enterprise_admin_client/search_indexing.rb#77 + def queue_index(target); end +end + +# Methods for the Enterprise User Administration API +# +# @see https://developer.github.com/enterprise/v3/enterprise-admin/users/ +# +# source://octokit//lib/octokit/enterprise_admin_client/users.rb#8 +module Octokit::EnterpriseAdminClient::Users + # Creates an impersonation OAuth token. + # + # @example + # @admin_client.create_impersonation_token('foobar', {:scopes => ['repo:write']}) + # @param login [String] The user to create a token for. + # @param options [Array] :scopes The scopes to apply. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#create-an-impersonation-oauth-token + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#95 + def create_impersonation_token(login, options = T.unsafe(nil)); end + + # Create a new user. + # + # @example + # @admin_client.create_user('foobar', 'notreal@foo.bar') + # @param login [String] The user's username. + # @param email [String] The user's email address. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users#create-a-new-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#16 + def create_user(login, email, options = T.unsafe(nil)); end + + # Deletes an impersonation OAuth token. + # + # @example + # @admin_client.delete_impersonation_token('foobar') + # @param login [String] The user whose token should be deleted. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-an-impersonation-oauth-token + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#105 + def delete_impersonation_token(login, options = T.unsafe(nil)); end + + # Deletes a public SSH keys. + # + # @example + # @admin_client.delete_key(1) + # @param id [Number] The ID of the key to delete. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-a-public-key + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#124 + def delete_key(id, options = T.unsafe(nil)); end + + # Deletes a user. + # + # @example + # @admin_client.delete_key(1) + # @param username [String] The username to delete. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-a-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#62 + def delete_user(username, options = T.unsafe(nil)); end + + # Demote a site administrator to an ordinary user + # + # @example + # @admin_client.demote('holman') + # @param user [String] Username of the user to demote. + # @return [Boolean] True if demote was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#demote-a-site-administrator-to-an-ordinary-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#40 + def demote(user, options = T.unsafe(nil)); end + + # Lists all the public SSH keys. + # + # @example + # @admin_client.list_all_keys + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#list-all-public-keys + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#114 + def list_all_keys(options = T.unsafe(nil)); end + + # Promote an ordinary user to a site administrator + # + # @example + # @admin_client.promote('holman') + # @param user [String] Username of the user to promote. + # @return [Boolean] True if promote was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#promote-an-ordinary-user-to-a-site-administrator + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#29 + def promote(user, options = T.unsafe(nil)); end + + # Rename a user. + # + # @example + # @admin_client.rename_user('foobar', 'foofoobar') + # @param old_login [String] The user's old username. + # @param new_login [String] The user's new username. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#rename-an-existing-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#51 + def rename_user(old_login, new_login, options = T.unsafe(nil)); end + + # Suspend a user. + # + # @example + # @admin_client.suspend('holman') + # @param user [String] Username of the user to suspend. + # @return [Boolean] True if suspend was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#suspend-a-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#73 + def suspend(user, options = T.unsafe(nil)); end + + # Unsuspend a user. + # + # @example + # @admin_client.unsuspend('holman') + # @param user [String] Username of the user to unsuspend. + # @return [Boolean] True if unsuspend was successful, false otherwise. + # @see https://developer.github.com/enterprise/v3/enterprise-admin/users/#unsuspend-a-user + # + # source://octokit//lib/octokit/enterprise_admin_client/users.rb#84 + def unsuspend(user, options = T.unsafe(nil)); end +end + +# EnterpriseManagementConsoleClient is only meant to be used by GitHub Enterprise Admins +# and provides access to the management console API endpoints. +# +# @see Octokit::Client Use Octokit::Client for regular API use for GitHub +# and GitHub Enterprise. +# @see https://developer.github.com/v3/enterprise-admin/management_console/ +# +# source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#4 +class Octokit::EnterpriseManagementConsoleClient + include ::Octokit::Configurable + include ::Octokit::Authentication + include ::Octokit::Connection + include ::Octokit::Warnable + include ::Octokit::EnterpriseManagementConsoleClient::ManagementConsole + + # @return [EnterpriseManagementConsoleClient] a new instance of EnterpriseManagementConsoleClient + # + # source://octokit//lib/octokit/enterprise_management_console_client.rb#21 + def initialize(options = T.unsafe(nil)); end + + protected + + # source://octokit//lib/octokit/enterprise_management_console_client.rb#36 + def endpoint; end + + # Set Enterprise Management Console endpoint + # + # @param value [String] Management console endpoint + # + # source://octokit//lib/octokit/enterprise_management_console_client.rb#51 + def management_console_endpoint=(value); end + + # Set Enterprise Management Console password + # + # @param value [String] Management console admin password + # + # source://octokit//lib/octokit/enterprise_management_console_client.rb#43 + def management_console_password=(value); end + + private + + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#160 + def faraday_configuration; end + + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#154 + def password_hash; end +end + +# Methods for the Enterprise Management Console API +# +# @see https://developer.github.com/v3/enterprise-admin/management_console/ +# +# source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#8 +module Octokit::EnterpriseManagementConsoleClient::ManagementConsole + # Add an authorized SSH keys on the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#106 + def add_authorized_key(key); end + + # Fetch the authorized SSH keys on the Enterprise install + # + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#97 + def authorized_keys; end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The installation information + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#51 + def config_check; end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The installation information + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#51 + def config_status; end + + # Removes an authorized SSH keys from the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#130 + def delete_authorized_key(key); end + + # Start (or turn off) the Enterprise maintenance mode + # + # @param maintenance [Hash] A hash configuration of the maintenance settings + # @return [nil] + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#87 + def edit_maintenance_status(maintenance); end + + # Modify the Enterprise settings + # + # @param settings [Hash] A hash configuration of the new settings + # @return [nil] + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#69 + def edit_settings(settings); end + + # Fetch the authorized SSH keys on the Enterprise install + # + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#97 + def get_authorized_keys; end + + # Get information about the Enterprise maintenance status + # + # @return [Sawyer::Resource] The maintenance status + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#78 + def get_maintenance_status; end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The settings + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#59 + def get_settings; end + + # Get information about the Enterprise maintenance status + # + # @return [Sawyer::Resource] The maintenance status + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#78 + def maintenance_status; end + + # Removes an authorized SSH keys from the Enterprise install + # + # @param key Either the file path to a key, a File handler to the key, or the contents of the key itself + # @return [Sawyer::Resource] An array of authorized SSH keys + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#130 + def remove_authorized_key(key); end + + # Start (or turn off) the Enterprise maintenance mode + # + # @param maintenance [Hash] A hash configuration of the maintenance settings + # @return [nil] + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#87 + def set_maintenance_status(maintenance); end + + # Get information about the Enterprise installation + # + # @return [Sawyer::Resource] The settings + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#59 + def settings; end + + # Start a configuration process. + # + # @return nil + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#30 + def start_configuration; end + + # Upgrade an Enterprise installation + # + # @param license [String] The path to your .ghl license file. + # @return nil + # + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#39 + def upgrade(license); end + + # source://octokit//lib/octokit/enterprise_management_console_client/management_console.rb#16 + def upload_license(license, settings = T.unsafe(nil)); end +end + +# Custom error class for rescuing from all GitHub errors +# +# source://octokit//lib/octokit/error.rb#5 +class Octokit::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://octokit//lib/octokit/error.rb#46 + def initialize(response = T.unsafe(nil)); end + + # source://octokit//lib/octokit/error.rb#40 + def build_error_context; end + + # Returns the value of attribute context. + # + # source://octokit//lib/octokit/error.rb#6 + def context; end + + # Documentation URL returned by the API for some errors + # + # @return [String] + # + # source://octokit//lib/octokit/error.rb#55 + def documentation_url; end + + # Array of validation errors + # + # @return [Array] Error info + # + # source://octokit//lib/octokit/error.rb#129 + def errors; end + + # Body returned by the GitHub server. + # + # @return [String] + # + # source://octokit//lib/octokit/error.rb#154 + def response_body; end + + # Headers returned by the GitHub server. + # + # @return [Hash] + # + # source://octokit//lib/octokit/error.rb#147 + def response_headers; end + + # Status code returned by the GitHub server. + # + # @return [Integer] + # + # source://octokit//lib/octokit/error.rb#140 + def response_status; end + + private + + # source://octokit//lib/octokit/error.rb#202 + def build_error_message; end + + # source://octokit//lib/octokit/error.rb#160 + def data; end + + # source://octokit//lib/octokit/error.rb#215 + def redact_url(url_string); end + + # source://octokit//lib/octokit/error.rb#183 + def response_error; end + + # source://octokit//lib/octokit/error.rb#187 + def response_error_summary; end + + # source://octokit//lib/octokit/error.rb#174 + def response_message; end + + class << self + # Returns most appropriate error for 401 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#62 + def error_for_401(headers); end + + # Returns most appropriate error for 403 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#73 + def error_for_403(body); end + + # Return most appropriate error for 404 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#104 + def error_for_404(body); end + + # Return most appropriate error for 422 HTTP status code + # + # @private + # + # source://octokit//lib/octokit/error.rb#116 + def error_for_422(body); end + + # Returns the appropriate Octokit::Error subclass based + # on status and response message + # + # @param response [Hash] HTTP response + # @return [Octokit::Error] + # + # source://octokit//lib/octokit/error.rb#13 + def from_response(response); end + end +end + +# Raised when GitHub returns a 403 HTTP status code +# +# source://octokit//lib/octokit/error.rb#262 +class Octokit::Forbidden < ::Octokit::ClientError; end + +# Class to parse and create Gist URLs +# +# source://octokit//lib/octokit/gist.rb#5 +class Octokit::Gist + # @return [Gist] a new instance of Gist + # + # source://octokit//lib/octokit/gist.rb#16 + def initialize(gist); end + + # !@attribute id + # @return [String] Gist ID + # + # source://octokit//lib/octokit/gist.rb#8 + def id; end + + # !@attribute id + # @return [String] Gist ID + # + # source://octokit//lib/octokit/gist.rb#8 + def id=(_arg0); end + + # Gist ID + # + # @return [String] + # + # source://octokit//lib/octokit/gist.rb#25 + def to_s; end + + # Gist URL + # + # @return [String] + # + # source://octokit//lib/octokit/gist.rb#31 + def url; end + + class << self + # Instantiate {Gist} object from Gist URL + # @ return [Gist] + # + # source://octokit//lib/octokit/gist.rb#12 + def from_url(url); end + end +end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'suspended your access' +# +# source://octokit//lib/octokit/error.rb#302 +class Octokit::InstallationSuspended < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 500 HTTP status code +# +# source://octokit//lib/octokit/error.rb#341 +class Octokit::InternalServerError < ::Octokit::ServerError; end + +# Raised when a repository is created with an invalid format +# +# source://octokit//lib/octokit/error.rb#360 +class Octokit::InvalidRepository < ::ArgumentError; end + +# Current major release. +# +# @return [Integer] +# +# source://octokit//lib/octokit/version.rb#6 +Octokit::MAJOR = T.let(T.unsafe(nil), Integer) + +# Current minor release. +# +# @return [Integer] +# +# source://octokit//lib/octokit/version.rb#10 +Octokit::MINOR = T.let(T.unsafe(nil), Integer) + +# Raised when GitHub returns a 405 HTTP status code +# +# source://octokit//lib/octokit/error.rb#312 +class Octokit::MethodNotAllowed < ::Octokit::ClientError; end + +# source://octokit//lib/octokit/middleware/follow_redirects.rb#12 +module Octokit::Middleware; end + +# Public: Follow HTTP 301, 302, 303, and 307 redirects. +# +# For HTTP 303, the original GET, POST, PUT, DELETE, or PATCH request gets +# converted into a GET. For HTTP 301, 302, and 307, the HTTP method remains +# unchanged. +# +# This middleware currently only works with synchronous requests; i.e. it +# doesn't support parallelism. +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#32 +class Octokit::Middleware::FollowRedirects < ::Faraday::Middleware + # Public: Initialize the middleware. + # + # options - An options Hash (default: {}): + # :limit - A Integer redirect limit (default: 3). + # + # @return [FollowRedirects] a new instance of FollowRedirects + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#53 + def initialize(app, options = T.unsafe(nil)); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#60 + def call(env); end + + private + + # @return [Boolean] + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#66 + def convert_to_get?(response); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#113 + def follow_limit; end + + # @return [Boolean] + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#108 + def follow_redirect?(env, response); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#71 + def perform_with_redirection(env, follows); end + + # Internal: Escapes unsafe characters from a URL which might be a path + # component only or a fully-qualified URI so that it can be joined onto a + # URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not + # risk double-escaping. + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#128 + def safe_escape(uri); end + + # @return [Boolean] + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#117 + def same_host?(original_url, redirect_url); end + + # source://octokit//lib/octokit/middleware/follow_redirects.rb#86 + def update_env(env, request_body, response); end +end + +# HTTP methods for which 30x redirects can be followed +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#33 +Octokit::Middleware::FollowRedirects::ALLOWED_METHODS = T.let(T.unsafe(nil), Set) + +# Keys in env hash which will get cleared between requests +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#39 +Octokit::Middleware::FollowRedirects::ENV_TO_CLEAR = T.let(T.unsafe(nil), Set) + +# Default value for max redirects followed +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#42 +Octokit::Middleware::FollowRedirects::FOLLOW_LIMIT = T.let(T.unsafe(nil), Integer) + +# HTTP redirect status codes that this middleware implements +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#36 +Octokit::Middleware::FollowRedirects::REDIRECT_CODES = T.let(T.unsafe(nil), Set) + +# Regex that matches characters that need to be escaped in URLs, sans +# the "%" character which we assume already represents an escaped +# sequence. +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#47 +Octokit::Middleware::FollowRedirects::URI_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# Public: Exception thrown when the maximum amount of requests is exceeded. +# +# source://octokit//lib/octokit/middleware/follow_redirects.rb#14 +class Octokit::Middleware::RedirectLimitReached < ::Faraday::ClientError + # @return [RedirectLimitReached] a new instance of RedirectLimitReached + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#17 + def initialize(response); end + + # Returns the value of attribute response. + # + # source://octokit//lib/octokit/middleware/follow_redirects.rb#15 + def response; end +end + +# Raised when client fails to provide valid Content-Type +# +# source://octokit//lib/octokit/error.rb#353 +class Octokit::MissingContentType < ::ArgumentError; end + +# Raised when GitHub returns a 406 HTTP status code +# +# source://octokit//lib/octokit/error.rb#315 +class Octokit::NotAcceptable < ::Octokit::ClientError; end + +# Raised when GitHub returns a 404 HTTP status code +# +# source://octokit//lib/octokit/error.rb#305 +class Octokit::NotFound < ::Octokit::ClientError; end + +# Raised when GitHub returns a 501 HTTP status code +# +# source://octokit//lib/octokit/error.rb#344 +class Octokit::NotImplemented < ::Octokit::ServerError; end + +# Raised when GitHub returns a 401 HTTP status code +# and headers include "X-GitHub-OTP" +# +# source://octokit//lib/octokit/error.rb#237 +class Octokit::OneTimePasswordRequired < ::Octokit::ClientError + # Delivery method for the user's OTP + # + # @return [String] + # + # source://octokit//lib/octokit/error.rb#248 + def password_delivery; end + + private + + # source://octokit//lib/octokit/error.rb#254 + def delivery_method_from_header; end + + class << self + # @private + # + # source://octokit//lib/octokit/error.rb#241 + def required_header(headers); end + end +end + +# @private +# +# source://octokit//lib/octokit/error.rb#238 +Octokit::OneTimePasswordRequired::OTP_DELIVERY_PATTERN = T.let(T.unsafe(nil), Regexp) + +# GitHub organization class to generate API path urls +# +# source://octokit//lib/octokit/organization.rb#5 +class Octokit::Organization + class << self + # Get the api path for an organization + # + # @param org [String, Integer] GitHub organization login or id + # @return [String] Organization Api path + # + # source://octokit//lib/octokit/organization.rb#10 + def path(org); end + end +end + +# Current patch level. +# +# @return [Integer] +# +# source://octokit//lib/octokit/version.rb#14 +Octokit::PATCH = T.let(T.unsafe(nil), Integer) + +# Raised when GitHub returns a 422 HTTP status code and body matches 'Path diff too large'. +# It could occur when attempting to post review comments on a "too large" file. +# +# source://octokit//lib/octokit/error.rb#332 +class Octokit::PathDiffTooLarge < ::Octokit::UnprocessableEntity; end + +# source://octokit//lib/octokit/error.rb#362 +Octokit::RATE_LIMITED_ERRORS = T.let(T.unsafe(nil), Array) + +# Class for API Rate Limit info +# +# @see https://developer.github.com/v3/#rate-limiting +# +# source://octokit//lib/octokit/rate_limit.rb#20 +class Octokit::RateLimit < ::Struct + class << self + # Get rate limit info from HTTP response + # + # @param response [#headers] HTTP response + # @return [RateLimit] + # + # source://octokit//lib/octokit/rate_limit.rb#21 + def from_response(response); end + end +end + +# Class to extract options from Ruby arguments for +# Repository-related methods +# +# source://octokit//lib/octokit/repo_arguments.rb#8 +class Octokit::RepoArguments < ::Octokit::Arguments + # @return [RepoArguments] a new instance of RepoArguments + # + # source://octokit//lib/octokit/repo_arguments.rb#11 + def initialize(args); end + + # !@attribute [r] repo + # @return [Repository] + # + # source://octokit//lib/octokit/repo_arguments.rb#9 + def repo; end +end + +# Class to parse GitHub repository owner and name from +# URLs and to generate URLs +# +# source://octokit//lib/octokit/repository.rb#6 +class Octokit::Repository + # @raise [Octokit::InvalidRepository] if the repository + # has an invalid format + # @return [Repository] a new instance of Repository + # + # source://octokit//lib/octokit/repository.rb#23 + def initialize(repo); end + + # Returns the value of attribute id. + # + # source://octokit//lib/octokit/repository.rb#7 + def id; end + + # Sets the attribute id + # + # @param value the value to set the attribute id to. + # + # source://octokit//lib/octokit/repository.rb#7 + def id=(_arg0); end + + # @return [String] Api path for id identified repos + # + # source://octokit//lib/octokit/repository.rb#67 + def id_api_path; end + + # Returns the value of attribute name. + # + # source://octokit//lib/octokit/repository.rb#7 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://octokit//lib/octokit/repository.rb#7 + def name=(_arg0); end + + # @return [String] Api path for owner/name identified repos + # + # source://octokit//lib/octokit/repository.rb#62 + def named_api_path; end + + # Returns the value of attribute owner. + # + # source://octokit//lib/octokit/repository.rb#7 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://octokit//lib/octokit/repository.rb#7 + def owner=(_arg0); end + + # @return [String] Repository API path + # + # source://octokit//lib/octokit/repository.rb#49 + def path; end + + # Returns the value of attribute name. + # + # source://octokit//lib/octokit/repository.rb#7 + def repo; end + + # Repository owner/name + # + # @return [String] + # + # source://octokit//lib/octokit/repository.rb#43 + def slug; end + + # Repository owner/name + # + # @return [String] + # + # source://octokit//lib/octokit/repository.rb#43 + def to_s; end + + # Repository URL based on {Octokit::Client#web_endpoint} + # + # @return [String] + # + # source://octokit//lib/octokit/repository.rb#73 + def url; end + + # Returns the value of attribute owner. + # + # source://octokit//lib/octokit/repository.rb#7 + def user; end + + # Returns the value of attribute owner. + # + # source://octokit//lib/octokit/repository.rb#7 + def username; end + + private + + # @raise [Octokit::InvalidRepository] + # + # source://octokit//lib/octokit/repository.rb#89 + def raise_invalid_repository!(repo); end + + # source://octokit//lib/octokit/repository.rb#83 + def validate_owner_and_name!(repo); end + + class << self + # Instantiate from a GitHub repository URL + # + # @return [Repository] + # + # source://octokit//lib/octokit/repository.rb#14 + def from_url(url); end + + # Get the api path for a repo + # + # @param repo [Integer, String, Hash, Repository] A GitHub repository. + # @return [String] Api path. + # + # source://octokit//lib/octokit/repository.rb#57 + def path(repo); end + end +end + +# source://octokit//lib/octokit/repository.rb#9 +Octokit::Repository::NAME_WITH_OWNER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'repository access blocked' +# +# source://octokit//lib/octokit/error.rb#282 +class Octokit::RepositoryUnavailable < ::Octokit::Forbidden; end + +# Faraday response middleware +# +# source://octokit//lib/octokit/response/base_middleware.rb#6 +module Octokit::Response; end + +# In Faraday 2.x, Faraday::Response::Middleware was removed +# +# source://octokit//lib/octokit/response/base_middleware.rb#8 +Octokit::Response::BaseMiddleware = Faraday::Middleware + +# Parses RSS and Atom feed responses. +# +# source://octokit//lib/octokit/response/feed_parser.rb#8 +class Octokit::Response::FeedParser < ::Faraday::Middleware + # source://octokit//lib/octokit/response/feed_parser.rb#9 + def on_complete(env); end +end + +# This class raises an Octokit-flavored exception based +# HTTP status codes returned by the API +# +# source://octokit//lib/octokit/response/raise_error.rb#11 +class Octokit::Response::RaiseError < ::Faraday::Middleware + # source://octokit//lib/octokit/response/raise_error.rb#12 + def on_complete(response); end +end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'Resource protected by organization SAML enforcement' +# +# source://octokit//lib/octokit/error.rb#298 +class Octokit::SAMLProtected < ::Octokit::Forbidden; end + +# Raised on errors in the 500-599 range +# +# source://octokit//lib/octokit/error.rb#338 +class Octokit::ServerError < ::Octokit::Error; end + +# Raised when GitHub returns a 503 HTTP status code +# +# source://octokit//lib/octokit/error.rb#350 +class Octokit::ServiceUnavailable < ::Octokit::ServerError; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'returns blobs up to [0-9]+ MB' +# +# source://octokit//lib/octokit/error.rb#274 +class Octokit::TooLargeContent < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'login attempts exceeded' +# +# source://octokit//lib/octokit/error.rb#270 +class Octokit::TooManyLoginAttempts < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'rate limit exceeded' +# +# source://octokit//lib/octokit/error.rb#266 +class Octokit::TooManyRequests < ::Octokit::Forbidden; end + +# Raised when GitHub returns a 401 HTTP status code +# +# source://octokit//lib/octokit/error.rb#232 +class Octokit::Unauthorized < ::Octokit::ClientError; end + +# Raised when GitHub returns a 451 HTTP status code +# +# source://octokit//lib/octokit/error.rb#335 +class Octokit::UnavailableForLegalReasons < ::Octokit::ClientError; end + +# Raised when GitHub returns a 422 HTTP status code +# +# source://octokit//lib/octokit/error.rb#324 +class Octokit::UnprocessableEntity < ::Octokit::ClientError; end + +# Raised when GitHub returns a 414 HTTP status code +# +# source://octokit//lib/octokit/error.rb#321 +class Octokit::UnsupportedMediaType < ::Octokit::ClientError; end + +# Raised when GitHub returns a 403 HTTP status code +# and body matches 'email address must be verified' +# +# source://octokit//lib/octokit/error.rb#286 +class Octokit::UnverifiedEmail < ::Octokit::Forbidden; end + +# GitHub user class to generate API path urls +# +# source://octokit//lib/octokit/user.rb#5 +class Octokit::User + class << self + # Get the api path for a user + # + # @param user [String, Integer] GitHub user login or id + # @return [String] User Api path + # + # source://octokit//lib/octokit/user.rb#10 + def path(user); end + end +end + +# Full release version. +# +# @return [String] +# +# source://octokit//lib/octokit/version.rb#18 +Octokit::VERSION = T.let(T.unsafe(nil), String) + +# Allows warnings to be suppressed via environment variable. +# +# source://octokit//lib/octokit/warnable.rb#5 +module Octokit::Warnable + private + + # Wrapper around Kernel#warn to print warnings unless + # OCTOKIT_SILENT is set to true. + # + # @return [nil] + # + # source://octokit//lib/octokit/warnable.rb#12 + def octokit_warn(*message); end + + class << self + # Wrapper around Kernel#warn to print warnings unless + # OCTOKIT_SILENT is set to true. + # + # @return [nil] + # + # source://octokit//lib/octokit/warnable.rb#12 + def octokit_warn(*message); end + end +end diff --git a/sorbet/rbi/gems/parallel@1.23.0.rbi b/sorbet/rbi/gems/parallel@1.23.0.rbi new file mode 100644 index 0000000000..c8b319a36c --- /dev/null +++ b/sorbet/rbi/gems/parallel@1.23.0.rbi @@ -0,0 +1,273 @@ +# 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(*args, &block); end + + # source://parallel//lib/parallel.rb#303 + def flat_map(*args, &block); 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, used for process scheduling + # + # source://parallel//lib/parallel.rb#345 + def processor_count; end + + # source://parallel//lib/parallel.rb#350 + 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#355 + def worker_number=(worker_num); end + + private + + # source://parallel//lib/parallel.rb#361 + def add_progress_bar!(job_factory, options); end + + # source://parallel//lib/parallel.rb#624 + def call_with_index(item, index, options, &block); end + + # source://parallel//lib/parallel.rb#556 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # source://parallel//lib/parallel.rb#614 + def extract_count_from_options(options); end + + # source://parallel//lib/parallel.rb#642 + def instrument_finish(item, index, result, options); end + + # source://parallel//lib/parallel.rb#647 + def instrument_start(item, index, options); end + + # source://parallel//lib/parallel.rb#590 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#544 + def replace_worker(job_factory, workers, index, options, blk); end + + # source://parallel//lib/parallel.rb#635 + def with_instrumentation(item, index, options); end + + # source://parallel//lib/parallel.rb#386 + def work_direct(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#496 + def work_in_processes(job_factory, options, &blk); end + + # source://parallel//lib/parallel.rb#430 + def work_in_ractors(job_factory, options); end + + # source://parallel//lib/parallel.rb#405 + def work_in_threads(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#564 + 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/parallel_tests@4.2.1.rbi b/sorbet/rbi/gems/parallel_tests@4.2.1.rbi new file mode 100644 index 0000000000..73cd5041f6 --- /dev/null +++ b/sorbet/rbi/gems/parallel_tests@4.2.1.rbi @@ -0,0 +1,245 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel_tests` gem. +# Please instead update this file by running `bin/tapioca gem parallel_tests`. + +# rake tasks for Rails 3+ +# +# source://parallel_tests//lib/parallel_tests.rb#6 +module ParallelTests + class << self + # copied from http://github.com/carlhuda/bundler Bundler::SharedHelpers#find_gemfile + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#50 + def bundler_enabled?; end + + # source://parallel_tests//lib/parallel_tests.rb#95 + def delta; end + + # source://parallel_tests//lib/parallel_tests.rb#16 + def determine_number_of_processes(count); end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#66 + def first_process?; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#70 + def last_process?; end + + # source://parallel_tests//lib/parallel_tests.rb#91 + def now; end + + # source://parallel_tests//lib/parallel_tests.rb#87 + def number_of_running_processes; end + + # source://parallel_tests//lib/parallel_tests.rb#41 + def pid_file_path; end + + # source://parallel_tests//lib/parallel_tests.rb#37 + def pids; end + + # source://parallel_tests//lib/parallel_tests.rb#45 + def stop_all_processes; end + + # source://parallel_tests//lib/parallel_tests.rb#82 + def wait_for_other_processes_to_finish; end + + # source://parallel_tests//lib/parallel_tests.rb#24 + def with_pid_file; end + + # source://parallel_tests//lib/parallel_tests.rb#78 + def with_ruby_binary(command); end + end +end + +# source://parallel_tests//lib/parallel_tests/cli.rb#9 +class ParallelTests::CLI + # source://parallel_tests//lib/parallel_tests/cli.rb#10 + def run(argv); end + + private + + # exit with correct status code so rake parallel:test && echo 123 works + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#177 + def any_test_failed?(test_results); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#340 + def append_test_options(options, argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#381 + def detailed_duration(seconds); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#355 + def execute_command_in_parallel(command, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#56 + def execute_in_parallel(items, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#329 + def extract_file_paths(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#335 + def extract_test_options(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#388 + def final_fail_message; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#398 + def first_is_1?; end + + # source://parallel_tests//lib/parallel_tests/cli.rb#31 + def handle_interrupt; end + + # source://parallel_tests//lib/parallel_tests/cli.rb#348 + def load_runner(type); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#126 + def lock(lockfile); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#181 + def parse_options!(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#166 + def pluralize(n, singular); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#144 + def report_failure_rerun_commmand(test_results, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#158 + def report_number_of_tests(groups); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#136 + def report_results(test_results, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#376 + def report_time_taken(&block); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#118 + def reprint_output(result, lockfile); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#110 + def run_tests(group, process_number, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#71 + def run_tests_in_parallel(num_processes, options); end + + # CI systems often fail when there is no output for a long time, so simulate some output + # + # source://parallel_tests//lib/parallel_tests/cli.rb#404 + def simulate_output_for_ci(simulate); end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#394 + def use_colors?; end +end + +# source://parallel_tests//lib/parallel_tests/grouper.rb#3 +class ParallelTests::Grouper + class << self + # source://parallel_tests//lib/parallel_tests/grouper.rb#10 + def by_scenarios(tests, num_groups, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#5 + def by_steps(tests, num_groups, options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#15 + def in_even_groups_by_size(items, num_groups, options = T.unsafe(nil)); end + + private + + # source://parallel_tests//lib/parallel_tests/grouper.rb#113 + def add_to_group(group, item, size); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#118 + def group_by_features_with_steps(tests, options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#123 + def group_by_scenarios(tests, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#128 + def group_features_by_size(items, groups_to_fill); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#95 + def isolate_count(options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#136 + def items_to_group(items); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#105 + def largest_first(files); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#109 + def smallest_group(groups); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#51 + def specify_groups(items, num_groups, options, groups); end + end +end + +# source://parallel_tests//lib/parallel_tests/pids.rb#5 +class ParallelTests::Pids + # @return [Pids] a new instance of Pids + # + # source://parallel_tests//lib/parallel_tests/pids.rb#8 + def initialize(file_path); end + + # source://parallel_tests//lib/parallel_tests/pids.rb#13 + def add(pid); end + + # source://parallel_tests//lib/parallel_tests/pids.rb#28 + def all; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#23 + def count; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#18 + def delete(pid); end + + # Returns the value of attribute file_path. + # + # source://parallel_tests//lib/parallel_tests/pids.rb#6 + def file_path; end + + # Returns the value of attribute mutex. + # + # source://parallel_tests//lib/parallel_tests/pids.rb#6 + def mutex; end + + private + + # source://parallel_tests//lib/parallel_tests/pids.rb#39 + def clear; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#35 + def pids; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#44 + def read; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#52 + def save; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#56 + def sync(&block); end +end + +# source://parallel_tests//lib/parallel_tests.rb#8 +ParallelTests::RUBY_BINARY = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests/version.rb#3 +ParallelTests::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests.rb#7 +ParallelTests::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/parseconfig@1.0.8.rbi b/sorbet/rbi/gems/parseconfig@1.0.8.rbi new file mode 100644 index 0000000000..1dad354e46 --- /dev/null +++ b/sorbet/rbi/gems/parseconfig@1.0.8.rbi @@ -0,0 +1,136 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parseconfig` gem. +# Please instead update this file by running `bin/tapioca gem parseconfig`. + +# Note: A group is a set of parameters defined for a subpart of a +# config file +# +# source://parseconfig//lib/parseconfig.rb#19 +class ParseConfig + # Initialize the class with the path to the 'config_file' + # The class objects are dynamically generated by the + # name of the 'param' in the config file. Therefore, if + # the config file is 'param = value' then the itializer + # will eval "@param = value" + # + # @return [ParseConfig] a new instance of ParseConfig + # + # source://parseconfig//lib/parseconfig.rb#31 + def initialize(config_file = T.unsafe(nil), separator = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Public: Compare this ParseConfig to some other ParseConfig. For two config to + # be equivalent, they must have the same sections with the same parameters + # + # other - The other ParseConfig. + # + # Returns true if ParseConfig are equivalent and false if they differ. + # + # @return [Boolean] + # + # source://parseconfig//lib/parseconfig.rb#204 + def ==(other); end + + # This method is a shortcut to accessing the @params variable + # + # source://parseconfig//lib/parseconfig.rb#121 + def [](param); end + + # This method adds an element to the config object (not the config file) + # By adding a Hash, you create a new group + # + # source://parseconfig//lib/parseconfig.rb#137 + def add(param_name, value, override = T.unsafe(nil)); end + + # Add parameters to a group. Note that parameters with the same name + # could be placed in different groups + # + # source://parseconfig//lib/parseconfig.rb#164 + def add_to_group(group, param_name, value); end + + # Returns the value of attribute config_file. + # + # source://parseconfig//lib/parseconfig.rb#23 + def config_file; end + + # Sets the attribute config_file + # + # @param value the value to set the attribute config_file to. + # + # source://parseconfig//lib/parseconfig.rb#23 + def config_file=(_arg0); end + + # Public: Compare this ParseConfig to some other ParseConfig. For two config to + # be equivalent, they must have the same sections with the same parameters + # + # other - The other ParseConfig. + # + # Returns true if ParseConfig are equivalent and false if they differ. + # + # @return [Boolean] + # + # source://parseconfig//lib/parseconfig.rb#204 + def eql?(other); end + + # List available sub-groups of the config. + # + # source://parseconfig//lib/parseconfig.rb#131 + def get_groups; end + + # This method returns all parameters/groups defined in a config file. + # + # source://parseconfig//lib/parseconfig.rb#126 + def get_params; end + + # This method will provide the value held by the object "@param" + # where "@param" is actually the name of the param in the config + # file. + # + # DEPRECATED - will be removed in future versions + # + # source://parseconfig//lib/parseconfig.rb#114 + def get_value(param); end + + # Returns the value of attribute groups. + # + # source://parseconfig//lib/parseconfig.rb#23 + def groups; end + + # Sets the attribute groups + # + # @param value the value to set the attribute groups to. + # + # source://parseconfig//lib/parseconfig.rb#23 + def groups=(_arg0); end + + # Import data from the config to our config object. + # + # source://parseconfig//lib/parseconfig.rb#54 + def import_config; end + + # Returns the value of attribute params. + # + # source://parseconfig//lib/parseconfig.rb#23 + def params; end + + # Sets the attribute params + # + # @param value the value to set the attribute params to. + # + # source://parseconfig//lib/parseconfig.rb#23 + def params=(_arg0); end + + # Validate the config file, and contents + # + # source://parseconfig//lib/parseconfig.rb#45 + def validate_config; end + + # Writes out the config file to output_stream + # + # source://parseconfig//lib/parseconfig.rb#172 + def write(output_stream = T.unsafe(nil), quoted = T.unsafe(nil)); end +end + +# source://parseconfig//lib/parseconfig.rb#21 +ParseConfig::Version = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/parser@3.2.2.3.rbi b/sorbet/rbi/gems/parser@3.2.2.3.rbi new file mode 100644 index 0000000000..ec410f7cff --- /dev/null +++ b/sorbet/rbi/gems/parser@3.2.2.3.rbi @@ -0,0 +1,7252 @@ +# 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 + class << self + private + + # source://parser//lib/parser/current.rb#5 + def warn_syntax_deviation(feature, version); end + end +end + +# @api public +# +# source://parser//lib/parser.rb#24 +module Parser::AST; end + +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# source://parser//lib/parser/ast/node.rb#17 +class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @api public + # @option properties + # @param properties [Hash] + # + # source://parser//lib/parser/ast/node.rb#30 + def assign_properties(properties); end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def loc; end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def location; end +end + +# @api public +# +# source://parser//lib/parser/ast/processor.rb#9 +class Parser::AST::Processor < ::AST::Processor + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_alias(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_and(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_and_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_arg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_args(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#103 + def on_argument(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_array(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_array_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_array_pattern_with_tail(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_back_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_begin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_block(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_block_pass(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_blockarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_blockarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_break(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_case(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_case_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#87 + def on_casgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_class(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#79 + def on_const(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_const_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 + def on_csend(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_cvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_cvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#158 + def on_def(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_defined?(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#167 + def on_defs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_dstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_dsym(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_eflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#286 + def on_empty_else(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_ensure(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_erange(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_find_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_for(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_forward_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_forwarded_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_forwarded_restarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_gvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_gvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_hash(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_hash_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_if(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_if_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_iflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_in_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_in_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_index(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_indexasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_irange(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_ivar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_ivasgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_kwarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_kwargs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_kwbegin(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_kwoptarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_kwsplat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_lambda(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_lvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_masgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_alt(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_as(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_current_line(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_pattern_p(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_rest(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_match_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_with_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_mlhs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_module(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_next(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_not(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_nth_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#196 + def on_numblock(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#68 + def on_op_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_optarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_or(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_or_asgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_pair(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_pin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_postexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_preexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#130 + def on_procarg0(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_redo(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_regexp(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_resbody(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_rescue(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_restarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_restarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_retry(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_return(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_sclass(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 + def on_send(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_shadowarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_splat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_super(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_undef(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_unless_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_until(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_until_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#27 + def on_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#43 + def on_vasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_when(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_while(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_while_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_xstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_yield(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#279 + def process_argument_node(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def process_regular_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#271 + def process_var_asgn_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#263 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# source://parser//lib/parser/base.rb#29 +class Parser::Base < ::Racc::Parser + # @api public + # @param builder [Parser::Builders::Default] The AST builder to use. + # @return [Base] a new instance of Base + # + # source://parser//lib/parser/base.rb#126 + def initialize(builder = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#114 + def builder; end + + # @api public + # + # source://parser//lib/parser/base.rb#117 + def context; end + + # @api public + # + # source://parser//lib/parser/base.rb#119 + def current_arg_stack; end + + # @api public + # @return [Parser::Diagnostic::Engine] + # + # source://parser//lib/parser/base.rb#113 + def diagnostics; end + + # @api public + # + # source://parser//lib/parser/base.rb#112 + def lexer; end + + # @api public + # + # source://parser//lib/parser/base.rb#118 + def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # source://parser//lib/parser/base.rb#186 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @api public + # @return [Array] + # @see #parse + # @see Parser::Source::Comment#associate + # + # source://parser//lib/parser/base.rb#204 + def parse_with_comments(source_buffer); end + + # @api public + # + # source://parser//lib/parser/base.rb#121 + def pattern_hash_keys; end + + # @api public + # + # source://parser//lib/parser/base.rb#120 + def pattern_variables; end + + # Resets the state of the parser. + # + # @api public + # + # source://parser//lib/parser/base.rb#167 + def reset; end + + # @api public + # + # source://parser//lib/parser/base.rb#116 + def source_buffer; end + + # @api public + # @return [Parser::StaticEnvironment] + # + # source://parser//lib/parser/base.rb#115 + def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param recover [Boolean] If true, recover from syntax errors. False by default. + # @return [Array] + # + # source://parser//lib/parser/base.rb#233 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + private + + # @api public + # + # source://parser//lib/parser/base.rb#257 + def check_kwarg_name(name_t); end + + # @api public + # + # source://parser//lib/parser/base.rb#266 + def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#251 + def next_token; end + + # @api public + # + # source://parser//lib/parser/base.rb#282 + def on_error(error_token_id, error_value, value_stack); end + + class << self + # @api public + # @return [Parser::Base] parser with the default options set. + # + # source://parser//lib/parser/base.rb#84 + def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse('puts "hello"') + # @param string [String] The block of code to parse. + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/base.rb#30 + def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # source://parser//lib/parser/base.rb#64 + def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Array] + # @see #parse + # + # source://parser//lib/parser/base.rb#77 + def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # @param string [String] The block of code to parse. + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @return [Array] + # + # source://parser//lib/parser/base.rb#49 + def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + private + + # @api public + # + # source://parser//lib/parser/base.rb#97 + def setup_source_buffer(file, line, string, encoding); end + end +end + +# @api public +# +# source://parser//lib/parser.rb#77 +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#690 + 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#616 + def accessible(node); end + + # source://parser//lib/parser/builders/default.rb#865 + def alias(alias_t, to, from); end + + # source://parser//lib/parser/builders/default.rb#904 + def arg(name_t); end + + # source://parser//lib/parser/builders/default.rb#994 + def arg_expr(expr); end + + # source://parser//lib/parser/builders/default.rb#874 + 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#1577 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#754 + def assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#699 + 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#1158 + def attr_asgn(receiver, dot_t, selector_t); end + + # source://parser//lib/parser/builders/default.rb#606 + def back_ref(token); end + + # source://parser//lib/parser/builders/default.rb#1422 + def begin(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1364 + 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#1440 + def begin_keyword(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1192 + def binary_op(receiver, operator_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1109 + def block(method_call, begin_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1144 + def block_pass(amper_t, arg); end + + # source://parser//lib/parser/builders/default.rb#969 + def blockarg(amper_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1014 + def blockarg_expr(amper_t, expr); end + + # source://parser//lib/parser/builders/default.rb#1100 + def call_lambda(lambda_t); end + + # source://parser//lib/parser/builders/default.rb#1083 + 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#1055 + def call_type_for_dot(dot_t); end + + # source://parser//lib/parser/builders/default.rb#1297 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1460 + 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#1410 + def compstmt(statements); end + + # source://parser//lib/parser/builders/default.rb#1273 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # source://parser//lib/parser/builders/default.rb#1279 + def condition_mod(if_true, if_false, cond_t, cond); end + + # source://parser//lib/parser/builders/default.rb#673 + def const(name_t); end + + # source://parser//lib/parser/builders/default.rb#685 + def const_fetch(scope, t_colon2, name_t); end + + # source://parser//lib/parser/builders/default.rb#678 + def const_global(t_colon3, name_t); end + + # source://parser//lib/parser/builders/default.rb#750 + def const_op_assignable(node); end + + # source://parser//lib/parser/builders/default.rb#1607 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # source://parser//lib/parser/builders/default.rb#601 + 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#801 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#832 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#850 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#824 + def def_method(def_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#814 + def def_module(module_t, name, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#808 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#840 + 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#1598 + 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#1318 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#900 + def forward_arg(dots_t); end + + # source://parser//lib/parser/builders/default.rb#890 + def forward_only_args(begin_t, dots_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1071 + def forwarded_args(dots_t); end + + # source://parser//lib/parser/builders/default.rb#1079 + def forwarded_kwrestarg(dstar_t); end + + # source://parser//lib/parser/builders/default.rb#1075 + 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#1571 + 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#1487 + def if_guard(if_t, if_body); end + + # source://parser//lib/parser/builders/default.rb#1466 + def in_match(lhs, in_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1481 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#1167 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1181 + 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#1326 + 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#931 + def kwarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#957 + def kwnilarg(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#938 + def kwoptarg(name_t, value); end + + # source://parser//lib/parser/builders/default.rb#945 + 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#1266 + def logical_op(type, lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1304 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1309 + def loop_mod(type, body, keyword_t, cond); end + + # source://parser//lib/parser/builders/default.rb#1621 + def match_alt(left, pipe_t, right); end + + # source://parser//lib/parser/builders/default.rb#1628 + def match_as(value, assoc_t, as); end + + # source://parser//lib/parser/builders/default.rb#1507 + def match_hash_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1521 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # source://parser//lib/parser/builders/default.rb#1659 + def match_label(label_type, label); end + + # source://parser//lib/parser/builders/default.rb#1635 + def match_nil_pattern(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#1214 + def match_op(receiver, match_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1640 + def match_pair(label_type, label, value); end + + # source://parser//lib/parser/builders/default.rb#1471 + def match_pattern(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1476 + def match_pattern_p(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1560 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1495 + def match_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1603 + def match_with_trailing_comma(match, comma_t); end + + # source://parser//lib/parser/builders/default.rb#792 + def multi_assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#787 + 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#1242 + 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#611 + def nth_ref(token); end + + # source://parser//lib/parser/builders/default.rb#886 + def numargs(max_numparam); end + + # source://parser//lib/parser/builders/default.rb#1025 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1039 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1149 + def objc_varargs(pair, rest_of_varargs); end + + # source://parser//lib/parser/builders/default.rb#761 + def op_assign(lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#911 + 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#1616 + def pin(pin_t, var); end + + # source://parser//lib/parser/builders/default.rb#1349 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#1344 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#979 + 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#1356 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # source://parser//lib/parser/builders/default.rb#920 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1003 + 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#962 + 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#1284 + 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#1230 + def unary_op(op_t, receiver); end + + # source://parser//lib/parser/builders/default.rb#860 + def undef_method(undef_t, names); end + + # source://parser//lib/parser/builders/default.rb#1491 + def unless_guard(unless_t, unless_body); end + + # source://parser//lib/parser/builders/default.rb#1291 + 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#1798 + def arg_name_collides?(this_name, that_name); end + + # source://parser//lib/parser/builders/default.rb#1994 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1968 + def binary_op_map(left_e, op_t, right_e); end + + # source://parser//lib/parser/builders/default.rb#2096 + def block_map(receiver_l, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1773 + def check_assignment_to_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1675 + def check_condition(cond); end + + # source://parser//lib/parser/builders/default.rb#1744 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1719 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1831 + def check_duplicate_pattern_key(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1821 + def check_duplicate_pattern_variable(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1813 + def check_lvar_name(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1788 + def check_reserved_for_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#2253 + def collapse_string_parts?(parts); end + + # source://parser//lib/parser/builders/default.rb#1919 + def collection_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2123 + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # source://parser//lib/parser/builders/default.rb#1954 + def constant_map(scope, colon2_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#2027 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1860 + def delimited_string_map(string_t); end + + # source://parser//lib/parser/builders/default.rb#2275 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2167 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # source://parser//lib/parser/builders/default.rb#2033 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # source://parser//lib/parser/builders/default.rb#1915 + def expr_map(loc); end + + # source://parser//lib/parser/builders/default.rb#2148 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#2195 + def guard_map(keyword_t, guard_body_e); end + + # source://parser//lib/parser/builders/default.rb#2085 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1851 + def join_exprs(left_expr, right_expr); end + + # source://parser//lib/parser/builders/default.rb#2101 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # source://parser//lib/parser/builders/default.rb#2118 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # source://parser//lib/parser/builders/default.rb#2004 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2306 + def kwargs?(node); end + + # source://parser//lib/parser/builders/default.rb#2270 + def loc(token); end + + # source://parser//lib/parser/builders/default.rb#2017 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1843 + def n(type, children, source_map); end + + # source://parser//lib/parser/builders/default.rb#1847 + def n0(type, source_map); end + + # source://parser//lib/parser/builders/default.rb#288 + def numeric(kind, token); end + + # source://parser//lib/parser/builders/default.rb#1885 + def pair_keyword_map(key_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1900 + def pair_quoted_map(begin_t, end_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1871 + def prefix_string_map(symbol); end + + # source://parser//lib/parser/builders/default.rb#1982 + def range_map(start_e, op_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1949 + def regexp_map(begin_t, end_t, options_e); end + + # source://parser//lib/parser/builders/default.rb#2154 + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # source://parser//lib/parser/builders/default.rb#2296 + def rewrite_hash_args_to_kwargs(args); end + + # source://parser//lib/parser/builders/default.rb#2067 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # source://parser//lib/parser/builders/default.rb#2090 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#2041 + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2073 + def send_unary_op_map(selector_t, arg_e); end + + # source://parser//lib/parser/builders/default.rb#2226 + def static_regexp(parts, options); end + + # source://parser//lib/parser/builders/default.rb#2246 + def static_regexp_node(node); end + + # source://parser//lib/parser/builders/default.rb#2209 + def static_string(nodes); end + + # source://parser//lib/parser/builders/default.rb#1935 + def string_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2262 + def string_value(token); end + + # source://parser//lib/parser/builders/default.rb#2143 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1856 + def token_map(token); end + + # source://parser//lib/parser/builders/default.rb#1972 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1880 + def unquoted_map(token); end + + # source://parser//lib/parser/builders/default.rb#2284 + def validate_definee(definee); end + + # source://parser//lib/parser/builders/default.rb#1758 + def validate_no_forward_arg_after_restarg(args); end + + # source://parser//lib/parser/builders/default.rb#2258 + def value(token); end + + # source://parser//lib/parser/builders/default.rb#2061 + def var_send_map(variable_e); end + + # source://parser//lib/parser/builders/default.rb#1964 + def variable_map(name_t); end + + class << self + # source://parser//lib/parser/builders/default.rb#97 + def emit_arg_inside_procarg0; end + + # source://parser//lib/parser/builders/default.rb#97 + def emit_arg_inside_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#58 + def emit_encoding; end + + # source://parser//lib/parser/builders/default.rb#58 + def emit_encoding=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#126 + def emit_forward_arg; end + + # source://parser//lib/parser/builders/default.rb#126 + def emit_forward_arg=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#80 + def emit_index; end + + # source://parser//lib/parser/builders/default.rb#80 + def emit_index=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#174 + def emit_kwargs; end + + # source://parser//lib/parser/builders/default.rb#174 + def emit_kwargs=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#22 + def emit_lambda; end + + # source://parser//lib/parser/builders/default.rb#22 + def emit_lambda=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#203 + def emit_match_pattern; end + + # source://parser//lib/parser/builders/default.rb#203 + def emit_match_pattern=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#40 + def emit_procarg0; end + + # source://parser//lib/parser/builders/default.rb#40 + def emit_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#211 + def modernize; end + end +end + +# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} +# detects a clobbering rewrite action. This class inherits {RuntimeError} +# rather than {StandardError} for backward compatibility. +# +# @api public +# +# source://parser//lib/parser/clobbering_error.rb#11 +class Parser::ClobberingError < ::RuntimeError; end + +# Context of parsing that is represented by a stack of scopes. +# +# Supported states: +# + :class - in the class body (class A; end) +# + :module - in the module body (module M; end) +# + :sclass - in the singleton class body (class << obj; end) +# + :def - in the method body (def m; end) +# + :defs - in the singleton method body (def self.m; end) +# + :def_open_args - in the arglist of the method definition +# keep in mind that it's set **only** after reducing the first argument, +# if you need to handle the first argument check `lex_state == expr_fname` +# + :block - in the block body (tap {}) +# + :lambda - in the lambda body (-> {}) +# +# source://parser//lib/parser/context.rb#18 +class Parser::Context + # @return [Context] a new instance of Context + # + # source://parser//lib/parser/context.rb#29 + def initialize; end + + # source://parser//lib/parser/context.rb#43 + def in_argdef; end + + # source://parser//lib/parser/context.rb#43 + def in_argdef=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_block; end + + # source://parser//lib/parser/context.rb#43 + def in_block=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_class; end + + # source://parser//lib/parser/context.rb#43 + def in_class=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_def; end + + # source://parser//lib/parser/context.rb#43 + def in_def=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_defined; end + + # source://parser//lib/parser/context.rb#43 + def in_defined=(_arg0); end + + # @return [Boolean] + # + # source://parser//lib/parser/context.rb#45 + def in_dynamic_block?; end + + # source://parser//lib/parser/context.rb#43 + def in_kwarg; end + + # source://parser//lib/parser/context.rb#43 + def in_kwarg=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_lambda; end + + # source://parser//lib/parser/context.rb#43 + def in_lambda=(_arg0); end + + # source://parser//lib/parser/context.rb#33 + def reset; end +end + +# source://parser//lib/parser/context.rb#19 +Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) + +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# source://parser//lib/parser/current_arg_stack.rb#14 +class Parser::CurrentArgStack + # @api private + # @return [CurrentArgStack] a new instance of CurrentArgStack + # + # source://parser//lib/parser/current_arg_stack.rb#17 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/current_arg_stack.rb#22 + def empty?; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#34 + def pop; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#26 + def push(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#38 + def reset; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#30 + def set(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#15 + def stack; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#42 + def top; end +end + +# source://parser//lib/parser/current.rb#102 +Parser::CurrentRuby = Parser::Ruby31 + +# @api private +# +# source://parser//lib/parser/deprecation.rb#7 +module Parser::Deprecation + # @api private + # + # source://parser//lib/parser/deprecation.rb#9 + def warn_of_deprecation; end + + # @api private + # + # source://parser//lib/parser/deprecation.rb#8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# source://parser//lib/parser/diagnostic.rb#31 +class Parser::Diagnostic + # @api public + # @param level [Symbol] + # @param reason [Symbol] + # @param arguments [Hash] + # @param location [Parser::Source::Range] + # @param highlights [Array] + # @return [Diagnostic] a new instance of Diagnostic + # + # source://parser//lib/parser/diagnostic.rb#49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # @api public + # @return [Symbol] extended arguments that describe the error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def arguments; end + + # Supplementary error-related source ranges. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#40 + def highlights; end + + # @api public + # @return [Symbol] diagnostic level + # @see LEVELS + # + # source://parser//lib/parser/diagnostic.rb#39 + def level; end + + # Main error-related source range. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#40 + def location; end + + # @api public + # @return [String] the rendered message. + # + # source://parser//lib/parser/diagnostic.rb#69 + def message; end + + # @api public + # @return [Symbol] reason for error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @api public + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# source://parser//lib/parser/diagnostic/engine.rb#36 +class Parser::Diagnostic::Engine + # source://parser//lib/parser/diagnostic/engine.rb#45 + def initialize(consumer = T.unsafe(nil)); end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal; end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer; end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings; end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#64 + def process(diagnostic); end + + protected + + # source://parser//lib/parser/diagnostic/engine.rb#86 + def ignore?(diagnostic); end + + # source://parser//lib/parser/diagnostic/engine.rb#97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @api public +# @return [Array] +# +# source://parser//lib/parser/diagnostic.rb#37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# source://parser//lib/parser/lexer-F1.rb#82 +class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8410 + def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start; end + + # Sets the attribute command_start + # + # @param value the value to set the attribute command_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cond_stack; end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8405 + def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8358 + def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32; end + + # Sets the attribute force_utf32 + # + # @param value the value to set the attribute force_utf32 to. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8392 + def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8401 + def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8387 + def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8396 + def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8281 + def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 + def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8334 + def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8379 + def state; end + + # source://parser//lib/parser/lexer-F1.rb#8383 + def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env; end + + # Sets the attribute static_env + # + # @param value the value to set the attribute static_env to. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def version; end + + protected + + # source://parser//lib/parser/lexer-F1.rb#14631 + def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14693 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14655 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14661 + def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14605 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14714 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14742 + def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14639 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14651 + def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14621 + def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14704 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14722 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14730 + def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14752 + def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14615 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14670 + def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14689 + def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14601 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14592 + def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14597 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14588 + 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#14799 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14785 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14792 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8362 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#6 +class Parser::Lexer::Literal + # source://parser//lib/parser/lexer/literal.rb#40 + 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#114 + def backslash_delimited?; end + + # source://parser//lib/parser/lexer/literal.rb#37 + def dedent_level; end + + # source://parser//lib/parser/lexer/literal.rb#189 + def end_interp_brace_and_try_closing; end + + # source://parser//lib/parser/lexer/literal.rb#216 + def extend_content; end + + # source://parser//lib/parser/lexer/literal.rb#220 + def extend_space(ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#195 + def extend_string(string, ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#202 + def flush_string; end + + # source://parser//lib/parser/lexer/literal.rb#102 + def heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#37 + def heredoc_e; end + + # source://parser//lib/parser/lexer/literal.rb#166 + def infer_indent_level(line); end + + # source://parser//lib/parser/lexer/literal.rb#89 + def interpolate?; end + + # source://parser//lib/parser/lexer/literal.rb#122 + def munge_escape?(character); end + + # source://parser//lib/parser/lexer/literal.rb#132 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#106 + def plain_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#98 + def regexp?; end + + # source://parser//lib/parser/lexer/literal.rb#38 + def saved_herebody_s; end + + # source://parser//lib/parser/lexer/literal.rb#38 + def saved_herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer/literal.rb#110 + def squiggly_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#185 + def start_interp_brace; end + + # source://parser//lib/parser/lexer/literal.rb#37 + def str_s; end + + # source://parser//lib/parser/lexer/literal.rb#230 + def supports_line_continuation_via_slash?; end + + # source://parser//lib/parser/lexer/literal.rb#118 + def type; end + + # source://parser//lib/parser/lexer/literal.rb#93 + def words?; end + + protected + + # source://parser//lib/parser/lexer/literal.rb#248 + def clear_buffer; end + + # source://parser//lib/parser/lexer/literal.rb#244 + def coerce_encoding(string); end + + # source://parser//lib/parser/lexer/literal.rb#236 + def delimiter?(delimiter); end + + # source://parser//lib/parser/lexer/literal.rb#264 + def emit(token, type, s, e); end + + # source://parser//lib/parser/lexer/literal.rb#259 + 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#9 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# source://parser//lib/parser/lexer-F1.rb#14759 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14779 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/stack_state.rb#5 +class Parser::Lexer::StackState + # source://parser//lib/parser/lexer/stack_state.rb#6 + def initialize(name); end + + # source://parser//lib/parser/lexer/stack_state.rb#34 + def active?; end + + # source://parser//lib/parser/lexer/stack_state.rb#11 + def clear; end + + # source://parser//lib/parser/lexer/stack_state.rb#38 + def empty?; end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def inspect; end + + # source://parser//lib/parser/lexer/stack_state.rb#29 + def lexpop; end + + # source://parser//lib/parser/lexer/stack_state.rb#22 + def pop; end + + # source://parser//lib/parser/lexer/stack_state.rb#15 + def push(bit); end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 +class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 + def initialize(lexer, version); end + + # source://parser//lib/parser/lexer-strings.rb#3339 + def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 + def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 + def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 + def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 + def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 + def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 + def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 + def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 + def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 + def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts=(_arg0); end + + protected + + # source://parser//lib/parser/lexer-strings.rb#5397 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5408 + def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 + def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5387 + def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5364 + def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 + def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 + def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5375 + def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 + def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 + def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 + def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5355 + def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 + def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 + def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 + def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 + def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 + def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5347 + def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5379 + def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5383 + def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 + def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 + def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited; end + + # Sets the attribute lex_en_interp_backslash_delimited + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words; end + + # Sets the attribute lex_en_interp_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string; end + + # Sets the attribute lex_en_interp_string + # + # @param value the value to set the attribute lex_en_interp_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words; end + + # Sets the attribute lex_en_interp_words + # + # @param value the value to set the attribute lex_en_interp_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited; end + + # Sets the attribute lex_en_plain_backslash_delimited + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words; end + + # Sets the attribute lex_en_plain_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string; end + + # Sets the attribute lex_en_plain_string + # + # @param value the value to set the attribute lex_en_plain_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words; end + + # Sets the attribute lex_en_plain_words + # + # @param value the value to set the attribute lex_en_plain_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers; end + + # Sets the attribute lex_en_regexp_modifiers + # + # @param value the value to set the attribute lex_en_regexp_modifiers to. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs=(_arg0); end + end +end + +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5414 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @api public +# @see Diagnostic +# +# source://parser//lib/parser/messages.rb#11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#8 +class Parser::MaxNumparamStack + # @api private + # @return [MaxNumparamStack] a new instance of MaxNumparamStack + # + # source://parser//lib/parser/max_numparam_stack.rb#13 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#17 + def empty?; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#29 + def has_numparams?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#21 + def has_ordinary_params!; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#25 + def has_ordinary_params?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#45 + def pop; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#41 + def push(static:); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#33 + def register(numparam); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#9 + def stack; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#37 + def top; end + + private + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#51 + def set(value); end +end + +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://parser//lib/parser/messages.rb#107 +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#114 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# source://parser//lib/parser/meta.rb#5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# +# source://parser//lib/parser/meta.rb#9 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# source://parser//lib/parser/rewriter.rb#22 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # @api public + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/rewriter.rb#98 + def initialize(*_arg0); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/rewriter.rb#38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#67 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @return [String] + # + # source://parser//lib/parser/rewriter.rb#23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#57 + def wrap(range, before, after); end +end + +# @api public +# +# source://parser//lib/parser/rewriter.rb#91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://parser//lib/parser/ruby31.rb#14 +class Parser::Ruby31 < ::Parser::Base + # reduce 0 omitted + # + # source://parser//lib/parser/ruby31.rb#8435 + def _reduce_1(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8489 + def _reduce_10(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9124 + def _reduce_100(val, _values, result); end + + # reduce 101 omitted + # + # source://parser//lib/parser/ruby31.rb#9133 + def _reduce_102(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9139 + def _reduce_103(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9145 + def _reduce_104(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9151 + def _reduce_105(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9157 + def _reduce_106(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9163 + def _reduce_107(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9169 + def _reduce_108(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9175 + def _reduce_109(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8495 + def _reduce_11(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9181 + def _reduce_110(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9191 + def _reduce_111(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9197 + def _reduce_112(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9207 + def _reduce_113(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9214 + def _reduce_114(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9221 + def _reduce_115(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9227 + def _reduce_116(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9233 + def _reduce_117(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9239 + def _reduce_118(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9245 + def _reduce_119(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8512 + def _reduce_12(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9251 + def _reduce_120(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9257 + def _reduce_121(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9263 + def _reduce_122(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9270 + def _reduce_123(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9277 + def _reduce_124(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9283 + def _reduce_125(val, _values, result); end + + # reduce 126 omitted + # + # source://parser//lib/parser/ruby31.rb#9291 + def _reduce_127(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9297 + def _reduce_128(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9303 + def _reduce_129(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8518 + def _reduce_13(val, _values, result); end + + # reduce 134 omitted + # + # source://parser//lib/parser/ruby31.rb#9319 + def _reduce_135(val, _values, result); end + + # reduce 136 omitted + # + # source://parser//lib/parser/ruby31.rb#9327 + def _reduce_137(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9333 + def _reduce_138(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9339 + def _reduce_139(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8524 + def _reduce_14(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8530 + def _reduce_15(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8536 + def _reduce_16(val, _values, result); end + + # reduce 17 omitted + # + # source://parser//lib/parser/ruby31.rb#8544 + def _reduce_18(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8550 + def _reduce_19(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8442 + def _reduce_2(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8556 + def _reduce_20(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8562 + def _reduce_21(val, _values, result); end + + # reduce 210 omitted + # + # source://parser//lib/parser/ruby31.rb#9487 + def _reduce_211(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9493 + def _reduce_212(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9499 + def _reduce_213(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9508 + def _reduce_214(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9517 + def _reduce_215(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9526 + def _reduce_216(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9535 + def _reduce_217(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9543 + def _reduce_218(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9551 + def _reduce_219(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8570 + def _reduce_22(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9557 + def _reduce_220(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9563 + def _reduce_221(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9569 + def _reduce_222(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9575 + def _reduce_223(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9581 + def _reduce_224(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9587 + def _reduce_225(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9593 + def _reduce_226(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9599 + def _reduce_227(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9605 + def _reduce_228(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9611 + def _reduce_229(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8578 + def _reduce_23(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9617 + def _reduce_230(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9623 + def _reduce_231(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9629 + def _reduce_232(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9637 + def _reduce_233(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9643 + def _reduce_234(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9649 + def _reduce_235(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9655 + def _reduce_236(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9661 + def _reduce_237(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9667 + def _reduce_238(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8584 + def _reduce_24(val, _values, result); end + + # reduce 239 omitted + # + # source://parser//lib/parser/ruby31.rb#9675 + def _reduce_240(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9681 + def _reduce_241(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9687 + def _reduce_242(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9693 + def _reduce_243(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9699 + def _reduce_244(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9705 + def _reduce_245(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9711 + def _reduce_246(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9717 + def _reduce_247(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9723 + def _reduce_248(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9729 + def _reduce_249(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8590 + def _reduce_25(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9735 + def _reduce_250(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9741 + def _reduce_251(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9747 + def _reduce_252(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9754 + def _reduce_253(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9761 + def _reduce_254(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9775 + def _reduce_255(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9795 + def _reduce_256(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9809 + def _reduce_257(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8597 + def _reduce_26(val, _values, result); end + + # reduce 262 omitted + # + # source://parser//lib/parser/ruby31.rb#9839 + def _reduce_263(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9845 + def _reduce_264(val, _values, result); end + + # reduce 267 omitted + # + # source://parser//lib/parser/ruby31.rb#9857 + def _reduce_268(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9863 + def _reduce_269(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8604 + def _reduce_27(val, _values, result); end + + # reduce 270 omitted + # + # source://parser//lib/parser/ruby31.rb#9871 + def _reduce_271(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9881 + def _reduce_272(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9887 + def _reduce_273(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9897 + def _reduce_274(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9907 + def _reduce_275(val, _values, result); end + + # reduce 276 omitted + # + # source://parser//lib/parser/ruby31.rb#9915 + def _reduce_277(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8610 + def _reduce_28(val, _values, result); end + + # reduce 279 omitted + # + # source://parser//lib/parser/ruby31.rb#9925 + def _reduce_280(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9931 + def _reduce_281(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9937 + def _reduce_282(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9943 + def _reduce_283(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9949 + def _reduce_284(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9956 + def _reduce_285(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9964 + def _reduce_286(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9970 + def _reduce_287(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9997 + def _reduce_288(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10018 + def _reduce_289(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8616 + def _reduce_29(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10024 + def _reduce_290(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10034 + def _reduce_291(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10040 + def _reduce_292(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10046 + def _reduce_293(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10052 + def _reduce_294(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10058 + def _reduce_295(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10064 + def _reduce_296(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10070 + def _reduce_297(val, _values, result); end + + # reduce 298 omitted + # + # source://parser//lib/parser/ruby31.rb#10078 + def _reduce_299(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8451 + def _reduce_3(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8626 + def _reduce_30(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10084 + def _reduce_300(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10090 + def _reduce_301(val, _values, result); end + + # reduce 311 omitted + # + # source://parser//lib/parser/ruby31.rb#10116 + def _reduce_312(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10122 + def _reduce_313(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10128 + def _reduce_314(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10136 + def _reduce_315(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10142 + def _reduce_316(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10148 + def _reduce_317(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10154 + def _reduce_318(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10160 + def _reduce_319(val, _values, result); end + + # reduce 31 omitted + # + # source://parser//lib/parser/ruby31.rb#8634 + def _reduce_32(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10166 + def _reduce_320(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10172 + def _reduce_321(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10178 + def _reduce_322(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10184 + def _reduce_323(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10190 + def _reduce_324(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10196 + def _reduce_325(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10202 + def _reduce_326(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10208 + def _reduce_327(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10214 + def _reduce_328(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10220 + def _reduce_329(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8640 + def _reduce_33(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10228 + def _reduce_330(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10234 + def _reduce_331(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10240 + def _reduce_332(val, _values, result); end + + # reduce 333 omitted + # + # source://parser//lib/parser/ruby31.rb#10252 + def _reduce_334(val, _values, result); end + + # reduce 335 omitted + # + # source://parser//lib/parser/ruby31.rb#10262 + def _reduce_336(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10271 + def _reduce_337(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10280 + def _reduce_338(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10286 + def _reduce_339(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8647 + def _reduce_34(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10292 + def _reduce_340(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10302 + def _reduce_341(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10312 + def _reduce_342(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10322 + def _reduce_343(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10328 + def _reduce_344(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10335 + def _reduce_345(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10351 + def _reduce_346(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10359 + def _reduce_347(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10371 + def _reduce_348(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10378 + def _reduce_349(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8658 + def _reduce_35(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10392 + def _reduce_350(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10404 + def _reduce_351(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10416 + def _reduce_352(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10422 + def _reduce_353(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10428 + def _reduce_354(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10434 + def _reduce_355(val, _values, result); end + + # reduce 356 omitted + # + # source://parser//lib/parser/ruby31.rb#10442 + def _reduce_357(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10448 + def _reduce_358(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10454 + def _reduce_359(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10461 + def _reduce_360(val, _values, result); end + + # reduce 362 omitted + # + # source://parser//lib/parser/ruby31.rb#10473 + def _reduce_363(val, _values, result); end + + # reduce 366 omitted + # + # source://parser//lib/parser/ruby31.rb#10485 + def _reduce_367(val, _values, result); end + + # reduce 368 omitted + # + # source://parser//lib/parser/ruby31.rb#10498 + def _reduce_369(val, _values, result); end + + # reduce 36 omitted + # + # source://parser//lib/parser/ruby31.rb#8666 + def _reduce_37(val, _values, result); end + + # reduce 371 omitted + # + # source://parser//lib/parser/ruby31.rb#10508 + def _reduce_372(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10514 + def _reduce_373(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10520 + def _reduce_374(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10526 + def _reduce_375(val, _values, result); end + + # reduce 376 omitted + # + # source://parser//lib/parser/ruby31.rb#10534 + def _reduce_377(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10541 + def _reduce_378(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10549 + def _reduce_379(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8672 + def _reduce_38(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10555 + def _reduce_380(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10561 + def _reduce_381(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10567 + def _reduce_382(val, _values, result); end + + # reduce 384 omitted + # + # source://parser//lib/parser/ruby31.rb#10577 + def _reduce_385(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10583 + def _reduce_386(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10589 + def _reduce_387(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10595 + def _reduce_388(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10601 + def _reduce_389(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8678 + def _reduce_39(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10607 + def _reduce_390(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10613 + def _reduce_391(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10619 + def _reduce_392(val, _values, result); end + + # reduce 393 omitted + # + # source://parser//lib/parser/ruby31.rb#10627 + def _reduce_394(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10636 + def _reduce_395(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10646 + def _reduce_396(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10654 + def _reduce_397(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10663 + def _reduce_398(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8457 + def _reduce_4(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8687 + def _reduce_40(val, _values, result); end + + # reduce 399 omitted + # + # source://parser//lib/parser/ruby31.rb#10673 + def _reduce_400(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10682 + def _reduce_401(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10692 + def _reduce_402(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10700 + def _reduce_403(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10709 + def _reduce_404(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10716 + def _reduce_405(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10724 + def _reduce_406(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10731 + def _reduce_407(val, _values, result); end + + # reduce 408 omitted + # + # source://parser//lib/parser/ruby31.rb#10741 + def _reduce_409(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8696 + def _reduce_41(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10747 + def _reduce_410(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10753 + def _reduce_411(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10762 + def _reduce_412(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10771 + def _reduce_413(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10777 + def _reduce_414(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10783 + def _reduce_415(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10789 + def _reduce_416(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10795 + def _reduce_417(val, _values, result); end + + # reduce 418 omitted + # + # source://parser//lib/parser/ruby31.rb#10804 + def _reduce_419(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8705 + def _reduce_42(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10813 + def _reduce_420(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10819 + def _reduce_421(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10835 + def _reduce_422(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10843 + def _reduce_423(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10853 + def _reduce_424(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10860 + def _reduce_425(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10867 + def _reduce_426(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10874 + def _reduce_427(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10881 + def _reduce_428(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10888 + def _reduce_429(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8713 + def _reduce_43(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10895 + def _reduce_430(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10903 + def _reduce_431(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10911 + def _reduce_432(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10923 + def _reduce_433(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10934 + def _reduce_434(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10942 + def _reduce_435(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10950 + def _reduce_436(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10958 + def _reduce_437(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10964 + def _reduce_438(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10972 + def _reduce_439(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8722 + def _reduce_44(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10980 + def _reduce_440(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10988 + def _reduce_441(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#10994 + def _reduce_442(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11000 + def _reduce_443(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11007 + def _reduce_444(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11014 + def _reduce_445(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11021 + def _reduce_446(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11028 + def _reduce_447(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11035 + def _reduce_448(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11045 + def _reduce_449(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8736 + def _reduce_45(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11052 + def _reduce_450(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11058 + def _reduce_451(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11069 + def _reduce_452(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11076 + def _reduce_453(val, _values, result); end + + # reduce 454 omitted + # + # source://parser//lib/parser/ruby31.rb#11084 + def _reduce_455(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11096 + def _reduce_456(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11104 + def _reduce_457(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11111 + def _reduce_458(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8756 + def _reduce_46(val, _values, result); end + + # reduce 459 omitted + # + # source://parser//lib/parser/ruby31.rb#11119 + def _reduce_460(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11125 + def _reduce_461(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11131 + def _reduce_462(val, _values, result); end + + # reduce 463 omitted + # + # source://parser//lib/parser/ruby31.rb#11139 + def _reduce_464(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11149 + def _reduce_465(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11155 + def _reduce_466(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11161 + def _reduce_467(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11167 + def _reduce_468(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8770 + def _reduce_47(val, _values, result); end + + # reduce 469 omitted + # + # source://parser//lib/parser/ruby31.rb#11175 + def _reduce_470(val, _values, result); end + + # reduce 471 omitted + # + # source://parser//lib/parser/ruby31.rb#11183 + def _reduce_472(val, _values, result); end + + # reduce 473 omitted + # + # source://parser//lib/parser/ruby31.rb#11191 + def _reduce_474(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11198 + def _reduce_475(val, _values, result); end + + # reduce 477 omitted + # + # source://parser//lib/parser/ruby31.rb#11209 + def _reduce_478(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11217 + def _reduce_479(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8790 + def _reduce_48(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11225 + def _reduce_480(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11233 + def _reduce_481(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11240 + def _reduce_482(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11248 + def _reduce_483(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11256 + def _reduce_484(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11264 + def _reduce_485(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11271 + def _reduce_486(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11277 + def _reduce_487(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11283 + def _reduce_488(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11289 + def _reduce_489(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11297 + def _reduce_490(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11305 + def _reduce_491(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11311 + def _reduce_492(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11317 + def _reduce_493(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11324 + def _reduce_494(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11330 + def _reduce_495(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11336 + def _reduce_496(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11342 + def _reduce_497(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11349 + def _reduce_498(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11356 + def _reduce_499(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8463 + def _reduce_5(val, _values, result); end + + # reduce 49 omitted + # + # source://parser//lib/parser/ruby31.rb#8798 + def _reduce_50(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11362 + def _reduce_500(val, _values, result); end + + # reduce 501 omitted + # + # source://parser//lib/parser/ruby31.rb#11370 + def _reduce_502(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11380 + def _reduce_503(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11390 + def _reduce_504(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11396 + def _reduce_505(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11402 + def _reduce_506(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11408 + def _reduce_507(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11414 + def _reduce_508(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11420 + def _reduce_509(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11426 + def _reduce_510(val, _values, result); end + + # reduce 511 omitted + # + # source://parser//lib/parser/ruby31.rb#11434 + def _reduce_512(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11440 + def _reduce_513(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11446 + def _reduce_514(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11452 + def _reduce_515(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11458 + def _reduce_516(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11464 + def _reduce_517(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11470 + def _reduce_518(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11476 + def _reduce_519(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11482 + def _reduce_520(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11488 + def _reduce_521(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11494 + def _reduce_522(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11500 + def _reduce_523(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11506 + def _reduce_524(val, _values, result); end + + # reduce 527 omitted + # + # source://parser//lib/parser/ruby31.rb#11518 + def _reduce_528(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11524 + def _reduce_529(val, _values, result); end + + # reduce 52 omitted + # + # source://parser//lib/parser/ruby31.rb#8812 + def _reduce_53(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11530 + def _reduce_530(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11536 + def _reduce_531(val, _values, result); end + + # reduce 534 omitted + # + # source://parser//lib/parser/ruby31.rb#11548 + def _reduce_535(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11554 + def _reduce_536(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8818 + def _reduce_54(val, _values, result); end + + # reduce 544 omitted + # + # source://parser//lib/parser/ruby31.rb#11576 + def _reduce_545(val, _values, result); end + + # reduce 546 omitted + # + # source://parser//lib/parser/ruby31.rb#11584 + def _reduce_547(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11590 + def _reduce_548(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11602 + def _reduce_549(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8824 + def _reduce_55(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11609 + def _reduce_550(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11616 + def _reduce_551(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11622 + def _reduce_552(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11628 + def _reduce_553(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11634 + def _reduce_554(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11649 + def _reduce_555(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11655 + def _reduce_556(val, _values, result); end + + # reduce 558 omitted + # + # source://parser//lib/parser/ruby31.rb#11665 + def _reduce_559(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8830 + def _reduce_56(val, _values, result); end + + # reduce 560 omitted + # + # source://parser//lib/parser/ruby31.rb#11673 + def _reduce_561(val, _values, result); end + + # reduce 564 omitted + # + # source://parser//lib/parser/ruby31.rb#11685 + def _reduce_565(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11691 + def _reduce_566(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11697 + def _reduce_567(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11703 + def _reduce_568(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11710 + def _reduce_569(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8836 + def _reduce_57(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11717 + def _reduce_570(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11723 + def _reduce_571(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11730 + def _reduce_572(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11737 + def _reduce_573(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11743 + def _reduce_574(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11749 + def _reduce_575(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11755 + def _reduce_576(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11761 + def _reduce_577(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11767 + def _reduce_578(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11773 + def _reduce_579(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8848 + def _reduce_58(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11779 + def _reduce_580(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11785 + def _reduce_581(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11791 + def _reduce_582(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11797 + def _reduce_583(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11803 + def _reduce_584(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11809 + def _reduce_585(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11815 + def _reduce_586(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11821 + def _reduce_587(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11827 + def _reduce_588(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11833 + def _reduce_589(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8857 + def _reduce_59(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11839 + def _reduce_590(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11845 + def _reduce_591(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11851 + def _reduce_592(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11857 + def _reduce_593(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11863 + def _reduce_594(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11869 + def _reduce_595(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11876 + def _reduce_596(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11885 + def _reduce_597(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11891 + def _reduce_598(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11897 + def _reduce_599(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8469 + def _reduce_6(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8869 + def _reduce_60(val, _values, result); end + + # reduce 602 omitted + # + # source://parser//lib/parser/ruby31.rb#11909 + def _reduce_603(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11916 + def _reduce_604(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11923 + def _reduce_605(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11929 + def _reduce_606(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11940 + def _reduce_607(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11947 + def _reduce_608(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11954 + def _reduce_609(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11961 + def _reduce_610(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11968 + def _reduce_611(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11974 + def _reduce_612(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11980 + def _reduce_613(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11986 + def _reduce_614(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11992 + def _reduce_615(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#11998 + def _reduce_616(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12004 + def _reduce_617(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12010 + def _reduce_618(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12016 + def _reduce_619(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12022 + def _reduce_620(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12028 + def _reduce_621(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12034 + def _reduce_622(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12040 + def _reduce_623(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12046 + def _reduce_624(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12052 + def _reduce_625(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12058 + def _reduce_626(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12064 + def _reduce_627(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12070 + def _reduce_628(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12076 + def _reduce_629(val, _values, result); end + + # reduce 62 omitted + # + # source://parser//lib/parser/ruby31.rb#8882 + def _reduce_63(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12082 + def _reduce_630(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12088 + def _reduce_631(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12094 + def _reduce_632(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12100 + def _reduce_633(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12106 + def _reduce_634(val, _values, result); end + + # reduce 635 omitted + # + # source://parser//lib/parser/ruby31.rb#12114 + def _reduce_636(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12121 + def _reduce_637(val, _values, result); end + + # reduce 638 omitted + # + # source://parser//lib/parser/ruby31.rb#12132 + def _reduce_639(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8888 + def _reduce_64(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12140 + def _reduce_640(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12148 + def _reduce_641(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12154 + def _reduce_642(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12160 + def _reduce_643(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12166 + def _reduce_644(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12172 + def _reduce_645(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12179 + def _reduce_646(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12185 + def _reduce_647(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12191 + def _reduce_648(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12200 + def _reduce_649(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8895 + def _reduce_65(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12210 + def _reduce_650(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12218 + def _reduce_651(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12227 + def _reduce_652(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12235 + def _reduce_653(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12244 + def _reduce_654(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12251 + def _reduce_655(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12259 + def _reduce_656(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12268 + def _reduce_657(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12275 + def _reduce_658(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12283 + def _reduce_659(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8905 + def _reduce_66(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12290 + def _reduce_660(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12298 + def _reduce_661(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12304 + def _reduce_662(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12310 + def _reduce_663(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12316 + def _reduce_664(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12322 + def _reduce_665(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12328 + def _reduce_666(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12334 + def _reduce_667(val, _values, result); end + + # reduce 668 omitted + # + # source://parser//lib/parser/ruby31.rb#12342 + def _reduce_669(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8911 + def _reduce_67(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12352 + def _reduce_670(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12359 + def _reduce_671(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12366 + def _reduce_672(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12372 + def _reduce_673(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12378 + def _reduce_674(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12384 + def _reduce_675(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12399 + def _reduce_676(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12407 + def _reduce_677(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12415 + def _reduce_678(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12422 + def _reduce_679(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8918 + def _reduce_68(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12429 + def _reduce_680(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12435 + def _reduce_681(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12441 + def _reduce_682(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12447 + def _reduce_683(val, _values, result); end + + # reduce 685 omitted + # + # source://parser//lib/parser/ruby31.rb#12457 + def _reduce_686(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12463 + def _reduce_687(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12471 + def _reduce_688(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12477 + def _reduce_689(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12485 + def _reduce_690(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12493 + def _reduce_691(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12499 + def _reduce_692(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12505 + def _reduce_693(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12511 + def _reduce_694(val, _values, result); end + + # reduce 696 omitted + # + # source://parser//lib/parser/ruby31.rb#12521 + def _reduce_697(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12529 + def _reduce_698(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8475 + def _reduce_7(val, _values, result); end + + # reduce 700 omitted + # + # source://parser//lib/parser/ruby31.rb#12539 + def _reduce_701(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12547 + def _reduce_702(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12555 + def _reduce_703(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12561 + def _reduce_704(val, _values, result); end + + # reduce 705 omitted + # + # source://parser//lib/parser/ruby31.rb#12569 + def _reduce_706(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12575 + def _reduce_707(val, _values, result); end + + # reduce 708 omitted + # + # source://parser//lib/parser/ruby31.rb#12583 + def _reduce_709(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12589 + def _reduce_710(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12595 + def _reduce_711(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12601 + def _reduce_712(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12607 + def _reduce_713(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12613 + def _reduce_714(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12619 + def _reduce_715(val, _values, result); end + + # reduce 71 omitted + # + # source://parser//lib/parser/ruby31.rb#8930 + def _reduce_72(val, _values, result); end + + # reduce 727 omitted + # + # source://parser//lib/parser/ruby31.rb#12649 + def _reduce_728(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12655 + def _reduce_729(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8937 + def _reduce_73(val, _values, result); end + + # reduce 733 omitted + # + # source://parser//lib/parser/ruby31.rb#12669 + def _reduce_734(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12675 + def _reduce_735(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12681 + def _reduce_736(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8944 + def _reduce_74(val, _values, result); end + + # reduce 739 omitted + # + # source://parser//lib/parser/ruby31.rb#12693 + def _reduce_740(val, _values, result); end + + # reduce 743 omitted + # + # source://parser//lib/parser/ruby31.rb#12705 + def _reduce_744(val, _values, result); end + + # reduce 75 omitted + # + # source://parser//lib/parser/ruby31.rb#8953 + def _reduce_76(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8960 + def _reduce_77(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8971 + def _reduce_78(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8978 + def _reduce_79(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8989 + def _reduce_80(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#8996 + def _reduce_81(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9007 + def _reduce_82(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9014 + def _reduce_83(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9021 + def _reduce_84(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9028 + def _reduce_85(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9035 + def _reduce_86(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9042 + def _reduce_87(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9048 + def _reduce_88(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9054 + def _reduce_89(val, _values, result); end + + # reduce 8 omitted + # + # source://parser//lib/parser/ruby31.rb#8483 + def _reduce_9(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9060 + def _reduce_90(val, _values, result); end + + # reduce 91 omitted + # + # source://parser//lib/parser/ruby31.rb#9068 + def _reduce_92(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9075 + def _reduce_93(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9082 + def _reduce_94(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9090 + def _reduce_95(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9097 + def _reduce_96(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9105 + def _reduce_97(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9111 + def _reduce_98(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#9118 + def _reduce_99(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#12711 + def _reduce_none(val, _values, result); end + + # source://parser//lib/parser/ruby31.rb#21 + def default_encoding; end + + # source://parser//lib/parser/ruby31.rb#25 + def endless_method_name(name_t); end + + # source://parser//lib/parser/ruby31.rb#38 + def local_pop; end + + # source://parser//lib/parser/ruby31.rb#31 + def local_push; end + + # source://parser//lib/parser/ruby31.rb#45 + def try_declare_numparam(node); end + + # source://parser//lib/parser/ruby31.rb#17 + def version; end +end + +# source://parser//lib/parser/ruby31.rb#8022 +Parser::Ruby31::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/ruby31.rb#8429 +Parser::Ruby31::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://parser//lib/parser/ruby31.rb#8039 +Parser::Ruby31::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# @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#105 + 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#242 + 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#217 + 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#312 + def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#318 + def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#307 + 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#231 + 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#284 + 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#180 + 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#131 + def read; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#194 + 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#145 + 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#162 + 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#273 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#252 + def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#298 + def source_range; end + + private + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#348 + def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#325 + def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#339 + 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] + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#51 + 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#90 + def reencode_string(input); end + end +end + +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://parser//lib/parser/source/comment.rb#67 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @api public + # @param other [Object] + # @return [Boolean] + # + # source://parser//lib/parser/source/comment.rb#120 + def ==(other); end + + # @api public + # @return [Boolean] true if this is a block comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#109 + def document?; end + + # @api public + # @return [Boolean] true if this is an inline comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#101 + def inline?; end + + # @api public + # @return [String] a human-readable representation of this comment + # + # source://parser//lib/parser/source/comment.rb#128 + def inspect; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def loc; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def location; end + + # @api public + # @return [String] + # + # source://parser//lib/parser/source/comment.rb#18 + def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @api public + # @return [Symbol] + # + # source://parser//lib/parser/source/comment.rb#89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @api public + # @deprecated Use {associate_locations}. + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # + # source://parser//lib/parser/source/comment.rb#32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # source://parser//lib/parser/source/comment.rb#59 + def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # source://parser//lib/parser/source/comment.rb#46 + def associate_locations(ast, comments); end + end +end + +# source://parser//lib/parser/source/comment/associator.rb#45 +class Parser::Source::Comment::Associator + # source://parser//lib/parser/source/comment/associator.rb#51 + def initialize(ast, comments); end + + # source://parser//lib/parser/source/comment/associator.rb#92 + def associate; end + + # source://parser//lib/parser/source/comment/associator.rb#115 + def associate_by_identity; end + + # source://parser//lib/parser/source/comment/associator.rb#103 + def associate_locations; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives=(_arg0); end + + private + + # source://parser//lib/parser/source/comment/associator.rb#182 + def advance_comment; end + + # source://parser//lib/parser/source/comment/associator.rb#214 + def advance_through_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#206 + def associate_and_advance_comment(node); end + + # source://parser//lib/parser/source/comment/associator.rb#123 + def children_in_source_order(node); end + + # source://parser//lib/parser/source/comment/associator.rb#187 + def current_comment_before?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#194 + def current_comment_before_end?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#201 + def current_comment_decorates?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#135 + def do_associate; end + + # source://parser//lib/parser/source/comment/associator.rb#166 + def process_leading_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#173 + def process_trailing_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#148 + def visit(node); end +end + +# source://parser//lib/parser/source/comment/associator.rb#212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# source://parser//lib/parser/source/comment/associator.rb#122 +Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) + +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @api public +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# source://parser//lib/parser/source/map.rb#70 +class Parser::Source::Map + # @api public + # @param expression [Range] + # @return [Map] a new instance of Map + # + # source://parser//lib/parser/source/map.rb#76 + def initialize(expression); end + + # Compares source maps. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/map.rb#140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#109 + def column; end + + # @api public + # @return [Range] + # + # source://parser//lib/parser/source/map.rb#72 + def expression; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#117 + def last_line; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def line; end + + # The node that is described by this map. Nodes and maps have 1:1 correspondence. + # + # @api public + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/source/map.rb#71 + def node; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#89 + def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @api public + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # @return [Hash] + # + # source://parser//lib/parser/source/map.rb#166 + def to_hash; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#132 + def with_expression(expression_l); end + + protected + + # @api public + # + # source://parser//lib/parser/source/map.rb#180 + def update_expression(expression_l); end + + # @api public + # + # source://parser//lib/parser/source/map.rb#176 + def with(&block); end + + private + + # @api private + # + # source://parser//lib/parser/source/map.rb#82 + def initialize_copy(other); end +end + +# source://parser//lib/parser/source/map/collection.rb#6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # source://parser//lib/parser/source/map/collection.rb#10 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/collection.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/collection.rb#8 + def end; end +end + +# source://parser//lib/parser/source/map/condition.rb#6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/condition.rb#12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/condition.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/condition.rb#9 + def else; end + + # source://parser//lib/parser/source/map/condition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/condition.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/constant.rb#6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # source://parser//lib/parser/source/map/constant.rb#11 + def initialize(double_colon, name, expression); end + + # source://parser//lib/parser/source/map/constant.rb#7 + def double_colon; end + + # source://parser//lib/parser/source/map/constant.rb#8 + def name; end + + # source://parser//lib/parser/source/map/constant.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/constant.rb#20 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/constant.rb#26 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/definition.rb#6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/definition.rb#12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # source://parser//lib/parser/source/map/definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/for.rb#6 +class Parser::Source::Map::For < ::Parser::Source::Map + # source://parser//lib/parser/source/map/for.rb#10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/for.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/for.rb#8 + def end; end + + # source://parser//lib/parser/source/map/for.rb#7 + def in; end + + # source://parser//lib/parser/source/map/for.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/heredoc.rb#6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # source://parser//lib/parser/source/map/heredoc.rb#10 + def initialize(begin_l, body_l, end_l); end + + # source://parser//lib/parser/source/map/heredoc.rb#7 + def heredoc_body; end + + # source://parser//lib/parser/source/map/heredoc.rb#8 + def heredoc_end; end +end + +# source://parser//lib/parser/source/map/index.rb#6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # source://parser//lib/parser/source/map/index.rb#11 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/index.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/index.rb#8 + def end; end + + # source://parser//lib/parser/source/map/index.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/index.rb#21 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/index.rb#27 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/keyword.rb#6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # source://parser//lib/parser/source/map/keyword.rb#11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/keyword.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/keyword.rb#9 + def end; end + + # source://parser//lib/parser/source/map/keyword.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/method_definition.rb#6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/method_definition.rb#13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # source://parser//lib/parser/source/map/method_definition.rb#11 + def assignment; end + + # source://parser//lib/parser/source/map/method_definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/method_definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/method_definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/method_definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/objc_kwarg.rb#6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # source://parser//lib/parser/source/map/objc_kwarg.rb#11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#9 + def argument; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/operator.rb#6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # source://parser//lib/parser/source/map/operator.rb#9 + def initialize(operator, expression); end + + # source://parser//lib/parser/source/map/operator.rb#7 + def operator; end +end + +# source://parser//lib/parser/source/map/rescue_body.rb#6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # source://parser//lib/parser/source/map/rescue_body.rb#11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # source://parser//lib/parser/source/map/rescue_body.rb#8 + def assoc; end + + # source://parser//lib/parser/source/map/rescue_body.rb#9 + def begin; end + + # source://parser//lib/parser/source/map/rescue_body.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/send.rb#6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # source://parser//lib/parser/source/map/send.rb#13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/send.rb#10 + def begin; end + + # source://parser//lib/parser/source/map/send.rb#7 + def dot; end + + # source://parser//lib/parser/source/map/send.rb#11 + def end; end + + # source://parser//lib/parser/source/map/send.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/send.rb#8 + def selector; end + + # source://parser//lib/parser/source/map/send.rb#24 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/send.rb#30 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/ternary.rb#6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # source://parser//lib/parser/source/map/ternary.rb#10 + def initialize(question_l, colon_l, expression_l); end + + # source://parser//lib/parser/source/map/ternary.rb#8 + def colon; end + + # source://parser//lib/parser/source/map/ternary.rb#7 + def question; end +end + +# source://parser//lib/parser/source/map/variable.rb#6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # source://parser//lib/parser/source/map/variable.rb#10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # source://parser//lib/parser/source/map/variable.rb#7 + def name; end + + # source://parser//lib/parser/source/map/variable.rb#8 + def operator; end + + # source://parser//lib/parser/source/map/variable.rb#19 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/variable.rb#25 + def update_operator(operator_l); end +end + +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @api public +# +# source://parser//lib/parser/source/range.rb#26 +class Parser::Source::Range + include ::Comparable + + # @api public + # @param source_buffer [Buffer] + # @param begin_pos [Integer] + # @param end_pos [Integer] + # @return [Range] a new instance of Range + # + # source://parser//lib/parser/source/range.rb#37 + def initialize(source_buffer, begin_pos, end_pos); end + + # Compare ranges, first by begin_pos, then by end_pos. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#301 + def <=>(other); end + + # by the given amount(s) + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # + # source://parser//lib/parser/source/range.rb#193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @api public + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # source://parser//lib/parser/source/range.rb#55 + def begin; end + + # @api public + # @return [Integer] index of the first character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def begin_pos; end + + # @api public + # @return [Integer] zero-based column number of the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#92 + def column; end + + # @api public + # @raise RangeError + # @return [::Range] a range of columns spanned by this range. + # + # source://parser//lib/parser/source/range.rb#114 + def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#274 + def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#262 + def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#286 + def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#294 + def empty?; end + + # @api public + # @return [Range] a zero-length range located just after the end + # of this range. + # + # source://parser//lib/parser/source/range.rb#63 + def end; end + + # @api public + # @return [Integer] index of the character after the last character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def end_pos; end + + # @api public + def eql?(_arg0); end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#313 + def hash; end + + # @api public + # @return [String] a human-readable representation of this range. + # + # source://parser//lib/parser/source/range.rb#320 + def inspect; end + + # @api public + # @param other [Range] + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # source://parser//lib/parser/source/range.rb#220 + def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#141 + def is?(*what); end + + # @api public + # @param other [Range] + # @return [Range] smallest possible range spanning both this range and `other`. + # + # source://parser//lib/parser/source/range.rb#209 + def join(other); end + + # @api public + # @return [Integer] zero-based column number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#106 + def last_column; end + + # @api public + # @return [Integer] line number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#99 + def last_line; end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @api public + # @param other [Range] + # @return [Boolean] `true` if this range and `other` overlap + # + # source://parser//lib/parser/source/range.rb#250 + def overlaps?(other); end + + # @api public + # @param new_size [Integer] + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # source://parser//lib/parser/source/range.rb#201 + def resize(new_size); end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def size; end + + # @api public + # @return [String] all source code covered by this range. + # + # source://parser//lib/parser/source/range.rb#132 + def source; end + + # @api public + # @return [Parser::Source::Buffer] + # + # source://parser//lib/parser/source/range.rb#29 + def source_buffer; end + + # @api public + # @return [String] a line of source code containing the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#125 + def source_line; end + + # @api public + # @return [Array] a set of character indexes contained in this range. + # + # source://parser//lib/parser/source/range.rb#148 + def to_a; end + + # @api public + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # source://parser//lib/parser/source/range.rb#155 + def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/range.rb#173 + def to_s; end + + # to the given value(s). + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # + # source://parser//lib/parser/source/range.rb#184 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @api public +# @deprecated Use {TreeRewriter} +# +# source://parser//lib/parser/source/rewriter.rb#31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @api public + # @deprecated Use {TreeRewriter} + # @param source_buffer [Source::Buffer] + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/source/rewriter.rb#39 + def initialize(source_buffer); end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/rewriter.rb#33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#131 + def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#80 + def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#117 + def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @deprecated Use {TreeRewriter#process} + # @return [String] + # + # source://parser//lib/parser/source/rewriter.rb#178 + def process; end + + # Removes the source range. + # + # @api public + # @deprecated Use {TreeRewriter#remove} + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @deprecated Use {TreeRewriter#replace} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#167 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/rewriter.rb#32 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @api public + # @deprecated Use {TreeRewriter#transaction} + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # + # source://parser//lib/parser/source/rewriter.rb#216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#wrap} + # @param range [Range] + # @param before [String] + # @param after [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#94 + def wrap(range, before, after); end + + private + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#476 + def active_clobber; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#484 + def active_clobber=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#480 + def active_insertions; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#492 + def active_insertions=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#472 + def active_queue; end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#500 + def adjacent?(range1, range2); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#351 + def adjacent_insertion_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#366 + def adjacent_insertions?(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#347 + def adjacent_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#377 + def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#280 + def append(action); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#389 + def can_merge?(action, existing); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#355 + def clobbered_insertion?(insertion); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#343 + def clobbered_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#468 + def in_transaction?; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#410 + def merge_actions(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#419 + def merge_actions!(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#425 + def merge_replacements(actions); end + + # @api public + # @raise [ClobberingError] + # + # source://parser//lib/parser/source/rewriter.rb#450 + def raise_clobber_error(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#335 + def record_insertion(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#339 + def record_replace(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#445 + def replace_actions(old, updated); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# source://parser//lib/parser/source/rewriter/action.rb#9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # source://parser//lib/parser/source/rewriter/action.rb#15 + def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + + # source://parser//lib/parser/source/rewriter/action.rb#24 + def <=>(other); end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions?; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def order; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def range; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def replacement; end + + # source://parser//lib/parser/source/rewriter/action.rb#30 + def to_s; end +end + +# @api public +# +# source://parser//lib/parser/source/rewriter.rb#504 +Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @api public + # @param source_buffer [Source::Buffer] + # @return [TreeRewriter] a new instance of TreeRewriter + # + # source://parser//lib/parser/source/tree_rewriter.rb#98 + def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @api public + # @return [Array<(Symbol, Range, String{, String})>] + # + # source://parser//lib/parser/source/tree_rewriter.rb#299 + def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @api public + # @return [Array] an ordered list of pairs of range & replacement + # + # source://parser//lib/parser/source/tree_rewriter.rb#281 + def as_replacements; end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/tree_rewriter.rb#93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#125 + def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @api public + # @param rewriter [TreeRewriter] from different source_buffer + # @param offset [Integer] + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#342 + def insert_before_multi(range, text); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#334 + def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] merge of receiver and argument + # + # source://parser//lib/parser/source/tree_rewriter.rb#155 + def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#139 + def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/tree_rewriter.rb#252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @api public + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#193 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/tree_rewriter.rb#92 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @api public + # @raise [RuntimeError] when no block is passed + # + # source://parser//lib/parser/source/tree_rewriter.rb#310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @api public + # @param range [Range] + # @param insert_before [String, nil] + # @param insert_after [String, nil] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#206 + def wrap(range, insert_before, insert_after); end + + protected + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#365 + def action_root; end + + private + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#369 + def action_summary; end + + # @api public + # @raise [ArgumentError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#392 + def check_policy_validity; end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#404 + def check_range_validity(range); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#397 + def combine(range, attributes); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#411 + def enforce_policy(event); end + + # @api public + # @raise [Parser::ClobberingError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/source/tree_rewriter/action.rb#13 +class Parser::Source::TreeRewriter::Action + # source://parser//lib/parser/source/tree_rewriter/action.rb#16 + 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#28 + def combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#67 + def contract; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#33 + def empty?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def insert_after; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def insert_before; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#57 + def insertion?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#80 + def moved(source_buffer, offset); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#49 + def nested_actions; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#40 + def ordered_replacements; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def range; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def replacement; end + + protected + + # source://parser//lib/parser/source/tree_rewriter/action.rb#158 + def analyse_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#145 + def bsearch_child_index(from = T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#224 + def call_enforcer_for_merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#204 + def check_fusible(action, *fusible); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#94 + def children; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#129 + def combine_children(more_children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#102 + def do_combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#135 + def fuse_deletions(action, fusible, other_sibblings); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#215 + def merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#110 + def place_in_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#232 + def swallow(children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#96 + 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#11 + def initialize; end + + # source://parser//lib/parser/static_environment.rb#40 + def declare(name); end + + # source://parser//lib/parser/static_environment.rb#58 + def declare_anonymous_blockarg; end + + # source://parser//lib/parser/static_environment.rb#74 + def declare_anonymous_kwrestarg; end + + # source://parser//lib/parser/static_environment.rb#66 + def declare_anonymous_restarg; end + + # source://parser//lib/parser/static_environment.rb#50 + def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#46 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#62 + def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#78 + def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#70 + def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#54 + def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#82 + def empty?; end + + # source://parser//lib/parser/static_environment.rb#27 + def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#20 + def extend_static; end + + # source://parser//lib/parser/static_environment.rb#15 + def reset; end + + # source://parser//lib/parser/static_environment.rb#34 + def unextend; end +end + +# source://parser//lib/parser/static_environment.rb#7 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#9 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG = 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#61 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/tree_rewriter.rb#79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#108 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#128 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # source://parser//lib/parser/tree_rewriter.rb#62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#98 + def wrap(range, before, after); end +end + +# 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/prettier_print@1.2.1.rbi b/sorbet/rbi/gems/prettier_print@1.2.1.rbi new file mode 100644 index 0000000000..4e8852502c --- /dev/null +++ b/sorbet/rbi/gems/prettier_print@1.2.1.rbi @@ -0,0 +1,951 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prettier_print` gem. +# Please instead update this file by running `bin/tapioca gem prettier_print`. + +# This class implements a pretty printing algorithm. It finds line breaks and +# nice indentations for grouped structure. +# +# By default, the class assumes that primitive elements are strings and each +# byte in the strings is a single column in width. But it can be used for other +# situations by giving suitable arguments for some methods: +# +# * newline object and space generation block for PrettierPrint.new +# * optional width argument for PrettierPrint#text +# * PrettierPrint#breakable +# +# There are several candidate uses: +# * text formatting using proportional fonts +# * multibyte characters which has columns different to number of bytes +# * non-string formatting +# +# == Usage +# +# To use this module, you will need to generate a tree of print nodes that +# represent indentation and newline behavior before it gets sent to the printer. +# Each node has different semantics, depending on the desired output. +# +# The most basic node is a Text node. This represents plain text content that +# cannot be broken up even if it doesn't fit on one line. You would create one +# of those with the text method, as in: +# +# PrettierPrint.format { |q| q.text('my content') } +# +# No matter what the desired output width is, the output for the snippet above +# will always be the same. +# +# If you want to allow the printer to break up the content on the space +# character when there isn't enough width for the full string on the same line, +# you can use the Breakable and Group nodes. For example: +# +# PrettierPrint.format do |q| +# q.group do +# q.text("my") +# q.breakable +# q.text("content") +# end +# end +# +# Now, if everything fits on one line (depending on the maximum width specified) +# then it will be the same output as the first example. If, however, there is +# not enough room on the line, then you will get two lines of output, one for +# the first string and one for the second. +# +# There are other nodes for the print tree as well, described in the +# documentation below. They control alignment, indentation, conditional +# formatting, and more. +# +# == References +# Christian Lindig, Strictly Pretty, March 2000 +# https://lindig.github.io/papers/strictly-pretty-2000.pdf +# +# Philip Wadler, A prettier printer, March 1998 +# https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf +# +# source://prettier_print//lib/prettier_print.rb#62 +class PrettierPrint + # Creates a buffer for pretty printing. + # + # +output+ is an output target. If it is not specified, '' is assumed. It + # should have a << method which accepts the first argument +obj+ of + # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable, + # the first argument +newline+ of PrettierPrint.new, and the result of a given + # block for PrettierPrint.new. + # + # +maxwidth+ specifies maximum line length. If it is not specified, 80 is + # assumed. However actual outputs may overflow +maxwidth+ if long + # non-breakable texts are provided. + # + # +newline+ is used for line breaks. "\n" is used if it is not specified. + # + # The block is used to generate spaces. ->(n) { ' ' * n } is used if it is not + # given. + # + # @return [PrettierPrint] a new instance of PrettierPrint + # + # source://prettier_print//lib/prettier_print.rb#441 + def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end + + # This inserts a BreakParent node into the print tree which forces the + # surrounding and all parent group nodes to break. + # + # source://prettier_print//lib/prettier_print.rb#814 + def break_parent; end + + # This says "you can break a line here if necessary", and a +width+\-column + # text +separator+ is inserted if a line is not broken at the point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # By default, if the surrounding group is broken and a newline is inserted, + # the printer will indent the subsequent line up to the current level of + # indentation. You can disable this behavior with the +indent+ argument if + # that's not desired (rare). + # + # By default, when you insert a Breakable into the print tree, it only breaks + # the surrounding group when the group's contents cannot fit onto the + # remaining space of the current line. You can force it to break the + # surrounding group instead if you always want the newline with the +force+ + # argument. + # + # There are a few circumstances where you'll want to force the newline into + # the output but no insert a break parent (because you don't want to + # necessarily force the groups to break unless they need to). In this case you + # can pass `force: :skip_break_parent` to this method and it will not insert + # a break parent.` + # + # source://prettier_print//lib/prettier_print.rb#802 + def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Another very common breakable call you receive while formatting is an + # empty string in flat mode and a newline in break mode. Similar to + # breakable_space, this is here for avoid unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#646 + def breakable_empty; end + + # The final of the very common breakable calls you receive while formatting + # is the normal breakable space but with the addition of the break_parent. + # + # source://prettier_print//lib/prettier_print.rb#652 + def breakable_force; end + + # This is the same shortcut as breakable_force, except that it doesn't indent + # the next line. This is necessary if you're trying to preserve some custom + # formatting like a multi-line string. + # + # source://prettier_print//lib/prettier_print.rb#660 + def breakable_return; end + + # The vast majority of breakable calls you receive while formatting are a + # space in flat mode and a newline in break mode. Since this is so common, + # we have a method here to skip past unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#639 + def breakable_space; end + + # This is an output buffer that wraps the output object and provides + # additional functionality depending on its type. + # + # This defaults to Buffer::StringBuffer.new("".dup) + # + # source://prettier_print//lib/prettier_print.rb#400 + def buffer; end + + # A convenience method which is same as follows: + # + # text(",") + # breakable + # + # source://prettier_print//lib/prettier_print.rb#669 + def comma_breakable; end + + # Returns the group most recently added to the stack. + # + # Contrived example: + # out = "" + # => "" + # q = PrettierPrint.new(out) + # => # + # q.group { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # } + # } + # } + # } + # => 284 + # puts out + # # + # # + # # + # # + # + # source://prettier_print//lib/prettier_print.rb#484 + def current_group; end + + # This is similar to #breakable except the decision to break or not is + # determined individually. + # + # Two #fill_breakable under a group may cause 4 results: + # (break,break), (break,non-break), (non-break,break), (non-break,non-break). + # This is different to #breakable because two #breakable under a group + # may cause 2 results: (break,break), (non-break,non-break). + # + # The text +separator+ is inserted if a line is not broken at this point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # source://prettier_print//lib/prettier_print.rb#688 + def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end + + # Flushes all of the generated print tree onto the output buffer, then clears + # the generated tree from memory. + # + # source://prettier_print//lib/prettier_print.rb#490 + def flush(base_indentation = T.unsafe(nil)); end + + # An object that responds to call that takes one argument, of an Integer, and + # returns the corresponding number of spaces. + # + # By default this is: ->(n) { ' ' * n } + # + # source://prettier_print//lib/prettier_print.rb#416 + def genspace; end + + # Groups line break hints added in the block. The line break hints are all to + # be used or not. + # + # If +indent+ is specified, the method call is regarded as nested by + # nest(indent) { ... }. + # + # If +open_object+ is specified, text(open_object, open_width) is + # called before grouping. If +close_object+ is specified, + # text(close_object, close_width) is called after grouping. + # + # source://prettier_print//lib/prettier_print.rb#845 + def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end + + # The stack of groups that are being printed. + # + # source://prettier_print//lib/prettier_print.rb#419 + def groups; end + + # Inserts an IfBreak node with the contents of the block being added to its + # list of nodes that should be printed if the surrounding node breaks. If it + # doesn't, then you can specify the contents to be printed with the #if_flat + # method used on the return object from this method. For example, + # + # q.if_break { q.text('do') }.if_flat { q.text('{') } + # + # In the example above, if the surrounding group is broken it will print 'do' + # and if it is not it will print '{'. + # + # source://prettier_print//lib/prettier_print.rb#917 + def if_break; end + + # This is similar to if_break in that it also inserts an IfBreak node into the + # print tree, however it's starting from the flat contents, and cannot be used + # to build the break contents. + # + # source://prettier_print//lib/prettier_print.rb#936 + def if_flat; end + + # Very similar to the #nest method, this indents the nested content by one + # level by inserting an Indent node into the print tree. The contents of the + # node are determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#956 + def indent; end + + # This method calculates the position of the text relative to the current + # indentation level when the doc has been printed. It's useful for + # determining how to align text to doc nodes that are already built into the + # tree. + # + # source://prettier_print//lib/prettier_print.rb#696 + def last_position(node); end + + # Inserts a LineSuffix node into the print tree. The contents of the node are + # determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#967 + def line_suffix(priority: T.unsafe(nil)); end + + # The maximum width of a line, before it is separated in to a newline + # + # This defaults to 80, and should be an Integer + # + # source://prettier_print//lib/prettier_print.rb#405 + def maxwidth; end + + # Increases left margin after newline with +indent+ for line breaks added in + # the block. + # + # source://prettier_print//lib/prettier_print.rb#977 + def nest(indent); end + + # The value that is appended to +output+ to add a new line. + # + # This defaults to "\n", and should be String + # + # source://prettier_print//lib/prettier_print.rb#410 + def newline; end + + # The output object. It represents the final destination of the contents of + # the print tree. It should respond to <<. + # + # This defaults to "".dup + # + # source://prettier_print//lib/prettier_print.rb#394 + def output; end + + # This method will remove any breakables from the list of contents so that + # no newlines are present in the output. If a newline is being forced into + # the output, the replace value will be used. + # + # source://prettier_print//lib/prettier_print.rb#721 + def remove_breaks(node, replace = T.unsafe(nil)); end + + # Adds a separated list. + # The list is separated by comma with breakable space, by default. + # + # #seplist iterates the +list+ using +iter_method+. + # It yields each object to the block given for #seplist. + # The procedure +separator_proc+ is called between each yields. + # + # If the iteration is zero times, +separator_proc+ is not called at all. + # + # If +separator_proc+ is nil or not given, + # +lambda { comma_breakable }+ is used. + # If +iter_method+ is not given, :each is used. + # + # For example, following 3 code fragments has similar effect. + # + # q.seplist([1,2,3]) {|v| xxx v } + # + # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } + # + # xxx 1 + # q.comma_breakable + # xxx 2 + # q.comma_breakable + # xxx 3 + # + # source://prettier_print//lib/prettier_print.rb#760 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end + + # The current array of contents that calls to methods that generate print tree + # nodes will append to. + # + # source://prettier_print//lib/prettier_print.rb#423 + def target; end + + # This adds +object+ as a text of +width+ columns in width. + # + # If +width+ is not specified, object.length is used. + # + # source://prettier_print//lib/prettier_print.rb#989 + def text(object = T.unsafe(nil), width = T.unsafe(nil)); end + + # This inserts a Trim node into the print tree which, when printed, will clear + # all whitespace at the end of the output buffer. This is useful for the rare + # case where you need to delete printed indentation and force the next node + # to start at the beginning of the line. + # + # source://prettier_print//lib/prettier_print.rb#828 + def trim; end + + # A convenience method used by a lot of the print tree node builders that + # temporarily changes the target that the builders will append to. + # + # source://prettier_print//lib/prettier_print.rb#1007 + def with_target(target); end + + private + + # This method returns a boolean as to whether or not the remaining commands + # fit onto the remaining space on the current line. If we finish printing + # all of the commands or if we hit a newline, then we return true. Otherwise + # if we continue printing past the remaining space, we return false. + # + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#1019 + def fits?(next_commands, rest_commands, remaining); end + + # source://prettier_print//lib/prettier_print.rb#1091 + def remove_breaks_with(doc, replace); end + + # Resets the group stack and target array so that this pretty printer object + # can continue to be used before calling flush again if desired. + # + # source://prettier_print//lib/prettier_print.rb#1085 + def reset; end + + class << self + # This is a convenience method which is same as follows: + # + # begin + # q = PrettierPrint.new(output, maxwidth, newline, &genspace) + # ... + # q.flush + # output + # end + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print.rb#377 + def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # This is similar to PrettierPrint::format but the result has no breaks. + # + # +maxwidth+, +newline+ and +genspace+ are ignored. + # + # The invocation of +breakable+ in the block doesn't break a line and is + # treated as just an invocation of +text+. + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print/single_line.rb#156 + def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end + end +end + +# A node in the print tree that represents aligning nested nodes to a certain +# prefix width or string. +# +# source://prettier_print//lib/prettier_print.rb#65 +class PrettierPrint::Align + # @return [Align] a new instance of Align + # + # source://prettier_print//lib/prettier_print.rb#68 + def initialize(indent:, contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#66 + def contents; end + + # Returns the value of attribute indent. + # + # source://prettier_print//lib/prettier_print.rb#66 + def indent; end + + # source://prettier_print//lib/prettier_print.rb#73 + def pretty_print(q); end +end + +# source://prettier_print//lib/prettier_print.rb#126 +PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#127 +PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#128 +PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Below here are the most common combination of options that are created when +# creating new breakables. They are here to cut down on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#125 +PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Since there's really no difference in these instances, just using the same +# one saves on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#141 +PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent) + +# A node in the print tree that forces the surrounding group to print out in +# the "break" mode as opposed to the "flat" mode. Useful for when you need to +# force a newline into a group. +# +# source://prettier_print//lib/prettier_print.rb#133 +class PrettierPrint::BreakParent + # source://prettier_print//lib/prettier_print.rb#134 + def pretty_print(q); end +end + +# A node in the print tree that represents a place in the buffer that the +# content can be broken onto multiple lines. +# +# source://prettier_print//lib/prettier_print.rb#82 +class PrettierPrint::Breakable + # @return [Breakable] a new instance of Breakable + # + # source://prettier_print//lib/prettier_print.rb#85 + def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#97 + def force?; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#101 + def indent?; end + + # source://prettier_print//lib/prettier_print.rb#105 + def pretty_print(q); end + + # Returns the value of attribute separator. + # + # source://prettier_print//lib/prettier_print.rb#83 + def separator; end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#83 + def width; end +end + +# When building up the contents in the output buffer, it's convenient to be +# able to trim trailing whitespace before newlines. If the output object is a +# string or array or strings, then we can do this with some gsub calls. If +# not, then this effectively just wraps the output object and forwards on +# calls to <<. +# +# source://prettier_print//lib/prettier_print.rb#277 +module PrettierPrint::Buffer + class << self + # This is a switch for building the correct output buffer wrapper class for + # the given output object. + # + # source://prettier_print//lib/prettier_print.rb#336 + def for(output); end + end +end + +# This is an output buffer that wraps an array output object. It provides a +# trim! method that trims off trailing whitespace from the last element in +# the array if it's an unfrozen string using the same method as the +# StringBuffer. +# +# source://prettier_print//lib/prettier_print.rb#303 +class PrettierPrint::Buffer::ArrayBuffer + # @return [ArrayBuffer] a new instance of ArrayBuffer + # + # source://prettier_print//lib/prettier_print.rb#306 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#310 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#304 + def output; end + + # source://prettier_print//lib/prettier_print.rb#314 + def trim!; end +end + +# This is an output buffer that wraps a string output object. It provides a +# trim! method that trims off trailing whitespace from the string using +# gsub!. +# +# source://prettier_print//lib/prettier_print.rb#281 +class PrettierPrint::Buffer::StringBuffer + # @return [StringBuffer] a new instance of StringBuffer + # + # source://prettier_print//lib/prettier_print.rb#284 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#288 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#282 + def output; end + + # source://prettier_print//lib/prettier_print.rb#292 + def trim!; end +end + +# When generating spaces after a newline for indentation, by default we +# generate one space per character needed for indentation. You can change this +# behavior (for instance to use tabs) by passing a different genspace +# procedure. +# +# source://prettier_print//lib/prettier_print.rb#350 +PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc) + +# The default indentation for printing is zero, assuming that the code starts +# at the top level. That can be changed if desired to start from a different +# indentation level. +# +# source://prettier_print//lib/prettier_print.rb#366 +PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) + +# When printing, you can optionally specify the value that should be used +# whenever a group needs to be broken onto multiple lines. In this case the +# default is \n. +# +# source://prettier_print//lib/prettier_print.rb#344 +PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String) + +# A node in the print tree that represents a group of items which the printer +# should try to fit onto one line. This is the basic command to tell the +# printer when to break. Groups are usually nested, and the printer will try +# to fit everything on one line, but if it doesn't fit it will break the +# outermost group first and try again. It will continue breaking groups until +# everything fits (or there are no more groups to break). +# +# source://prettier_print//lib/prettier_print.rb#149 +class PrettierPrint::Group + # @return [Group] a new instance of Group + # + # source://prettier_print//lib/prettier_print.rb#152 + def initialize(depth, contents: T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#158 + def break; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#162 + def break?; end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#150 + def contents; end + + # Returns the value of attribute depth. + # + # source://prettier_print//lib/prettier_print.rb#150 + def depth; end + + # source://prettier_print//lib/prettier_print.rb#166 + def pretty_print(q); end +end + +# A node in the print tree that represents printing one thing if the +# surrounding group node is broken and another thing if the surrounding group +# node is flat. +# +# source://prettier_print//lib/prettier_print.rb#176 +class PrettierPrint::IfBreak + # @return [IfBreak] a new instance of IfBreak + # + # source://prettier_print//lib/prettier_print.rb#179 + def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end + + # Returns the value of attribute break_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def break_contents; end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#184 + def pretty_print(q); end +end + +# A small DSL-like object used for specifying the alternative contents to be +# printed if the surrounding group doesn't break for an IfBreak node. +# +# source://prettier_print//lib/prettier_print.rb#874 +class PrettierPrint::IfBreakBuilder + # @return [IfBreakBuilder] a new instance of IfBreakBuilder + # + # source://prettier_print//lib/prettier_print.rb#877 + def initialize(q, flat_contents); end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#875 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#882 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#875 + def q; end +end + +# When we already know that groups are broken, we don't actually need to track +# the flat versions of the contents. So this builder version is effectively a +# no-op, but we need it to maintain the same API. The only thing this can +# impact is that if there's a forced break in the flat contents, then we need +# to propagate that break up the whole tree. +# +# source://prettier_print//lib/prettier_print.rb#892 +class PrettierPrint::IfFlatIgnore + # @return [IfFlatIgnore] a new instance of IfFlatIgnore + # + # source://prettier_print//lib/prettier_print.rb#895 + def initialize(q); end + + # source://prettier_print//lib/prettier_print.rb#899 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#893 + def q; end +end + +# A node in the print tree that is a variant of the Align node that indents +# its contents by one level. +# +# source://prettier_print//lib/prettier_print.rb#200 +class PrettierPrint::Indent + # @return [Indent] a new instance of Indent + # + # source://prettier_print//lib/prettier_print.rb#203 + def initialize(contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#201 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#207 + def pretty_print(q); end +end + +# A node in the print tree that has its own special buffer for implementing +# content that should flush before any newline. +# +# Useful for implementating trailing content, as it's not always practical to +# constantly check where the line ends to avoid accidentally printing some +# content after a line suffix node. +# +# source://prettier_print//lib/prettier_print.rb#220 +class PrettierPrint::LineSuffix + # @return [LineSuffix] a new instance of LineSuffix + # + # source://prettier_print//lib/prettier_print.rb#225 + def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#223 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#230 + def pretty_print(q); end + + # Returns the value of attribute priority. + # + # source://prettier_print//lib/prettier_print.rb#223 + def priority; end +end + +# source://prettier_print//lib/prettier_print.rb#221 +PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer) + +# There are two modes in printing, break and flat. When we're in break mode, +# any lines will use their newline, any if-breaks will use their break +# contents, etc. +# +# source://prettier_print//lib/prettier_print.rb#356 +PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer) + +# This is another print mode much like MODE_BREAK. When we're in flat mode, we +# attempt to print everything on one line until we either hit a broken group, +# a forced line, or the maximum width. +# +# source://prettier_print//lib/prettier_print.rb#361 +PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer) + +# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format +# +# It is passed to be similar to a PrettierPrint object itself, by responding to +# all of the same print tree node builder methods, as well as the #flush +# method. +# +# The significant difference here is that there are no line breaks in the +# output. If an IfBreak node is used, only the flat contents are printed. +# LineSuffix nodes are printed at the end of the buffer when #flush is called. +# +# source://prettier_print//lib/prettier_print/single_line.rb#13 +class PrettierPrint::SingleLine + # Create a PrettierPrint::SingleLine object + # + # Arguments: + # * +output+ - String (or similar) to store rendered text. Needs to respond + # to '<<'. + # * +maxwidth+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # * +newline+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # + # @return [SingleLine] a new instance of SingleLine + # + # source://prettier_print//lib/prettier_print/single_line.rb#34 + def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end + + # Here for compatibility, does nothing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#64 + def break_parent; end + + # Appends +separator+ to the text to be output. By default +separator+ is + # ' ' + # + # The +width+, +indent+, and +force+ arguments are here for compatibility. + # They are all noop arguments. + # + # source://prettier_print//lib/prettier_print/single_line.rb#54 + def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Appends +separator+ to the output buffer. +width+ is a noop here for + # compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#69 + def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Flushes the line suffixes onto the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#41 + def flush; end + + # Opens a block for grouping objects to be pretty printed. + # + # Arguments: + # * +indent+ - noop argument. Present for compatibility. + # * +open_obj+ - text appended before the &block. Default is '' + # * +close_obj+ - text appended after the &block. Default is '' + # * +open_width+ - noop argument. Present for compatibility. + # * +close_width+ - noop argument. Present for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#90 + def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end + + # Effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#113 + def if_break; end + + # Also effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#118 + def if_flat; end + + # A noop that immediately yields. + # + # source://prettier_print//lib/prettier_print/single_line.rb#122 + def indent; end + + # Changes the target output buffer to the line suffix output buffer which + # will get flushed at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#128 + def line_suffix; end + + # A buffer output that wraps any calls to line_suffix that will be flushed + # at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#23 + def line_suffixes; end + + # Takes +indent+ arg, but does nothing with it. + # + # Yields to a block. + # + # source://prettier_print//lib/prettier_print/single_line.rb#137 + def nest(_indent); end + + # The output object. It stores rendered text and should respond to <<. + # + # source://prettier_print//lib/prettier_print/single_line.rb#15 + def output; end + + # The current array of contents that the print tree builder methods should + # append to. + # + # source://prettier_print//lib/prettier_print/single_line.rb#19 + def target; end + + # Add +object+ to the text to be output. + # + # +width+ argument is here for compatibility. It is a noop argument. + # + # source://prettier_print//lib/prettier_print/single_line.rb#144 + def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Immediately trims the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#74 + def trim; end +end + +# A class that wraps the ability to call #if_flat. The contents of the +# #if_flat block are executed immediately, so effectively this class and the +# #if_break method that triggers it are unnecessary, but they're here to +# maintain compatibility. +# +# source://prettier_print//lib/prettier_print/single_line.rb#106 +class PrettierPrint::SingleLine::IfBreakBuilder + # source://prettier_print//lib/prettier_print/single_line.rb#107 + def if_flat; end +end + +# Since all of the instances here are the same, we can reuse the same one to +# cut down on allocations. +# +# source://prettier_print//lib/prettier_print.rb#270 +PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim) + +# A node in the print tree that represents plain content that cannot be broken +# up (by default this assumes strings, but it can really be anything). +# +# source://prettier_print//lib/prettier_print.rb#239 +class PrettierPrint::Text + # @return [Text] a new instance of Text + # + # source://prettier_print//lib/prettier_print.rb#242 + def initialize; end + + # source://prettier_print//lib/prettier_print.rb#247 + def add(object: T.unsafe(nil), width: T.unsafe(nil)); end + + # Returns the value of attribute objects. + # + # source://prettier_print//lib/prettier_print.rb#240 + def objects; end + + # source://prettier_print//lib/prettier_print.rb#252 + def pretty_print(q); end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#240 + def width; end +end + +# A node in the print tree that represents trimming all of the indentation of +# the current line, in the rare case that you need to ignore the indentation +# that you've already created. This node should be placed after a Breakable. +# +# source://prettier_print//lib/prettier_print.rb#262 +class PrettierPrint::Trim + # source://prettier_print//lib/prettier_print.rb#263 + def pretty_print(q); end +end diff --git a/sorbet/rbi/gems/psych@5.1.0.rbi b/sorbet/rbi/gems/psych@5.1.0.rbi new file mode 100644 index 0000000000..c85f4cbd40 --- /dev/null +++ b/sorbet/rbi/gems/psych@5.1.0.rbi @@ -0,0 +1,1760 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `psych` gem. +# Please instead update this file by running `bin/tapioca gem psych`. + +# source://psych//lib/psych/core_ext.rb#2 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # call-seq: to_yaml(options = {}) + # + # Convert an object to YAML. See Psych.dump for more information on the + # available +options+. + # + # source://psych//lib/psych/core_ext.rb#12 + def to_yaml(options = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/core_ext.rb#3 + def yaml_tag(url); end + end +end + +# = Overview +# +# Psych is a YAML parser and emitter. +# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] +# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing +# and emitting capabilities. In addition to wrapping libyaml, Psych also +# knows how to serialize and de-serialize most Ruby objects to and from +# the YAML format. +# +# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! +# +# # Parse some YAML +# Psych.load("--- foo") # => "foo" +# +# # Emit some YAML +# Psych.dump("foo") # => "--- foo\n...\n" +# { :a => 'b'}.to_yaml # => "---\n:a: b\n" +# +# Got more time on your hands? Keep on reading! +# +# == YAML Parsing +# +# Psych provides a range of interfaces for parsing a YAML document ranging from +# low level to high level, depending on your parsing needs. At the lowest +# level, is an event based parser. Mid level is access to the raw YAML AST, +# and at the highest level is the ability to unmarshal YAML to Ruby objects. +# +# == YAML Emitting +# +# Psych provides a range of interfaces ranging from low to high level for +# producing YAML documents. Very similar to the YAML parsing interfaces, Psych +# provides at the lowest level, an event based system, mid-level is building +# a YAML AST, and the highest level is converting a Ruby object straight to +# a YAML document. +# +# == High-level API +# +# === Parsing +# +# The high level YAML parser provided by Psych simply takes YAML as input and +# returns a Ruby data structure. For information on using the high level parser +# see Psych.load +# +# ==== Reading from a string +# +# Psych.safe_load("--- a") # => 'a' +# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] +# # From a trusted string: +# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 +# +# ==== Reading from a file +# +# Psych.safe_load_file("data.yml", permitted_classes: [Date]) +# Psych.load_file("trusted_database.yml") +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# The high level emitter has the easiest interface. Psych simply takes a Ruby +# data structure and converts it to a YAML document. See Psych.dump for more +# information on dumping a Ruby data structure. +# +# ==== Writing to a string +# +# # Dump an array, get back a YAML string +# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" +# +# # Dump an array to an IO object +# Psych.dump(['a', 'b'], StringIO.new) # => # +# +# # Dump an array with indentation set +# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" +# +# # Dump an array to an IO with indentation set +# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) +# +# ==== Writing to a file +# +# Currently there is no direct API for dumping Ruby structure to file: +# +# File.open('database.yml', 'w') do |file| +# file.write(Psych.dump(['a', 'b'])) +# end +# +# == Mid-level API +# +# === Parsing +# +# Psych provides access to an AST produced from parsing a YAML document. This +# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can +# be examined and manipulated freely. Please see Psych::parse_stream, +# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with +# YAML syntax trees. +# +# ==== Reading from a string +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream("---\n - a\n - b") +# +# # Returns Psych::Nodes::Document +# Psych.parse("---\n - a\n - b") +# +# ==== Reading from a file +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream(File.read('database.yml')) +# +# # Returns Psych::Nodes::Document +# Psych.parse_file('database.yml') +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# At the mid level is building an AST. This AST is exactly the same as the AST +# used when parsing a YAML document. Users can build an AST by hand and the +# AST knows how to emit itself as a YAML document. See Psych::Nodes, +# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building +# a YAML AST. +# +# ==== Writing to a string +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream("---\n - a\n - b") +# +# stream.to_yaml # => "---\n- a\n- b\n" +# +# ==== Writing to a file +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream(File.read('database.yml')) +# +# File.open('database.yml', 'w') do |file| +# file.write(stream.to_yaml) +# end +# +# == Low-level API +# +# === Parsing +# +# The lowest level parser should be used when the YAML input is already known, +# and the developer does not want to pay the price of building an AST or +# automatic detection and conversion to Ruby objects. See Psych::Parser for +# more information on using the event based parser. +# +# ==== Reading to Psych::Nodes::Stream structure +# +# parser = Psych::Parser.new(TreeBuilder.new) # => # +# parser = Psych.parser # it's an alias for the above +# +# parser.parse("---\n - a\n - b") # => # +# parser.handler # => # +# parser.handler.root # => # +# +# ==== Receiving an events stream +# +# recorder = Psych::Handlers::Recorder.new +# parser = Psych::Parser.new(recorder) +# +# parser.parse("---\n - a\n - b") +# recorder.events # => [list of [event, args] lists] +# # event is one of: Psych::Handler::EVENTS +# # args are the arguments passed to the event +# +# === Emitting +# +# The lowest level emitter is an event based system. Events are sent to a +# Psych::Emitter object. That object knows how to convert the events to a YAML +# document. This interface should be used when document format is known in +# advance or speed is a concern. See Psych::Emitter for more information. +# +# ==== Writing to a Ruby structure +# +# Psych.parser.parse("--- a") # => # +# +# parser.handler.first # => # +# parser.handler.first.to_ruby # => ["a"] +# +# parser.handler.root.first # => # +# parser.handler.root.first.to_ruby # => "a" +# +# # You can instantiate an Emitter manually +# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) +# # => "a" +# +# source://psych//lib/psych/versions.rb#3 +module Psych + class << self + # source://psych//lib/psych.rb#682 + def add_builtin_type(type_tag, &block); end + + # :stopdoc: + # + # source://psych//lib/psych.rb#676 + def add_domain_type(domain, type_tag, &block); end + + # source://psych//lib/psych.rb#692 + def add_tag(tag, klass); end + + # source://psych//lib/psych.rb#726 + def config; end + + # call-seq: + # Psych.dump(o) -> string of yaml + # Psych.dump(o, options) -> string of yaml + # Psych.dump(o, io) -> io object passed in + # Psych.dump(o, io, options) -> io object passed in + # + # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//lib/psych.rb#505 + def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dump a list of objects as separate documents to a document stream. + # + # Example: + # + # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" + # + # source://psych//lib/psych.rb#595 + def dump_stream(*objects); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.load("--- a") # => 'a' + # Psych.load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass. This method is + # similar to `safe_load` except that `Symbol` objects are allowed by default. + # + # source://psych//lib/psych.rb#368 + def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See load for options. + # + # source://psych//lib/psych.rb#669 + def load_file(filename, **kwargs); end + + # Load multiple documents given in +yaml+. Returns the parsed documents + # as a list. If a block is given, each document will be converted to Ruby + # and passed to the block during parsing + # + # Example: + # + # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] + # + # list = [] + # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| + # list << ruby + # end + # list # => ['foo', 'bar'] + # + # source://psych//lib/psych.rb#626 + def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse("---\n - a\n - b") # => # + # + # begin + # Psych.parse("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//lib/psych.rb#398 + def parse(yaml, filename: T.unsafe(nil)); end + + # Parse a file at +filename+. Returns the Psych::Nodes::Document. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # source://psych//lib/psych.rb#410 + def parse_file(filename, fallback: T.unsafe(nil)); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. + # This method can handle multiple YAML documents contained in +yaml+. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # If a block is given, a Psych::Nodes::Document node will be yielded to the + # block as it's being parsed. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse_stream("---\n - a\n - b") # => # + # + # Psych.parse_stream("--- a\n--- b") do |node| + # node # => # + # end + # + # begin + # Psych.parse_stream("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # Raises a TypeError when NilClass is passed. + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//lib/psych.rb#452 + def parse_stream(yaml, filename: T.unsafe(nil), &block); end + + # Returns a default parser + # + # source://psych//lib/psych.rb#419 + def parser; end + + # source://psych//lib/psych.rb#688 + def remove_type(type_tag); end + + # call-seq: + # Psych.safe_dump(o) -> string of yaml + # Psych.safe_dump(o, options) -> string of yaml + # Psych.safe_dump(o, io) -> io object passed in + # Psych.safe_dump(o, io, options) -> io object passed in + # + # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. By default, only the following + # classes are allowed to be serialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+ + # keyword argument. They are additive. For example, to allow Date serialization: + # + # Psych.safe_dump(yaml, permitted_classes: [Date]) + # + # Now the Date class can be dumped in addition to the classes listed above. + # + # A Psych::DisallowedClass exception will be raised if the object contains a + # class that isn't in the +permitted_classes+ list. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.safe_dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//lib/psych.rb#578 + def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Safely load the yaml string in +yaml+. By default, only the following + # classes are allowed to be deserialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Recursive data structures are not allowed by default. Arbitrary classes + # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are + # additive. For example, to allow Date deserialization: + # + # Psych.safe_load(yaml, permitted_classes: [Date]) + # + # Now the Date class can be loaded in addition to the classes listed above. + # + # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. + # For example: + # + # x = [] + # x << x + # yaml = Psych.dump x + # Psych.safe_load yaml # => raises an exception + # Psych.safe_load yaml, aliases: true # => loads the aliases + # + # A Psych::DisallowedClass exception will be raised if the yaml contains a + # class that isn't in the +permitted_classes+ list. + # + # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases + # but the +aliases+ keyword argument is set to false. + # + # +filename+ will be used in the exception message if any exception is raised + # while parsing. + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # source://psych//lib/psych.rb#322 + def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Safely loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See safe_load for options. + # + # source://psych//lib/psych.rb#658 + def safe_load_file(filename, **kwargs); end + + # Dump Ruby +object+ to a JSON string. + # + # source://psych//lib/psych.rb#605 + def to_json(object); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.unsafe_load("--- a") # => 'a' + # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.unsafe_load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # load method or the safe_load method. + # + # source://psych//lib/psych.rb#271 + def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Load the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # safe_load_file method. + # + # source://psych//lib/psych.rb#647 + def unsafe_load_file(filename, **kwargs); end + + private + + # source://psych//lib/psych.rb#703 + def parse_caller(at); end + + # Workaround for emulating `warn '...', uplevel: 1` in Ruby 2.4 or lower. + # + # source://psych//lib/psych.rb#698 + def warn_with_uplevel(message, uplevel: T.unsafe(nil)); end + end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#10 +class Psych::AliasesNotEnabled < ::Psych::BadAlias + # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled + # + # source://psych//lib/psych/exception.rb#11 + def initialize; end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#17 +class Psych::AnchorNotDefined < ::Psych::BadAlias + # @return [AnchorNotDefined] a new instance of AnchorNotDefined + # + # source://psych//lib/psych/exception.rb#18 + def initialize(anchor_name); end +end + +# source://psych//lib/psych/class_loader.rb#6 +class Psych::ClassLoader + # @return [ClassLoader] a new instance of ClassLoader + # + # source://psych//lib/psych/class_loader.rb#21 + def initialize; end + + # source://psych//lib/psych/class_loader.rb#39 + def big_decimal; end + + # source://psych//lib/psych/class_loader.rb#39 + def complex; end + + # source://psych//lib/psych/class_loader.rb#39 + def date; end + + # source://psych//lib/psych/class_loader.rb#39 + def date_time; end + + # source://psych//lib/psych/class_loader.rb#39 + def exception; end + + # source://psych//lib/psych/class_loader.rb#25 + def load(klassname); end + + # source://psych//lib/psych/class_loader.rb#39 + def object; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_omap; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_set; end + + # source://psych//lib/psych/class_loader.rb#39 + def range; end + + # source://psych//lib/psych/class_loader.rb#39 + def rational; end + + # source://psych//lib/psych/class_loader.rb#39 + def regexp; end + + # source://psych//lib/psych/class_loader.rb#39 + def struct; end + + # source://psych//lib/psych/class_loader.rb#39 + def symbol; end + + # source://psych//lib/psych/class_loader.rb#31 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#47 + def find(klassname); end + + # source://psych//lib/psych/class_loader.rb#51 + def resolve(klassname); end +end + +# source://psych//lib/psych/class_loader.rb#76 +class Psych::ClassLoader::Restricted < ::Psych::ClassLoader + # @return [Restricted] a new instance of Restricted + # + # source://psych//lib/psych/class_loader.rb#77 + def initialize(classes, symbols); end + + # source://psych//lib/psych/class_loader.rb#83 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#95 + def find(klassname); end +end + +# If an object defines +encode_with+, then an instance of Psych::Coder will +# be passed to the method when the object is being serialized. The Coder +# automatically assumes a Psych::Nodes::Mapping is being emitted. Other +# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are +# called, respectively. +# +# source://psych//lib/psych/coder.rb#9 +class Psych::Coder + # @return [Coder] a new instance of Coder + # + # source://psych//lib/psych/coder.rb#13 + def initialize(tag); end + + # source://psych//lib/psych/coder.rb#84 + def [](k); end + + # source://psych//lib/psych/coder.rb#78 + def []=(k, v); end + + # source://psych//lib/psych/coder.rb#78 + def add(k, v); end + + # Returns the value of attribute implicit. + # + # source://psych//lib/psych/coder.rb#10 + def implicit; end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://psych//lib/psych/coder.rb#10 + def implicit=(_arg0); end + + # Emit a map. The coder will be yielded to the block. + # + # @yield [_self] + # @yieldparam _self [Psych::Coder] the object that the method was called on + # + # source://psych//lib/psych/coder.rb#34 + def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end + + # Emit a map with +value+ + # + # source://psych//lib/psych/coder.rb#73 + def map=(map); end + + # Returns the value of attribute object. + # + # source://psych//lib/psych/coder.rb#10 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://psych//lib/psych/coder.rb#10 + def object=(_arg0); end + + # Emit a sequence with +map+ and +tag+ + # + # source://psych//lib/psych/coder.rb#54 + def represent_map(tag, map); end + + # Emit an arbitrary object +obj+ and +tag+ + # + # source://psych//lib/psych/coder.rb#60 + def represent_object(tag, obj); end + + # Emit a scalar with +value+ and +tag+ + # + # source://psych//lib/psych/coder.rb#42 + def represent_scalar(tag, value); end + + # Emit a sequence with +list+ and +tag+ + # + # source://psych//lib/psych/coder.rb#48 + def represent_seq(tag, list); end + + # source://psych//lib/psych/coder.rb#24 + def scalar(*args); end + + # Emit a scalar with +value+ + # + # source://psych//lib/psych/coder.rb#67 + def scalar=(value); end + + # Returns the value of attribute seq. + # + # source://psych//lib/psych/coder.rb#11 + def seq; end + + # Emit a sequence of +list+ + # + # source://psych//lib/psych/coder.rb#90 + def seq=(list); end + + # Returns the value of attribute style. + # + # source://psych//lib/psych/coder.rb#10 + def style; end + + # Sets the attribute style + # + # @param value the value to set the attribute style to. + # + # source://psych//lib/psych/coder.rb#10 + def style=(_arg0); end + + # Returns the value of attribute tag. + # + # source://psych//lib/psych/coder.rb#10 + def tag; end + + # Sets the attribute tag + # + # @param value the value to set the attribute tag to. + # + # source://psych//lib/psych/coder.rb#10 + def tag=(_arg0); end + + # Returns the value of attribute type. + # + # source://psych//lib/psych/coder.rb#11 + def type; end +end + +# source://psych//lib/psych/exception.rb#23 +class Psych::DisallowedClass < ::Psych::Exception + # @return [DisallowedClass] a new instance of DisallowedClass + # + # source://psych//lib/psych/exception.rb#24 + def initialize(action, klass_name); end +end + +# Psych::Handler is an abstract base class that defines the events used +# when dealing with Psych::Parser. Clients who want to use Psych::Parser +# should implement a class that inherits from Psych::Handler and define +# events that they can handle. +# +# Psych::Handler defines all events that Psych::Parser can possibly send to +# event handlers. +# +# See Psych::Parser for more details +# +# source://psych//lib/psych/handler.rb#13 +class Psych::Handler + # Called when an alias is found to +anchor+. +anchor+ will be the name + # of the anchor found. + # + # === Example + # + # Here we have an example of an array that references itself in YAML: + # + # --- &ponies + # - first element + # - *ponies + # + # &ponies is the anchor, *ponies is the alias. In this case, alias is + # called with "ponies". + # + # source://psych//lib/psych/handler.rb#110 + def alias(anchor); end + + # Called when an empty event happens. (Which, as far as I can tell, is + # never). + # + # source://psych//lib/psych/handler.rb#236 + def empty; end + + # Called with the document ends. +implicit+ is a boolean value indicating + # whether or not the document has an implicit ending. + # + # === Example + # + # Given the following YAML: + # + # --- + # hello world + # + # +implicit+ will be true. Given this YAML: + # + # --- + # hello world + # ... + # + # +implicit+ will be false. + # + # source://psych//lib/psych/handler.rb#93 + def end_document(implicit); end + + # Called when a map ends + # + # source://psych//lib/psych/handler.rb#230 + def end_mapping; end + + # Called when a sequence ends. + # + # source://psych//lib/psych/handler.rb#191 + def end_sequence; end + + # Called when the YAML stream ends + # + # source://psych//lib/psych/handler.rb#241 + def end_stream; end + + # Called before each event with line/column information. + # + # source://psych//lib/psych/handler.rb#246 + def event_location(start_line, start_column, end_line, end_column); end + + # Called when a scalar +value+ is found. The scalar may have an + # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # See the constants in Psych::Nodes::Scalar for the possible values of + # +style+ + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !str "foo" + # - &anchor fun + # - many + # lines + # - | + # many + # newlines + # + # The above YAML document contains a list with four strings. Here are + # the parameters sent to this method in the same order: + # + # # value anchor tag plain quoted style + # ["foo", nil, "!str", false, false, 3 ] + # ["fun", "anchor", nil, true, false, 1 ] + # ["many lines", nil, nil, true, false, 1 ] + # ["many\nnewlines\n", nil, nil, false, true, 4 ] + # + # source://psych//lib/psych/handler.rb#150 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Called when the document starts with the declared +version+, + # +tag_directives+, if the document is +implicit+. + # + # +version+ will be an array of integers indicating the YAML version being + # dealt with, +tag_directives+ is a list of tuples indicating the prefix + # and suffix of each tag, and +implicit+ is a boolean indicating whether + # the document is started implicitly. + # + # === Example + # + # Given the following YAML: + # + # %YAML 1.1 + # %TAG ! tag:tenderlovemaking.com,2009: + # --- !squee + # + # The parameters for start_document must be this: + # + # version # => [1, 1] + # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] + # implicit # => false + # + # source://psych//lib/psych/handler.rb#72 + def start_document(version, tag_directives, implicit); end + + # Called when a map starts. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # See the constants in Psych::Nodes::Mapping for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # k: !!map { hello: world } + # v: &pewpew + # hello: world + # + # The above YAML document consists of three maps, an outer map that contains + # two inner maps. Below is a matrix of the parameters sent in order to + # represent these three maps: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:map", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#225 + def start_mapping(anchor, tag, implicit, style); end + + # Called when a sequence is started. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was implicitly + # started. + # +style+ is an integer indicating the list style. + # + # See the constants in Psych::Nodes::Sequence for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !!seq [ + # a + # ] + # - &pewpew + # - b + # + # The above YAML document consists of three lists, an outer list that + # contains two inner lists. Here is a matrix of the parameters sent + # to represent these lists: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:seq", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#186 + def start_sequence(anchor, tag, implicit, style); end + + # Called with +encoding+ when the YAML stream starts. This method is + # called once per stream. A stream may contain multiple documents. + # + # See the constants in Psych::Parser for the possible values of +encoding+. + # + # source://psych//lib/psych/handler.rb#47 + def start_stream(encoding); end + + # Is this handler a streaming handler? + # + # @return [Boolean] + # + # source://psych//lib/psych/handler.rb#251 + def streaming?; end +end + +# Configuration options for dumping YAML. +# +# source://psych//lib/psych/handler.rb#16 +class Psych::Handler::DumperOptions + # @return [DumperOptions] a new instance of DumperOptions + # + # source://psych//lib/psych/handler.rb#19 + def initialize; end + + # Returns the value of attribute canonical. + # + # source://psych//lib/psych/handler.rb#17 + def canonical; end + + # Sets the attribute canonical + # + # @param value the value to set the attribute canonical to. + # + # source://psych//lib/psych/handler.rb#17 + def canonical=(_arg0); end + + # Returns the value of attribute indentation. + # + # source://psych//lib/psych/handler.rb#17 + def indentation; end + + # Sets the attribute indentation + # + # @param value the value to set the attribute indentation to. + # + # source://psych//lib/psych/handler.rb#17 + def indentation=(_arg0); end + + # Returns the value of attribute line_width. + # + # source://psych//lib/psych/handler.rb#17 + def line_width; end + + # Sets the attribute line_width + # + # @param value the value to set the attribute line_width to. + # + # source://psych//lib/psych/handler.rb#17 + def line_width=(_arg0); end +end + +# source://psych//lib/psych/json/stream.rb#7 +class Psych::JSON::Stream < ::Psych::Visitors::JSONTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# YAML event parser class. This class parses a YAML document and calls +# events on the handler that is passed to the constructor. The events can +# be used for things such as constructing a YAML AST or deserializing YAML +# documents. It can even be fed back to Psych::Emitter to emit the same +# document that was parsed. +# +# See Psych::Handler for documentation on the events that Psych::Parser emits. +# +# Here is an example that prints out ever scalar found in a YAML document: +# +# # Handler for detecting scalar values +# class ScalarHandler < Psych::Handler +# def scalar value, anchor, tag, plain, quoted, style +# puts value +# end +# end +# +# parser = Psych::Parser.new(ScalarHandler.new) +# parser.parse(yaml_document) +# +# Here is an example that feeds the parser back in to Psych::Emitter. The +# YAML document is read from STDIN and written back out to STDERR: +# +# parser = Psych::Parser.new(Psych::Emitter.new($stderr)) +# parser.parse($stdin) +# +# Psych uses Psych::Parser in combination with Psych::TreeBuilder to +# construct an AST of the parsed YAML document. +# +# source://psych//lib/psych/parser.rb#33 +class Psych::Parser + # Creates a new Psych::Parser instance with +handler+. YAML events will + # be called on +handler+. See Psych::Parser for more details. + # + # @return [Parser] a new instance of Parser + # + # source://psych//lib/psych/parser.rb#47 + def initialize(handler = T.unsafe(nil)); end + + # Set the encoding for this parser to +encoding+ + # + # source://psych//lib/psych/parser.rb#41 + def external_encoding=(_arg0); end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler; end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler=(_arg0); end + + # call-seq: + # parser.parse(yaml) + # + # Parse the YAML document contained in +yaml+. Events will be called on + # the handler set on the parser instance. + # + # See Psych::Parser and Psych::Parser#handler + # + # source://psych//lib/psych/parser.rb#61 + def parse(yaml, path = T.unsafe(nil)); end +end + +# Scan scalars for built in types +# +# source://psych//lib/psych/scalar_scanner.rb#6 +class Psych::ScalarScanner + # Create a new scanner + # + # @return [ScalarScanner] a new instance of ScalarScanner + # + # source://psych//lib/psych/scalar_scanner.rb#30 + def initialize(class_loader, strict_integer: T.unsafe(nil)); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/scalar_scanner.rb#27 + def class_loader; end + + # Parse and return an int from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#109 + def parse_int(string); end + + # Parse and return a Time from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#115 + def parse_time(string); end + + # Tokenize +string+ returning the Ruby object + # + # source://psych//lib/psych/scalar_scanner.rb#37 + def tokenize(string); end +end + +# Same as above, but allows commas. +# Not to YML spec, but kept for backwards compatibility +# +# source://psych//lib/psych/scalar_scanner.rb#22 +Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) + +# Taken from http://yaml.org/type/int.html +# +# source://psych//lib/psych/scalar_scanner.rb#15 +Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) + +# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, +# but send it straight to an IO. +# +# Here is an example use: +# +# stream = Psych::Stream.new($stdout) +# stream.start +# stream.push({:foo => 'bar'}) +# stream.finish +# +# YAML will be immediately emitted to $stdout with no buffering. +# +# Psych::Stream#start will take a block and ensure that Psych::Stream#finish +# is called, so you can do this form: +# +# stream = Psych::Stream.new($stdout) +# stream.start do |em| +# em.push(:foo => 'bar') +# end +# +# source://psych//lib/psych/stream.rb#24 +class Psych::Stream < ::Psych::Visitors::YAMLTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# source://psych//lib/psych/stream.rb#25 +class Psych::Stream::Emitter < ::Psych::Emitter + # source://psych//lib/psych/stream.rb#26 + def end_document(implicit_end = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://psych//lib/psych/stream.rb#30 + def streaming?; end +end + +# source://psych//lib/psych/streaming.rb#3 +module Psych::Streaming + # Start streaming using +encoding+ + # + # source://psych//lib/psych/streaming.rb#18 + def start(encoding = T.unsafe(nil)); end + + private + + # source://psych//lib/psych/streaming.rb#25 + def register(target, obj); end +end + +# source://psych//lib/psych/streaming.rb#4 +module Psych::Streaming::ClassMethods + # Create a new streaming emitter. Emitter will print to +io+. See + # Psych::Stream for an example. + # + # source://psych//lib/psych/streaming.rb#8 + def new(io); end +end + +# source://psych//lib/psych/syntax_error.rb#5 +class Psych::SyntaxError < ::Psych::Exception + # @return [SyntaxError] a new instance of SyntaxError + # + # source://psych//lib/psych/syntax_error.rb#8 + def initialize(file, line, col, offset, problem, context); end + + # Returns the value of attribute column. + # + # source://psych//lib/psych/syntax_error.rb#6 + def column; end + + # Returns the value of attribute context. + # + # source://psych//lib/psych/syntax_error.rb#6 + def context; end + + # Returns the value of attribute file. + # + # source://psych//lib/psych/syntax_error.rb#6 + def file; end + + # Returns the value of attribute line. + # + # source://psych//lib/psych/syntax_error.rb#6 + def line; end + + # Returns the value of attribute offset. + # + # source://psych//lib/psych/syntax_error.rb#6 + def offset; end + + # Returns the value of attribute problem. + # + # source://psych//lib/psych/syntax_error.rb#6 + def problem; end +end + +# This class works in conjunction with Psych::Parser to build an in-memory +# parse tree that represents a YAML document. +# +# == Example +# +# parser = Psych::Parser.new Psych::TreeBuilder.new +# parser.parse('--- foo') +# tree = parser.handler.root +# +# See Psych::Handler for documentation on the event methods used in this +# class. +# +# source://psych//lib/psych/tree_builder.rb#18 +class Psych::TreeBuilder < ::Psych::Handler + # Create a new TreeBuilder instance + # + # @return [TreeBuilder] a new instance of TreeBuilder + # + # source://psych//lib/psych/tree_builder.rb#22 + def initialize; end + + # source://psych//lib/psych/tree_builder.rb#103 + def alias(anchor); end + + # Handles end_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#77 + def end_document(implicit_end = T.unsafe(nil)); end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_mapping; end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_sequence; end + + # source://psych//lib/psych/tree_builder.rb#90 + def end_stream; end + + # source://psych//lib/psych/tree_builder.rb#33 + def event_location(start_line, start_column, end_line, end_column); end + + # Returns the root node for the built tree + # + # source://psych//lib/psych/tree_builder.rb#19 + def root; end + + # source://psych//lib/psych/tree_builder.rb#96 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Handles start_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#65 + def start_document(version, tag_directives, implicit); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_mapping(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_sequence(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#84 + def start_stream(encoding); end + + private + + # source://psych//lib/psych/tree_builder.rb#116 + def pop; end + + # source://psych//lib/psych/tree_builder.rb#111 + def push(value); end + + # source://psych//lib/psych/tree_builder.rb#132 + def set_end_location(node); end + + # source://psych//lib/psych/tree_builder.rb#122 + def set_location(node); end + + # source://psych//lib/psych/tree_builder.rb#127 + def set_start_location(node); end +end + +# The version of Psych you are using +# +# source://psych//lib/psych/versions.rb#5 +Psych::VERSION = T.let(T.unsafe(nil), String) + +# source://psych//lib/psych/visitors/depth_first.rb#4 +class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor + # @return [DepthFirst] a new instance of DepthFirst + # + # source://psych//lib/psych/visitors/depth_first.rb#5 + def initialize(block); end + + private + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def nary(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def terminal(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Stream(o); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#541 +class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree + # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree + # + # source://psych//lib/psych/visitors/yaml_tree.rb#553 + def initialize(emitter, ss, options); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#566 + def accept(target); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#578 + def visit_Symbol(sym); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#542 +Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) + +# This class walks a YAML AST, converting each node to Ruby +# +# source://psych//lib/psych/visitors/to_ruby.rb#14 +class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor + # @return [ToRuby] a new instance of ToRuby + # + # source://psych//lib/psych/visitors/to_ruby.rb#23 + def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end + + # source://psych//lib/psych/visitors/to_ruby.rb#34 + def accept(target); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/visitors/to_ruby.rb#21 + def class_loader; end + + # source://psych//lib/psych/visitors/to_ruby.rb#327 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#319 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#165 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#129 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#133 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#323 + def visit_Psych_Nodes_Stream(o); end + + private + + # source://psych//lib/psych/visitors/to_ruby.rb#395 + def deduplicate(key); end + + # source://psych//lib/psych/visitors/to_ruby.rb#51 + def deserialize(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#412 + def init_with(o, h, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#404 + def merge_key(hash, key, val); end + + # source://psych//lib/psych/visitors/to_ruby.rb#333 + def register(node, object); end + + # source://psych//lib/psych/visitors/to_ruby.rb#338 + def register_empty(object); end + + # Convert +klassname+ to a Class + # + # source://psych//lib/psych/visitors/to_ruby.rb#425 + def resolve_class(klassname); end + + # source://psych//lib/psych/visitors/to_ruby.rb#407 + def revive(klass, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#344 + def revive_hash(hash, o, tagged = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/visitors/to_ruby.rb#15 + def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +# source://psych//lib/psych/visitors/visitor.rb#4 +class Psych::Visitors::Visitor + # source://psych//lib/psych/visitors/visitor.rb#5 + def accept(target); end + + private + + # source://psych//lib/psych/visitors/visitor.rb#19 + def dispatch; end + + # source://psych//lib/psych/visitors/visitor.rb#29 + def visit(target); end + + class << self + # @api private + # + # source://psych//lib/psych/visitors/visitor.rb#12 + def dispatch_cache; end + end +end + +# YAMLTree builds a YAML ast given a Ruby object. For example: +# +# builder = Psych::Visitors::YAMLTree.new +# builder << { :foo => 'bar' } +# builder.tree # => # # + # @example Parse a valid subdomain + # PublicSuffix.parse("www.google.com") + # # => # + # @example Parse a fully qualified domain + # PublicSuffix.parse("google.com.") + # # => # + # @example Parse a fully qualified domain (subdomain) + # PublicSuffix.parse("www.google.com.") + # # => # + # @example Parse an invalid (unlisted) domain + # PublicSuffix.parse("x.yz") + # # => # + # @example Parse an invalid (unlisted) domain with strict checking (without applying the default * rule) + # PublicSuffix.parse("x.yz", default_rule: nil) + # # => PublicSuffix::DomainInvalid: `x.yz` is not a valid domain + # @example Parse an URL (not supported, only domains) + # PublicSuffix.parse("http://www.google.com") + # # => PublicSuffix::DomainInvalid: http://www.google.com is not expected to contain a scheme + # @param name [#to_s] The domain name or fully qualified domain name to parse. + # @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List} + # @param ignore_private [Boolean] + # @raise [PublicSuffix::DomainInvalid] If domain is not a valid domain. + # @raise [PublicSuffix::DomainNotAllowed] If a rule for +domain+ is found, but the rule doesn't allow +domain+. + # @return [PublicSuffix::Domain] + # + # source://public_suffix//lib/public_suffix.rb#67 + def parse(name, list: T.unsafe(nil), default_rule: T.unsafe(nil), ignore_private: T.unsafe(nil)); end + + # Checks whether +domain+ is assigned and allowed, without actually parsing it. + # + # This method doesn't care whether domain is a domain or subdomain. + # The validation is performed using the default {PublicSuffix::List}. + # + # @example Validate a valid domain + # PublicSuffix.valid?("example.com") + # # => true + # @example Validate a valid subdomain + # PublicSuffix.valid?("www.example.com") + # # => true + # @example Validate a not-listed domain + # PublicSuffix.valid?("example.tldnotlisted") + # # => true + # @example Validate a not-listed domain with strict checking (without applying the default * rule) + # PublicSuffix.valid?("example.tldnotlisted") + # # => true + # PublicSuffix.valid?("example.tldnotlisted", default_rule: nil) + # # => false + # @example Validate a fully qualified domain + # PublicSuffix.valid?("google.com.") + # # => true + # PublicSuffix.valid?("www.google.com.") + # # => true + # @example Check an URL (which is not a valid domain) + # PublicSuffix.valid?("http://www.example.com") + # # => false + # @param name [#to_s] The domain name or fully qualified domain name to validate. + # @param ignore_private [Boolean] + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix.rb#123 + def valid?(name, list: T.unsafe(nil), default_rule: T.unsafe(nil), ignore_private: T.unsafe(nil)); end + end +end + +# source://public_suffix//lib/public_suffix.rb#26 +PublicSuffix::BANG = T.let(T.unsafe(nil), String) + +# source://public_suffix//lib/public_suffix.rb#25 +PublicSuffix::DOT = T.let(T.unsafe(nil), String) + +# Domain represents a domain name, composed by a TLD, SLD and TRD. +# +# source://public_suffix//lib/public_suffix/domain.rb#12 +class PublicSuffix::Domain + # Creates and returns a new {PublicSuffix::Domain} instance. + # + # @example Initialize with a TLD + # PublicSuffix::Domain.new("com") + # # => # + # @example Initialize with a TLD and SLD + # PublicSuffix::Domain.new("com", "example") + # # => # + # @example Initialize with a TLD, SLD and TRD + # PublicSuffix::Domain.new("com", "example", "wwww") + # # => # + # @overload initialize + # @overload initialize + # @overload initialize + # @return [Domain] a new instance of Domain + # @yield [self] Yields on self. + # @yieldparam self [PublicSuffix::Domain] The newly creates instance + # + # source://public_suffix//lib/public_suffix/domain.rb#65 + def initialize(*args); end + + # Returns a domain-like representation of this object + # if the object is a {#domain?}, nil otherwise. + # + # PublicSuffix::Domain.new("com").domain + # # => nil + # + # PublicSuffix::Domain.new("com", "google").domain + # # => "google.com" + # + # PublicSuffix::Domain.new("com", "google", "www").domain + # # => "www.google.com" + # + # This method doesn't validate the input. It handles the domain + # as a valid domain name and simply applies the necessary transformations. + # + # This method returns a FQD, not just the domain part. + # To get the domain part, use #sld (aka second level domain). + # + # PublicSuffix::Domain.new("com", "google", "www").domain + # # => "google.com" + # + # PublicSuffix::Domain.new("com", "google", "www").sld + # # => "google" + # + # @return [String] + # @see #domain? + # @see #subdomain + # + # source://public_suffix//lib/public_suffix/domain.rb#137 + def domain; end + + # Checks whether self looks like a domain. + # + # This method doesn't actually validate the domain. + # It only checks whether the instance contains + # a value for the {#tld} and {#sld} attributes. + # + # @example + # + # PublicSuffix::Domain.new("com").domain? + # # => false + # + # PublicSuffix::Domain.new("com", "google").domain? + # # => true + # + # PublicSuffix::Domain.new("com", "google", "www").domain? + # # => true + # + # # This is an invalid domain, but returns true + # # because this method doesn't validate the content. + # PublicSuffix::Domain.new("com", nil).domain? + # # => true + # @return [Boolean] + # @see #subdomain? + # + # source://public_suffix//lib/public_suffix/domain.rb#198 + def domain?; end + + # Returns the full domain name. + # + # @example Gets the domain name of a domain + # PublicSuffix::Domain.new("com", "google").name + # # => "google.com" + # @example Gets the domain name of a subdomain + # PublicSuffix::Domain.new("com", "google", "www").name + # # => "www.google.com" + # @return [String] + # + # source://public_suffix//lib/public_suffix/domain.rb#105 + def name; end + + # Returns the value of attribute sld. + # + # source://public_suffix//lib/public_suffix/domain.rb#33 + def sld; end + + # Returns a subdomain-like representation of this object + # if the object is a {#subdomain?}, nil otherwise. + # + # PublicSuffix::Domain.new("com").subdomain + # # => nil + # + # PublicSuffix::Domain.new("com", "google").subdomain + # # => nil + # + # PublicSuffix::Domain.new("com", "google", "www").subdomain + # # => "www.google.com" + # + # This method doesn't validate the input. It handles the domain + # as a valid domain name and simply applies the necessary transformations. + # + # This method returns a FQD, not just the subdomain part. + # To get the subdomain part, use #trd (aka third level domain). + # + # PublicSuffix::Domain.new("com", "google", "www").subdomain + # # => "www.google.com" + # + # PublicSuffix::Domain.new("com", "google", "www").trd + # # => "www" + # + # @return [String] + # @see #subdomain? + # @see #domain + # + # source://public_suffix//lib/public_suffix/domain.rb#169 + def subdomain; end + + # Checks whether self looks like a subdomain. + # + # This method doesn't actually validate the subdomain. + # It only checks whether the instance contains + # a value for the {#tld}, {#sld} and {#trd} attributes. + # If you also want to validate the domain, + # use {#valid_subdomain?} instead. + # + # @example + # + # PublicSuffix::Domain.new("com").subdomain? + # # => false + # + # PublicSuffix::Domain.new("com", "google").subdomain? + # # => false + # + # PublicSuffix::Domain.new("com", "google", "www").subdomain? + # # => true + # + # # This is an invalid domain, but returns true + # # because this method doesn't validate the content. + # PublicSuffix::Domain.new("com", "example", nil).subdomain? + # # => true + # @return [Boolean] + # @see #domain? + # + # source://public_suffix//lib/public_suffix/domain.rb#229 + def subdomain?; end + + # Returns the value of attribute tld. + # + # source://public_suffix//lib/public_suffix/domain.rb#33 + def tld; end + + # Returns an array containing the domain parts. + # + # @example + # + # PublicSuffix::Domain.new("google.com").to_a + # # => [nil, "google", "com"] + # + # PublicSuffix::Domain.new("www.google.com").to_a + # # => [nil, "google", "com"] + # @return [Array] + # + # source://public_suffix//lib/public_suffix/domain.rb#89 + def to_a; end + + # Returns a string representation of this object. + # + # @return [String] + # + # source://public_suffix//lib/public_suffix/domain.rb#73 + def to_s; end + + # Returns the value of attribute trd. + # + # source://public_suffix//lib/public_suffix/domain.rb#33 + def trd; end + + class << self + # Splits a string into the labels, that is the dot-separated parts. + # + # The input is not validated, but it is assumed to be a valid domain name. + # + # @example + # + # name_to_labels('example.com') + # # => ['example', 'com'] + # + # name_to_labels('example.co.uk') + # # => ['example', 'co', 'uk'] + # @param name [String, #to_s] The domain name to split. + # @return [Array] + # + # source://public_suffix//lib/public_suffix/domain.rb#28 + def name_to_labels(name); end + end +end + +# Raised when trying to parse an invalid name. +# A name is considered invalid when no rule is found in the definition list. +# +# @example +# +# PublicSuffix.parse("nic.test") +# # => PublicSuffix::DomainInvalid +# +# PublicSuffix.parse("http://www.nic.it") +# # => PublicSuffix::DomainInvalid +# +# source://public_suffix//lib/public_suffix/errors.rb#25 +class PublicSuffix::DomainInvalid < ::PublicSuffix::Error; end + +# Raised when trying to parse a name that matches a suffix. +# +# @example +# +# PublicSuffix.parse("nic.do") +# # => PublicSuffix::DomainNotAllowed +# +# PublicSuffix.parse("www.nic.do") +# # => PublicSuffix::Domain +# +# source://public_suffix//lib/public_suffix/errors.rb#38 +class PublicSuffix::DomainNotAllowed < ::PublicSuffix::DomainInvalid; end + +# source://public_suffix//lib/public_suffix/errors.rb#11 +class PublicSuffix::Error < ::StandardError; end + +# A {PublicSuffix::List} is a collection of one +# or more {PublicSuffix::Rule}. +# +# Given a {PublicSuffix::List}, +# you can add or remove {PublicSuffix::Rule}, +# iterate all items in the list or search for the first rule +# which matches a specific domain name. +# +# # Create a new list +# list = PublicSuffix::List.new +# +# # Push two rules to the list +# list << PublicSuffix::Rule.factory("it") +# list << PublicSuffix::Rule.factory("com") +# +# # Get the size of the list +# list.size +# # => 2 +# +# # Search for the rule matching given domain +# list.find("example.com") +# # => # +# list.find("example.org") +# # => nil +# +# You can create as many {PublicSuffix::List} you want. +# The {PublicSuffix::List.default} rule list is used +# to tokenize and validate a domain. +# +# source://public_suffix//lib/public_suffix/list.rb#40 +class PublicSuffix::List + # Initializes an empty {PublicSuffix::List}. + # + # @return [List] a new instance of List + # @yield [self] Yields on self. + # @yieldparam self [PublicSuffix::List] The newly created instance. + # + # source://public_suffix//lib/public_suffix/list.rb#106 + def initialize; end + + # Adds the given object to the list and optionally refreshes the rule index. + # + # @param rule [PublicSuffix::Rule::*] the rule to add to the list + # @return [self] + # + # source://public_suffix//lib/public_suffix/list.rb#141 + def <<(rule); end + + # Checks whether two lists are equal. + # + # List one is equal to two, if two is an instance of + # {PublicSuffix::List} and each +PublicSuffix::Rule::*+ + # in list one is available in list two, in the same order. + # + # @param other [PublicSuffix::List] the List to compare + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix/list.rb#120 + def ==(other); end + + # Adds the given object to the list and optionally refreshes the rule index. + # + # @param rule [PublicSuffix::Rule::*] the rule to add to the list + # @return [self] + # + # source://public_suffix//lib/public_suffix/list.rb#141 + def add(rule); end + + # Removes all rules. + # + # @return [self] + # + # source://public_suffix//lib/public_suffix/list.rb#164 + def clear; end + + # Gets the default rule. + # + # @return [PublicSuffix::Rule::*] + # @see PublicSuffix::Rule.default_rule + # + # source://public_suffix//lib/public_suffix/list.rb#226 + def default_rule; end + + # Iterates each rule in the list. + # + # source://public_suffix//lib/public_suffix/list.rb#128 + def each(&block); end + + # Checks whether the list is empty. + # + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix/list.rb#157 + def empty?; end + + # Checks whether two lists are equal. + # + # List one is equal to two, if two is an instance of + # {PublicSuffix::List} and each +PublicSuffix::Rule::*+ + # in list one is available in list two, in the same order. + # + # @param other [PublicSuffix::List] the List to compare + # @return [Boolean] + # + # source://public_suffix//lib/public_suffix/list.rb#120 + def eql?(other); end + + # Finds and returns the rule corresponding to the longest public suffix for the hostname. + # + # @param name [#to_s] the hostname + # @param default [PublicSuffix::Rule::*] the default rule to return in case no rule matches + # @return [PublicSuffix::Rule::*] + # + # source://public_suffix//lib/public_suffix/list.rb#174 + def find(name, default: T.unsafe(nil), **options); end + + # Gets the number of rules in the list. + # + # @return [Integer] + # + # source://public_suffix//lib/public_suffix/list.rb#150 + def size; end + + protected + + # Returns the value of attribute rules. + # + # source://public_suffix//lib/public_suffix/list.rb#233 + def rules; end + + private + + # source://public_suffix//lib/public_suffix/list.rb#238 + def entry_to_rule(entry, value); end + + # source://public_suffix//lib/public_suffix/list.rb#242 + def rule_to_entry(rule); end + + # Selects all the rules matching given hostame. + # + # If `ignore_private` is set to true, the algorithm will skip the rules that are flagged as + # private domain. Note that the rules will still be part of the loop. + # If you frequently need to access lists ignoring the private domains, + # you should create a list that doesn't include these domains setting the + # `private_domains: false` option when calling {.parse}. + # + # Note that this method is currently private, as you should not rely on it. Instead, + # the public interface is {#find}. The current internal algorithm allows to return all + # matching rules, but different data structures may not be able to do it, and instead would + # return only the match. For this reason, you should rely on {#find}. + # + # @param name [#to_s] the hostname + # @param ignore_private [Boolean] + # @return [Array] + # + # source://public_suffix//lib/public_suffix/list.rb#199 + def select(name, ignore_private: T.unsafe(nil)); end + + class << self + # Gets the default rule list. + # + # Initializes a new {PublicSuffix::List} parsing the content + # of {PublicSuffix::List.default_list_content}, if required. + # + # @return [PublicSuffix::List] + # + # source://public_suffix//lib/public_suffix/list.rb#50 + def default(**options); end + + # Sets the default rule list to +value+. + # + # @param value [PublicSuffix::List] the new list + # @return [PublicSuffix::List] + # + # source://public_suffix//lib/public_suffix/list.rb#58 + def default=(value); end + + # Parse given +input+ treating the content as Public Suffix List. + # + # See http://publicsuffix.org/format/ for more details about input format. + # + # @param input [#each_line] the list to parse + # @param private_domains [Boolean] whether to ignore the private domains section + # @return [PublicSuffix::List] + # + # source://public_suffix//lib/public_suffix/list.rb#69 + def parse(input, private_domains: T.unsafe(nil)); end + end +end + +# source://public_suffix//lib/public_suffix/list.rb#42 +PublicSuffix::List::DEFAULT_LIST_PATH = T.let(T.unsafe(nil), String) + +# A Rule is a special object which holds a single definition +# of the Public Suffix List. +# +# There are 3 types of rules, each one represented by a specific +# subclass within the +PublicSuffix::Rule+ namespace. +# +# To create a new Rule, use the {PublicSuffix::Rule#factory} method. +# +# PublicSuffix::Rule.factory("ar") +# # => # +# +# source://public_suffix//lib/public_suffix/rule.rb#22 +module PublicSuffix::Rule + class << self + # The default rule to use if no rule match. + # + # The default rule is "*". From https://publicsuffix.org/list/: + # + # > If no rules match, the prevailing rule is "*". + # + # @return [PublicSuffix::Rule::Wildcard] The default rule. + # + # source://public_suffix//lib/public_suffix/rule.rb#344 + def default; end + + # Takes the +name+ of the rule, detects the specific rule class + # and creates a new instance of that class. + # The +name+ becomes the rule +value+. + # + # @example Creates a Normal rule + # PublicSuffix::Rule.factory("ar") + # # => # + # @example Creates a Wildcard rule + # PublicSuffix::Rule.factory("*.ar") + # # => # + # @example Creates an Exception rule + # PublicSuffix::Rule.factory("!congresodelalengua3.ar") + # # => # + # @param content [#to_s] the content of the rule + # @return [PublicSuffix::Rule::*] A rule instance. + # + # source://public_suffix//lib/public_suffix/rule.rb#326 + def factory(content, private: T.unsafe(nil)); end + end +end + +# = Abstract rule class +# +# This represent the base class for a Rule definition +# in the {Public Suffix List}[https://publicsuffix.org]. +# +# This is intended to be an Abstract class +# and you shouldn't create a direct instance. The only purpose +# of this class is to expose a common interface +# for all the available subclasses. +# +# * {PublicSuffix::Rule::Normal} +# * {PublicSuffix::Rule::Exception} +# * {PublicSuffix::Rule::Wildcard} +# +# ## Properties +# +# A rule is composed by 4 properties: +# +# value - A normalized version of the rule name. +# The normalization process depends on rule tpe. +# +# Here's an example +# +# PublicSuffix::Rule.factory("*.google.com") +# # +# +# ## Rule Creation +# +# The best way to create a new rule is passing the rule name +# to the PublicSuffix::Rule.factory method. +# +# PublicSuffix::Rule.factory("com") +# # => PublicSuffix::Rule::Normal +# +# PublicSuffix::Rule.factory("*.com") +# # => PublicSuffix::Rule::Wildcard +# +# This method will detect the rule type and create an instance +# from the proper rule class. +# +# ## Rule Usage +# +# A rule describes the composition of a domain name and explains how to tokenize +# the name into tld, sld and trd. +# +# To use a rule, you first need to be sure the name you want to tokenize +# can be handled by the current rule. +# You can use the #match? method. +# +# rule = PublicSuffix::Rule.factory("com") +# +# rule.match?("google.com") +# # => true +# +# rule.match?("google.com") +# # => false +# +# Rule order is significant. A name can match more than one rule. +# See the {Public Suffix Documentation}[http://publicsuffix.org/format/] +# to learn more about rule priority. +# +# When you have the right rule, you can use it to tokenize the domain name. +# +# rule = PublicSuffix::Rule.factory("com") +# +# rule.decompose("google.com") +# # => ["google", "com"] +# +# rule.decompose("www.google.com") +# # => ["www.google", "com"] +# +# @abstract +# +# source://public_suffix//lib/public_suffix/rule.rb#102 +class PublicSuffix::Rule::Base + # Initializes a new rule. + # + # @param value [String] + # @param private [Boolean] + # @return [Base] a new instance of Base + # + # source://public_suffix//lib/public_suffix/rule.rb#126 + def initialize(value:, length: T.unsafe(nil), private: T.unsafe(nil)); end + + # Checks whether this rule is equal to other. + # + # @param other [PublicSuffix::Rule::*] The rule to compare + # @return [Boolean] true if this rule and other are instances of the same class + # and has the same value, false otherwise. + # + # source://public_suffix//lib/public_suffix/rule.rb#137 + def ==(other); end + + # @abstract + # @param domain [#to_s] The domain name to decompose + # @raise [NotImplementedError] + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#180 + def decompose(*_arg0); end + + # Checks whether this rule is equal to other. + # + # @param other [PublicSuffix::Rule::*] The rule to compare + # @return [Boolean] true if this rule and other are instances of the same class + # and has the same value, false otherwise. + # + # source://public_suffix//lib/public_suffix/rule.rb#137 + def eql?(other); end + + # @return [String] the length of the rule + # + # source://public_suffix//lib/public_suffix/rule.rb#108 + def length; end + + # Checks if this rule matches +name+. + # + # A domain name is said to match a rule if and only if + # all of the following conditions are met: + # + # - When the domain and rule are split into corresponding labels, + # that the domain contains as many or more labels than the rule. + # - Beginning with the right-most labels of both the domain and the rule, + # and continuing for all labels in the rule, one finds that for every pair, + # either they are identical, or that the label from the rule is "*". + # + # @example + # PublicSuffix::Rule.factory("com").match?("example.com") + # # => true + # PublicSuffix::Rule.factory("com").match?("example.net") + # # => false + # @param name [String] the domain name to check + # @return [Boolean] + # @see https://publicsuffix.org/list/ + # + # source://public_suffix//lib/public_suffix/rule.rb#163 + def match?(name); end + + # @abstract + # @raise [NotImplementedError] + # + # source://public_suffix//lib/public_suffix/rule.rb#173 + def parts; end + + # @return [Boolean] true if the rule is a private domain + # + # source://public_suffix//lib/public_suffix/rule.rb#111 + def private; end + + # @return [String] the rule definition + # + # source://public_suffix//lib/public_suffix/rule.rb#105 + def value; end + + class << self + # Initializes a new rule from the content. + # + # @param content [String] the content of the rule + # @param private [Boolean] + # + # source://public_suffix//lib/public_suffix/rule.rb#118 + def build(content, private: T.unsafe(nil)); end + end +end + +# @api internal +# +# source://public_suffix//lib/public_suffix/rule.rb#25 +class PublicSuffix::Rule::Entry < ::Struct + # Returns the value of attribute length + # + # @return [Object] the current value of length + def length; end + + # Sets the attribute length + # + # @param value [Object] the value to set the attribute length to. + # @return [Object] the newly set value + def length=(_); end + + # Returns the value of attribute private + # + # @return [Object] the current value of private + def private; end + + # Sets the attribute private + # + # @param value [Object] the value to set the attribute private to. + # @return [Object] the newly set value + def private=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Exception represents an exception rule (e.g. !parliament.uk). +# +# source://public_suffix//lib/public_suffix/rule.rb#265 +class PublicSuffix::Rule::Exception < ::PublicSuffix::Rule::Base + # Decomposes the domain name according to rule properties. + # + # @param domain [#to_s] The domain name to decompose + # @return [Array] The array with [trd + sld, tld]. + # + # source://public_suffix//lib/public_suffix/rule.rb#286 + def decompose(domain); end + + # dot-split rule value and returns all rule parts + # in the order they appear in the value. + # The leftmost label is not considered a label. + # + # See http://publicsuffix.org/format/: + # If the prevailing rule is a exception rule, + # modify it by removing the leftmost label. + # + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#301 + def parts; end + + # Gets the original rule definition. + # + # @return [String] The rule definition. + # + # source://public_suffix//lib/public_suffix/rule.rb#278 + def rule; end + + class << self + # Initializes a new rule from the content. + # + # @param content [#to_s] the content of the rule + # @param private [Boolean] + # + # source://public_suffix//lib/public_suffix/rule.rb#271 + def build(content, private: T.unsafe(nil)); end + end +end + +# Normal represents a standard rule (e.g. com). +# +# source://public_suffix//lib/public_suffix/rule.rb#187 +class PublicSuffix::Rule::Normal < ::PublicSuffix::Rule::Base + # Decomposes the domain name according to rule properties. + # + # @param domain [#to_s] The domain name to decompose + # @return [Array] The array with [trd + sld, tld]. + # + # source://public_suffix//lib/public_suffix/rule.rb#200 + def decompose(domain); end + + # dot-split rule value and returns all rule parts + # in the order they appear in the value. + # + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#210 + def parts; end + + # Gets the original rule definition. + # + # @return [String] The rule definition. + # + # source://public_suffix//lib/public_suffix/rule.rb#192 + def rule; end +end + +# Wildcard represents a wildcard rule (e.g. *.co.uk). +# +# source://public_suffix//lib/public_suffix/rule.rb#217 +class PublicSuffix::Rule::Wildcard < ::PublicSuffix::Rule::Base + # Initializes a new rule. + # + # @param value [String] + # @param length [Integer] + # @param private [Boolean] + # @return [Wildcard] a new instance of Wildcard + # + # source://public_suffix//lib/public_suffix/rule.rb#232 + def initialize(value:, length: T.unsafe(nil), private: T.unsafe(nil)); end + + # Decomposes the domain name according to rule properties. + # + # @param domain [#to_s] The domain name to decompose + # @return [Array] The array with [trd + sld, tld]. + # + # source://public_suffix//lib/public_suffix/rule.rb#248 + def decompose(domain); end + + # dot-split rule value and returns all rule parts + # in the order they appear in the value. + # + # @return [Array] + # + # source://public_suffix//lib/public_suffix/rule.rb#258 + def parts; end + + # Gets the original rule definition. + # + # @return [String] The rule definition. + # + # source://public_suffix//lib/public_suffix/rule.rb#240 + def rule; end + + class << self + # Initializes a new rule from the content. + # + # @param content [String] the content of the rule + # @param private [Boolean] + # + # source://public_suffix//lib/public_suffix/rule.rb#223 + def build(content, private: T.unsafe(nil)); end + end +end + +# source://public_suffix//lib/public_suffix.rb#27 +PublicSuffix::STAR = T.let(T.unsafe(nil), String) + +# @return [String] the current library version +# +# source://public_suffix//lib/public_suffix/version.rb#12 +PublicSuffix::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/racc@1.7.1.rbi b/sorbet/rbi/gems/racc@1.7.1.rbi new file mode 100644 index 0000000000..d01a4f515a --- /dev/null +++ b/sorbet/rbi/gems/racc@1.7.1.rbi @@ -0,0 +1,161 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `racc` gem. +# Please instead update this file by running `bin/tapioca gem racc`. + +# source://racc//lib/racc/parser.rb#23 +ParseError = Racc::ParseError + +# source://racc//lib/racc/info.rb#16 +Racc::Copyright = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#186 +class Racc::Parser + # source://racc//lib/racc/parser.rb#281 + def _racc_do_parse_rb(arg, in_debug); end + + # source://racc//lib/racc/parser.rb#481 + def _racc_do_reduce(arg, act); end + + # common + # + # source://racc//lib/racc/parser.rb#384 + def _racc_evalact(act, arg); end + + # source://racc//lib/racc/parser.rb#234 + def _racc_init_sysvars; end + + # source://racc//lib/racc/parser.rb#222 + def _racc_setup; end + + # source://racc//lib/racc/parser.rb#331 + def _racc_yyparse_rb(recv, mid, arg, c_debug); end + + # source://racc//lib/racc/parser.rb#264 + def do_parse; end + + # The method to fetch next token. + # If you use #do_parse method, you must implement #next_token. + # + # The format of return value is [TOKEN_SYMBOL, VALUE]. + # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT + # for 'IDENT'. ";" (String) for ';'. + # + # The final symbol (End of file) must be false. + # + # @raise [NotImplementedError] + # + # source://racc//lib/racc/parser.rb#277 + def next_token; end + + # This method is called when a parse error is found. + # + # ERROR_TOKEN_ID is an internal ID of token which caused error. + # You can get string representation of this ID by calling + # #token_to_str. + # + # ERROR_VALUE is a value of error token. + # + # value_stack is a stack of symbol values. + # DO NOT MODIFY this object. + # + # This method raises ParseError by default. + # + # If this method returns, parsers enter "error recovering mode". + # + # @raise [ParseError] + # + # source://racc//lib/racc/parser.rb#537 + def on_error(t, val, vstack); end + + # source://racc//lib/racc/parser.rb#586 + def racc_accept; end + + # source://racc//lib/racc/parser.rb#591 + def racc_e_pop(state, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#598 + def racc_next_state(curstate, state); end + + # source://racc//lib/racc/parser.rb#604 + def racc_print_stacks(t, v); end + + # source://racc//lib/racc/parser.rb#613 + def racc_print_states(s); end + + # For debugging output + # + # source://racc//lib/racc/parser.rb#560 + def racc_read_token(t, tok, val); end + + # source://racc//lib/racc/parser.rb#573 + def racc_reduce(toks, sim, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#567 + def racc_shift(tok, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#620 + def racc_token2str(tok); end + + # Convert internal ID of token symbol to the string. + # + # source://racc//lib/racc/parser.rb#626 + def token_to_str(t); end + + # Exit parser. + # Return value is +Symbol_Value_Stack[0]+. + # + # source://racc//lib/racc/parser.rb#550 + def yyaccept; end + + # Leave error recovering mode. + # + # source://racc//lib/racc/parser.rb#555 + def yyerrok; end + + # Enter error recovering mode. + # This method does not call #on_error. + # + # source://racc//lib/racc/parser.rb#544 + def yyerror; end + + # source://racc//lib/racc/parser.rb#326 + def yyparse(recv, mid); end + + class << self + # source://racc//lib/racc/parser.rb#218 + def racc_runtime_type; end + end +end + +# source://racc//lib/racc/parser.rb#207 +Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) + +Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#209 +Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) + +Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#189 +Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#210 +Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#188 +Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#208 +Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) + +# source://racc//lib/racc/parser.rb#183 +Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) + +# source://racc//lib/racc/info.rb#14 +Racc::VERSION = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/info.rb#15 +Racc::Version = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi new file mode 100644 index 0000000000..87f4c33ef2 --- /dev/null +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -0,0 +1,402 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rainbow` gem. +# Please instead update this file by running `bin/tapioca gem rainbow`. + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://rainbow//lib/rainbow/global.rb#23 + def Rainbow(string); end +end + +# source://rainbow//lib/rainbow/string_utils.rb#3 +module Rainbow + class << self + # source://rainbow//lib/rainbow/global.rb#10 + def enabled; end + + # source://rainbow//lib/rainbow/global.rb#14 + def enabled=(value); end + + # source://rainbow//lib/rainbow/global.rb#6 + def global; end + + # source://rainbow//lib/rainbow.rb#6 + def new; end + + # source://rainbow//lib/rainbow/global.rb#18 + def uncolor(string); end + end +end + +# source://rainbow//lib/rainbow/color.rb#4 +class Rainbow::Color + # Returns the value of attribute ground. + # + # source://rainbow//lib/rainbow/color.rb#5 + def ground; end + + class << self + # source://rainbow//lib/rainbow/color.rb#7 + def build(ground, values); end + + # source://rainbow//lib/rainbow/color.rb#40 + def parse_hex_color(hex); end + end +end + +# source://rainbow//lib/rainbow/color.rb#54 +class Rainbow::Color::Indexed < ::Rainbow::Color + # @return [Indexed] a new instance of Indexed + # + # source://rainbow//lib/rainbow/color.rb#57 + def initialize(ground, num); end + + # source://rainbow//lib/rainbow/color.rb#62 + def codes; end + + # Returns the value of attribute num. + # + # source://rainbow//lib/rainbow/color.rb#55 + def num; end +end + +# source://rainbow//lib/rainbow/color.rb#69 +class Rainbow::Color::Named < ::Rainbow::Color::Indexed + # @return [Named] a new instance of Named + # + # source://rainbow//lib/rainbow/color.rb#90 + def initialize(ground, name); end + + class << self + # source://rainbow//lib/rainbow/color.rb#82 + def color_names; end + + # source://rainbow//lib/rainbow/color.rb#86 + def valid_names; end + end +end + +# source://rainbow//lib/rainbow/color.rb#70 +Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash) + +# source://rainbow//lib/rainbow/color.rb#100 +class Rainbow::Color::RGB < ::Rainbow::Color::Indexed + # @return [RGB] a new instance of RGB + # + # source://rainbow//lib/rainbow/color.rb#107 + def initialize(ground, *values); end + + # Returns the value of attribute b. + # + # source://rainbow//lib/rainbow/color.rb#101 + def b; end + + # source://rainbow//lib/rainbow/color.rb#116 + def codes; end + + # Returns the value of attribute g. + # + # source://rainbow//lib/rainbow/color.rb#101 + def g; end + + # Returns the value of attribute r. + # + # source://rainbow//lib/rainbow/color.rb#101 + def r; end + + private + + # source://rainbow//lib/rainbow/color.rb#122 + def code_from_rgb; end + + class << self + # source://rainbow//lib/rainbow/color.rb#103 + def to_ansi_domain(value); end + end +end + +# source://rainbow//lib/rainbow/color.rb#129 +class Rainbow::Color::X11Named < ::Rainbow::Color::RGB + include ::Rainbow::X11ColorNames + + # @return [X11Named] a new instance of X11Named + # + # source://rainbow//lib/rainbow/color.rb#140 + def initialize(ground, name); end + + class << self + # source://rainbow//lib/rainbow/color.rb#132 + def color_names; end + + # source://rainbow//lib/rainbow/color.rb#136 + def valid_names; end + end +end + +# source://rainbow//lib/rainbow/null_presenter.rb#4 +class Rainbow::NullPresenter < ::String + # source://rainbow//lib/rainbow/null_presenter.rb#9 + def background(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#9 + def bg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#49 + def black; end + + # source://rainbow//lib/rainbow/null_presenter.rb#33 + def blink; end + + # source://rainbow//lib/rainbow/null_presenter.rb#65 + def blue; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 + def bold; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 + def bright; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def color(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 + def cross_out; end + + # source://rainbow//lib/rainbow/null_presenter.rb#73 + def cyan; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 + def dark; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 + def faint; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def fg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def foreground(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#57 + def green; end + + # source://rainbow//lib/rainbow/null_presenter.rb#41 + def hide; end + + # source://rainbow//lib/rainbow/null_presenter.rb#37 + def inverse; end + + # source://rainbow//lib/rainbow/null_presenter.rb#25 + def italic; end + + # source://rainbow//lib/rainbow/null_presenter.rb#69 + def magenta; end + + # source://rainbow//lib/rainbow/null_presenter.rb#81 + def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/null_presenter.rb#53 + def red; end + + # source://rainbow//lib/rainbow/null_presenter.rb#13 + def reset; end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 + def strike; end + + # source://rainbow//lib/rainbow/null_presenter.rb#29 + def underline; end + + # source://rainbow//lib/rainbow/null_presenter.rb#77 + def white; end + + # source://rainbow//lib/rainbow/null_presenter.rb#61 + def yellow; end + + private + + # @return [Boolean] + # + # source://rainbow//lib/rainbow/null_presenter.rb#89 + def respond_to_missing?(method_name, *args); end +end + +# source://rainbow//lib/rainbow/presenter.rb#8 +class Rainbow::Presenter < ::String + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 + def background(*values); end + + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 + def bg(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#92 + def black; end + + # Turns on blinking attribute for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#72 + def blink; end + + # source://rainbow//lib/rainbow/presenter.rb#108 + def blue; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 + def bold; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 + def bright; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def color(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#86 + def cross_out; end + + # source://rainbow//lib/rainbow/presenter.rb#116 + def cyan; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 + def dark; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 + def faint; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def fg(*values); end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def foreground(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#100 + def green; end + + # Hides this text (set its color to the same as background). + # + # source://rainbow//lib/rainbow/presenter.rb#82 + def hide; end + + # Inverses current foreground/background colors. + # + # source://rainbow//lib/rainbow/presenter.rb#77 + def inverse; end + + # Turns on italic style for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#61 + def italic; end + + # source://rainbow//lib/rainbow/presenter.rb#112 + def magenta; end + + # We take care of X11 color method call here. + # Such as #aqua, #ghostwhite. + # + # source://rainbow//lib/rainbow/presenter.rb#126 + def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#96 + def red; end + + # Resets terminal to default colors/backgrounds. + # + # It shouldn't be needed to use this method because all methods + # append terminal reset code to end of string. + # + # source://rainbow//lib/rainbow/presenter.rb#40 + def reset; end + + # source://rainbow//lib/rainbow/presenter.rb#86 + def strike; end + + # Turns on underline decoration for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#66 + def underline; end + + # source://rainbow//lib/rainbow/presenter.rb#120 + def white; end + + # source://rainbow//lib/rainbow/presenter.rb#104 + def yellow; end + + private + + # @return [Boolean] + # + # source://rainbow//lib/rainbow/presenter.rb#134 + def respond_to_missing?(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#140 + def wrap_with_sgr(codes); end +end + +# source://rainbow//lib/rainbow/presenter.rb#9 +Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash) + +# source://rainbow//lib/rainbow/string_utils.rb#4 +class Rainbow::StringUtils + class << self + # source://rainbow//lib/rainbow/string_utils.rb#17 + def uncolor(string); end + + # source://rainbow//lib/rainbow/string_utils.rb#5 + def wrap_with_sgr(string, codes); end + end +end + +# source://rainbow//lib/rainbow/wrapper.rb#7 +class Rainbow::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rainbow//lib/rainbow/wrapper.rb#10 + def initialize(enabled = T.unsafe(nil)); end + + # Returns the value of attribute enabled. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 + def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 + def enabled=(_arg0); end + + # source://rainbow//lib/rainbow/wrapper.rb#14 + def wrap(string); end +end + +# source://rainbow//lib/rainbow/x11_color_names.rb#4 +module Rainbow::X11ColorNames; end + +# source://rainbow//lib/rainbow/x11_color_names.rb#5 +Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.0.6.rbi new file mode 100644 index 0000000000..e87f61d802 --- /dev/null +++ b/sorbet/rbi/gems/rake@13.0.6.rbi @@ -0,0 +1,3021 @@ +# 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#70 +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#128 + 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#86 + def set_verbose_option(options); end + + # source://rake//lib/rake/file_utils.rb#73 + def sh_show_command(cmd); end +end + +# source://rake//lib/rake/file_utils.rb#108 +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#777 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # source://rake//lib/rake/application.rb#139 + 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#758 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#772 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # source://rake//lib/rake/application.rb#258 + def deprecate(old_usage, new_usage, call_site); end + + # source://rake//lib/rake/application.rb#222 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # source://rake//lib/rake/application.rb#206 + def display_error_message(ex); end + + # source://rake//lib/rake/application.rb#245 + def display_exception_backtrace(ex); end + + # source://rake//lib/rake/application.rb#214 + def display_exception_details(ex); end + + # source://rake//lib/rake/application.rb#229 + def display_exception_details_seen; end + + # source://rake//lib/rake/application.rb#237 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # source://rake//lib/rake/application.rb#381 + def display_prerequisites; end + + # Display the tasks and comments. + # + # source://rake//lib/rake/application.rb#298 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # source://rake//lib/rake/application.rb#349 + def dynamic_width; end + + # source://rake//lib/rake/application.rb#353 + def dynamic_width_stty; end + + # source://rake//lib/rake/application.rb#357 + def dynamic_width_tput; end + + # Exit the program because of an unhandled exception. + # (may be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#201 + def exit_because_of_exception(ex); end + + # source://rake//lib/rake/application.rb#678 + def find_rakefile_location; end + + # Read and handle the command line options. Returns the command line + # arguments that we didn't understand, which should (in theory) be just + # task names and env vars. + # + # source://rake//lib/rake/application.rb#644 + def handle_options(argv); end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#233 + def has_cause?(ex); end + + # True if one of the files in RAKEFILES is in the current directory. + # If a match is found, it is copied into @rakefile. + # + # source://rake//lib/rake/application.rb#274 + 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#157 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # source://rake//lib/rake/application.rb#782 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # source://rake//lib/rake/application.rb#102 + 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#145 + 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#163 + def parse_task_string(string); end + + # source://rake//lib/rake/application.rb#690 + def print_rakefile_directory(location); end + + # Similar to the regular Ruby +require+ command, but will check + # for *.rake files in addition to *.rb files. + # + # source://rake//lib/rake/application.rb#664 + 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#798 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # source://rake//lib/rake/application.rb#695 + 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#122 + def run_with_threads; end + + # source://rake//lib/rake/application.rb#807 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # source://rake//lib/rake/application.rb#185 + def standard_exception_handling; end + + # A list of all the standard options used in rake, suitable for + # passing to OptionParser. + # + # source://rake//lib/rake/application.rb#402 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # source://rake//lib/rake/application.rb#727 + 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#337 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # source://rake//lib/rake/application.rb#150 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # source://rake//lib/rake/application.rb#109 + 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#388 + def trace(*strings); end + + # source://rake//lib/rake/application.rb#370 + 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#293 + 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#287 + def tty_output?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#361 + def unix?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#366 + def windows?; end + + private + + # source://rake//lib/rake/application.rb#721 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#267 + def has_chain?(exception); end + + # source://rake//lib/rake/application.rb#620 + def select_tasks_to_show(options, show_tasks, value); end + + # source://rake//lib/rake/application.rb#627 + def select_trace_output(options, trace_option, value); end + + # source://rake//lib/rake/application.rb#393 + def sort_options(options); end + + # source://rake//lib/rake/application.rb#744 + 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#18 + 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#16 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rake//lib/rake/backtrace.rb#4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#5 +Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) + +# Mixin for creating easily cloned objects. +# +# source://rake//lib/rake/cloneable.rb#6 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # source://rake//lib/rake/cloneable.rb#8 + def initialize_copy(source); end +end + +# source://rake//lib/rake/application.rb#13 +class Rake::CommandLineOptionError < ::StandardError; end + +# Based on a script at: +# http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed +# +# source://rake//lib/rake/cpu_counter.rb#6 +class Rake::CpuCounter + # source://rake//lib/rake/cpu_counter.rb#22 + def count; end + + # source://rake//lib/rake/cpu_counter.rb#11 + def count_with_default(default = T.unsafe(nil)); end + + class << self + # source://rake//lib/rake/cpu_counter.rb#7 + def count; end + end +end + +# DSL is a module that provides #task, #desc, #namespace, etc. Use this +# when you'd like to use rake outside the top level scope. +# +# For a Rakefile you run from the command line this module is automatically +# included. +# +# source://rake//lib/rake/dsl_definition.rb#14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] + # # ... run tests + # end + # + # source://rake//lib/rake/dsl_definition.rb#165 + 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#183 + def import(*fns); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # source://rake//lib/rake/dsl_definition.rb#112 + def multitask(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # source://rake//lib/rake/dsl_definition.rb#135 + def namespace(name = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#100 + def ruby(*args, **options, &block); end + + # Declare a rule for auto-tasks. + # + # Example: + # rule '.o' => '.c' do |t| + # sh 'cc', '-o', t.name, t.source + # end + # + # source://rake//lib/rake/dsl_definition.rb#151 + def rule(*args, &block); end + + # source://rake//lib/rake/file_utils.rb#112 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # source://rake//lib/rake/file_utils.rb#128 + def split_all(path); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # source://rake//lib/rake/dsl_definition.rb#59 + def task(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# source://rake//lib/rake/default_loader.rb#5 +class Rake::DefaultLoader + # Loads a rakefile into the current application from +fn+ + # + # source://rake//lib/rake/default_loader.rb#10 + def load(fn); end +end + +# source://rake//lib/rake/early_time.rb#21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# source://rake//lib/rake/task_arguments.rb#108 +Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) + +# EarlyTime is a fake timestamp that occurs _before_ any other time value. +# +# source://rake//lib/rake/early_time.rb#5 +class Rake::EarlyTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # source://rake//lib/rake/early_time.rb#12 + def <=>(other); end + + # source://rake//lib/rake/early_time.rb#16 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# source://rake//lib/rake/file_creation_task.rb#13 +class Rake::FileCreationTask < ::Rake::FileTask + # Is this file task needed? Yes if it doesn't exist. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_creation_task.rb#14 + def needed?; end + + # Time stamp for file creation task. This time stamp is earlier + # than any other time stamp. + # + # source://rake//lib/rake/file_creation_task.rb#20 + def timestamp; end +end + +# A FileList is essentially an array with a few helper methods defined to +# make file manipulation a bit easier. +# +# FileLists are lazy. When given a list of glob patterns for possible files +# to be included in the file list, instead of searching the file structures +# to find the files, a FileList holds the pattern for latter use. +# +# This allows us to define a number of FileList to match any number of +# files, but only search out the actual files when then FileList itself is +# actually used. The key is that the first time an element of the +# FileList/Array is requested, the pending patterns are resolved into a real +# list of file names. +# +# source://rake//lib/rake/file_list.rb#22 +class Rake::FileList + include ::Rake::Cloneable + + # Create a file list from the globbable patterns given. If you wish to + # perform multiple includes or excludes at object build time, use the + # "yield self" pattern. + # + # Example: + # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb') + # + # pkg_files = FileList.new('lib/**/*') do |fl| + # fl.exclude(/\bCVS\b/) + # end + # + # @return [FileList] a new instance of FileList + # @yield [_self] + # @yieldparam _self [Rake::FileList] the object that the method was called on + # + # source://rake//lib/rake/file_list.rb#99 + def initialize(*patterns); end + + # source://rake//lib/rake/file_list.rb#68 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # source://rake//lib/rake/file_list.rb#193 + def *(other); end + + # source://rake//lib/rake/file_list.rb#68 + def +(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def -(*args, &block); end + + # source://rake//lib/rake/file_list.rb#203 + def <<(obj); end + + # source://rake//lib/rake/file_list.rb#77 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # source://rake//lib/rake/file_list.rb#171 + def ==(array); end + + # source://rake//lib/rake/file_list.rb#77 + def [](*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def []=(*args, &block); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def add(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def all?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def any?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def append(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def assoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chain(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # source://rake//lib/rake/file_list.rb#164 + def clear_exclude; end + + # source://rake//lib/rake/file_list.rb#68 + def collect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect_concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def compact(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def count(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def cycle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def deconstruct(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_if(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def detect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def difference(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def dig(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_cons(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_entry(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # source://rake//lib/rake/file_list.rb#293 + def egrep(pattern, *options); end + + # source://rake//lib/rake/file_list.rb#77 + def empty?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # source://rake//lib/rake/file_list.rb#150 + def exclude(*patterns, &block); end + + # 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#77 + def fetch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fill(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def find_all(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def first(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flat_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def flatten(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flatten!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def grep(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def grep_v(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # source://rake//lib/rake/file_list.rb#253 + def gsub(pat, rep); end + + # Same as +gsub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#264 + def gsub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#391 + def import(array); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def include(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def include?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def insert(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inspect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersect?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersection(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def is_a?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def join(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def keep_if(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def kind_of?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def lazy(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def length(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def map!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def member?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def none?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def one?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pack(*args, &block); end + + # FileList version of partition. Needed because the nested arrays should + # be FileLists in this version. + # + # source://rake//lib/rake/file_list.rb#334 + def partition(&block); end + + # Apply the pathmap spec to each of the included file names, returning a + # new file list with the modified paths. (See String#pathmap for + # details.) + # + # source://rake//lib/rake/file_list.rb#272 + def pathmap(spec = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_list.rb#77 + def permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def place(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def prepend(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def product(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def push(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rassoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reduce(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def reject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reject!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # source://rake//lib/rake/file_list.rb#210 + def resolve; end + + # source://rake//lib/rake/file_list.rb#77 + def reverse(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse_each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rindex(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sample(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def select(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def select!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shelljoin(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def size(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_after(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_before(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_when(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # source://rake//lib/rake/file_list.rb#242 + def sub(pat, rep); end + + # Same as +sub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#258 + def sub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#77 + def sum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def tally(*args, &block); end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#176 + def to_a; end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#182 + def to_ary; end + + # source://rake//lib/rake/file_list.rb#77 + def to_csv(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + 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#77 + def to_set(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def transpose(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def union(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def uniq(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def uniq!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def unshift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def values_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def zip(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # source://rake//lib/rake/file_list.rb#350 + def add_matching(pattern); end + + # source://rake//lib/rake/file_list.rb#220 + def resolve_add(fn); end + + # source://rake//lib/rake/file_list.rb#230 + def resolve_exclude; end + + class << self + # Create a new file list including the files listed. Similar to: + # + # FileList.new(*args) + # + # source://rake//lib/rake/file_list.rb#400 + def [](*args); end + + # Get a sorted list of files matching the pattern. This method + # should be preferred to Dir[pattern] and Dir.glob(pattern) because + # the files returned are guaranteed to be sorted. + # + # source://rake//lib/rake/file_list.rb#407 + def glob(pattern, *args); end + end +end + +# List of array methods (that are not in +Object+) that need to be +# delegated. +# +# source://rake//lib/rake/file_list.rb#44 +Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#381 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#387 +Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#61 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#86 +Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) + +# List of additional methods that must be delegated. +# +# source://rake//lib/rake/file_list.rb#47 +Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) + +# List of methods that should not be delegated here (we define special +# versions of them explicitly below). +# +# source://rake//lib/rake/file_list.rb#51 +Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) + +# List of delegated methods that return new array values which need +# wrapping. +# +# source://rake//lib/rake/file_list.rb#55 +Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) + +# A FileTask is a task that includes time based dependencies. If any of a +# FileTask's prerequisites have a timestamp that is later than the file +# represented by this task, then the file must be rebuilt (using the +# supplied actions). +# +# source://rake//lib/rake/file_task.rb#12 +class Rake::FileTask < ::Rake::Task + # Is this file task needed? Yes if it doesn't exist, or if its time stamp + # is out of date. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#16 + def needed?; end + + # Time stamp for file task. + # + # source://rake//lib/rake/file_task.rb#21 + 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#32 + def out_of_date?(stamp); end + + class << self + # Apply the scope to the task name according to the rules for this kind + # of task. File based tasks ignore the scope when creating the name. + # + # source://rake//lib/rake/file_task.rb#49 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# source://rake//lib/rake/file_utils_ext.rb#10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # Check that the options do not contain options not listed in + # +optdecl+. An ArgumentError exception is thrown if non-declared + # options are found. + # + # @raise [ArgumentError] + # + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # Send the message to the default rake output (which is $stderr). + # + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # Use this function to prevent potentially destructive ruby code + # from running when the :nowrite flag is set. + # + # Example: + # + # when_writing("Building Project") do + # project.build + # end + # + # The following code will build the project under normal + # conditions. If the nowrite(true) flag is set, then the example + # will print: + # + # DRYRUN: Building Project + # + # instead of actually building the project. + # + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end + + class << self + # Returns the value of attribute nowrite_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag; end + + # Sets the attribute nowrite_flag + # + # @param value the value to set the attribute nowrite_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag=(_arg0); end + + # Returns the value of attribute verbose_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag; end + + # Sets the attribute verbose_flag + # + # @param value the value to set the attribute verbose_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag=(_arg0); end + end +end + +# source://rake//lib/rake/file_utils_ext.rb#17 +Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) + +# InvocationChain tracks the chain of task invocations to detect +# circular dependencies. +# +# source://rake//lib/rake/invocation_chain.rb#6 +class Rake::InvocationChain < ::Rake::LinkedList + # Append an invocation to the chain of invocations. It is an error + # if the invocation already listed. + # + # source://rake//lib/rake/invocation_chain.rb#15 + def append(invocation); end + + # Is the invocation already in the chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#9 + def member?(invocation); end + + # Convert to string, ie: TOP => invocation => invocation + # + # source://rake//lib/rake/invocation_chain.rb#23 + def to_s; end + + private + + # source://rake//lib/rake/invocation_chain.rb#34 + def prefix; end + + class << self + # Class level append. + # + # source://rake//lib/rake/invocation_chain.rb#28 + def append(invocation, chain); end + end +end + +# source://rake//lib/rake/invocation_chain.rb#55 +Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) + +# Null object for an empty chain. +# +# source://rake//lib/rake/invocation_chain.rb#39 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/invocation_chain.rb#46 + def append(invocation); end + + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#42 + def member?(obj); end + + # source://rake//lib/rake/invocation_chain.rb#50 + def to_s; end +end + +# source://rake//lib/rake/invocation_exception_mixin.rb#3 +module Rake::InvocationExceptionMixin + # Return the invocation chain (list of Rake tasks) that were in + # effect when this exception was detected by rake. May be null if + # no tasks were active. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#7 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#13 + def chain=(value); end +end + +# source://rake//lib/rake/late_time.rb#17 +Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) + +# LateTime is a fake timestamp that occurs _after_ any other time value. +# +# source://rake//lib/rake/late_time.rb#4 +class Rake::LateTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://rake//lib/rake/late_time.rb#8 + def <=>(other); end + + # source://rake//lib/rake/late_time.rb#12 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# source://rake//lib/rake/linked_list.rb#6 +class Rake::LinkedList + include ::Enumerable + + # @return [LinkedList] a new instance of LinkedList + # + # source://rake//lib/rake/linked_list.rb#84 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # source://rake//lib/rake/linked_list.rb#25 + def ==(other); end + + # Polymorphically add a new element to the head of a list. The + # type of head node will be the same list type as the tail. + # + # source://rake//lib/rake/linked_list.rb#12 + def conj(item); end + + # For each item in the list. + # + # source://rake//lib/rake/linked_list.rb#48 + def each; end + + # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method + # + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#20 + def empty?; end + + # Returns the value of attribute head. + # + # source://rake//lib/rake/linked_list.rb#8 + def head; end + + # Same as +to_s+, but with inspected items. + # + # source://rake//lib/rake/linked_list.rb#42 + def inspect; end + + # Returns the value of attribute tail. + # + # source://rake//lib/rake/linked_list.rb#8 + def tail; end + + # Convert to string: LL(item, item...) + # + # source://rake//lib/rake/linked_list.rb#36 + def to_s; end + + class << self + # Cons a new head onto the tail list. + # + # source://rake//lib/rake/linked_list.rb#73 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # source://rake//lib/rake/linked_list.rb#78 + def empty; end + + # Make a list out of the given arguments. This method is + # polymorphic + # + # source://rake//lib/rake/linked_list.rb#59 + def make(*args); end + end +end + +# source://rake//lib/rake/linked_list.rb#110 +Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) + +# Represent an empty list, using the Null Object Pattern. +# +# When inheriting from the LinkedList class, you should implement +# a type specific Empty class as well. Make sure you set the class +# instance variable @parent to the associated list class (this +# allows conj, cons and make to work polymorphically). +# +# source://rake//lib/rake/linked_list.rb#95 +class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList + # @return [EmptyLinkedList] a new instance of EmptyLinkedList + # + # source://rake//lib/rake/linked_list.rb#98 + def initialize; end + + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#101 + def empty?; end + + class << self + # source://rake//lib/rake/linked_list.rb#105 + def cons(head, tail); end + end +end + +# Same as a regular task, but the immediate prerequisites are done in +# parallel using Ruby threads. +# +# source://rake//lib/rake/multi_task.rb#7 +class Rake::MultiTask < ::Rake::Task + private + + # source://rake//lib/rake/multi_task.rb#10 + def invoke_prerequisites(task_args, invocation_chain); end +end + +# The NameSpace class will lookup task names in the scope defined by a +# +namespace+ command. +# +# source://rake//lib/rake/name_space.rb#6 +class Rake::NameSpace + # Create a namespace lookup object using the given task manager + # and the list of scopes. + # + # @return [NameSpace] a new instance of NameSpace + # + # source://rake//lib/rake/name_space.rb#12 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # source://rake//lib/rake/name_space.rb#20 + def [](name); end + + # The scope of the namespace (a LinkedList) + # + # source://rake//lib/rake/name_space.rb#27 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # source://rake//lib/rake/name_space.rb#34 + def tasks; end +end + +# Include PrivateReader to use +private_reader+. +# +# source://rake//lib/rake/private_reader.rb#5 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # source://rake//lib/rake/private_reader.rb#7 + def included(base); end + end +end + +# source://rake//lib/rake/private_reader.rb#11 +module Rake::PrivateReader::ClassMethods + # Declare a list of private accessors + # + # source://rake//lib/rake/private_reader.rb#14 + def private_reader(*names); end +end + +# A Promise object represents a promise to do work (a chore) in the +# future. The promise is created with a block and a list of +# arguments for the block. Calling value will return the value of +# the promised chore. +# +# Used by ThreadPool. +# +# source://rake//lib/rake/promise.rb#11 +class Rake::Promise + # Create a promise to do the chore specified by the block. + # + # @return [Promise] a new instance of Promise + # + # source://rake//lib/rake/promise.rb#17 + def initialize(args, &block); end + + # source://rake//lib/rake/promise.rb#14 + def recorder; end + + # source://rake//lib/rake/promise.rb#14 + def recorder=(_arg0); end + + # Return the value of this promise. + # + # If the promised chore is not yet complete, then do the work + # synchronously. We will wait. + # + # source://rake//lib/rake/promise.rb#29 + def value; end + + # If no one else is working this promise, go ahead and do the chore. + # + # source://rake//lib/rake/promise.rb#42 + def work; end + + private + + # Perform the chore promised + # + # source://rake//lib/rake/promise.rb#57 + def chore; end + + # Are we done with the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#83 + def complete?; end + + # free up these items for the GC + # + # source://rake//lib/rake/promise.rb#88 + def discard; end + + # Did the promise throw an error + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#78 + def error?; end + + # Do we have a result for the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#73 + def result?; end + + # Record execution statistics if there is a recorder + # + # source://rake//lib/rake/promise.rb#94 + def stat(*args); end +end + +# source://rake//lib/rake/promise.rb#12 +Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) + +# Exit status class for times the system just gives us a nil. +# +# source://rake//lib/rake/pseudo_status.rb#6 +class Rake::PseudoStatus + # @return [PseudoStatus] a new instance of PseudoStatus + # + # source://rake//lib/rake/pseudo_status.rb#9 + def initialize(code = T.unsafe(nil)); end + + # source://rake//lib/rake/pseudo_status.rb#17 + def >>(n); end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#25 + def exited?; end + + # source://rake//lib/rake/pseudo_status.rb#7 + def exitstatus; end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#21 + def stopped?; end + + # source://rake//lib/rake/pseudo_status.rb#13 + def to_i; end +end + +# Error indicating a recursion overflow error in task selection. +# +# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +class Rake::RuleRecursionOverflowError < ::StandardError + # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError + # + # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + def initialize(*args); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + def add_target(target); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + def message; end +end + +# source://rake//lib/rake/scope.rb#3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # source://rake//lib/rake/scope.rb#6 + def path; end + + # Path for the scope + the named path. + # + # source://rake//lib/rake/scope.rb#11 + def path_with_task_name(task_name); end + + # Trim +n+ innermost scope levels from the scope. In no case will + # this trim beyond the toplevel scope. + # + # source://rake//lib/rake/scope.rb#17 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# source://rake//lib/rake/scope.rb#41 +Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) + +# Scope lists always end with an EmptyScope object. See Null +# Object Pattern) +# +# source://rake//lib/rake/scope.rb#28 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/scope.rb#31 + def path; end + + # source://rake//lib/rake/scope.rb#35 + def path_with_task_name(task_name); end +end + +# A Task is the basic unit of work in a Rakefile. Tasks have associated +# actions (possibly more than one) and a list of prerequisites. When +# invoked, a task will first ensure that all of its prerequisites have an +# opportunity to run and then it will execute its own actions. +# +# Tasks are not usually created directly using the new method, but rather +# use the +file+ and +task+ convenience methods. +# +# source://rake//lib/rake/task.rb#15 +class Rake::Task + # Create a task named +task_name+ with no actions or prerequisites. Use + # +enhance+ to add actions and prerequisites. + # + # @return [Task] a new instance of Task + # + # source://rake//lib/rake/task.rb#99 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # source://rake//lib/rake/task.rb#24 + def actions; end + + # Add a description to the task. The description can consist of an option + # argument list (enclosed brackets) and an optional comment. + # + # source://rake//lib/rake/task.rb#298 + def add_description(description); end + + # List of all unique prerequisite tasks including prerequisite tasks' + # prerequisites. + # Includes self when cyclic dependencies are found. + # + # source://rake//lib/rake/task.rb#77 + def all_prerequisite_tasks; end + + # Has this task already been invoked? Already invoked tasks + # will be skipped unless you reenable them. + # + # source://rake//lib/rake/task.rb#39 + def already_invoked; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # source://rake//lib/rake/task.rb#136 + def arg_description; end + + # Name of arguments for this task. + # + # source://rake//lib/rake/task.rb#141 + def arg_names; end + + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. + # + # source://rake//lib/rake/task.rb#153 + def clear; end + + # Clear the existing actions on a rake task. + # + # source://rake//lib/rake/task.rb#168 + def clear_actions; end + + # Clear the existing arguments on a rake task. + # + # source://rake//lib/rake/task.rb#180 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # source://rake//lib/rake/task.rb#174 + def clear_comments; end + + # Clear the existing prerequisites of a rake task. + # + # source://rake//lib/rake/task.rb#162 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # source://rake//lib/rake/task.rb#322 + def comment; end + + # source://rake//lib/rake/task.rb#304 + def comment=(comment); end + + # Enhance a task with prerequisites or actions. Returns self. + # + # source://rake//lib/rake/task.rb#115 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # source://rake//lib/rake/task.rb#270 + def execute(args = T.unsafe(nil)); end + + # Full collection of comments. Multiple comments are separated by + # newlines. + # + # source://rake//lib/rake/task.rb#316 + def full_comment; end + + # source://rake//lib/rake/task.rb#46 + def inspect; end + + # Return a string describing the internal state of a task. Useful for + # debugging. + # + # source://rake//lib/rake/task.rb#354 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # source://rake//lib/rake/task.rb#186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # source://rake//lib/rake/task.rb#237 + def invoke_prerequisites(task_args, invocation_chain); end + + # Invoke all the prerequisites of a task in parallel. + # + # source://rake//lib/rake/task.rb#249 + def invoke_prerequisites_concurrently(task_args, invocation_chain); end + + # File/Line locations of each of the task definitions for this + # task (only valid if the task was defined with the detect + # location option set). + # + # source://rake//lib/rake/task.rb#35 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # source://rake//lib/rake/task.rb#122 + def name; end + + # Name of task with argument list description. + # + # source://rake//lib/rake/task.rb#127 + def name_with_args; end + + # Is this task needed? + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#286 + def needed?; end + + # List of order only prerequisites for a task. + # + # source://rake//lib/rake/task.rb#21 + def order_only_prerequisites; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prereqs; end + + # List of prerequisite tasks + # + # source://rake//lib/rake/task.rb#61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prerequisites; end + + # Reenable the task, allowing its tasks to be executed if the task + # is invoked again. + # + # source://rake//lib/rake/task.rb#147 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # source://rake//lib/rake/task.rb#30 + def scope; end + + # Set the names of the arguments for this task. +args+ should be + # an array of symbols, one for each argument name. + # + # source://rake//lib/rake/task.rb#348 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # source://rake//lib/rake/task.rb#93 + def source; end + + # source://rake//lib/rake/task.rb#52 + def sources; end + + # List of sources for task. + # + # source://rake//lib/rake/task.rb#51 + def sources=(_arg0); end + + # Timestamp for this task. Basic tasks return the current time for their + # time stamp. Other tasks can be more sophisticated. + # + # source://rake//lib/rake/task.rb#292 + def timestamp; end + + # Return task name + # + # source://rake//lib/rake/task.rb#42 + def to_s; end + + # Add order only dependencies. + # + # source://rake//lib/rake/task.rb#379 + def |(deps); end + + protected + + # source://rake//lib/rake/task.rb#83 + def collect_prerequisites(seen); end + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + # + # source://rake//lib/rake/task.rb#197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # source://rake//lib/rake/task.rb#229 + def add_chain_to(exception, new_chain); end + + # source://rake//lib/rake/task.rb#308 + def add_comment(comment); end + + # Get the first sentence in a string. The sentence is terminated + # by the first period, exclamation mark, or the end of the line. + # Decimal points do not count as periods. + # + # source://rake//lib/rake/task.rb#341 + def first_sentence(string); end + + # Format the trace flags for display. + # + # source://rake//lib/rake/task.rb#261 + def format_trace_flags; end + + # source://rake//lib/rake/task.rb#65 + def lookup_prerequisite(prerequisite_name); end + + # Transform the list of comments as specified by the block and + # join with the separator. + # + # source://rake//lib/rake/task.rb#328 + def transform_comments(separator, &block); end + + class << self + # Return a task with the given name. If the task is not currently + # known, try to synthesize one from the defined rules. If no rules are + # found, but an existing file matches the task name, assume it is a file + # task with no dependencies or actions. + # + # source://rake//lib/rake/task.rb#404 + def [](task_name); end + + # Clear the task list. This cause rake to immediately forget all the + # tasks that have been assigned. (Normally used in the unit tests.) + # + # source://rake//lib/rake/task.rb#391 + def clear; end + + # Define a rule for synthesizing tasks. + # + # source://rake//lib/rake/task.rb#421 + def create_rule(*args, &block); end + + # Define a task given +args+ and an option block. If a rule with the + # given name already exists, the prerequisites and actions are added to + # the existing task. Returns the defined task. + # + # source://rake//lib/rake/task.rb#416 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # source://rake//lib/rake/task.rb#373 + def format_deps(deps); end + + # Apply the scope to the task name according to the rules for + # this kind of task. Generic tasks will accept the scope as + # part of the name. + # + # source://rake//lib/rake/task.rb#428 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # source://rake//lib/rake/task.rb#396 + def tasks; end + end +end + +# Error indicating an ill-formed task declaration. +# +# source://rake//lib/rake/task_argument_error.rb#5 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# source://rake//lib/rake/task_arguments.rb#7 +class Rake::TaskArguments + include ::Enumerable + + # Create a TaskArgument object with a list of argument +names+ and a set + # of associated +values+. +parent+ is the parent argument object. + # + # @return [TaskArguments] a new instance of TaskArguments + # + # source://rake//lib/rake/task_arguments.rb#15 + def initialize(names, values, parent = T.unsafe(nil)); end + + # Find an argument value by name or index. + # + # source://rake//lib/rake/task_arguments.rb#44 + def [](index); end + + # Enumerates the arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#56 + def each(&block); end + + # Retrieve the list of values not associated with named arguments + # + # source://rake//lib/rake/task_arguments.rb#32 + def extras; end + + # source://rake//lib/rake/task_arguments.rb#93 + def fetch(*args, &block); end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def has_key?(key); end + + # source://rake//lib/rake/task_arguments.rb#79 + def inspect; end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # source://rake//lib/rake/task_arguments.rb#66 + def method_missing(sym, *args); end + + # Argument names + # + # source://rake//lib/rake/task_arguments.rb#11 + def names; end + + # Create a new argument scope using the prerequisite argument + # names. + # + # source://rake//lib/rake/task_arguments.rb#38 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # source://rake//lib/rake/task_arguments.rb#27 + def to_a; end + + # Returns a Hash of arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#71 + def to_hash; end + + # source://rake//lib/rake/task_arguments.rb#75 + def to_s; end + + # Extracts the argument values at +keys+ + # + # source://rake//lib/rake/task_arguments.rb#61 + def values_at(*keys); end + + # Specify a hash of default values for task arguments. Use the + # defaults only if there is no specific value for the given + # argument. + # + # source://rake//lib/rake/task_arguments.rb#51 + def with_defaults(defaults); end + + protected + + # source://rake//lib/rake/task_arguments.rb#99 + def lookup(name); end +end + +# Base class for Task Libraries. +# +# source://rake//lib/rake/tasklib.rb#7 +class Rake::TaskLib + include ::Rake::Cloneable + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL +end + +# The TaskManager module is a mixin for managing tasks. +# +# source://rake//lib/rake/task_manager.rb#5 +module Rake::TaskManager + # source://rake//lib/rake/task_manager.rb#9 + def initialize; end + + # Find a matching task for +task_name+. + # + # source://rake//lib/rake/task_manager.rb#54 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#182 + def clear; end + + # source://rake//lib/rake/task_manager.rb#17 + def create_rule(*args, &block); end + + # Return the list of scope names currently active in the task + # manager. + # + # source://rake//lib/rake/task_manager.rb#222 + def current_scope; end + + # source://rake//lib/rake/task_manager.rb#23 + def define_task(task_class, *args, &block); end + + # If a rule can be found that matches the task name, enhance the + # task with the prerequisites and actions from the rule. Set the + # source attribute of the task appropriately for the rule. Return + # the enhanced task or nil of no rule was found. + # + # source://rake//lib/rake/task_manager.rb#151 + def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end + + # source://rake//lib/rake/task_manager.rb#68 + def generate_did_you_mean_suggestions(task_name); end + + # source://rake//lib/rake/task_manager.rb#62 + def generate_message_for_undefined_task(task_name); end + + # Evaluate the block in a nested namespace named +name+. Create + # an anonymous namespace if +name+ is nil. + # + # source://rake//lib/rake/task_manager.rb#228 + def in_namespace(name); end + + # Lookup a task. Return an existing task if found, otherwise + # create a task of the current type. + # + # source://rake//lib/rake/task_manager.rb#49 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description; end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description=(_arg0); end + + # Lookup a task, using scope and the scope hints in the task name. + # This method performs straight lookups without trying to + # synthesize file tasks or rules. Special scope names (e.g. '^') + # are recognized. If no scope argument is supplied, use the + # current scope. Return nil if the task cannot be found. + # + # source://rake//lib/rake/task_manager.rb#192 + def lookup(task_name, initial_scope = T.unsafe(nil)); end + + # Resolve the arguments for a task/rule. Returns a tuple of + # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. + # + # source://rake//lib/rake/task_manager.rb#88 + def resolve_args(args); end + + # source://rake//lib/rake/task_manager.rb#81 + def synthesize_file_task(task_name); end + + # List of all defined tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#168 + def tasks; end + + # List of all the tasks defined in the given scope (and its + # sub-scopes). + # + # source://rake//lib/rake/task_manager.rb#174 + def tasks_in_scope(scope); end + + private + + # Add a location to the locations field of the given task. + # + # source://rake//lib/rake/task_manager.rb#241 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # source://rake//lib/rake/task_manager.rb#271 + def attempt_rule(task_name, task_pattern, args, extensions, block, level); end + + # Find the location that called into the dsl layer. + # + # source://rake//lib/rake/task_manager.rb#248 + def find_location; end + + # Generate an anonymous namespace name. + # + # source://rake//lib/rake/task_manager.rb#259 + def generate_name; end + + # Return the current description, clearing it in the process. + # + # source://rake//lib/rake/task_manager.rb#319 + def get_description(task); end + + # Lookup the task name + # + # source://rake//lib/rake/task_manager.rb#208 + def lookup_in_scope(name, scope); end + + # Make a list of sources from the list of file name extensions / + # translation procs. + # + # source://rake//lib/rake/task_manager.rb#293 + def make_sources(task_name, task_pattern, extensions); end + + # Resolve task arguments for a task or rule when there are + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t, order_only: [:e] + # task :t => [:d] + # task :t => [:d], order_only: [:e] + # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] + # + # source://rake//lib/rake/task_manager.rb#127 + def resolve_args_with_dependencies(args, hash); end + + # Resolve task arguments for a task or rule when there are no + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t + # task :t, [:a] + # + # source://rake//lib/rake/task_manager.rb#105 + def resolve_args_without_dependencies(args); end + + # source://rake//lib/rake/task_manager.rb#265 + def trace_rule(level, message); end + + class << self + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata; end + + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata=(_arg0); end + end +end + +# source://rake//lib/rake/thread_history_display.rb#6 +class Rake::ThreadHistoryDisplay + include ::Rake::PrivateReader + extend ::Rake::PrivateReader::ClassMethods + + # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay + # + # source://rake//lib/rake/thread_history_display.rb#11 + def initialize(stats); end + + # source://rake//lib/rake/thread_history_display.rb#17 + def show; end + + private + + # source://rake//lib/rake/private_reader.rb#15 + def items; end + + # source://rake//lib/rake/thread_history_display.rb#35 + def rename(hash, key, renames); end + + # source://rake//lib/rake/private_reader.rb#15 + def stats; end + + # source://rake//lib/rake/private_reader.rb#15 + def threads; end +end + +# source://rake//lib/rake/thread_pool.rb#7 +class Rake::ThreadPool + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. + # + # @return [ThreadPool] a new instance of ThreadPool + # + # source://rake//lib/rake/thread_pool.rb#11 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # source://rake//lib/rake/thread_pool.rb#33 + def future(*args, &block); end + + # Enable the gathering of history events. + # + # source://rake//lib/rake/thread_pool.rb#68 + def gather_history; end + + # Return a array of history events for the thread pool. + # + # History gathering must be enabled to be able to see the events + # (see #gather_history). Best to call this when the job is + # complete (i.e. after ThreadPool#join is called). + # + # source://rake//lib/rake/thread_pool.rb#77 + def history; end + + # Waits until the queue of futures is empty and all threads have exited. + # + # source://rake//lib/rake/thread_pool.rb#44 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # source://rake//lib/rake/thread_pool.rb#84 + def statistics; end + + private + + # for testing only + # + # source://rake//lib/rake/thread_pool.rb#158 + def __queue__; end + + # processes one item on the queue. Returns true if there was an + # item to process, false if there was no item + # + # source://rake//lib/rake/thread_pool.rb#95 + def process_queue_item; end + + # source://rake//lib/rake/thread_pool.rb#111 + def safe_thread_count; end + + # source://rake//lib/rake/thread_pool.rb#117 + def start_thread; end + + # source://rake//lib/rake/thread_pool.rb#145 + def stat(event, data = T.unsafe(nil)); end +end + +# source://rake//lib/rake/trace_output.rb#3 +module Rake::TraceOutput + # Write trace output to output stream +out+. + # + # The write is done as a single IO call (to print) to lessen the + # chance that the trace output is interrupted by other tasks also + # producing output. + # + # source://rake//lib/rake/trace_output.rb#10 + def trace_on(out, *strings); end +end + +# source://rake//lib/rake/version.rb#3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#5 +module Rake::Version; end + +# source://rake//lib/rake/version.rb#6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::OTHER = T.let(T.unsafe(nil), Array) + +# Win 32 interface methods for Rake. Windows specific functionality +# will be placed here to collect that knowledge in one spot. +# +# source://rake//lib/rake/win32.rb#7 +module Rake::Win32 + class << self + # Normalize a win32 path so that the slashes are all forward slashes. + # + # source://rake//lib/rake/win32.rb#45 + def normalize(path); end + + # The standard directory containing system wide rake files on + # Win 32 systems. Try the following environment variables (in + # order): + # + # * HOME + # * HOMEDRIVE + HOMEPATH + # * APPDATA + # * USERPROFILE + # + # If the above are not defined, the return nil. + # + # @raise [Win32HomeError] + # + # source://rake//lib/rake/win32.rb#30 + def win32_system_dir; end + + # True if running on a windows system. + # + # @return [Boolean] + # + # source://rake//lib/rake/win32.rb#16 + def windows?; end + end +end + +# Error indicating a problem in locating the home directory on a +# Win32 system. +# +# source://rake//lib/rake/win32.rb#11 +class Rake::Win32::Win32HomeError < ::RuntimeError; end + +# source://rake//lib/rake.rb#71 +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.0.17.rbi b/sorbet/rbi/gems/rbi@0.0.17.rbi new file mode 100644 index 0000000000..29a1e5ca93 --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.0.17.rbi @@ -0,0 +1,2972 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + +# source://rbi//lib/rbi/loc.rb#4 +module RBI; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/parser.rb#133 +class RBI::ASTVisitor + abstract! + + # @abstract + # + # source://rbi//lib/rbi/parser.rb#145 + sig { abstract.params(node: T.nilable(::AST::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/parser.rb#140 + sig { params(nodes: T::Array[::AST::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/parser.rb#155 + sig { params(node: ::AST::Node).returns(::String) } + def parse_expr(node); end + + # source://rbi//lib/rbi/parser.rb#150 + sig { params(node: ::AST::Node).returns(::String) } + def parse_name(node); end +end + +# source://rbi//lib/rbi/model.rb#968 +class RBI::Arg < ::RBI::Node + # source://rbi//lib/rbi/model.rb#980 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#986 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#613 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#991 + sig { returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#972 + sig { returns(::String) } + def value; end +end + +# Attributes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#349 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/model.rb#374 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#348 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#382 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#113 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#356 + sig { returns(T::Array[::Symbol]) } + def names; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#356 + def names=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#375 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#362 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#359 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#359 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#385 +class RBI::AttrAccessor < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#399 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#405 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#411 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#417 +class RBI::AttrReader < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#431 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#437 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#443 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#449 +class RBI::AttrWriter < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#463 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#469 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#475 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# source://rbi//lib/rbi/model.rb#74 +class RBI::BlankLine < ::RBI::Comment + # source://rbi//lib/rbi/model.rb#78 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#217 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end +end + +# source://rbi//lib/rbi/model.rb#741 +class RBI::BlockParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#752 + 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#763 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#543 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#548 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#758 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#218 +class RBI::Class < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#236 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + end + def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#244 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#222 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#222 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#284 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end + + # source://rbi//lib/rbi/model.rb#225 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#225 + def superclass_name=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#53 +class RBI::Comment < ::RBI::Node + # source://rbi//lib/rbi/model.rb#60 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#66 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#197 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#57 + sig { returns(::String) } + def text; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#57 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 +class RBI::ConflictTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + sig { returns(::RBI::Tree) } + def left; end + + # @return [Tree] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + def right; end +end + +# Consts +# +# source://rbi//lib/rbi/model.rb#312 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#327 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/printer.rb#335 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#335 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#103 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#316 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#342 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#316 + def value; end +end + +# source://rbi//lib/rbi/parser.rb#627 +class RBI::ConstBuilder < ::RBI::ASTVisitor + # source://rbi//lib/rbi/parser.rb#634 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/parser.rb#631 + sig { returns(T::Array[::String]) } + def names; end + + # @return [Array] + # + # source://rbi//lib/rbi/parser.rb#631 + def names=(_arg0); end + + # source://rbi//lib/rbi/parser.rb#653 + sig { override.params(node: T.nilable(::AST::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/parser.rb#643 + sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) } + def visit(node); end + end +end + +# source://rbi//lib/rbi/model.rb#816 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#828 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#143 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#834 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#137 +class RBI::File + # source://rbi//lib/rbi/model.rb#156 + sig do + params( + strictness: T.nilable(::String), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#164 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/printer.rb#105 + sig { params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#147 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#147 + def comments=(_arg0); end + + # source://rbi//lib/rbi/model.rb#169 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/printer.rb#129 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#141 + sig { returns(::RBI::Tree) } + def root; end + + # @return [Tree] + # + # source://rbi//lib/rbi/model.rb#141 + def root=(_arg0); end + + # source://rbi//lib/rbi/model.rb#144 + sig { returns(T.nilable(::String)) } + def strictness; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#144 + def strictness=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#135 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/formatter.rb#5 +class RBI::Formatter + # source://rbi//lib/rbi/formatter.rb#36 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_methods: T::Boolean, + sort_nodes: T::Boolean + ).void + end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end + + # source://rbi//lib/rbi/formatter.rb#15 + sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } + def add_sig_templates=(add_sig_templates); end + + # source://rbi//lib/rbi/formatter.rb#59 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # source://rbi//lib/rbi/formatter.rb#64 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # source://rbi//lib/rbi/formatter.rb#18 + sig { params(group_nodes: T::Boolean).returns(T::Boolean) } + def group_nodes=(group_nodes); end + + # source://rbi//lib/rbi/formatter.rb#24 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/formatter.rb#24 + def max_line_length=(_arg0); end + + # source://rbi//lib/rbi/formatter.rb#21 + sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } + def nest_non_public_methods=(nest_non_public_methods); end + + # source://rbi//lib/rbi/formatter.rb#12 + sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } + def nest_singleton_methods=(nest_singleton_methods); end + + # source://rbi//lib/rbi/formatter.rb#53 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end + + # source://rbi//lib/rbi/formatter.rb#9 + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 +class RBI::Group < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # source://rbi//lib/rbi/printer.rb#838 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 +class RBI::Group::Kind < ::T::Enum + enums do + Mixins = new + RequiredAncestors = new + Helpers = new + TypeMembers = new + MixesInClassMethods = new + Sends = new + Attrs = new + TStructFields = new + TEnums = new + Inits = new + Methods = new + SingletonClasses = new + Consts = new + end +end + +# Sorbet's misc. +# +# source://rbi//lib/rbi/model.rb#1294 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1308 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/printer.rb#825 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#173 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1298 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1315 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#793 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#805 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#133 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#811 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/index.rb#5 +class RBI::Index < ::RBI::Visitor + # source://rbi//lib/rbi/index.rb#21 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/index.rb#32 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # source://rbi//lib/rbi/index.rb#37 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # source://rbi//lib/rbi/index.rb#27 + sig { returns(T::Array[::String]) } + def keys; end + + # source://rbi//lib/rbi/index.rb#42 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/index.rb#59 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # source://rbi//lib/rbi/index.rb#13 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be refered to by a unique ID inside an index +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/index.rb#74 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # + # @abstract + # + # source://rbi//lib/rbi/index.rb#85 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# source://rbi//lib/rbi/model.rb#996 +class RBI::KwArg < ::RBI::Arg + # source://rbi//lib/rbi/model.rb#1009 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1015 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#622 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1000 + sig { returns(::String) } + def keyword; end + + # source://rbi//lib/rbi/model.rb#1020 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#682 +class RBI::KwOptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#697 + 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#709 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#513 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#518 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#704 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#686 + sig { returns(::String) } + def value; end +end + +# source://rbi//lib/rbi/model.rb#655 +class RBI::KwParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#666 + 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#677 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#498 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#503 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#672 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#714 +class RBI::KwRestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#725 + 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#736 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#528 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#533 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#731 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/loc.rb#5 +class RBI::Loc + # source://rbi//lib/rbi/loc.rb#23 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#12 + def begin_column; end + + # source://rbi//lib/rbi/loc.rb#12 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#12 + def end_column; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#12 + def end_line; end + + # source://rbi//lib/rbi/loc.rb#9 + sig { returns(T.nilable(::String)) } + def file; end + + # source://rbi//lib/rbi/loc.rb#37 + sig { returns(T.nilable(::String)) } + def source; end + + # source://rbi//lib/rbi/loc.rb#32 + sig { returns(::String) } + def to_s; end + + class << self + # source://rbi//lib/rbi/parser.rb#748 + sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) } + def from_ast_loc(file, ast_loc); end + end +end + +# A tree that _might_ contain conflicts +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 +class RBI::MergeTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# source://rbi//lib/rbi/model.rb#483 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#513 + sig do + params( + name: ::String, + params: T::Array[::RBI::Param], + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#533 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # source://rbi//lib/rbi/printer.rb#384 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#538 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#123 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/printer.rb#437 + sig { returns(T::Boolean) } + def inline_params?; end + + # source://rbi//lib/rbi/model.rb#493 + sig { returns(T::Boolean) } + def is_singleton; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#493 + def is_singleton=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#487 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#487 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#432 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#490 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # source://rbi//lib/rbi/model.rb#499 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#499 + def sigs=(_arg0); end + + # source://rbi//lib/rbi/model.rb#547 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#496 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#496 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1355 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1367 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#153 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1373 + sig { override.returns(::String) } + def to_s; end +end + +# Mixins +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#770 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#787 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#558 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#777 + sig { returns(T::Array[::String]) } + def names; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#777 + def names=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#190 +class RBI::Module < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#204 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#211 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#194 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#194 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#270 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#5 +class RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#18 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # @abstract + # + # source://rbi//lib/rbi/printer.rb#146 + sig { abstract.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # Can `self` and `_other` be merged into a single definition? + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # source://rbi//lib/rbi/model.rb#24 + sig { void } + def detach; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 + sig { returns(::RBI::Group::Kind) } + def group_kind; end + + # source://rbi//lib/rbi/model.rb#15 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # @return [Loc, nil] + # + # source://rbi//lib/rbi/model.rb#15 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/printer.rb#179 + sig { returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # source://rbi//lib/rbi/model.rb#46 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # source://rbi//lib/rbi/model.rb#12 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # @return [Tree, nil] + # + # source://rbi//lib/rbi/model.rb#12 + def parent_tree=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#156 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#169 + sig { params(v: ::RBI::Printer).void } + def print_blank_line_before(v); end + + # source://rbi//lib/rbi/model.rb#33 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # source://rbi//lib/rbi/printer.rb#162 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#83 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#93 + sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#99 + sig { returns(T::Array[::String]) } + def annotations; end + + # source://rbi//lib/rbi/model.rb#90 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#90 + def comments=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/printer.rb#188 + sig { override.returns(T::Boolean) } + def oneline?; end +end + +# source://rbi//lib/rbi/model.rb#601 +class RBI::OptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#616 + 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#623 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#468 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#473 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#605 + sig { returns(::String) } + def value; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#552 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#568 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#446 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#459 + sig { returns(T::Array[::String]) } + def comments_lines; end + + # source://rbi//lib/rbi/model.rb#559 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/printer.rb#451 + sig { params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#574 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/parser.rb#7 +class RBI::ParseError < ::StandardError + # source://rbi//lib/rbi/parser.rb#14 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # source://rbi//lib/rbi/parser.rb#11 + sig { returns(::RBI::Loc) } + def location; end +end + +# source://rbi//lib/rbi/parser.rb#53 +class RBI::Parser + # source://rbi//lib/rbi/parser.rb#64 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/parser.rb#101 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#96 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # source://rbi//lib/rbi/parser.rb#108 + sig { params(content: ::String, file: ::String).returns(::RBI::Tree) } + def parse(content, file:); end + + class << self + # source://rbi//lib/rbi/parser.rb#78 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#83 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # source://rbi//lib/rbi/parser.rb#73 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # source://rbi//lib/rbi/parser.rb#89 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# source://rbi//lib/rbi/printer.rb#5 +class RBI::Printer < ::RBI::Visitor + # source://rbi//lib/rbi/printer.rb#28 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/printer.rb#46 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/printer.rb#41 + sig { void } + def indent; end + + # source://rbi//lib/rbi/printer.rb#18 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#52 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#72 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#58 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#65 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/printer.rb#90 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/printer.rb#78 + sig { params(file: ::RBI::File).void } + def visit_file(file); end +end + +# source://rbi//lib/rbi/model.rb#909 +class RBI::Private < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#919 + 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#893 +class RBI::Protected < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#903 + 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#877 +class RBI::Public < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#887 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Public).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#579 +class RBI::ReqParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#590 + 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#596 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/model.rb#1378 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1391 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#870 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/index.rb#163 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1382 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1397 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#628 +class RBI::RestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#639 + 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#650 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#483 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#488 + sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # source://rbi//lib/rbi/model.rb#645 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 +module RBI::Rewriters; end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# source://rbi//lib/rbi/rewriters/annotate.rb#6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/annotate.rb#10 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/annotate.rb#31 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#38 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# source://rbi//lib/rbi/rewriters/deannotate.rb#6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/deannotate.rb#10 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/deannotate.rb#27 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 +class RBI::Rewriters::Merge + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 +class RBI::Rewriters::Merge::Conflict < ::T::Struct + const :left, ::RBI::Node + const :right, ::RBI::Node + const :left_name, ::String + const :right_name, ::String + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 +class RBI::Rewriters::Merge::Keep < ::T::Enum + enums do + NONE = new + LEFT = new + RIGHT = new + end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 +class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 +class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct + const :deleted_node, ::RBI::Node + const :duplicate_of, ::RBI::Node + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Scopes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#176 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/printer.rb#242 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # Duplicate `self` scope without its body + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#182 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#93 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/printer.rb#256 + sig { params(v: ::RBI::Printer).void } + def print_body(v); end + + # @abstract + # + # source://rbi//lib/rbi/printer.rb#253 + sig { abstract.params(v: ::RBI::Printer).void } + def print_header(v); end + + # source://rbi//lib/rbi/model.rb#185 + sig { override.returns(::String) } + def to_s; end +end + +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 +class RBI::ScopeConflict < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 + sig { returns(::RBI::Scope) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 + sig { override.returns(T::Boolean) } + def oneline?; end + + # @return [Scope] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 + def right; end +end + +# Sends +# +# source://rbi//lib/rbi/model.rb#927 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#945 + 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#953 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # source://rbi//lib/rbi/model.rb#958 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#592 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#934 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#193 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#931 + sig { returns(::String) } + def method; end + + # source://rbi//lib/rbi/model.rb#963 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#1027 +class RBI::Sig < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1059 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.nilable(::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1084 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#1089 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#633 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1043 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # @return [Symbol, nil] + # + # source://rbi//lib/rbi/model.rb#1043 + def checked=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#656 + sig { returns(T::Boolean) } + def inline_params?; end + + # source://rbi//lib/rbi/model.rb#1037 + sig { returns(T::Boolean) } + def is_abstract; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_abstract=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_final; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_final=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_overridable; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_overridable=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_override; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1037 + def is_override=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#651 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#1031 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # source://rbi//lib/rbi/model.rb#1034 + sig { returns(T.nilable(::String)) } + def return_type; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1034 + def return_type=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1040 + sig { returns(T::Array[::String]) } + def type_params; end + + private + + # source://rbi//lib/rbi/printer.rb#698 + sig { params(v: ::RBI::Printer).void } + def print_as_block(v); end + + # source://rbi//lib/rbi/printer.rb#674 + sig { params(v: ::RBI::Printer).void } + def print_as_line(v); end + + # source://rbi//lib/rbi/printer.rb#663 + sig { returns(T::Array[::String]) } + def sig_modifiers; end +end + +# source://rbi//lib/rbi/parser.rb#668 +class RBI::SigBuilder < ::RBI::ASTVisitor + # source://rbi//lib/rbi/parser.rb#675 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/parser.rb#672 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#692 + sig { override.params(node: T.nilable(::AST::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/parser.rb#702 + sig { params(node: ::AST::Node).void } + def visit_send(node); end + + class << self + # source://rbi//lib/rbi/parser.rb#684 + sig { params(node: ::AST::Node).returns(::RBI::Sig) } + def build(node); end + end +end + +# source://rbi//lib/rbi/model.rb#1098 +class RBI::SigParam < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1113 + sig do + params( + name: ::String, + type: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) + ).void + end + def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1121 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#751 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#764 + sig { returns(T::Array[::String]) } + def comments_lines; end + + # source://rbi//lib/rbi/model.rb#1102 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/printer.rb#756 + sig { params(v: ::RBI::Printer, last: T::Boolean).void } + def print_comment_leading_space(v, last:); end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1102 + def type; end +end + +# source://rbi//lib/rbi/model.rb#251 +class RBI::SingletonClass < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#261 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#267 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/printer.rb#321 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# source://rbi//lib/rbi/model.rb#272 +class RBI::Struct < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#294 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + end + def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#303 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#282 + sig { returns(T::Boolean) } + def keyword_init; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#282 + def keyword_init=(_arg0); end + + # source://rbi//lib/rbi/model.rb#279 + sig { returns(T::Array[::Symbol]) } + def members; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#279 + def members=(_arg0); end + + # source://rbi//lib/rbi/model.rb#276 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#276 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#300 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# Sorbet's T::Enum +# +# source://rbi//lib/rbi/model.rb#1239 +class RBI::TEnum < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1250 + 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#1256 +class RBI::TEnumBlock < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1270 + sig do + params( + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1282 + sig { params(name: ::String).void } + def <<(name); end + + # source://rbi//lib/rbi/printer.rb#795 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1277 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/index.rb#223 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#1260 + sig { returns(T::Array[::String]) } + def names; end + + # source://rbi//lib/rbi/model.rb#1287 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1128 +class RBI::TStruct < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1139 + 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#1177 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1190 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1196 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#203 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1202 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#1145 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#1166 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#773 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1155 + sig { returns(T.nilable(::String)) } + def default; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1155 + def default=(_arg0); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#1174 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#1152 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1152 + def name=(_arg0); end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1152 + def type; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1152 + def type=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1207 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1220 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1226 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#213 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1232 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#106 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#119 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#126 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/printer.rb#226 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#49 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#89 + sig do + params( + name: ::String, + parameters: T::Array[::RBI::TypedParam], + return_type: ::String, + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#25 + sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_module(name, &block); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_path(constant, &block); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + end + def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi//lib/rbi/model.rb#132 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 + sig { void } + def group_nodes!; end + + # source://rbi//lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 + sig { void } + def nest_non_public_methods!; end + + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi//lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi//lib/rbi/printer.rb#233 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#116 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca/0.11.8/lib/tapioca/rbi_ext/model.rb#111 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# source://rbi//lib/rbi/parser.rb#160 +class RBI::TreeBuilder < ::RBI::ASTVisitor + # source://rbi//lib/rbi/parser.rb#176 + sig do + params( + file: ::String, + comments: T::Array[::Parser::Source::Comment], + nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]] + ).void + end + def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/parser.rb#167 + sig { returns(T.nilable(::AST::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#191 + sig { void } + def post_process; end + + # source://rbi//lib/rbi/parser.rb#164 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#197 + sig { override.params(node: T.nilable(::Object)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/parser.rb#573 + sig { void } + def assoc_dangling_comments; end + + # source://rbi//lib/rbi/parser.rb#554 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#559 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#566 + sig { returns(T::Array[::RBI::Comment]) } + def current_sigs_comments; end + + # source://rbi//lib/rbi/parser.rb#542 + sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#537 + sig { params(node: ::AST::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#410 + sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } + def parse_block(node); end + + # source://rbi//lib/rbi/parser.rb#254 + sig { params(node: ::AST::Node).returns(::RBI::Node) } + def parse_const_assign(node); end + + # source://rbi//lib/rbi/parser.rb#270 + sig { params(node: ::AST::Node).returns(::RBI::Method) } + def parse_def(node); end + + # source://rbi//lib/rbi/parser.rb#512 + sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) } + def parse_enum(node); end + + # source://rbi//lib/rbi/parser.rb#297 + sig { params(node: ::AST::Node).returns(::RBI::Param) } + def parse_param(node); end + + # source://rbi//lib/rbi/parser.rb#529 + sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) } + def parse_requires_ancestor(node); end + + # source://rbi//lib/rbi/parser.rb#234 + sig { params(node: ::AST::Node).returns(::RBI::Scope) } + def parse_scope(node); end + + # source://rbi//lib/rbi/parser.rb#325 + sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } + def parse_send(node); end + + # source://rbi//lib/rbi/parser.rb#393 + sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#505 + sig { params(node: ::AST::Node).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#432 + sig { params(node: ::AST::Node).returns(::RBI::Struct) } + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#489 + sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) } + def parse_tstruct_prop(node); end + + # source://rbi//lib/rbi/parser.rb#478 + sig { params(node: ::AST::Node).returns(::RBI::TypeMember) } + def parse_type_variable(node); end + + # source://rbi//lib/rbi/parser.rb#591 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#613 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#426 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def struct_definition?(node); end + + # source://rbi//lib/rbi/parser.rb#471 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/model.rb#1320 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1335 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/printer.rb#812 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#1343 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1324 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1350 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1324 + def value; end +end + +# source://rbi//lib/rbi/parser.rb#20 +class RBI::UnexpectedParserError < ::StandardError + # source://rbi//lib/rbi/parser.rb#27 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # source://rbi//lib/rbi/parser.rb#24 + sig { returns(::RBI::Loc) } + def last_location; end + + # source://rbi//lib/rbi/parser.rb#34 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/version.rb#5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# Visibility +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#841 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#851 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#857 + sig { params(other: ::RBI::Visibility).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/printer.rb#579 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#872 + sig { returns(T::Boolean) } + def private?; end + + # source://rbi//lib/rbi/model.rb#867 + sig { returns(T::Boolean) } + def protected?; end + + # source://rbi//lib/rbi/model.rb#862 + sig { returns(T::Boolean) } + def public?; end + + # source://rbi//lib/rbi/model.rb#848 + sig { returns(::Symbol) } + def visibility; end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 +class RBI::VisibilityGroup < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # source://rbi//lib/rbi/printer.rb#848 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#861 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/visitor.rb#5 +class RBI::Visitor + abstract! + + # @abstract + # + # source://rbi//lib/rbi/visitor.rb#12 + sig { abstract.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/visitor.rb#15 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end +end diff --git a/sorbet/rbi/gems/rbs@2.8.4.rbi b/sorbet/rbi/gems/rbs@2.8.4.rbi new file mode 100644 index 0000000000..7e4a636fa6 --- /dev/null +++ b/sorbet/rbi/gems/rbs@2.8.4.rbi @@ -0,0 +1,5530 @@ +# 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/namespace.rb#120 +module Kernel + # source://rbs//lib/rbs/namespace.rb#121 + def Namespace(name); end + + # source://rbs//lib/rbs/type_name.rb#93 + def TypeName(string); end +end + +# source://rbs//lib/rbs/version.rb#3 +module RBS + class << self + # source://rbs//lib/rbs.rb#63 + def logger; end + + # Returns the value of attribute logger_level. + # + # source://rbs//lib/rbs.rb#60 + def logger_level; end + + # source://rbs//lib/rbs.rb#72 + def logger_level=(level); end + + # Returns the value of attribute logger_output. + # + # source://rbs//lib/rbs.rb#61 + def logger_output; end + + # source://rbs//lib/rbs.rb#67 + def logger_output=(val); end + + # source://rbs//lib/rbs.rb#77 + 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#14 + 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#14 + 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#268 +class RBS::AST::Declarations::Alias < ::RBS::AST::Declarations::Base + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/ast/declarations.rb#276 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#285 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#272 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#274 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#285 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#294 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#273 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#269 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#298 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#271 + def type; end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#270 + def type_params; 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#107 + 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#107 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#117 + 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#121 + 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 +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#67 + 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#311 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # @return [Constant] a new instance of Constant + # + # source://rbs//lib/rbs/ast/declarations.rb#317 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#324 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#315 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#324 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#332 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#314 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#312 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#336 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#313 + def type; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#347 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # @return [Global] a new instance of Global + # + # source://rbs//lib/rbs/ast/declarations.rb#353 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#360 + def ==(other); 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#360 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#368 + 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#372 + 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#223 +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#233 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#242 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#227 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#229 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#242 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#251 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#228 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#226 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#224 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#255 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#225 + def type_params; 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#135 +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#185 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#195 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#181 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#183 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#195 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#205 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#180 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#179 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#177 + def name; end + + # Returns the value of attribute self_types. + # + # source://rbs//lib/rbs/ast/declarations.rb#182 + def self_types; end + + # source://rbs//lib/rbs/ast/declarations.rb#209 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#178 + def type_params; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#136 +class RBS::AST::Declarations::Module::Self + # @return [Self] a new instance of Self + # + # source://rbs//lib/rbs/ast/declarations.rb#141 + def initialize(name:, args:, location:); end + + # source://rbs//lib/rbs/ast/declarations.rb#147 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/declarations.rb#138 + def args; end + + # source://rbs//lib/rbs/ast/declarations.rb#147 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#153 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#139 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#137 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#157 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/declarations.rb#165 + def to_s; 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/members.rb#5 +module RBS::AST::Members; end + +# source://rbs//lib/rbs/ast/members.rb#363 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/ast/members.rb#371 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#380 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#367 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#369 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#380 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#389 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#405 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#366 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#368 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/members.rb#364 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs//lib/rbs/ast/members.rb#365 + def old_name; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#409 + def singleton?; end + + # source://rbs//lib/rbs/ast/members.rb#393 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#293 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#296 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#275 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#278 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#311 +class RBS::AST::Members::AttrWriter < ::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#224 +module RBS::AST::Members::Attribute + # source://rbs//lib/rbs/ast/members.rb#234 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#245 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#229 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#231 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#245 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#256 + def hash; end + + # Returns the value of attribute ivar_name. + # + # source://rbs//lib/rbs/ast/members.rb#228 + def ivar_name; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#227 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#230 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#225 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/members.rb#226 + def type; end + + # source://rbs//lib/rbs/ast/members.rb#260 + 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#232 + 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#123 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#126 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#137 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#140 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#194 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#197 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#179 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#182 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#109 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#112 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#329 +module RBS::AST::Members::LocationOnly + # source://rbs//lib/rbs/ast/members.rb#332 + def initialize(location:); end + + # source://rbs//lib/rbs/ast/members.rb#336 + def ==(other); end + + # source://rbs//lib/rbs/ast/members.rb#336 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#342 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#330 + 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#19 + def initialize(name:, kind:, types:, annotations:, location:, comment:, overload:, visibility: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#30 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#13 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#15 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#30 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#41 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#45 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#11 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#14 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#10 + def name; end + + # Returns the value of attribute overload. + # + # source://rbs//lib/rbs/ast/members.rb#16 + def overload; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#53 + def overload?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#49 + def singleton?; end + + # source://rbs//lib/rbs/ast/members.rb#70 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/ast/members.rb#12 + def types; end + + # source://rbs//lib/rbs/ast/members.rb#57 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overload: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs//lib/rbs/ast/members.rb#17 + def visibility; end +end + +# source://rbs//lib/rbs/ast/members.rb#151 +module RBS::AST::Members::Mixin + # source://rbs//lib/rbs/ast/members.rb#158 + def initialize(name:, args:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#166 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#154 + def annotations; end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/members.rb#153 + def args; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#156 + def comment; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#170 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#174 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#155 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#152 + def name; end +end + +# source://rbs//lib/rbs/ast/members.rb#209 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#212 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#355 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs//lib/rbs/ast/members.rb#358 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#347 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs//lib/rbs/ast/members.rb#350 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#85 +module RBS::AST::Members::Var + # source://rbs//lib/rbs/ast/members.rb#91 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#98 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#89 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#98 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#104 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#88 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#86 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/members.rb#87 + def type; end +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:, location:); end + + # source://rbs//lib/rbs/ast/type_param.rb#25 + def ==(other); end + + # source://rbs//lib/rbs/ast/type_param.rb#25 + def eql?(other); end + + # source://rbs//lib/rbs/ast/type_param.rb#35 + 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#58 + 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#49 + def rename(name); end + + # source://rbs//lib/rbs/ast/type_param.rb#39 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/type_param.rb#110 + def to_s; end + + # source://rbs//lib/rbs/ast/type_param.rb#16 + def unchecked!(value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/type_param.rb#21 + def unchecked?; end + + # Returns the value of attribute upper_bound. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def upper_bound; 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#93 + def rename(params, new_names:); end + + # source://rbs//lib/rbs/ast/type_param.rb#71 + def resolve_variables(params); end + + # source://rbs//lib/rbs/ast/type_param.rb#81 + def subst_var(vars, type); end + 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 + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#6 +class RBS::AncestorGraph::SingletonNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#8 + def initialize(name:, content:); end + + # Returns the value of attribute content. + # + # source://rbs//lib/rbs/buffer.rb#6 + def content; end + + # source://rbs//lib/rbs/buffer.rb#58 + def inspect; end + + # source://rbs//lib/rbs/buffer.rb#54 + def last_position; end + + # source://rbs//lib/rbs/buffer.rb#13 + def lines; end + + # source://rbs//lib/rbs/buffer.rb#44 + def loc_to_pos(loc); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/buffer.rb#5 + def name; end + + # source://rbs//lib/rbs/buffer.rb#32 + def pos_to_loc(pos); end + + # source://rbs//lib/rbs/buffer.rb#17 + def ranges; 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/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#23 + 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 + + # source://rbs//lib/rbs/collection/config.rb#54 + def add_gem(gem); end + + # It raises an error when there are non-available libraries + # + # @raise [CollectionNotAvailable] + # + # source://rbs//lib/rbs/collection/config.rb#94 + def check_rbs_availability!; end + + # source://rbs//lib/rbs/collection/config.rb#75 + def dump_to(io); end + + # source://rbs//lib/rbs/collection/config.rb#58 + def gem(gem_name); end + + # source://rbs//lib/rbs/collection/config.rb#87 + def gemfile_lock_path; end + + # source://rbs//lib/rbs/collection/config.rb#83 + def gemfile_lock_path=(path); end + + # source://rbs//lib/rbs/collection/config.rb#79 + def gems; end + + # source://rbs//lib/rbs/collection/config.rb#62 + def repo_path; end + + # source://rbs//lib/rbs/collection/config.rb#66 + def sources; end + + class << self + # source://rbs//lib/rbs/collection/config.rb#19 + def find_config_path; end + + # source://rbs//lib/rbs/collection/config.rb#36 + 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#32 + def generate_lockfile(config_path:, gemfile_lock_path:, with_lockfile: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/config.rb#40 + def lockfile_of(config_path); 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_generator.rb#6 +class RBS::Collection::Config::LockfileGenerator + # @return [LockfileGenerator] a new instance of LockfileGenerator + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#29 + def initialize(config_path:, gemfile_lock_path:, with_lockfile:); end + + # Returns the value of attribute config. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def config; end + + # Returns the value of attribute gemfile_lock. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def gemfile_lock; end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#41 + def generate; end + + # Returns the value of attribute lock. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def lock; end + + # Returns the value of attribute lock_path. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def lock_path; end + + private + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#67 + def assign_gem(name:, version:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#124 + def find_best_version(version:, versions:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#118 + def find_source(name:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#112 + def gemfile_lock_gems(&block); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#108 + def remove_ignored_gems!; end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#100 + def upsert_gem(old, new); end + + # @raise [GemfileLockMismatchError] + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#59 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + def generate(config_path:, gemfile_lock_path:, with_lockfile: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#7 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # @return [GemfileLockMismatchError] a new instance of GemfileLockMismatchError + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#8 + def initialize(expected:, actual:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#13 + 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 + + private + + # source://rbs//lib/rbs/collection/installer.rb#23 + def source_for(config_entry); end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#5 +module RBS::Collection::Sources + class << self + # source://rbs//lib/rbs/collection/sources.rb#11 + def from_config_entry(source_entry); 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(config_entry); end +end + +# source://rbs//lib/rbs/collection/sources/git.rb#10 +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#18 + def initialize(name:, revision:, remote:, repo_dir:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#26 + def has?(config_entry); end + + # source://rbs//lib/rbs/collection/sources/git.rb#36 + def install(dest:, config_entry:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#56 + def manifest_of(config_entry); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def name; end + + # Returns the value of attribute remote. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def remote; end + + # Returns the value of attribute repo_dir. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def repo_dir; end + + # source://rbs//lib/rbs/collection/sources/git.rb#90 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/git.rb#31 + def versions(config_entry); end + + private + + # source://rbs//lib/rbs/collection/sources/git.rb#65 + def _install(dest:, config_entry:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#76 + def cp_r(src, dest); end + + # source://rbs//lib/rbs/collection/sources/git.rb#100 + def format_config_entry(config_entry); end + + # source://rbs//lib/rbs/collection/sources/git.rb#153 + def gem_repo_dir; end + + # source://rbs//lib/rbs/collection/sources/git.rb#165 + def git(*cmd, **opt); end + + # source://rbs//lib/rbs/collection/sources/git.rb#143 + def git_dir; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#132 + def need_to_fetch?(revision); end + + # source://rbs//lib/rbs/collection/sources/git.rb#161 + def resolve_revision; end + + # source://rbs//lib/rbs/collection/sources/git.rb#157 + def resolved_revision; end + + # source://rbs//lib/rbs/collection/sources/git.rb#110 + def setup!(revision:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#169 + def sh!(*cmd, **opt); end +end + +# source://rbs//lib/rbs/collection/sources/git.rb#14 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# source://rbs//lib/rbs/collection/sources/git.rb#12 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# Signatures that are inclduded 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?(config_entry); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#23 + def install(dest:, config_entry:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#31 + def manifest_of(config_entry); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#38 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#17 + def versions(config_entry); end + + private + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#44 + def gem_sig_path(config_entry); end + + class << self + private + + def allocate; end + 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?(config_entry); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#23 + def install(dest:, config_entry:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#31 + def manifest_of(config_entry); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#37 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#19 + def versions(config_entry); end + + private + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#43 + def lookup(config_entry); end + + class << self + private + + def allocate; end + 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#15 + 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/constant_table.rb#4 +class RBS::ConstantTable + # @return [ConstantTable] a new instance of ConstantTable + # + # source://rbs//lib/rbs/constant_table.rb#16 + def initialize(builder:); end + + # source://rbs//lib/rbs/constant_table.rb#21 + def absolute_type(type, context:); end + + # source://rbs//lib/rbs/constant_table.rb#27 + def absolute_type_name(type_name, context:, location:); end + + # source://rbs//lib/rbs/constant_table.rb#108 + def constant_scopes(name); end + + # source://rbs//lib/rbs/constant_table.rb#131 + def constant_scopes0(name, scopes: T.unsafe(nil)); end + + # Returns the value of attribute constant_scopes_cache. + # + # source://rbs//lib/rbs/constant_table.rb#6 + def constant_scopes_cache; end + + # source://rbs//lib/rbs/constant_table.rb#112 + def constant_scopes_module(name, scopes:); end + + # Returns the value of attribute definition_builder. + # + # source://rbs//lib/rbs/constant_table.rb#5 + def definition_builder; end + + # source://rbs//lib/rbs/constant_table.rb#8 + def env; end + + # source://rbs//lib/rbs/constant_table.rb#32 + def name_to_constant(name); end + + # source://rbs//lib/rbs/constant_table.rb#47 + def resolve_constant_reference(name, context:); end + + # source://rbs//lib/rbs/constant_table.rb#78 + def resolve_constant_reference_context(name, context:); end + + # source://rbs//lib/rbs/constant_table.rb#91 + def resolve_constant_reference_inherit(name, scopes:, no_object: T.unsafe(nil)); end + + # source://rbs//lib/rbs/constant_table.rb#12 + def resolver; end + + # source://rbs//lib/rbs/constant_table.rb#43 + def split_name(name); end +end + +# source://rbs//lib/rbs/errors.rb#469 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound + # + # source://rbs//lib/rbs/errors.rb#472 + def initialize(type_name:, method_name:, params:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#470 + def location; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#470 + def method_name; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/errors.rb#470 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#470 + 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#287 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#281 + def ancestors; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#310 + def class?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#327 + def class_type?; end + + # Returns the value of attribute class_variables. + # + # source://rbs//lib/rbs/definition.rb#285 + def class_variables; end + + # source://rbs//lib/rbs/definition.rb#372 + def each_type(&block); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/definition.rb#280 + def entry; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#331 + def instance_type?; end + + # Returns the value of attribute instance_variables. + # + # source://rbs//lib/rbs/definition.rb#284 + def instance_variables; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#318 + def interface?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#335 + def interface_type?; end + + # source://rbs//lib/rbs/definition.rb#362 + def map_method_type(&block); end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition.rb#283 + def methods; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#314 + def module?; end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/definition.rb#282 + def self_type; end + + # source://rbs//lib/rbs/definition.rb#352 + def sub(s); end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#279 + def type_name; end + + # source://rbs//lib/rbs/definition.rb#339 + def type_params; end + + # source://rbs//lib/rbs/definition.rb#343 + def type_params_decl; end +end + +# source://rbs//lib/rbs/definition.rb#189 +module RBS::Definition::Ancestor; end + +# source://rbs//lib/rbs/definition.rb#190 +class RBS::Definition::Ancestor::Instance + # @return [Instance] a new instance of Instance + # + # source://rbs//lib/rbs/definition.rb#193 + def initialize(name:, args:, source:); end + + # source://rbs//lib/rbs/definition.rb#199 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/definition.rb#191 + def args; end + + # source://rbs//lib/rbs/definition.rb#199 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#205 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/definition.rb#191 + def name; end + + # Returns the value of attribute source. + # + # source://rbs//lib/rbs/definition.rb#191 + def source; end +end + +# source://rbs//lib/rbs/definition.rb#210 +class RBS::Definition::Ancestor::Singleton + # @return [Singleton] a new instance of Singleton + # + # source://rbs//lib/rbs/definition.rb#213 + def initialize(name:); end + + # source://rbs//lib/rbs/definition.rb#217 + def ==(other); end + + # source://rbs//lib/rbs/definition.rb#217 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#223 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/definition.rb#211 + def name; end +end + +# source://rbs//lib/rbs/definition.rb#229 +class RBS::Definition::InstanceAncestors + # @return [InstanceAncestors] a new instance of InstanceAncestors + # + # source://rbs//lib/rbs/definition.rb#234 + def initialize(type_name:, params:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#232 + def ancestors; end + + # source://rbs//lib/rbs/definition.rb#240 + def apply(args, location:); end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/definition.rb#231 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#230 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#25 +class RBS::Definition::Method + # @return [Method] a new instance of Method + # + # source://rbs//lib/rbs/definition.rb#81 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition.rb#89 + def ==(other); end + + # Returns the value of attribute accessibility. + # + # source://rbs//lib/rbs/definition.rb#77 + def accessibility; end + + # Returns the value of attribute alias_of. + # + # source://rbs//lib/rbs/definition.rb#79 + def alias_of; end + + # source://rbs//lib/rbs/definition.rb#126 + def annotations; end + + # source://rbs//lib/rbs/definition.rb#122 + def comments; end + + # source://rbs//lib/rbs/definition.rb#104 + def defined_in; end + + # Returns the value of attribute defs. + # + # source://rbs//lib/rbs/definition.rb#76 + def defs; end + + # source://rbs//lib/rbs/definition.rb#89 + def eql?(other); end + + # Returns the value of attribute extra_annotations. + # + # source://rbs//lib/rbs/definition.rb#78 + def extra_annotations; end + + # source://rbs//lib/rbs/definition.rb#100 + def hash; end + + # source://rbs//lib/rbs/definition.rb#111 + def implemented_in; end + + # source://rbs//lib/rbs/definition.rb#169 + def map_method_type(&block); end + + # source://rbs//lib/rbs/definition.rb#151 + def map_type(&block); end + + # source://rbs//lib/rbs/definition.rb#160 + def map_type_bound(&block); end + + # source://rbs//lib/rbs/definition.rb#130 + def members; end + + # source://rbs//lib/rbs/definition.rb#118 + def method_types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#138 + def private?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#134 + def public?; end + + # source://rbs//lib/rbs/definition.rb#142 + def sub(s); end + + # Returns the value of attribute super_method. + # + # source://rbs//lib/rbs/definition.rb#75 + def super_method; end + + # source://rbs//lib/rbs/definition.rb#178 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/definition.rb#26 +class RBS::Definition::Method::TypeDef + # @return [TypeDef] a new instance of TypeDef + # + # source://rbs//lib/rbs/definition.rb#32 + def initialize(type:, member:, defined_in:, implemented_in:); end + + # source://rbs//lib/rbs/definition.rb#39 + def ==(other); end + + # source://rbs//lib/rbs/definition.rb#57 + def annotations; end + + # source://rbs//lib/rbs/definition.rb#53 + def comment; end + + # Returns the value of attribute defined_in. + # + # source://rbs//lib/rbs/definition.rb#29 + def defined_in; end + + # source://rbs//lib/rbs/definition.rb#39 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#49 + def hash; end + + # Returns the value of attribute implemented_in. + # + # source://rbs//lib/rbs/definition.rb#30 + def implemented_in; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/definition.rb#28 + def member; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#65 + def overload?; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition.rb#27 + def type; end + + # source://rbs//lib/rbs/definition.rb#61 + 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#269 +class RBS::Definition::SingletonAncestors + # @return [SingletonAncestors] a new instance of SingletonAncestors + # + # source://rbs//lib/rbs/definition.rb#273 + def initialize(type_name:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#271 + def ancestors; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#270 + 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#10 + def initialize(parent_variable:, type:, declared_in:); 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 + + # source://rbs//lib/rbs/definition.rb#16 + 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#15 + 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#7 + def ancestor_builder; end + + # source://rbs//lib/rbs/definition_builder.rb#137 + def build_instance(type_name, no_self_types: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition_builder.rb#35 + def build_interface(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#375 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # source://rbs//lib/rbs/definition_builder.rb#278 + def build_singleton0(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#624 + def define_methods(definition, methods:, interface_methods:, methods_with_self:, super_interface_method:); end + + # source://rbs//lib/rbs/definition_builder.rb#600 + def define_methods_instance(definition, methods:, interface_methods:); end + + # source://rbs//lib/rbs/definition_builder.rb#610 + def define_methods_module_instance(definition, methods:, interface_methods:, module_self_methods:); end + + # source://rbs//lib/rbs/definition_builder.rb#614 + def define_methods_singleton(definition, methods:, interface_methods:); end + + # source://rbs//lib/rbs/definition_builder.rb#27 + 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#863 + def expand_alias(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#867 + def expand_alias1(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#873 + def expand_alias2(type_name, args); end + + # source://rbs//lib/rbs/definition_builder.rb#592 + def insert_variable(type_name, variables, name:, type:); end + + # Returns the value of attribute instance_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#10 + def instance_cache; end + + # Returns the value of attribute interface_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#13 + def interface_cache; end + + # source://rbs//lib/rbs/definition_builder.rb#783 + def merge_definition(src:, dest:, subst:, implemented_in: T.unsafe(nil), keep_super: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition_builder.rb#807 + def merge_method(type_name, methods, name, method, sub, implemented_in: T.unsafe(nil), keep_super: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition_builder.rb#797 + def merge_variable(variables, name, variable, sub, keep_super: T.unsafe(nil)); end + + # Returns the value of attribute method_builder. + # + # source://rbs//lib/rbs/definition_builder.rb#8 + def method_builder; end + + # Returns the value of attribute singleton0_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#12 + def singleton0_cache; end + + # Returns the value of attribute singleton_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#11 + def singleton_cache; end + + # source://rbs//lib/rbs/definition_builder.rb#496 + def source_location(source, decl); end + + # source://rbs//lib/rbs/definition_builder.rb#854 + def try_cache(type_name, cache:, key: T.unsafe(nil)); end + + # Returns the value of attribute type_name_resolver. + # + # source://rbs//lib/rbs/definition_builder.rb#6 + def type_name_resolver; end + + # source://rbs//lib/rbs/definition_builder.rb#896 + def update(env:, except:, ancestor_builder:); end + + # source://rbs//lib/rbs/definition_builder.rb#486 + def validate_params_with(type_params, result:); end + + # @raise [NoTypeFoundError] + # + # source://rbs//lib/rbs/definition_builder.rb#926 + def validate_type_name(name, location); end + + # source://rbs//lib/rbs/definition_builder.rb#510 + def validate_type_params(definition, ancestors:, methods:); end + + # source://rbs//lib/rbs/definition_builder.rb#915 + def validate_type_presence(type); 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#392 + 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#510 + 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#372 + 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#325 + 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#306 + 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#255 + 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#462 + 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#194 + def build_alias(methods, type, member:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#199 + 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#174 + def build_interface(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#215 + def build_method(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#145 + def build_singleton(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#226 + def each_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#239 + 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 + def accessibilities; end + def accessibilities=(_); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#14 + def accessibility; end + + def name; end + def name=(_); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#10 + def original; end + + def originals; end + def originals=(_); end + def overloads; end + def overloads=(_); end + def type; end + def type=(_); end + + class << self + def [](*_arg0); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#22 + def empty(name:, type:); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); 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#358 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError + # + # source://rbs//lib/rbs/errors.rb#362 + def initialize(name, *decls); end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/errors.rb#360 + def decls; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#359 + def name; end +end + +# source://rbs//lib/rbs/errors.rb#270 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + # @return [DuplicatedInterfaceMethodDefinitionError] a new instance of DuplicatedInterfaceMethodDefinitionError + # + # source://rbs//lib/rbs/errors.rb#275 + def initialize(type:, method_name:, member:); end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#273 + def member; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#272 + def method_name; end + + # source://rbs//lib/rbs/errors.rb#283 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#271 + def type; end + + # source://rbs//lib/rbs/errors.rb#292 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#231 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + # @return [DuplicatedMethodDefinitionError] a new instance of DuplicatedMethodDefinitionError + # + # source://rbs//lib/rbs/errors.rb#236 + def initialize(type:, method_name:, members:); end + + # source://rbs//lib/rbs/errors.rb#261 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/errors.rb#234 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#233 + def method_name; end + + # source://rbs//lib/rbs/errors.rb#265 + def other_locations; end + + # source://rbs//lib/rbs/errors.rb#248 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#232 + def type; end + + # source://rbs//lib/rbs/errors.rb#257 + 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#126 + def initialize; end + + # source://rbs//lib/rbs/environment.rb#221 + def <<(decl); end + + # source://rbs//lib/rbs/environment.rb#478 + def absolute_type(resolver, type, context:); end + + # source://rbs//lib/rbs/environment.rb#474 + def absolute_type_name(resolver, type_name, context:); end + + # Returns the value of attribute alias_decls. + # + # source://rbs//lib/rbs/environment.rb#9 + def alias_decls; end + + # source://rbs//lib/rbs/environment.rb#489 + def buffers; end + + # source://rbs//lib/rbs/environment.rb#493 + def buffers_decls; end + + # source://rbs//lib/rbs/environment.rb#154 + def cache_name(cache, name:, decl:, outer:); end + + # Returns the value of attribute class_decls. + # + # source://rbs//lib/rbs/environment.rb#7 + def class_decls; end + + # Returns the value of attribute constant_decls. + # + # source://rbs//lib/rbs/environment.rb#10 + def constant_decls; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/environment.rb#5 + def declarations; end + + # source://rbs//lib/rbs/environment.rb#93 + def foo; end + + # Returns the value of attribute global_decls. + # + # source://rbs//lib/rbs/environment.rb#11 + def global_decls; end + + # source://rbs//lib/rbs/environment.rb#162 + def insert_decl(decl, outer:, namespace:); end + + # source://rbs//lib/rbs/environment.rb#484 + def inspect; end + + # Returns the value of attribute interface_decls. + # + # source://rbs//lib/rbs/environment.rb#8 + def interface_decls; end + + # source://rbs//lib/rbs/environment.rb#505 + def reject; end + + # source://rbs//lib/rbs/environment.rb#248 + def resolve_declaration(resolver, decl, outer:, prefix:); end + + # source://rbs//lib/rbs/environment.rb#362 + def resolve_member(resolver, member, context:); end + + # source://rbs//lib/rbs/environment.rb#460 + def resolve_method_type(resolver, type, context:); end + + # source://rbs//lib/rbs/environment.rb#233 + def resolve_type_names(only: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment.rb#468 + def resolve_type_params(resolver, params, context:); end + + # source://rbs//lib/rbs/environment.rb#227 + def validate_type_params; end + + private + + # source://rbs//lib/rbs/environment.rb#137 + def initialize_copy(other); end + + class << self + # source://rbs//lib/rbs/environment.rb#148 + def from_loader(loader); end + end +end + +# source://rbs//lib/rbs/environment.rb#99 +class RBS::Environment::ClassEntry < ::RBS::Environment::MultiEntry + # source://rbs//lib/rbs/environment.rb#100 + def primary; end +end + +# source://rbs//lib/rbs/environment.rb#13 +module RBS::Environment::ContextUtil + # source://rbs//lib/rbs/environment.rb#14 + def calculate_context(decls); end +end + +# source://rbs//lib/rbs/environment.rb#78 +class RBS::Environment::ModuleEntry < ::RBS::Environment::MultiEntry + # source://rbs//lib/rbs/environment.rb#85 + def primary; end + + # source://rbs//lib/rbs/environment.rb#79 + def self_types; end +end + +# source://rbs//lib/rbs/environment.rb#22 +class RBS::Environment::MultiEntry + # @return [MultiEntry] a new instance of MultiEntry + # + # source://rbs//lib/rbs/environment.rb#36 + def initialize(name:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#63 + def compatible_params?(ps1, ps2); end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/environment.rb#34 + def decls; end + + # source://rbs//lib/rbs/environment.rb#41 + def insert(decl:, outer:); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment.rb#33 + def name; end + + # source://rbs//lib/rbs/environment.rb#73 + def primary; end + + # source://rbs//lib/rbs/environment.rb#69 + def type_params; end + + # source://rbs//lib/rbs/environment.rb#46 + def validate_type_params; end +end + +# source://rbs//lib/rbs/environment.rb#23 +class RBS::Environment::MultiEntry::D < ::Struct + include ::RBS::Environment::ContextUtil + + # source://rbs//lib/rbs/environment.rb#28 + def context; end + + def decl; end + def decl=(_); end + def outer; end + def outer=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment.rb#108 +class RBS::Environment::SingleEntry + include ::RBS::Environment::ContextUtil + + # @return [SingleEntry] a new instance of SingleEntry + # + # source://rbs//lib/rbs/environment.rb#113 + def initialize(name:, decl:, outer:); end + + # source://rbs//lib/rbs/environment.rb#121 + def context; end + + # Returns the value of attribute decl. + # + # source://rbs//lib/rbs/environment.rb#111 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment.rb#109 + def name; end + + # Returns the value of attribute outer. + # + # source://rbs//lib/rbs/environment.rb#110 + def outer; end +end + +# source://rbs//lib/rbs/environment_loader.rb#4 +class RBS::EnvironmentLoader + # @return [EnvironmentLoader] a new instance of EnvironmentLoader + # + # source://rbs//lib/rbs/environment_loader.rb#37 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment_loader.rb#45 + 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#75 + def add_collection(collection_config); end + + # Returns the value of attribute core_root. + # + # source://rbs//lib/rbs/environment_loader.rb#17 + def core_root; end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/environment_loader.rb#21 + def dirs; end + + # source://rbs//lib/rbs/environment_loader.rb#150 + def each_decl; end + + # source://rbs//lib/rbs/environment_loader.rb#105 + def each_dir; end + + # source://rbs//lib/rbs/environment_loader.rb#128 + def each_file(path, immediate:, skip_hidden:, &block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment_loader.rb#85 + def has_library?(library:, version:); end + + # Returns the value of attribute libs. + # + # source://rbs//lib/rbs/environment_loader.rb#20 + def libs; end + + # source://rbs//lib/rbs/environment_loader.rb#93 + def load(env:); end + + # Returns the value of attribute repository. + # + # source://rbs//lib/rbs/environment_loader.rb#18 + def repository; end + + # source://rbs//lib/rbs/environment_loader.rb#61 + def resolve_dependencies(library:, version:); end + + class << self + # source://rbs//lib/rbs/environment_loader.rb#25 + def gem_sig_path(name, version); end + end +end + +# source://rbs//lib/rbs/environment_loader.rb#23 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/environment_loader.rb#15 +class RBS::EnvironmentLoader::Library < ::Struct + def name; end + def name=(_); end + def version; end + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +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 + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_walker.rb#6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_walker.rb#7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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/errors.rb#347 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError + # + # source://rbs//lib/rbs/errors.rb#351 + def initialize(name:, decl:); end + + # Returns the value of attribute decl. + # + # source://rbs//lib/rbs/errors.rb#349 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#348 + def name; end +end + +# source://rbs//lib/rbs/errors.rb#159 +class RBS::InheritModuleError < ::RBS::DefinitionError + # @return [InheritModuleError] a new instance of InheritModuleError + # + # source://rbs//lib/rbs/errors.rb#162 + def initialize(super_decl); end + + # Returns the value of attribute super_decl. + # + # source://rbs//lib/rbs/errors.rb#160 + def super_decl; end + + class << self + # source://rbs//lib/rbs/errors.rb#168 + def check!(super_decl, env:); end + end +end + +# source://rbs//lib/rbs/errors.rb#324 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + # @return [InvalidOverloadMethodError] a new instance of InvalidOverloadMethodError + # + # source://rbs//lib/rbs/errors.rb#330 + def initialize(type_name:, method_name:, kind:, members:); end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/errors.rb#327 + def kind; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/errors.rb#328 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#326 + def method_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#325 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#51 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # @return [InvalidTypeApplicationError] a new instance of InvalidTypeApplicationError + # + # source://rbs//lib/rbs/errors.rb#57 + def initialize(type_name:, args:, params:, location:); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/errors.rb#53 + def args; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#55 + def location; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/errors.rb#54 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#52 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#65 + def check!(type_name:, args:, params:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#371 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError + # + # source://rbs//lib/rbs/errors.rb#376 + def initialize(type_name:, param:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#374 + def location; end + + # Returns the value of attribute param. + # + # source://rbs//lib/rbs/errors.rb#373 + def param; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#372 + 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#70 + 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 _optional_keys; end + def _required_keys; end + + # source://rbs//lib/rbs/location_aux.rb#101 + def add_optional_child(name, range); end + + # source://rbs//lib/rbs/location_aux.rb#97 + def add_required_child(name, range); end + + def aref(_arg0); end + def buffer; end + + # source://rbs//lib/rbs/location_aux.rb#109 + def each_optional_key(&block); end + + # source://rbs//lib/rbs/location_aux.rb#117 + def each_required_key(&block); end + + # source://rbs//lib/rbs/location_aux.rb#42 + def end_column; end + + # source://rbs//lib/rbs/location_aux.rb#38 + def end_line; end + + # source://rbs//lib/rbs/location_aux.rb#52 + def end_loc; end + + def end_pos; end + + # source://rbs//lib/rbs/location_aux.rb#5 + def inspect; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#125 + def key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#26 + def name; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#129 + def optional_key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#58 + def range; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#133 + def required_key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#62 + def source; end + + # source://rbs//lib/rbs/location_aux.rb#34 + def start_column; end + + # source://rbs//lib/rbs/location_aux.rb#30 + def start_line; end + + # source://rbs//lib/rbs/location_aux.rb#46 + def start_loc; end + + def start_pos; end + + # source://rbs//lib/rbs/location_aux.rb#77 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/location_aux.rb#66 + def to_s; end + + private + + def _end_loc; end + def _start_loc; end + def initialize_copy(_arg0); end + + class << self + # source://rbs//lib/rbs/location_aux.rb#11 + 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#93 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/location_aux.rb#24 +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(decls:); end + + # source://rbs//lib/rbs/locator.rb#11 + def buffer; end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/locator.rb#5 + def decls; end + + # source://rbs//lib/rbs/locator.rb#15 + def find(line:, column:); end + + # source://rbs//lib/rbs/locator.rb#26 + def find2(line:, column:); end + + # source://rbs//lib/rbs/locator.rb#39 + def find_in_decl(pos, decl:, array:); end + + # source://rbs//lib/rbs/locator.rb#184 + def find_in_loc(pos, location:, array:); end + + # source://rbs//lib/rbs/locator.rb#110 + def find_in_member(pos, member:, array:); end + + # source://rbs//lib/rbs/locator.rb#133 + def find_in_method_type(pos, method_type:, array:); end + + # source://rbs//lib/rbs/locator.rb#168 + def find_in_type(pos, type:, array:); end + + # source://rbs//lib/rbs/locator.rb#151 + def find_in_type_param(pos, type_param:, array:); end + + # source://rbs//lib/rbs/locator.rb#211 + 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#84 + def each_type(&block); end + + # source://rbs//lib/rbs/method_type.rb#57 + def free_variables(set = T.unsafe(nil)); 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#63 + def map_type(&block); end + + # source://rbs//lib/rbs/method_type.rb#72 + 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#95 + 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#114 + 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#48 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/errors.rb#403 +class RBS::MixinClassError < ::RBS::DefinitionError + # @return [MixinClassError] a new instance of MixinClassError + # + # source://rbs//lib/rbs/errors.rb#407 + def initialize(type_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#414 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#405 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#404 + def type_name; end + + private + + # source://rbs//lib/rbs/errors.rb#427 + def mixin_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#418 + 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#59 + 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#202 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + # @return [NoMixinFoundError] a new instance of NoMixinFoundError + # + # source://rbs//lib/rbs/errors.rb#206 + def initialize(type_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#213 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#204 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#203 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#217 + def check!(type_name, env:, member:); end + end +end + +# source://rbs//lib/rbs/errors.rb#175 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + # @return [NoSelfTypeFoundError] a new instance of NoSelfTypeFoundError + # + # source://rbs//lib/rbs/errors.rb#179 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#177 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#176 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#186 + def check!(self_type, env:); end + end +end + +# source://rbs//lib/rbs/errors.rb#139 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # @return [NoSuperclassFoundError] a new instance of NoSuperclassFoundError + # + # source://rbs//lib/rbs/errors.rb#143 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#141 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#140 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#150 + def check!(type_name, env:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#110 +class RBS::NoTypeFoundError < ::RBS::BaseError + # @return [NoTypeFoundError] a new instance of NoTypeFoundError + # + # source://rbs//lib/rbs/errors.rb#114 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#112 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#111 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#121 + def check!(type_name, env:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#457 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError + # + # source://rbs//lib/rbs/errors.rb#461 + def initialize(diagnostic:, location:); end + + # Returns the value of attribute diagnostic. + # + # source://rbs//lib/rbs/errors.rb#458 + def diagnostic; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#459 + def location; end +end + +# source://rbs//lib/rbs/parser_aux.rb#4 +class RBS::Parser + class << self + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_signature(_arg0, _arg1); end + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + + # source://rbs//lib/rbs/parser_aux.rb#20 + def buffer(source); end + + # source://rbs//lib/rbs/parser_aux.rb#10 + def parse_method_type(source, line: T.unsafe(nil), column: T.unsafe(nil), range: T.unsafe(nil), variables: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#15 + def parse_signature(source, line: T.unsafe(nil), column: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#5 + def parse_type(source, line: T.unsafe(nil), column: T.unsafe(nil), range: T.unsafe(nil), variables: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/parser_aux.rb#34 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rbs//lib/rbs/parser_compat/lexer_error.rb#6 +RBS::Parser::LexerError = RBS::ParsingError + +# source://rbs//lib/rbs/parser_compat/located_value.rb#6 +class RBS::Parser::LocatedValue; end + +# source://rbs//lib/rbs/parser_compat/semantics_error.rb#6 +RBS::Parser::SemanticsError = RBS::ParsingError + +# source://rbs//lib/rbs/parser_compat/syntax_error.rb#6 +RBS::Parser::SyntaxError = RBS::ParsingError + +# source://rbs//lib/rbs/errors.rb#23 +class RBS::ParsingError < ::RBS::BaseError + # @return [ParsingError] a new instance of ParsingError + # + # source://rbs//lib/rbs/errors.rb#28 + def initialize(location, error_message, token_type); end + + # Returns the value of attribute error_message. + # + # source://rbs//lib/rbs/errors.rb#25 + def error_message; end + + # source://rbs//lib/rbs/errors.rb#36 + def error_value; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#24 + def location; end + + # source://rbs//lib/rbs/errors.rb#43 + def token_str; end + + # Returns the value of attribute token_type. + # + # source://rbs//lib/rbs/errors.rb#26 + 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#81 + 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#105 + 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#69 + def each_child(node, &block); end + + # source://rbs//lib/rbs/prototype/helpers.rb#73 + def each_node(nodes); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/helpers.rb#93 + def keyword_hash?(node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#109 + def untyped; 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#37 + def initialize; end + + # source://rbs//lib/rbs/prototype/rb.rb#509 + def block_type(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#489 + def body_type(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#408 + def const_to_name(node, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#389 + def const_to_name!(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#687 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#41 + def decls; end + + # source://rbs//lib/rbs/prototype/rb.rb#727 + def find_def_index_by_name(decls, name); end + + # source://rbs//lib/rbs/prototype/rb.rb#484 + def function_return_type_from_body(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#428 + def function_type_from_body(node, def_name); end + + # source://rbs//lib/rbs/prototype/rb.rb#502 + def if_unless_type(node); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rb.rb#723 + def is_accessibility?(decl); end + + # source://rbs//lib/rbs/prototype/rb.rb#419 + def literal_to_symbol(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#523 + def literal_to_type(node); end + + # backward compatible + # + # source://rbs//lib/rbs/prototype/rb.rb#644 + def node_type(node, default: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#644 + def param_type(node, default: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#67 + def parse(string); end + + # source://rbs//lib/rbs/prototype/rb.rb#679 + def private; end + + # source://rbs//lib/rbs/prototype/rb.rb#100 + def process(node, decls:, comments:, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#383 + def process_children(node, decls:, comments:, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#683 + def public; end + + # source://rbs//lib/rbs/prototype/rb.rb#624 + def range_element_type(types); end + + # source://rbs//lib/rbs/prototype/rb.rb#697 + def remove_unnecessary_accessibility_methods!(decls); end + + # Returns the value of attribute source_decls. + # + # source://rbs//lib/rbs/prototype/rb.rb#34 + def source_decls; end + + # Returns the value of attribute toplevel_members. + # + # source://rbs//lib/rbs/prototype/rb.rb#35 + def toplevel_members; end + + # source://rbs//lib/rbs/prototype/rb.rb#613 + 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#15 + def method_kind; end + + def module_function; end + def module_function=(_); end + def namespace; end + def namespace=(_); end + def singleton; end + def singleton=(_); end + + class << self + def [](*_arg0); end + + # source://rbs//lib/rbs/prototype/rb.rb#11 + def initial(namespace: T.unsafe(nil)); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/prototype/rbi.rb#5 +class RBS::Prototype::RBI + # @return [RBI] a new instance of RBI + # + # source://rbs//lib/rbs/prototype/rbi.rb#10 + def initialize; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rbi.rb#544 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rbi.rb#548 + 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#6 + def decls; end + + # source://rbs//lib/rbs/prototype/rbi.rb#588 + def each_arg(array, &block); end + + # source://rbs//lib/rbs/prototype/rbi.rb#602 + 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#8 + def last_sig; end + + # source://rbs//lib/rbs/prototype/rbi.rb#276 + def method_type(args_node, type_node, variables:, overloads:); end + + # Returns the value of attribute modules. + # + # source://rbs//lib/rbs/prototype/rbi.rb#7 + def modules; end + + # source://rbs//lib/rbs/prototype/rbi.rb#42 + def nested_name(name); end + + # source://rbs//lib/rbs/prototype/rbi.rb#610 + def node_to_hash(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#16 + def parse(string); end + + # source://rbs//lib/rbs/prototype/rbi.rb#338 + 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#536 + 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#459 + def type_of(type_node, variables:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#472 + def type_of0(type_node, variables:); end +end + +# source://rbs//lib/rbs/prototype/runtime.rb#5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + + # @return [Runtime] a new instance of Runtime + # + # source://rbs//lib/rbs/prototype/runtime.rb#13 + def initialize(patterns:, env:, merge:, owners_included: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#540 + def block_from_ast_of(method); end + + # source://rbs//lib/rbs/prototype/runtime.rb#37 + def builder; end + + # source://rbs//lib/rbs/prototype/runtime.rb#527 + def const_name(const); end + + # source://rbs//lib/rbs/prototype/runtime.rb#45 + def decls; end + + # source://rbs//lib/rbs/prototype/runtime.rb#76 + def each_included_module(type_name, mod); 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#478 + def ensure_outer_module_declarations(mod); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/prototype/runtime.rb#9 + def env; end + + # source://rbs//lib/rbs/prototype/runtime.rb#374 + def generate_class(mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#323 + def generate_constants(mod, decls); end + + # source://rbs//lib/rbs/prototype/runtime.rb#224 + def generate_methods(mod, module_name, members); end + + # source://rbs//lib/rbs/prototype/runtime.rb#421 + def generate_module(mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#361 + def generate_super_class(mod); end + + # Returns the value of attribute merge. + # + # source://rbs//lib/rbs/prototype/runtime.rb#10 + def merge; end + + # source://rbs//lib/rbs/prototype/runtime.rb#173 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#106 + def method_type(method); end + + # Returns the exact name & not compactly declared name + # + # source://rbs//lib/rbs/prototype/runtime.rb#522 + def only_name(mod); end + + # Returns the value of attribute owners_included. + # + # source://rbs//lib/rbs/prototype/runtime.rb#11 + def owners_included; end + + # source://rbs//lib/rbs/prototype/runtime.rb#41 + def parse(file); end + + # Returns the value of attribute patterns. + # + # source://rbs//lib/rbs/prototype/runtime.rb#8 + def patterns; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#24 + def target?(const); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#213 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#62 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#532 + def type_args(type_name); end +end + +# source://rbs//lib/rbs/errors.rb#385 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError + # + # source://rbs//lib/rbs/errors.rb#389 + def initialize(type:, defs:); end + + # Returns the value of attribute defs. + # + # source://rbs//lib/rbs/errors.rb#387 + def defs; end + + # source://rbs//lib/rbs/errors.rb#396 + def location; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#386 + def type; end +end + +# source://rbs//lib/rbs/errors.rb#72 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # @return [RecursiveAncestorError] a new instance of RecursiveAncestorError + # + # source://rbs//lib/rbs/errors.rb#76 + def initialize(ancestors:, location:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/errors.rb#73 + def ancestors; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#74 + def location; end + + class << self + # source://rbs//lib/rbs/errors.rb#96 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#441 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError + # + # source://rbs//lib/rbs/errors.rb#445 + def initialize(alias_names:, location:); end + + # Returns the value of attribute alias_names. + # + # source://rbs//lib/rbs/errors.rb#442 + def alias_names; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#443 + def location; end + + # source://rbs//lib/rbs/errors.rb#452 + 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 + def gem; end + def gem=(_); end + def path; end + def path=(_); end + def version; end + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#75 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#72 + def builder; end + + # Returns the value of attribute child_constants_cache. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#73 + def child_constants_cache; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#99 + def children(module_name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#87 + def constants(context); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#162 + def constants_from_ancestors(module_name, constants:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#147 + def constants_from_context(context, constants:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#185 + def constants_itself(context, constants:); end + + # Returns the value of attribute context_constants_cache. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#73 + def context_constants_cache; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#122 + def load_child_constants(name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#107 + def load_context_constants(context); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#82 + def resolve(name, context:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#95 + def resolve_child(module_name, name); end + + # Returns the value of attribute table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#72 + 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#50 + 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#54 + def constant(name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#67 + def constant_of_constant(name, entry); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#58 + 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#9 + def initialize(env); 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#50 + def has_name?(full_name); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#25 + def resolve(type_name, context:); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#35 + def resolve_in(type_name, context); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#18 + def try_cache(query); 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#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#53 + 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/errors.rb#313 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # @return [SuperclassMismatchError] a new instance of SuperclassMismatchError + # + # source://rbs//lib/rbs/errors.rb#317 + def initialize(name:, entry:); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/errors.rb#315 + def entry; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#314 + 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 + + # 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 + + # 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#71 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # source://rbs//lib/rbs/type_alias_dependency.rb#55 + 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#59 + 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#67 + 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#103 + def each_alias_type(type, &block); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#81 + 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#77 + 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#113 + 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#25 + 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 +end + +# source://rbs//lib/rbs/type_name_resolver.rb#4 +class RBS::TypeNameResolver + # @return [TypeNameResolver] a new instance of TypeNameResolver + # + # source://rbs//lib/rbs/type_name_resolver.rb#10 + def initialize; end + + # source://rbs//lib/rbs/type_name_resolver.rb#21 + def add_names(names); end + + # Returns the value of attribute all_names. + # + # source://rbs//lib/rbs/type_name_resolver.rb#7 + def all_names; end + + # Returns the value of attribute cache. + # + # source://rbs//lib/rbs/type_name_resolver.rb#8 + def cache; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name_resolver.rb#61 + def has_name?(full_name); end + + # source://rbs//lib/rbs/type_name_resolver.rb#33 + def resolve(type_name, context:); end + + # source://rbs//lib/rbs/type_name_resolver.rb#26 + def try_cache(query); end + + class << self + # source://rbs//lib/rbs/type_name_resolver.rb#15 + def from_env(env); end + end +end + +# source://rbs//lib/rbs/type_name_resolver.rb#5 +class RBS::TypeNameResolver::Query < ::Struct + def context; end + def context=(_); end + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/types.rb#4 +module RBS::Types; end + +# source://rbs//lib/rbs/types.rb#330 +class RBS::Types::Alias + include ::RBS::Types::Application + + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/types.rb#335 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#331 + def location; end + + # source://rbs//lib/rbs/types.rb#357 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#349 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#345 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#341 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#207 +module RBS::Types::Application + # source://rbs//lib/rbs/types.rb#211 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/types.rb#209 + def args; end + + # source://rbs//lib/rbs/types.rb#237 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#211 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#221 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#217 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#208 + def name; end + + # source://rbs//lib/rbs/types.rb#229 + def to_s(level = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#41 +module RBS::Types::Bases; end + +# source://rbs//lib/rbs/types.rb#97 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base; 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#49 + def eql?(other); 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 +end + +# source://rbs//lib/rbs/types.rb#95 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#100 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#107 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#102 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # source://rbs//lib/rbs/types.rb#103 + def sub(s); end +end + +# source://rbs//lib/rbs/types.rb#98 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#101 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#99 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#96 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#1038 +class RBS::Types::Block + # @return [Block] a new instance of Block + # + # source://rbs//lib/rbs/types.rb#1043 + def initialize(type:, required:, self_type: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1049 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1072 + def map_type(&block); end + + # Returns the value of attribute required. + # + # source://rbs//lib/rbs/types.rb#1040 + def required; end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/types.rb#1041 + def self_type; end + + # source://rbs//lib/rbs/types.rb#1064 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1056 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#1039 + def type; end +end + +# source://rbs//lib/rbs/types.rb#288 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # @return [ClassInstance] a new instance of ClassInstance + # + # source://rbs//lib/rbs/types.rb#293 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#289 + def location; end + + # source://rbs//lib/rbs/types.rb#317 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#309 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#303 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#299 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#167 +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#171 + def initialize(name:, location:); end + + # source://rbs//lib/rbs/types.rb#176 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#176 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#182 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#169 + def location; end + + # source://rbs//lib/rbs/types.rb#199 + def map_type_name; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#168 + def name; end + + # source://rbs//lib/rbs/types.rb#189 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#193 + def to_s(level = T.unsafe(nil)); 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#724 +class RBS::Types::Function + # @return [Function] a new instance of Function + # + # source://rbs//lib/rbs/types.rb#780 + 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#791 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#862 + def amap(array, &block); end + + # source://rbs//lib/rbs/types.rb#999 + def drop_head; end + + # source://rbs//lib/rbs/types.rb#1016 + def drop_tail; end + + # source://rbs//lib/rbs/types.rb#899 + def each_param(&block); end + + # source://rbs//lib/rbs/types.rb#884 + def each_type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#970 + def empty?; end + + # source://rbs//lib/rbs/types.rb#791 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#817 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1029 + def has_keyword?; end + + # source://rbs//lib/rbs/types.rb#805 + def hash; end + + # source://rbs//lib/rbs/types.rb#870 + def hmapv(hash, &block); end + + # source://rbs//lib/rbs/types.rb#845 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#878 + def map_type_name(&block); end + + # Returns the value of attribute optional_keywords. + # + # source://rbs//lib/rbs/types.rb#776 + def optional_keywords; end + + # Returns the value of attribute optional_positionals. + # + # source://rbs//lib/rbs/types.rb#772 + def optional_positionals; end + + # source://rbs//lib/rbs/types.rb#980 + def param_to_s; end + + # Returns the value of attribute required_keywords. + # + # source://rbs//lib/rbs/types.rb#775 + def required_keywords; end + + # Returns the value of attribute required_positionals. + # + # source://rbs//lib/rbs/types.rb#771 + def required_positionals; end + + # Returns the value of attribute rest_keywords. + # + # source://rbs//lib/rbs/types.rb#777 + def rest_keywords; end + + # Returns the value of attribute rest_positionals. + # + # source://rbs//lib/rbs/types.rb#773 + def rest_positionals; end + + # source://rbs//lib/rbs/types.rb#995 + def return_to_s; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/types.rb#778 + def return_type; end + + # source://rbs//lib/rbs/types.rb#926 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#913 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute trailing_positionals. + # + # source://rbs//lib/rbs/types.rb#774 + def trailing_positionals; end + + # source://rbs//lib/rbs/types.rb#956 + 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 + + # source://rbs//lib/rbs/types.rb#943 + def with_return_type(type); end + + class << self + # source://rbs//lib/rbs/types.rb#930 + def empty(return_type); end + end +end + +# source://rbs//lib/rbs/types.rb#725 +class RBS::Types::Function::Param + # @return [Param] a new instance of Param + # + # source://rbs//lib/rbs/types.rb#730 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#736 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#736 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#742 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#728 + def location; end + + # source://rbs//lib/rbs/types.rb#746 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#727 + def name; end + + # source://rbs//lib/rbs/types.rb#754 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#758 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#726 + def type; end +end + +# source://rbs//lib/rbs/types.rb#246 +class RBS::Types::Interface + include ::RBS::Types::Application + + # @return [Interface] a new instance of Interface + # + # source://rbs//lib/rbs/types.rb#251 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#247 + def location; end + + # source://rbs//lib/rbs/types.rb#275 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#267 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#261 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#257 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#655 +class RBS::Types::Intersection + # @return [Intersection] a new instance of Intersection + # + # source://rbs//lib/rbs/types.rb#659 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#664 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#700 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#664 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#674 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#670 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#657 + def location; end + + # source://rbs//lib/rbs/types.rb#708 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#716 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#686 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#682 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#691 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#656 + def types; end +end + +# source://rbs//lib/rbs/types.rb#1190 +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#1194 + def initialize(literal:, location:); end + + # source://rbs//lib/rbs/types.rb#1199 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1199 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#1205 + def hash; end + + # Returns the value of attribute literal. + # + # source://rbs//lib/rbs/types.rb#1191 + def literal; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1192 + def location; end + + # source://rbs//lib/rbs/types.rb#1214 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1218 + def to_s(level = T.unsafe(nil)); end +end + +# 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; end +end + +# source://rbs//lib/rbs/types.rb#517 +class RBS::Types::Optional + # @return [Optional] a new instance of Optional + # + # source://rbs//lib/rbs/types.rb#521 + def initialize(type:, location:); end + + # source://rbs//lib/rbs/types.rb#526 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#560 + def each_type; end + + # source://rbs//lib/rbs/types.rb#526 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#536 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#532 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#519 + def location; end + + # source://rbs//lib/rbs/types.rb#575 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#568 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#544 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#540 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#548 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#518 + def type; end +end + +# source://rbs//lib/rbs/types.rb#1093 +class RBS::Types::Proc + # @return [Proc] a new instance of Proc + # + # source://rbs//lib/rbs/types.rb#1099 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1106 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/types.rb#1095 + def block; end + + # source://rbs//lib/rbs/types.rb#1158 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#1106 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#1116 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1112 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1097 + def location; end + + # source://rbs//lib/rbs/types.rb#1176 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#1167 + def map_type_name(&block); end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/types.rb#1096 + def self_type; end + + # source://rbs//lib/rbs/types.rb#1133 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1123 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1142 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#1094 + def type; end +end + +# source://rbs//lib/rbs/types.rb#441 +class RBS::Types::Record + # @return [Record] a new instance of Record + # + # source://rbs//lib/rbs/types.rb#445 + def initialize(fields:, location:); end + + # source://rbs//lib/rbs/types.rb#450 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#490 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#450 + def eql?(other); end + + # Returns the value of attribute fields. + # + # source://rbs//lib/rbs/types.rb#442 + def fields; end + + # source://rbs//lib/rbs/types.rb#460 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#456 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#443 + def location; end + + # source://rbs//lib/rbs/types.rb#505 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#498 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#472 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#468 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#477 + def to_s(level = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#1081 +module RBS::Types::SelfTypeBindingHelper + private + + # source://rbs//lib/rbs/types.rb#1084 + def self_type_binding_to_s(t); end + + class << self + # source://rbs//lib/rbs/types.rb#1084 + def self_type_binding_to_s(t); end + end +end + +# source://rbs//lib/rbs/types.rb#370 +class RBS::Types::Tuple + # @return [Tuple] a new instance of Tuple + # + # source://rbs//lib/rbs/types.rb#374 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#379 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#414 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#379 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#389 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#385 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#372 + def location; end + + # source://rbs//lib/rbs/types.rb#429 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#422 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#401 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#397 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#406 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#371 + def types; end +end + +# source://rbs//lib/rbs/types.rb#587 +class RBS::Types::Union + # @return [Union] a new instance of Union + # + # source://rbs//lib/rbs/types.rb#591 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#596 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#631 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#596 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#606 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#602 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#589 + def location; end + + # source://rbs//lib/rbs/types.rb#639 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#647 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#618 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#614 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#623 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#588 + def types; end +end + +# source://rbs//lib/rbs/types.rb#110 +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#116 + def initialize(name:, location:); end + + # source://rbs//lib/rbs/types.rb#121 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#121 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#131 + def free_variables(set = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#127 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#112 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#111 + def name; end + + # source://rbs//lib/rbs/types.rb#141 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#137 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#160 + def to_s(level = T.unsafe(nil)); end + + class << self + # source://rbs//lib/rbs/types.rb#145 + def build(v); end + + # source://rbs//lib/rbs/types.rb#155 + def fresh(v = T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/errors.rb#297 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + # @return [UnknownMethodAliasError] a new instance of UnknownMethodAliasError + # + # source://rbs//lib/rbs/errors.rb#303 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # Returns the value of attribute aliased_name. + # + # source://rbs//lib/rbs/errors.rb#300 + def aliased_name; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#301 + def location; end + + # Returns the value of attribute original_name. + # + # source://rbs//lib/rbs/errors.rb#299 + def original_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#298 + 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:); end + + # source://rbs//lib/rbs/validator.rb#15 + def absolute_type(type, context:); 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#149 + def type_alias_dependency; end + + # source://rbs//lib/rbs/validator.rb#153 + def type_alias_regularity; end + + # source://rbs//lib/rbs/validator.rb#100 + 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#22 + def validate_type(type, context:); end + + # source://rbs//lib/rbs/validator.rb#59 + def validate_type_alias(entry:); end + + # source://rbs//lib/rbs/validator.rb#115 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); 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#166 + 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#173 + def negate(variance); end + + # source://rbs//lib/rbs/variance_calculator.rb#118 + 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/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#314 + def attribute(kind, attr); 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#244 + def method_name(name); end + + # source://rbs//lib/rbs/writer.rb#170 + def name_and_args(name, args); end + + # source://rbs//lib/rbs/writer.rb#158 + 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#344 + def preserve_empty_line(prev, decl); end + + # source://rbs//lib/rbs/writer.rb#180 + 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#73 + def write(decls); end + + # source://rbs//lib/rbs/writer.rb#42 + def write_annotation(annotations); end + + # source://rbs//lib/rbs/writer.rb#60 + def write_comment(comment); end + + # source://rbs//lib/rbs/writer.rb#82 + def write_decl(decl); end + + # source://rbs//lib/rbs/writer.rb#265 + def write_def(member); end + + # source://rbs//lib/rbs/writer.rb#257 + def write_loc_source(located); end + + # source://rbs//lib/rbs/writer.rb#190 + def write_member(member); end +end diff --git a/sorbet/rbi/gems/rdoc@6.5.0.rbi b/sorbet/rbi/gems/rdoc@6.5.0.rbi new file mode 100644 index 0000000000..d93048ef18 --- /dev/null +++ b/sorbet/rbi/gems/rdoc@6.5.0.rbi @@ -0,0 +1,12429 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rdoc` gem. +# Please instead update this file by running `bin/tapioca gem rdoc`. + +# RDoc produces documentation for Ruby source files by parsing the source and +# extracting the definition for classes, modules, methods, includes and +# requires. It associates these with optional documentation contained in an +# immediately preceding comment block then renders the result using an output +# formatter. +# +# For a simple introduction to writing or generating documentation using RDoc +# see the README. +# +# == Roadmap +# +# If you think you found a bug in RDoc see CONTRIBUTING@Bugs +# +# If you want to use RDoc to create documentation for your Ruby source files, +# see RDoc::Markup and refer to rdoc --help for command line usage. +# +# If you want to set the default markup format see +# RDoc::Markup@Supported+Formats +# +# If you want to store rdoc configuration in your gem (such as the default +# markup format) see RDoc::Options@Saved+Options +# +# If you want to write documentation for Ruby files see RDoc::Parser::Ruby +# +# If you want to write documentation for extensions written in C see +# RDoc::Parser::C +# +# If you want to generate documentation using rake see RDoc::Task. +# +# If you want to drive RDoc programmatically, see RDoc::RDoc. +# +# If you want to use the library to format text blocks into HTML or other +# formats, look at RDoc::Markup. +# +# If you want to make an RDoc plugin such as a generator or directive handler +# see RDoc::RDoc. +# +# If you want to write your own output generator see RDoc::Generator. +# +# If you want an overview of how RDoc works see CONTRIBUTING +# +# == Credits +# +# RDoc is currently being maintained by Eric Hodel . +# +# Dave Thomas is the original author of RDoc. +# +# * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding +# work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby +# parser for irb and the rtags package. +# +# source://rdoc//lib/rdoc.rb#58 +module RDoc + class << self + # source://rdoc//lib/rdoc.rb#123 + def home; end + + # Loads the best available YAML library. + # + # source://rdoc//lib/rdoc.rb#107 + def load_yaml; end + end +end + +# Represent an alias, which is an old_name/new_name pair associated with a +# particular context +# -- +# TODO implement Alias as a proxy to a method/attribute, inheriting from +# MethodAttr +# +# source://rdoc//lib/rdoc/alias.rb#9 +class RDoc::Alias < ::RDoc::CodeObject + # Creates a new Alias with a token stream of +text+ that aliases +old_name+ + # to +new_name+, has +comment+ and is a +singleton+ context. + # + # @return [Alias] a new instance of Alias + # + # source://rdoc//lib/rdoc/alias.rb#37 + def initialize(text, old_name, new_name, comment, singleton = T.unsafe(nil)); end + + # Order by #singleton then #new_name + # + # source://rdoc//lib/rdoc/alias.rb#50 + def <=>(other); end + + # HTML fragment reference for this alias + # + # source://rdoc//lib/rdoc/alias.rb#57 + def aref; end + + # Full old name including namespace + # + # source://rdoc//lib/rdoc/alias.rb#65 + def full_old_name; end + + # HTML id-friendly version of +#new_name+. + # + # source://rdoc//lib/rdoc/alias.rb#72 + def html_name; end + + # source://rdoc//lib/rdoc/alias.rb#76 + def inspect; end + + # Aliased method's name + # + # source://rdoc//lib/rdoc/alias.rb#14 + def name; end + + # '::' for the alias of a singleton method/attribute, '#' for instance-level. + # + # source://rdoc//lib/rdoc/alias.rb#87 + def name_prefix; end + + # Aliased method's name + # + # source://rdoc//lib/rdoc/alias.rb#14 + def new_name; end + + # Aliasee method's name + # + # source://rdoc//lib/rdoc/alias.rb#21 + def old_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#101 + def pretty_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#101 + def pretty_new_name; end + + # Old name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#94 + def pretty_old_name; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//lib/rdoc/alias.rb#26 + def singleton; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//lib/rdoc/alias.rb#26 + def singleton=(_arg0); end + + # Source file token stream + # + # source://rdoc//lib/rdoc/alias.rb#31 + def text; end + + # source://rdoc//lib/rdoc/alias.rb#107 + def to_s; end +end + +# AnyMethod is the base class for objects representing methods +# +# source://rdoc//lib/rdoc/any_method.rb#5 +class RDoc::AnyMethod < ::RDoc::MethodAttr + include ::RDoc::TokenStream + + # Creates a new AnyMethod with a token stream +text+ and +name+ + # + # @return [AnyMethod] a new instance of AnyMethod + # + # source://rdoc//lib/rdoc/any_method.rb#46 + def initialize(text, name); end + + # Adds +an_alias+ as an alias for this method in +context+. + # + # source://rdoc//lib/rdoc/any_method.rb#59 + def add_alias(an_alias, context = T.unsafe(nil)); end + + # Prefix for +aref+ is 'method'. + # + # source://rdoc//lib/rdoc/any_method.rb#76 + def aref_prefix; end + + # The call_seq or the param_seq with method name, if there is no call_seq. + # + # Use this for displaying a method's argument lists. + # + # source://rdoc//lib/rdoc/any_method.rb#85 + def arglists; end + + # The C function that implements this method (if it was defined in a C file) + # + # source://rdoc//lib/rdoc/any_method.rb#27 + def c_function; end + + # The C function that implements this method (if it was defined in a C file) + # + # source://rdoc//lib/rdoc/any_method.rb#27 + def c_function=(_arg0); end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/any_method.rb#96 + def call_seq; end + + # Sets the different ways you can call this method. If an empty +call_seq+ + # is given nil is assumed. + # + # See also #param_seq + # + # source://rdoc//lib/rdoc/any_method.rb#112 + def call_seq=(call_seq); end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//lib/rdoc/any_method.rb#39 + def calls_super; end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//lib/rdoc/any_method.rb#39 + def calls_super=(_arg0); end + + # Don't rename \#initialize to \::new + # + # source://rdoc//lib/rdoc/any_method.rb#22 + def dont_rename_initialize; end + + # Don't rename \#initialize to \::new + # + # source://rdoc//lib/rdoc/any_method.rb#22 + def dont_rename_initialize=(_arg0); end + + # Loads is_alias_for from the internal name. Returns nil if the alias + # cannot be found. + # + # source://rdoc//lib/rdoc/any_method.rb#122 + def is_alias_for; end + + # Dumps this AnyMethod for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/any_method.rb#140 + def marshal_dump; end + + # Loads this AnyMethod from +array+. For a loaded AnyMethod the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/any_method.rb#177 + def marshal_load(array); end + + # Method name + # + # If the method has no assigned name, it extracts it from #call_seq. + # + # source://rdoc//lib/rdoc/any_method.rb#226 + def name; end + + # A list of this method's method and yield parameters. +call-seq+ params + # are preferred over parsed method and block params. + # + # source://rdoc//lib/rdoc/any_method.rb#239 + def param_list; end + + # Pretty parameter list for this method. If the method's parameters were + # given by +call-seq+ it is preferred over the parsed values. + # + # source://rdoc//lib/rdoc/any_method.rb#271 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/any_method.rb#34 + def params; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/any_method.rb#34 + def params=(_arg0); end + + # The section title of the method (if defined in a C file via +:category:+) + # + # source://rdoc//lib/rdoc/any_method.rb#30 + def section_title; end + + # The section title of the method (if defined in a C file via +:category:+) + # + # source://rdoc//lib/rdoc/any_method.rb#30 + def section_title=(_arg0); end + + # Sets the store for this method and its referenced code objects. + # + # source://rdoc//lib/rdoc/any_method.rb#302 + def store=(store); end + + # For methods that +super+, find the superclass method that would be called. + # + # source://rdoc//lib/rdoc/any_method.rb#311 + def superclass_method; end + + protected + + # call_seq without deduplication and alias lookup. + # + # source://rdoc//lib/rdoc/any_method.rb#330 + def _call_seq; end + + private + + # call_seq with alias examples information removed, if this + # method is an alias method. + # + # source://rdoc//lib/rdoc/any_method.rb#340 + def deduplicate_call_seq(call_seq); end +end + +# An attribute created by \#attr, \#attr_reader, \#attr_writer or +# \#attr_accessor +# +# source://rdoc//lib/rdoc/attr.rb#6 +class RDoc::Attr < ::RDoc::MethodAttr + # Creates a new Attr with body +text+, +name+, read/write status +rw+ and + # +comment+. +singleton+ marks this as a class attribute. + # + # @return [Attr] a new instance of Attr + # + # source://rdoc//lib/rdoc/attr.rb#25 + def initialize(text, name, rw, comment, singleton = T.unsafe(nil)); end + + # Attributes are equal when their names, singleton and rw are identical + # + # source://rdoc//lib/rdoc/attr.rb#36 + def ==(other); end + + # Add +an_alias+ as an attribute in +context+. + # + # source://rdoc//lib/rdoc/attr.rb#46 + def add_alias(an_alias, context); end + + # The #aref prefix for attributes + # + # source://rdoc//lib/rdoc/attr.rb#61 + def aref_prefix; end + + # Attributes never call super. See RDoc::AnyMethod#calls_super + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//lib/rdoc/attr.rb#71 + def calls_super; end + + # Returns attr_reader, attr_writer or attr_accessor as appropriate. + # + # source://rdoc//lib/rdoc/attr.rb#78 + def definition; end + + # source://rdoc//lib/rdoc/attr.rb#86 + def inspect; end + + # Dumps this Attr for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/attr.rb#102 + def marshal_dump; end + + # Loads this Attr from +array+. For a loaded Attr the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/attr.rb#124 + def marshal_load(array); end + + # source://rdoc//lib/rdoc/attr.rb#151 + def pretty_print(q); end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//lib/rdoc/attr.rb#19 + def rw; end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//lib/rdoc/attr.rb#19 + def rw=(_arg0); end + + # source://rdoc//lib/rdoc/attr.rb#162 + def to_s; end + + # Attributes do not have token streams. + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//lib/rdoc/attr.rb#172 + def token_stream; end +end + +# ClassModule is the base class for objects representing either a class or a +# module. +# +# source://rdoc//lib/rdoc/class_module.rb#6 +class RDoc::ClassModule < ::RDoc::Context + # Creates a new ClassModule with +name+ with optional +superclass+ + # + # This is a constructor for subclasses, and must never be called directly. + # + # @return [ClassModule] a new instance of ClassModule + # + # source://rdoc//lib/rdoc/class_module.rb#111 + def initialize(name, superclass = T.unsafe(nil)); end + + # Adds +comment+ to this ClassModule's list of comments at +location+. This + # method is preferred over #comment= since it allows ri data to be updated + # across multiple runs. + # + # source://rdoc//lib/rdoc/class_module.rb#127 + def add_comment(comment, location); end + + # source://rdoc//lib/rdoc/class_module.rb#148 + def add_things(my_things, other_things); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # source://rdoc//lib/rdoc/class_module.rb#171 + def ancestors; end + + # HTML fragment reference for this module or class. See + # RDoc::NormalClass#aref and RDoc::NormalModule#aref + # + # source://rdoc//lib/rdoc/class_module.rb#183 + def aref; end + + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/class_module.rb#175 + def aref_prefix; end + + # Clears the comment. Used by the Ruby parser. + # + # source://rdoc//lib/rdoc/class_module.rb#195 + def clear_comment; end + + # This method is deprecated, use #add_comment instead. + # + # Appends +comment+ to the current comment, but separated by a rule. Works + # more like +=. + # + # source://rdoc//lib/rdoc/class_module.rb#205 + def comment=(comment); end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//lib/rdoc/class_module.rb#35 + def comment_location; end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//lib/rdoc/class_module.rb#35 + def comment_location=(_arg0); end + + # Prepares this ClassModule for use by a generator. + # + # See RDoc::Store#complete + # + # source://rdoc//lib/rdoc/class_module.rb#223 + def complete(min_visibility); end + + # Constants that are aliases for this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#30 + def constant_aliases; end + + # Constants that are aliases for this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#30 + def constant_aliases=(_arg0); end + + # Handy wrapper for marking up this class or module's comment + # + # source://rdoc//lib/rdoc/generator/markup.rb#131 + def description; end + + # source://rdoc//lib/rdoc/class_module.rb#37 + def diagram; end + + # source://rdoc//lib/rdoc/class_module.rb#37 + def diagram=(_arg0); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # Ancestors of this class or module only + # + # source://rdoc//lib/rdoc/class_module.rb#171 + def direct_ancestors; end + + # Does this ClassModule or any of its methods have document_self set? + # + # source://rdoc//lib/rdoc/class_module.rb#233 + def document_self_or_methods; end + + # Does this class or module have a comment with content or is + # #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/class_module.rb#241 + def documented?; end + + # Iterates the ancestors of this class or module for which an + # RDoc::ClassModule exists. + # + # source://rdoc//lib/rdoc/class_module.rb#251 + def each_ancestor; end + + # Looks for a symbol in the #ancestors. See Context#find_local_symbol. + # + # source://rdoc//lib/rdoc/class_module.rb#264 + def find_ancestor_local_symbol(symbol); end + + # Finds a class or module with +name+ in this namespace or its descendants + # + # source://rdoc//lib/rdoc/class_module.rb#276 + def find_class_named(name); end + + # Return the fully qualified name of this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#289 + def full_name; end + + # Class or module this constant is an alias for + # + # source://rdoc//lib/rdoc/class_module.rb#42 + def is_alias_for; end + + # Class or module this constant is an alias for + # + # source://rdoc//lib/rdoc/class_module.rb#42 + def is_alias_for=(_arg0); end + + # TODO: filter included items by #display? + # + # source://rdoc//lib/rdoc/class_module.rb#300 + def marshal_dump; end + + # source://rdoc//lib/rdoc/class_module.rb#346 + def marshal_load(array); end + + # Merges +class_module+ into this ClassModule. + # + # The data in +class_module+ is preferred over the receiver. + # + # source://rdoc//lib/rdoc/class_module.rb#435 + def merge(class_module); end + + # Merges collection +mine+ with +other+ preferring other. +other_files+ is + # used to help determine which items should be deleted. + # + # Yields whether the item should be added or removed (true or false) and the + # item to be added or removed. + # + # merge_collections things, other.things, other.in_files do |add, thing| + # if add then + # # add the thing + # else + # # remove the thing + # end + # end + # + # source://rdoc//lib/rdoc/class_module.rb#519 + def merge_collections(mine, other, other_files, &block); end + + # Merges the comments in this ClassModule with the comments in the other + # ClassModule +cm+. + # + # source://rdoc//lib/rdoc/class_module.rb#531 + def merge_sections(cm); end + + # Does this object represent a module? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/class_module.rb#570 + def module?; end + + # Allows overriding the initial name. + # + # Used for modules and classes that are constant aliases. + # + # source://rdoc//lib/rdoc/class_module.rb#579 + def name=(new_name); end + + # Name to use to generate the url: + # modules and classes that are aliases for another + # module or class return the name of the latter. + # + # source://rdoc//lib/rdoc/class_module.rb#622 + def name_for_path; end + + # Returns the classes and modules that are not constants + # aliasing another class or module. For use by formatters + # only (caches its result). + # + # source://rdoc//lib/rdoc/class_module.rb#631 + def non_aliases; end + + # Parses +comment_location+ into an RDoc::Markup::Document composed of + # multiple RDoc::Markup::Documents with their file set. + # + # source://rdoc//lib/rdoc/class_module.rb#587 + def parse(comment_location); end + + # Path to this class or module for use with HTML generator output. + # + # source://rdoc//lib/rdoc/class_module.rb#613 + def path; end + + # Updates the child modules or classes of class/module +parent+ by + # deleting the ones that have been removed from the documentation. + # + # +parent_hash+ is either parent.modules_hash or + # parent.classes_hash and +all_hash+ is ::all_modules_hash or + # ::all_classes_hash. + # + # source://rdoc//lib/rdoc/class_module.rb#643 + def remove_nodoc_children; end + + # source://rdoc//lib/rdoc/class_module.rb#657 + def remove_things(my_things, other_files); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//lib/rdoc/class_module.rb#672 + def search_record; end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/class_module.rb#687 + def store=(store); end + + # Get the superclass of this class. Attempts to retrieve the superclass + # object, returns the name if it is not known. + # + # source://rdoc//lib/rdoc/class_module.rb#701 + def superclass; end + + # Set the superclass of this class to +superclass+ + # + # @raise [NoMethodError] + # + # source://rdoc//lib/rdoc/class_module.rb#708 + def superclass=(superclass); end + + # source://rdoc//lib/rdoc/class_module.rb#713 + def to_s; end + + # 'module' or 'class' + # + # source://rdoc//lib/rdoc/class_module.rb#724 + def type; end + + # Updates the child modules & classes by replacing the ones that are + # aliases through a constant. + # + # The aliased module/class is replaced in the children and in + # RDoc::Store#modules_hash or RDoc::Store#classes_hash + # by a copy that has RDoc::ClassModule#is_alias_for set to + # the aliased module/class, and this copy is added to #aliases + # of the aliased module/class. + # + # Formatters can use the #non_aliases method to retrieve children that + # are not aliases, for instance to list the namespace content, since + # the aliased modules are included in the constants of the class/module, + # that are listed separately. + # + # source://rdoc//lib/rdoc/class_module.rb#743 + def update_aliases; end + + # Deletes from #extends those whose module has been removed from the + # documentation. + # -- + # FIXME: like update_includes, extends are not reliably removed + # + # source://rdoc//lib/rdoc/class_module.rb#791 + def update_extends; end + + # Deletes from #includes those whose module has been removed from the + # documentation. + # -- + # FIXME: includes are not reliably removed, see _possible_bug test case + # + # source://rdoc//lib/rdoc/class_module.rb#776 + def update_includes; end + + class << self + # Return a RDoc::ClassModule of class +class_type+ that is a copy + # of module +module+. Used to promote modules to classes. + # -- + # TODO move to RDoc::NormalClass (I think) + # + # source://rdoc//lib/rdoc/class_module.rb#50 + def from_module(class_type, mod); end + end +end + +# Base class for the RDoc code tree. +# +# We contain the common stuff for contexts (which are containers) and other +# elements (methods, attributes and so on) +# +# Here's the tree of the CodeObject subclasses: +# +# * RDoc::Context +# * RDoc::TopLevel +# * RDoc::ClassModule +# * RDoc::AnonClass (never used so far) +# * RDoc::NormalClass +# * RDoc::NormalModule +# * RDoc::SingleClass +# * RDoc::MethodAttr +# * RDoc::Attr +# * RDoc::AnyMethod +# * RDoc::GhostMethod +# * RDoc::MetaMethod +# * RDoc::Alias +# * RDoc::Constant +# * RDoc::Mixin +# * RDoc::Require +# * RDoc::Include +# +# source://rdoc//lib/rdoc/code_object.rb#28 +class RDoc::CodeObject + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new CodeObject that will document itself and its children + # + # @return [CodeObject] a new instance of CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#102 + def initialize; end + + # Our comment + # + # source://rdoc//lib/rdoc/code_object.rb#35 + def comment; end + + # Replaces our comment with +comment+, unless it is empty. + # + # source://rdoc//lib/rdoc/code_object.rb#135 + def comment=(comment); end + + # Should this CodeObject be displayed in output? + # + # A code object should be displayed if: + # + # * The item didn't have a nodoc or wasn't in a container that had nodoc + # * The item wasn't ignored + # * The item has documentation and was not suppressed + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#163 + def display?; end + + # Do we document our children? + # + # source://rdoc//lib/rdoc/code_object.rb#40 + def document_children; end + + # Enables or disables documentation of this CodeObject's children unless it + # has been turned off by :enddoc: + # + # source://rdoc//lib/rdoc/code_object.rb#172 + def document_children=(document_children); end + + # Do we document ourselves? + # + # source://rdoc//lib/rdoc/code_object.rb#45 + def document_self; end + + # Enables or disables documentation of this CodeObject unless it has been + # turned off by :enddoc:. If the argument is +nil+ it means the + # + # source://rdoc//lib/rdoc/code_object.rb#183 + def document_self=(document_self); end + + # Does this object have a comment with content or is #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#194 + def documented?; end + + # Are we done documenting (ie, did we come across a :enddoc:)? + # + # source://rdoc//lib/rdoc/code_object.rb#50 + def done_documenting; end + + # Turns documentation on/off, and turns on/off #document_self + # and #document_children. + # + # Once documentation has been turned off (by +:enddoc:+), + # the object will refuse to turn #document_self or + # will have no effect in the current file. + # + # source://rdoc//lib/rdoc/code_object.rb#207 + def done_documenting=(value); end + + # Yields each parent of this CodeObject. See also + # RDoc::ClassModule#each_ancestor + # + # source://rdoc//lib/rdoc/code_object.rb#218 + def each_parent; end + + # Which file this code object was defined in + # + # source://rdoc//lib/rdoc/code_object.rb#55 + def file; end + + # File name where this CodeObject was found. + # + # See also RDoc::Context#in_files + # + # source://rdoc//lib/rdoc/code_object.rb#233 + def file_name; end + + # Force documentation of this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#60 + def force_documentation; end + + # Force the documentation of this object unless documentation + # has been turned off by :enddoc: + # -- + # HACK untested, was assigning to an ivar + # + # source://rdoc//lib/rdoc/code_object.rb#245 + def force_documentation=(value); end + + # Sets the full_name overriding any computed full name. + # + # Set to +nil+ to clear RDoc's cached value + # + # source://rdoc//lib/rdoc/code_object.rb#254 + def full_name=(full_name); end + + # Use this to ignore a CodeObject and all its children until found again + # (#record_location is called). An ignored item will not be displayed in + # documentation. + # + # See github issue #55 + # + # The ignored status is temporary in order to allow implementation details + # to be hidden. At the end of processing a file RDoc allows all classes + # and modules to add new documentation to previously created classes. + # + # If a class was ignored (via stopdoc) then reopened later with additional + # documentation it should be displayed. If a class was ignored and never + # reopened it should not be displayed. The ignore flag allows this to + # occur. + # + # source://rdoc//lib/rdoc/code_object.rb#274 + def ignore; end + + # Has this class been ignored? + # + # See also #ignore + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#287 + def ignored?; end + + # Initializes state for visibility of this CodeObject and its children. + # + # source://rdoc//lib/rdoc/code_object.rb#121 + def initialize_visibility; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//lib/rdoc/code_object.rb#65 + def line; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//lib/rdoc/code_object.rb#65 + def line=(_arg0); end + + # Hash of arbitrary metadata for this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#70 + def metadata; end + + # The options instance from the store this CodeObject is attached to, or a + # default options instance if the CodeObject is not attached. + # + # This is used by Text#snippet + # + # source://rdoc//lib/rdoc/code_object.rb#297 + def options; end + + # Our parent CodeObject. The parent may be missing for classes loaded from + # legacy RI data stores. + # + # source://rdoc//lib/rdoc/code_object.rb#309 + def parent; end + + # Sets the parent CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#75 + def parent=(_arg0); end + + # File name of our parent + # + # source://rdoc//lib/rdoc/code_object.rb#331 + def parent_file_name; end + + # Name of our parent + # + # source://rdoc//lib/rdoc/code_object.rb#338 + def parent_name; end + + # source://rdoc//lib/rdoc/code_object.rb#80 + def received_nodoc; end + + # Records the RDoc::TopLevel (file) where this code object was defined + # + # source://rdoc//lib/rdoc/code_object.rb#345 + def record_location(top_level); end + + # The section this CodeObject is in. Sections allow grouping of constants, + # attributes and methods inside a class or module. + # + # source://rdoc//lib/rdoc/code_object.rb#355 + def section; end + + # Set the section this CodeObject is in + # + # source://rdoc//lib/rdoc/code_object.rb#85 + def section=(_arg0); end + + # Enable capture of documentation unless documentation has been + # turned off by :enddoc: + # + # source://rdoc//lib/rdoc/code_object.rb#365 + def start_doc; end + + # Disable capture of documentation + # + # source://rdoc//lib/rdoc/code_object.rb#377 + def stop_doc; end + + # The RDoc::Store for this object. + # + # source://rdoc//lib/rdoc/code_object.rb#90 + def store; end + + # Sets the +store+ that contains this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#387 + def store=(store); end + + # Use this to suppress a CodeObject and all its children until the next file + # it is seen in or documentation is discovered. A suppressed item with + # documentation will be displayed while an ignored item with documentation + # may not be displayed. + # + # source://rdoc//lib/rdoc/code_object.rb#404 + def suppress; end + + # Has this class been suppressed? + # + # See also #suppress + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#417 + def suppressed?; end + + # We are the model of the code, but we know that at some point we will be + # worked on by viewers. By implementing the Viewable protocol, viewers can + # associated themselves with these objects. + # + # source://rdoc//lib/rdoc/code_object.rb#97 + def viewer; end + + # We are the model of the code, but we know that at some point we will be + # worked on by viewers. By implementing the Viewable protocol, viewers can + # associated themselves with these objects. + # + # source://rdoc//lib/rdoc/code_object.rb#97 + def viewer=(_arg0); end +end + +# A comment holds the text comment for a RDoc::CodeObject and provides a +# unified way of cleaning it up and parsing it into an RDoc::Markup::Document. +# +# Each comment may have a different markup format set by #format=. By default +# 'rdoc' is used. The :markup: directive tells RDoc which format to use. +# +# See RDoc::Markup@Other+directives for instructions on adding an alternate +# format. +# +# source://rdoc//lib/rdoc/comment.rb#12 +class RDoc::Comment + include ::RDoc::Text + + # Creates a new comment with +text+ that is found in the RDoc::TopLevel + # +location+. + # + # @return [Comment] a new instance of Comment + # + # source://rdoc//lib/rdoc/comment.rb#56 + def initialize(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/comment.rb#74 + def ==(other); end + + # Overrides the content returned by #parse. Use when there is no #text + # source for this comment + # + # source://rdoc//lib/rdoc/comment.rb#50 + def document=(_arg0); end + + # A comment is empty if its text String is empty. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#144 + def empty?; end + + # HACK dubious + # + # source://rdoc//lib/rdoc/comment.rb#151 + def encode!(encoding); end + + # Look for a 'call-seq' in the comment to override the normal parameter + # handling. The :call-seq: is indented from the baseline. All lines of the + # same indentation level and prefix are consumed. + # + # For example, all of the following will be used as the :call-seq: + # + # # :call-seq: + # # ARGF.readlines(sep=$/) -> array + # # ARGF.readlines(limit) -> array + # # ARGF.readlines(sep, limit) -> array + # # + # # ARGF.to_a(sep=$/) -> array + # # ARGF.to_a(limit) -> array + # # ARGF.to_a(sep, limit) -> array + # + # source://rdoc//lib/rdoc/comment.rb#95 + def extract_call_seq(method); end + + # The RDoc::TopLevel this comment was found in + # + # For duck-typing when merging classes at load time + # + # source://rdoc//lib/rdoc/comment.rb#24 + def file; end + + # The format of this comment. Defaults to RDoc::Markup + # + # source://rdoc//lib/rdoc/comment.rb#19 + def format; end + + # Sets the format of this comment and resets any parsed document + # + # source://rdoc//lib/rdoc/comment.rb#164 + def format=(format); end + + # source://rdoc//lib/rdoc/comment.rb#169 + def inspect; end + + # Line where this Comment was written + # + # source://rdoc//lib/rdoc/comment.rb#29 + def line; end + + # Line where this Comment was written + # + # source://rdoc//lib/rdoc/comment.rb#29 + def line=(_arg0); end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//lib/rdoc/comment.rb#24 + def location; end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//lib/rdoc/comment.rb#24 + def location=(_arg0); end + + # Normalizes the text. See RDoc::Text#normalize_comment for details + # + # source://rdoc//lib/rdoc/comment.rb#178 + def normalize; end + + # Was this text normalized? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#192 + def normalized?; end + + # Parses the comment into an RDoc::Markup::Document. The parsed document is + # cached until the text is changed. + # + # source://rdoc//lib/rdoc/comment.rb#200 + def parse; end + + # Removes private sections from this comment. Private sections are flush to + # the comment marker and start with -- and end with ++. + # For C-style comments, a private marker may not start at the opening of the + # comment. + # + # /* + # *-- + # * private + # *++ + # * public + # */ + # + # source://rdoc//lib/rdoc/comment.rb#221 + def remove_private; end + + # The text for this comment + # + # source://rdoc//lib/rdoc/comment.rb#39 + def text; end + + # Replaces this comment's text with +text+ and resets the parsed document. + # + # An error is raised if the comment contains a document but no text. + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/comment.rb#235 + def text=(text); end + + # The text for this comment + # + # Alias for text + # + # source://rdoc//lib/rdoc/comment.rb#39 + def to_s; end + + # Returns true if this comment is in TomDoc format. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#246 + def tomdoc?; end + + private + + # -- + # TODO deep copy @document + # + # source://rdoc//lib/rdoc/comment.rb#70 + def initialize_copy(copy); end +end + +# A constant +# +# source://rdoc//lib/rdoc/constant.rb#5 +class RDoc::Constant < ::RDoc::CodeObject + # Creates a new constant with +name+, +value+ and +comment+ + # + # @return [Constant] a new instance of Constant + # + # source://rdoc//lib/rdoc/constant.rb#32 + def initialize(name, value, comment); end + + # Constants are ordered by name + # + # source://rdoc//lib/rdoc/constant.rb#47 + def <=>(other); end + + # Constants are equal when their #parent and #name is the same + # + # source://rdoc//lib/rdoc/constant.rb#56 + def ==(other); end + + # A constant is documented if it has a comment, or is an alias + # for a documented class or module. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/constant.rb#66 + def documented?; end + + # Full constant name including namespace + # + # source://rdoc//lib/rdoc/constant.rb#81 + def full_name; end + + # source://rdoc//lib/rdoc/constant.rb#99 + def inspect; end + + # The module or class this constant is an alias for + # + # source://rdoc//lib/rdoc/constant.rb#88 + def is_alias_for; end + + # Sets the module or class this is constant is an alias for. + # + # source://rdoc//lib/rdoc/constant.rb#12 + def is_alias_for=(_arg0); end + + # Dumps this Constant for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/constant.rb#109 + def marshal_dump; end + + # Loads this Constant from +array+. For a loaded Constant the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/constant.rb#135 + def marshal_load(array); end + + # The constant's name + # + # source://rdoc//lib/rdoc/constant.rb#17 + def name; end + + # The constant's name + # + # source://rdoc//lib/rdoc/constant.rb#17 + def name=(_arg0); end + + # Path to this constant for use with HTML generator output. + # + # source://rdoc//lib/rdoc/constant.rb#153 + def path; end + + # source://rdoc//lib/rdoc/constant.rb#157 + def pretty_print(q); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/constant.rb#171 + def store=(store); end + + # source://rdoc//lib/rdoc/constant.rb#177 + def to_s; end + + # The constant's value + # + # source://rdoc//lib/rdoc/constant.rb#22 + def value; end + + # The constant's value + # + # source://rdoc//lib/rdoc/constant.rb#22 + def value=(_arg0); end + + # The constant's visibility + # + # source://rdoc//lib/rdoc/constant.rb#27 + def visibility; end + + # The constant's visibility + # + # source://rdoc//lib/rdoc/constant.rb#27 + def visibility=(_arg0); end +end + +# A Context is something that can hold modules, classes, methods, attributes, +# aliases, requires, and includes. Classes, modules, and files are all +# Contexts. +# +# source://rdoc//lib/rdoc/context.rb#7 +class RDoc::Context < ::RDoc::CodeObject + include ::Comparable + + # Creates an unnamed empty context with public current visibility + # + # @return [Context] a new instance of Context + # + # source://rdoc//lib/rdoc/context.rb#123 + def initialize; end + + # Contexts are sorted by full_name + # + # source://rdoc//lib/rdoc/context.rb#171 + def <=>(other); end + + # Adds an item of type +klass+ with the given +name+ and +comment+ to the + # context. + # + # Currently only RDoc::Extend and RDoc::Include are supported. + # + # source://rdoc//lib/rdoc/context.rb#183 + def add(klass, name, comment); end + + # Adds +an_alias+ that is automatically resolved + # + # source://rdoc//lib/rdoc/context.rb#198 + def add_alias(an_alias); end + + # Adds +attribute+ if not already there. If it is (as method(s) or attribute), + # updates the comment if it was empty. + # + # The attribute is registered only if it defines a new method. + # For instance, attr_reader :foo will not be registered + # if method +foo+ exists, but attr_accessor :foo will be registered + # if method +foo+ exists, but foo= does not. + # + # source://rdoc//lib/rdoc/context.rb#225 + def add_attribute(attribute); end + + # Adds a class named +given_name+ with +superclass+. + # + # Both +given_name+ and +superclass+ may contain '::', and are + # interpreted relative to the +self+ context. This allows handling correctly + # examples like these: + # class RDoc::Gauntlet < Gauntlet + # module Mod + # class Object # implies < ::Object + # class SubObject < Object # this is _not_ ::Object + # + # Given class Container::Item RDoc assumes +Container+ is a module + # unless it later sees class Container. +add_class+ automatically + # upgrades +given_name+ to a class in this case. + # + # source://rdoc//lib/rdoc/context.rb#288 + def add_class(class_type, given_name, superclass = T.unsafe(nil)); end + + # Adds the class or module +mod+ to the modules or + # classes Hash +self_hash+, and to +all_hash+ (either + # TopLevel::modules_hash or TopLevel::classes_hash), + # unless #done_documenting is +true+. Sets the #parent of +mod+ + # to +self+, and its #section to #current_section. Returns +mod+. + # + # source://rdoc//lib/rdoc/context.rb#404 + def add_class_or_module(mod, self_hash, all_hash); end + + # Adds +constant+ if not already there. If it is, updates the comment, + # value and/or is_alias_for of the known constant if they were empty/nil. + # + # source://rdoc//lib/rdoc/context.rb#429 + def add_constant(constant); end + + # Adds extension module +ext+ which should be an RDoc::Extend + # + # source://rdoc//lib/rdoc/context.rb#463 + def add_extend(ext); end + + # Adds included module +include+ which should be an RDoc::Include + # + # source://rdoc//lib/rdoc/context.rb#454 + def add_include(include); end + + # Adds +method+ if not already there. If it is (as method or attribute), + # updates the comment if it was empty. + # + # source://rdoc//lib/rdoc/context.rb#473 + def add_method(method); end + + # Adds a module named +name+. If RDoc already knows +name+ is a class then + # that class is returned instead. See also #add_class. + # + # source://rdoc//lib/rdoc/context.rb#506 + def add_module(class_type, name); end + + # Adds an alias from +from+ (a class or module) to +name+ which was defined + # in +file+. + # + # source://rdoc//lib/rdoc/context.rb#527 + def add_module_alias(from, from_name, to, file); end + + # Adds a module by +RDoc::NormalModule+ instance. See also #add_module. + # + # source://rdoc//lib/rdoc/context.rb#519 + def add_module_by_normal_module(mod); end + + # Adds +require+ to this context's top level + # + # source://rdoc//lib/rdoc/context.rb#568 + def add_require(require); end + + # Returns a section with +title+, creating it if it doesn't already exist. + # +comment+ will be appended to the section's comment. + # + # A section with a +title+ of +nil+ will return the default section. + # + # See also RDoc::Context::Section + # + # source://rdoc//lib/rdoc/context.rb#586 + def add_section(title, comment = T.unsafe(nil)); end + + # Adds +thing+ to the collection +array+ + # + # source://rdoc//lib/rdoc/context.rb#600 + def add_to(array, thing); end + + # Class/module aliases + # + # source://rdoc//lib/rdoc/context.rb#25 + def aliases; end + + # Is there any content? + # + # This means any of: comment, aliases, methods, attributes, external + # aliases, require, constant. + # + # Includes and extends are also checked unless includes == false. + # + # source://rdoc//lib/rdoc/context.rb#616 + def any_content(includes = T.unsafe(nil)); end + + # All attr* methods + # + # source://rdoc//lib/rdoc/context.rb#30 + def attributes; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#35 + def block_params; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#35 + def block_params=(_arg0); end + + # Creates the full name for a child with +name+ + # + # source://rdoc//lib/rdoc/context.rb#632 + def child_name(name); end + + # Class attributes + # + # source://rdoc//lib/rdoc/context.rb#645 + def class_attributes; end + + # Class methods + # + # source://rdoc//lib/rdoc/context.rb#652 + def class_method_list; end + + # Array of classes in this context + # + # source://rdoc//lib/rdoc/context.rb#659 + def classes; end + + # All classes and modules in this namespace + # + # source://rdoc//lib/rdoc/context.rb#666 + def classes_and_modules; end + + # Hash of classes keyed by class name + # + # source://rdoc//lib/rdoc/context.rb#673 + def classes_hash; end + + # Constants defined + # + # source://rdoc//lib/rdoc/context.rb#40 + def constants; end + + # Hash of registered constants. + # + # source://rdoc//lib/rdoc/context.rb#118 + def constants_hash; end + + # Current visibility of this line + # + # source://rdoc//lib/rdoc/context.rb#102 + def current_line_visibility=(_arg0); end + + # The current documentation section that new items will be added to. If + # temporary_section is available it will be used. + # + # source://rdoc//lib/rdoc/context.rb#681 + def current_section; end + + # Sets the current documentation section of documentation + # + # source://rdoc//lib/rdoc/context.rb#45 + def current_section=(_arg0); end + + # Is part of this thing was defined in +file+? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#694 + def defined_in?(file); end + + # source://rdoc//lib/rdoc/context.rb#698 + def display(method_attr); end + + # Iterator for ancestors for duck-typing. Does nothing. See + # RDoc::ClassModule#each_ancestor. + # + # This method exists to make it easy to work with Context subclasses that + # aren't part of RDoc. + # + # source://rdoc//lib/rdoc/context.rb#713 + def each_ancestor; end + + # Iterator for attributes + # + # source://rdoc//lib/rdoc/context.rb#719 + def each_attribute; end + + # Iterator for classes and modules + # + # source://rdoc//lib/rdoc/context.rb#726 + def each_classmodule(&block); end + + # Iterator for constants + # + # source://rdoc//lib/rdoc/context.rb#733 + def each_constant; end + + # Iterator for extension modules + # + # source://rdoc//lib/rdoc/context.rb#747 + def each_extend; end + + # Iterator for included modules + # + # source://rdoc//lib/rdoc/context.rb#740 + def each_include; end + + # Iterator for methods + # + # source://rdoc//lib/rdoc/context.rb#754 + def each_method; end + + # Iterator for each section's contents sorted by title. The +section+, the + # section's +constants+ and the sections +attributes+ are yielded. The + # +constants+ and +attributes+ collections are sorted. + # + # To retrieve methods in a section use #methods_by_type with the optional + # +section+ parameter. + # + # NOTE: Do not edit collections yielded by this method + # + # source://rdoc//lib/rdoc/context.rb#770 + def each_section; end + + # Modules this context is extended with + # + # source://rdoc//lib/rdoc/context.rb#60 + def extends; end + + # Aliases that could not be resolved. + # + # source://rdoc//lib/rdoc/context.rb#92 + def external_aliases; end + + # Finds an attribute +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#787 + def find_attribute(name, singleton); end + + # Finds an attribute with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#795 + def find_attribute_named(name); end + + # Finds a class method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#809 + def find_class_method_named(name); end + + # Finds a constant with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#816 + def find_constant_named(name); end + + # Find a module at a higher scope + # + # source://rdoc//lib/rdoc/context.rb#825 + def find_enclosing_module_named(name); end + + # Finds an external alias +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#832 + def find_external_alias(name, singleton); end + + # Finds an external alias with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#839 + def find_external_alias_named(name); end + + # Finds a file with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#853 + def find_file_named(name); end + + # Finds an instance method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#860 + def find_instance_method_named(name); end + + # Finds a method, constant, attribute, external alias, module or file + # named +symbol+ in this context. + # + # source://rdoc//lib/rdoc/context.rb#868 + def find_local_symbol(symbol); end + + # Finds a method named +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#880 + def find_method(name, singleton); end + + # Finds a instance or module method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#893 + def find_method_named(name); end + + # Find a module with +name+ using ruby's scoping rules + # + # source://rdoc//lib/rdoc/context.rb#907 + def find_module_named(name); end + + # Look up +symbol+, first as a module, then as a local symbol. + # + # source://rdoc//lib/rdoc/context.rb#917 + def find_symbol(symbol); end + + # Look up a module named +symbol+. + # + # source://rdoc//lib/rdoc/context.rb#924 + def find_symbol_module(symbol); end + + # The full name for this context. This method is overridden by subclasses. + # + # source://rdoc//lib/rdoc/context.rb#957 + def full_name; end + + # Does this context and its methods and constants all have documentation? + # + # (Yes, fully documented doesn't mean everything.) + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#966 + def fully_documented?; end + + # URL for this with a +prefix+ + # + # source://rdoc//lib/rdoc/context.rb#976 + def http_url(prefix); end + + # Files this context is found in + # + # source://rdoc//lib/rdoc/context.rb#50 + def in_files; end + + # Modules this context includes + # + # source://rdoc//lib/rdoc/context.rb#55 + def includes; end + + # Sets the defaults for methods and so-forth + # + # source://rdoc//lib/rdoc/context.rb#145 + def initialize_methods_etc; end + + # Instance attributes + # + # source://rdoc//lib/rdoc/context.rb#987 + def instance_attributes; end + + # Instance methods + # -- + # TODO remove this later + # + # source://rdoc//lib/rdoc/context.rb#1003 + def instance_method_list; end + + # Instance methods + # + # source://rdoc//lib/rdoc/context.rb#994 + def instance_methods; end + + # Methods defined in this context + # + # source://rdoc//lib/rdoc/context.rb#65 + def method_list; end + + # Breaks method_list into a nested hash by type ('class' or + # 'instance') and visibility (+:public+, +:protected+, +:private+). + # + # If +section+ is provided only methods in that RDoc::Context::Section will + # be returned. + # + # source://rdoc//lib/rdoc/context.rb#1015 + def methods_by_type(section = T.unsafe(nil)); end + + # Hash of registered methods. Attributes are also registered here, + # twice if they are RW. + # + # source://rdoc//lib/rdoc/context.rb#108 + def methods_hash; end + + # Yields AnyMethod and Attr entries matching the list of names in +methods+. + # + # source://rdoc//lib/rdoc/context.rb#1038 + def methods_matching(methods, singleton = T.unsafe(nil), &block); end + + # Array of modules in this context + # + # source://rdoc//lib/rdoc/context.rb#1051 + def modules; end + + # Hash of modules keyed by module name + # + # source://rdoc//lib/rdoc/context.rb#1058 + def modules_hash; end + + # Name of this class excluding namespace. See also full_name + # + # source://rdoc//lib/rdoc/context.rb#70 + def name; end + + # Name to use to generate the url. + # #full_name by default. + # + # source://rdoc//lib/rdoc/context.rb#1066 + def name_for_path; end + + # Changes the visibility for new methods to +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1073 + def ongoing_visibility=(visibility); end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#113 + def params; end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#113 + def params=(_arg0); end + + # Record +top_level+ as a file +self+ is in. + # + # source://rdoc//lib/rdoc/context.rb#1080 + def record_location(top_level); end + + # Should we remove this context from the documentation? + # + # The answer is yes if: + # * #received_nodoc is +true+ + # * #any_content is +false+ (not counting includes) + # * All #includes are modules (not a string), and their module has + # #remove_from_documentation? == true + # * All classes and modules have #remove_from_documentation? == true + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#1094 + def remove_from_documentation?; end + + # Removes methods and attributes with a visibility less than +min_visibility+. + # -- + # TODO mark the visibility of attributes in the template (if not public?) + # + # source://rdoc//lib/rdoc/context.rb#1107 + def remove_invisible(min_visibility); end + + # Only called when min_visibility == :public or :private + # + # source://rdoc//lib/rdoc/context.rb#1117 + def remove_invisible_in(array, min_visibility); end + + # Files this context requires + # + # source://rdoc//lib/rdoc/context.rb#75 + def requires; end + + # Tries to resolve unmatched aliases when a method or attribute has just + # been added. + # + # source://rdoc//lib/rdoc/context.rb#1133 + def resolve_aliases(added); end + + # Returns RDoc::Context::Section objects referenced in this context for use + # in a table of contents. + # + # source://rdoc//lib/rdoc/context.rb#1149 + def section_contents; end + + # Sections in this context + # + # source://rdoc//lib/rdoc/context.rb#1173 + def sections; end + + # source://rdoc//lib/rdoc/context.rb#1177 + def sections_hash; end + + # Given an array +names+ of constants, set the visibility of each constant to + # +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1202 + def set_constant_visibility_for(names, visibility); end + + # Sets the current section to a section with +title+. See also #add_section + # + # source://rdoc//lib/rdoc/context.rb#1184 + def set_current_section(title, comment); end + + # Given an array +methods+ of method names, set the visibility of each to + # +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1192 + def set_visibility_for(methods, visibility, singleton = T.unsafe(nil)); end + + # Sorts sections alphabetically (default) or in TomDoc fashion (none, + # Public, Internal, Deprecated) + # + # source://rdoc//lib/rdoc/context.rb#1213 + def sort_sections; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//lib/rdoc/context.rb#80 + def temporary_section; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//lib/rdoc/context.rb#80 + def temporary_section=(_arg0); end + + # source://rdoc//lib/rdoc/context.rb#1229 + def to_s; end + + # Return the TopLevel that owns us + # -- + # FIXME we can be 'owned' by several TopLevel (see #record_location & + # #in_files) + # + # source://rdoc//lib/rdoc/context.rb#1239 + def top_level; end + + # Hash old_name => [aliases], for aliases + # that haven't (yet) been resolved to a method/attribute. + # (Not to be confused with the aliases of the context.) + # + # source://rdoc//lib/rdoc/context.rb#87 + def unmatched_alias_lists; end + + # Hash old_name => [aliases], for aliases + # that haven't (yet) been resolved to a method/attribute. + # (Not to be confused with the aliases of the context.) + # + # source://rdoc//lib/rdoc/context.rb#87 + def unmatched_alias_lists=(_arg0); end + + # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+ + # + # source://rdoc//lib/rdoc/context.rb#1249 + def upgrade_to_class(mod, class_type, enclosing); end + + # Current visibility of this context + # + # source://rdoc//lib/rdoc/context.rb#97 + def visibility; end + + # Current visibility of this context + # + # source://rdoc//lib/rdoc/context.rb#97 + def visibility=(_arg0); end +end + +# A section of documentation like: +# +# # :section: The title +# # The body +# +# Sections can be referenced multiple times and will be collapsed into a +# single section. +# +# source://rdoc//lib/rdoc/context/section.rb#13 +class RDoc::Context::Section + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new section with +title+ and +comment+ + # + # @return [Section] a new instance of Section + # + # source://rdoc//lib/rdoc/context/section.rb#42 + def initialize(parent, title, comment); end + + # Sections are equal when they have the same #title + # + # source://rdoc//lib/rdoc/context/section.rb#54 + def ==(other); end + + # Adds +comment+ to this section + # + # source://rdoc//lib/rdoc/context/section.rb#63 + def add_comment(comment); end + + # Anchor reference for linking to this section + # + # source://rdoc//lib/rdoc/context/section.rb#83 + def aref; end + + # Section comment + # + # source://rdoc//lib/rdoc/context/section.rb#22 + def comment; end + + # Section comments + # + # source://rdoc//lib/rdoc/context/section.rb#27 + def comments; end + + # Sections are equal when they have the same #title + # + # source://rdoc//lib/rdoc/context/section.rb#54 + def eql?(other); end + + # Extracts the comment for this section from the original comment block. + # If the first line contains :section:, strip it and use the rest. + # Otherwise remove lines up to the line containing :section:, and look + # for those lines again at the end and remove them. This lets us write + # + # # :section: The title + # # The body + # + # source://rdoc//lib/rdoc/context/section.rb#98 + def extract_comment(comment); end + + # source://rdoc//lib/rdoc/context/section.rb#130 + def hash; end + + # The files comments in this section come from + # + # source://rdoc//lib/rdoc/context/section.rb#137 + def in_files; end + + # source://rdoc//lib/rdoc/context/section.rb#126 + def inspect; end + + # Serializes this Section. The title and parsed comment are saved, but not + # the section parent which must be restored manually. + # + # source://rdoc//lib/rdoc/context/section.rb#158 + def marshal_dump; end + + # De-serializes this Section. The section parent must be restored manually. + # + # source://rdoc//lib/rdoc/context/section.rb#169 + def marshal_load(array); end + + # Context this Section lives in + # + # source://rdoc//lib/rdoc/context/section.rb#32 + def parent; end + + # Parses +comment_location+ into an RDoc::Markup::Document composed of + # multiple RDoc::Markup::Documents with their file set. + # + # source://rdoc//lib/rdoc/context/section.rb#180 + def parse; end + + # The section's title, or 'Top Section' if the title is nil. + # + # This is used by the table of contents template so the name is silly. + # + # source://rdoc//lib/rdoc/context/section.rb#208 + def plain_html; end + + # Removes a comment from this section if it is from the same file as + # +comment+ + # + # source://rdoc//lib/rdoc/context/section.rb#216 + def remove_comment(comment); end + + # Section title + # + # source://rdoc//lib/rdoc/context/section.rb#37 + def title; end +end + +# RDoc::CrossReference is a reusable way to create cross references for names. +# +# source://rdoc//lib/rdoc/cross_reference.rb#8 +class RDoc::CrossReference + # Allows cross-references to be created based on the given +context+ + # (RDoc::Context). + # + # @return [CrossReference] a new instance of CrossReference + # + # source://rdoc//lib/rdoc/cross_reference.rb#127 + def initialize(context); end + + # Returns a reference to +name+. + # + # If the reference is found and +name+ is not documented +text+ will be + # returned. If +name+ is escaped +name+ is returned. If +name+ is not + # found +text+ is returned. + # + # source://rdoc//lib/rdoc/cross_reference.rb#187 + def resolve(name, text); end + + # source://rdoc//lib/rdoc/cross_reference.rb#134 + def resolve_method(name); end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//lib/rdoc/cross_reference.rb#121 + def seen; end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//lib/rdoc/cross_reference.rb#121 + def seen=(_arg0); end +end + +# Regular expression to match method arguments. +# +# source://rdoc//lib/rdoc/cross_reference.rb#28 +RDoc::CrossReference::METHOD_ARGS_REGEXP_STR = T.let(T.unsafe(nil), String) + +# Regular expression to match a single method argument. +# +# source://rdoc//lib/rdoc/cross_reference.rb#23 +RDoc::CrossReference::METHOD_ARG_REGEXP_STR = T.let(T.unsafe(nil), String) + +# A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson +# and Masatoshi SEKI. +# +# To use: +# +# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil +# +# File.open 'hello.txt', 'w' do |io| +# erbio.result binding +# end +# +# Note that binding must enclose the io you wish to output on. +# +# source://rdoc//lib/rdoc/erbio.rb#18 +class RDoc::ERBIO < ::ERB + # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize + # + # @return [ERBIO] a new instance of ERBIO + # + # source://rdoc//lib/rdoc/erbio.rb#23 + def initialize(str, safe_level = T.unsafe(nil), legacy_trim_mode = T.unsafe(nil), legacy_eoutvar = T.unsafe(nil), trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end + + # Instructs +compiler+ how to write to +io_variable+ + # + # source://rdoc//lib/rdoc/erbio.rb#34 + def set_eoutvar(compiler, io_variable); end +end + +# Allows an ERB template to be rendered in the context (binding) of an +# existing ERB template evaluation. +# +# source://rdoc//lib/rdoc/erb_partial.rb#6 +class RDoc::ERBPartial < ::ERB + # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only + # if it isn't already set. + # + # source://rdoc//lib/rdoc/erb_partial.rb#12 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# This class is a wrapper around File IO and Encoding that helps RDoc load +# files and convert them to the correct encoding. +# +# source://rdoc//lib/rdoc/encoding.rb#8 +module RDoc::Encoding + class << self + # Changes encoding based on +encoding+ without converting and returns new + # string + # + # source://rdoc//lib/rdoc/encoding.rb#123 + def change_encoding(text, encoding); end + + # Detects the encoding of +string+ based on the magic comment + # + # source://rdoc//lib/rdoc/encoding.rb#103 + def detect_encoding(string); end + + # Reads the contents of +filename+ and handles any encoding directives in + # the file. + # + # The content will be converted to the +encoding+. If the file cannot be + # converted a warning will be printed and nil will be returned. + # + # If +force_transcode+ is true the document will be transcoded and any + # unknown character in the target encoding will be replaced with '?' + # + # source://rdoc//lib/rdoc/encoding.rb#32 + def read_file(filename, encoding, force_transcode = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/encoding.rb#89 + def remove_frozen_string_literal(string); end + + # Removes magic comments and shebang + # + # source://rdoc//lib/rdoc/encoding.rb#113 + def remove_magic_comment(string); end + end +end + +# source://rdoc//lib/rdoc/encoding.rb#10 +RDoc::Encoding::HEADER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//lib/rdoc/generator/darkfish.rb#55 +class RDoc::Generator::Darkfish + include ::ERB::Util + + # Initialize a few instance variables before we start + # + # @return [Darkfish] a new instance of Darkfish + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#159 + def initialize(store, options); end + + # Creates a template from its components and the +body_file+. + # + # For backwards compatibility, if +body_file+ contains "--op from the + # options for a full path. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#102 + def base_dir; end + + # Directory where generated class HTML files live relative to the output + # dir. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#191 + def class_dir; end + + # Classes and modules to be used by this generator, not necessarily + # displayed. See also #modsort + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#108 + def classes; end + + # Copies static files from the static_path into the output directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#265 + def copy_static; end + + # Output progress information if debugging is enabled + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#182 + def debug_msg(*msg); end + + # No files will be written when dry_run is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 + def dry_run; end + + # No files will be written when dry_run is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 + def dry_run=(_arg0); end + + # Directory where generated class HTML files live relative to the output + # dir. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#199 + def file_dir; end + + # When false the generate methods return a String instead of writing to a + # file. The default is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 + def file_output; end + + # When false the generate methods return a String instead of writing to a + # file. The default is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 + def file_output=(_arg0); end + + # Files to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#124 + def files; end + + # Create the directories the generated docs will live in if they don't + # already exist. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#207 + def gen_sub_directories; end + + # Build the initial indices and output objects based on an array of TopLevel + # objects containing the extracted information. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#241 + def generate; end + + # Generates a class file for +klass+ + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#337 + def generate_class(klass, template_file = T.unsafe(nil)); end + + # Generate a documentation file for each class and module + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#368 + def generate_class_files; end + + # Generate a documentation file for each file + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#395 + def generate_file_files; end + + # Generate an index page which lists all the classes which are documented. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#303 + def generate_index; end + + # Generate a page file for +file+ + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#464 + def generate_page(file); end + + # Generates the 404 page for the RDoc servlet + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#493 + def generate_servlet_not_found(message); end + + # Generates the servlet root page for the RDoc servlet + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#526 + def generate_servlet_root(installed); end + + # Generate an index page which lists all the classes which are documented. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#553 + def generate_table_of_contents; end + + # Return a list of the documented modules sorted by salience first, then + # by name. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#294 + def get_sorted_module_list(classes); end + + # Try to extract Subversion information out of the first constant whose + # value looks like a subversion Id tag. If no matching constant is found, + # and empty hash is returned. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#652 + def get_svninfo(klass); end + + # source://rdoc//lib/rdoc/generator/darkfish.rb#584 + def install_rdoc_static_file(source, destination, options); end + + # The JSON index generator for this Darkfish generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#129 + def json_index; end + + # Methods to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#134 + def methods; end + + # Sorted list of classes and modules to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#139 + def modsort; end + + # The output directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#154 + def outputdir; end + + # Renders the ERb contained in +file_name+ relative to the template + # directory and returns the result based on the current context. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#699 + def render(file_name); end + + # Load and render the erb template in the given +template_file+ and write + # it out to +out_file+. + # + # Both +template_file+ and +out_file+ should be Pathname-like objects. + # + # An io will be yielded which must be captured by binding in the caller. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#717 + def render_template(template_file, out_file = T.unsafe(nil)); end + + # Prepares for generation of output from the current directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#604 + def setup; end + + # The RDoc::Store that is the source of the generated content + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#144 + def store; end + + # The directory where the template files live + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#149 + def template_dir; end + + # Retrieves a cache template for +file+, if present, or fills the cache. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#764 + def template_for(file, page = T.unsafe(nil), klass = T.unsafe(nil)); end + + # Creates the result for +template+ with +context+. If an error is raised a + # Pathname +template_file+ will indicate the file where the error occurred. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#751 + def template_result(template, context, template_file); end + + # Return a string describing the amount of time in the given number of + # seconds in terms a human can understand easily. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#621 + def time_delta_string(seconds); end + + # Copy over the stylesheet into the appropriate place in the output + # directory. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#215 + def write_style_sheet; end +end + +# source://rdoc//lib/rdoc/generator/json_index.rb#77 +class RDoc::Generator::JsonIndex + include ::RDoc::Text + + # Creates a new generator. +parent_generator+ is used to determine the + # class_dir and file_dir of links in the output index. + # + # +options+ are the same options passed to the parent generator. + # + # @return [JsonIndex] a new instance of JsonIndex + # + # source://rdoc//lib/rdoc/generator/json_index.rb#94 + def initialize(parent_generator, options); end + + # Builds the JSON index as a Hash. + # + # source://rdoc//lib/rdoc/generator/json_index.rb#110 + def build_index; end + + # The directory classes are written to + # + # source://rdoc//lib/rdoc/generator/json_index.rb#271 + def class_dir; end + + # Output progress information if debugging is enabled + # + # source://rdoc//lib/rdoc/generator/json_index.rb#123 + def debug_msg(*msg); end + + # The directory files are written to + # + # source://rdoc//lib/rdoc/generator/json_index.rb#278 + def file_dir; end + + # Writes the JSON index to disk + # + # source://rdoc//lib/rdoc/generator/json_index.rb#131 + def generate; end + + # Compress the search_index.js file using gzip + # + # source://rdoc//lib/rdoc/generator/json_index.rb#166 + def generate_gzipped; end + + # source://rdoc//lib/rdoc/generator/json_index.rb#86 + def index; end + + # Adds classes and modules to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#211 + def index_classes; end + + # Adds methods to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#230 + def index_methods; end + + # Adds pages to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#251 + def index_pages; end + + # source://rdoc//lib/rdoc/generator/json_index.rb#282 + def reset(files, classes); end + + # Removes whitespace and downcases +string+ + # + # source://rdoc//lib/rdoc/generator/json_index.rb#296 + def search_string(string); end +end + +# Generates a POT file. +# +# Here is a translator work flow with the generator. +# +# == Create .pot +# +# You create .pot file by pot formatter: +# +# % rdoc --format pot +# +# It generates doc/rdoc.pot. +# +# == Create .po +# +# You create .po file from doc/rdoc.pot. This operation is needed only +# the first time. This work flow assumes that you are a translator +# for Japanese. +# +# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit +# provided by GNU gettext or rmsginit provided by gettext gem. This +# work flow uses gettext gem because it is more portable than GNU +# gettext for Rubyists. Gettext gem is implemented by pure Ruby. +# +# % gem install gettext +# % mkdir -p locale/ja +# % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja +# +# Translate messages in .po +# +# You translate messages in .po by a PO file editor. po-mode.el exists +# for Emacs users. There are some GUI tools such as GTranslator. +# There are some Web services such as POEditor and Tansifex. You can +# edit by your favorite text editor because .po is a text file. +# Generate localized documentation +# +# You can generate localized documentation with locale/ja/rdoc.po: +# +# % rdoc --locale ja +# +# You can find documentation in Japanese in doc/. Yay! +# +# == Update translation +# +# You need to update translation when your application is added or +# modified messages. +# +# You can update .po by the following command lines: +# +# % rdoc --format pot +# % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot +# +# You edit locale/ja/rdoc.po to translate new messages. +# +# source://rdoc//lib/rdoc/generator/pot.rb#56 +class RDoc::Generator::POT + # Set up a new .pot generator + # + # @return [POT] a new instance of POT + # + # source://rdoc//lib/rdoc/generator/pot.rb#68 + def initialize(store, options); end + + # source://rdoc//lib/rdoc/generator/pot.rb#84 + def class_dir; end + + # Writes .pot to disk. + # + # source://rdoc//lib/rdoc/generator/pot.rb#76 + def generate; end + + private + + # source://rdoc//lib/rdoc/generator/pot.rb#89 + def extract_messages; end +end + +# Extracts message from RDoc::Store +# +# source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#5 +class RDoc::Generator::POT::MessageExtractor + # Creates a message extractor for +store+. + # + # @return [MessageExtractor] a new instance of MessageExtractor + # + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#10 + def initialize(store); end + + # Extracts messages from +store+, stores them into + # RDoc::Generator::POT::PO and returns it. + # + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#19 + def extract; end + + private + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#64 + def entry(msgid, options); end + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#28 + def extract_from_klass(klass); end + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#51 + def extract_text(text, comment, location = T.unsafe(nil)); end +end + +# Generates a PO format text +# +# source://rdoc//lib/rdoc/generator/pot/po.rb#5 +class RDoc::Generator::POT::PO + # Creates an object that represents PO format. + # + # @return [PO] a new instance of PO + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#10 + def initialize; end + + # Adds a PO entry to the PO. + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#18 + def add(entry); end + + # Returns PO format text for the PO. + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#29 + def to_s; end + + private + + # source://rdoc//lib/rdoc/generator/pot/po.rb#40 + def add_header; end + + # source://rdoc//lib/rdoc/generator/pot/po.rb#44 + def header_entry; end + + # source://rdoc//lib/rdoc/generator/pot/po.rb#73 + def sort_entries; end +end + +# A PO entry in PO +# +# source://rdoc//lib/rdoc/generator/pot/po_entry.rb#5 +class RDoc::Generator::POT::POEntry + # Creates a PO entry for +msgid+. Other valus can be specified by + # +options+. + # + # @return [POEntry] a new instance of POEntry + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#29 + def initialize(msgid, options = T.unsafe(nil)); end + + # The comment content extracted from source file + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#17 + def extracted_comment; end + + # The flags of the PO entry + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#23 + def flags; end + + # Merges the PO entry with +other_entry+. + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#56 + def merge(other_entry); end + + # The msgid content + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#8 + def msgid; end + + # The msgstr content + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#11 + def msgstr; end + + # The locations where the PO entry is extracted + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#20 + def references; end + + # Returns the PO entry in PO format. + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#41 + def to_s; end + + # The comment content created by translator (PO editor) + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#14 + def translator_comment; end + + private + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#120 + def escape(string); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#72 + def format_comment(mark, comment); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#88 + def format_extracted_comment; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#102 + def format_flags; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#109 + def format_message(message); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#92 + def format_references; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#84 + def format_translator_comment; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#137 + def merge_array(array1, array2); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#133 + def merge_string(string1, string2); end +end + +# Generates ri data files +# +# source://rdoc//lib/rdoc/generator/ri.rb#5 +class RDoc::Generator::RI + # Set up a new ri generator + # + # @return [RI] a new instance of RI + # + # source://rdoc//lib/rdoc/generator/ri.rb#17 + def initialize(store, options); end + + # Writes the parsed data store to disk for use by ri. + # + # source://rdoc//lib/rdoc/generator/ri.rb#26 + def generate; end +end + +# A message container for a locale. +# +# This object provides the following two features: +# +# * Loads translated messages from .po file. +# * Translates a message into the locale. +# +# source://rdoc//lib/rdoc/i18n/locale.rb#10 +class RDoc::I18n::Locale + # Creates a new locale object for +name+ locale. +name+ must + # follow IETF language tag format. + # + # @return [Locale] a new instance of Locale + # + # source://rdoc//lib/rdoc/i18n/locale.rb#48 + def initialize(name); end + + # Loads translation messages from +locale_directory+/+@name+/rdoc.po + # or +locale_directory+/+@name+.po. The former has high priority. + # + # This method requires gettext gem for parsing .po file. If you + # don't have gettext gem, this method doesn't load .po file. This + # method warns and returns +false+. + # + # Returns +true+ if succeeded, +false+ otherwise. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#63 + def load(locale_directory); end + + # The name of the locale. It uses IETF language tag format + # +[language[_territory][.codeset][@modifier]]+. + # + # See also {BCP 47 - Tags for Identifying + # Languages}[http://tools.ietf.org/rfc/bcp/bcp47.txt]. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#42 + def name; end + + # Translates the +message+ into locale. If there is no translation + # messages for +message+ in locale, +message+ itself is returned. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#98 + def translate(message); end + + class << self + # Returns the locale object for +locale_name+. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#19 + def [](locale_name); end + + # Sets the locale object for +locale_name+. + # + # Normally, this method is not used. This method is useful for + # testing. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#29 + def []=(locale_name, locale); end + end +end + +# An i18n supported text. +# +# This object provides the following two features: +# +# * Extracts translation messages from wrapped raw text. +# * Translates wrapped raw text in specified locale. +# +# Wrapped raw text is one of String, RDoc::Comment or Array of them. +# +# source://rdoc//lib/rdoc/i18n/text.rb#12 +class RDoc::I18n::Text + # Creates a new i18n supported text for +raw+ text. + # + # @return [Text] a new instance of Text + # + # source://rdoc//lib/rdoc/i18n/text.rb#17 + def initialize(raw); end + + # Extracts translation target messages and yields each message. + # + # Each yielded message is a Hash. It consists of the followings: + # + # :type :: :paragraph + # :paragraph :: String (The translation target message itself.) + # :line_no :: Integer (The line number of the :paragraph is started.) + # + # The above content may be added in the future. + # + # source://rdoc//lib/rdoc/i18n/text.rb#32 + def extract_messages; end + + # Translates raw text into +locale+. + # + # source://rdoc//lib/rdoc/i18n/text.rb#44 + def translate(locale); end + + private + + # source://rdoc//lib/rdoc/i18n/text.rb#88 + def each_line(raw, &block); end + + # @yield [part] + # + # source://rdoc//lib/rdoc/i18n/text.rb#101 + def emit_empty_line_event(line, line_no); end + + # source://rdoc//lib/rdoc/i18n/text.rb#110 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # source://rdoc//lib/rdoc/i18n/text.rb#60 + def parse(&block); end +end + +# source://rdoc//lib/rdoc/markdown.rb#182 +class RDoc::Markdown + # Creates a new markdown parser that enables the given +extensions+. + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//lib/rdoc/markdown.rb#666 + def initialize(extensions = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Alphanumeric = %literals.Alphanumeric + # + # source://rdoc//lib/rdoc/markdown.rb#14703 + def _Alphanumeric; end + + # AlphanumericAscii = %literals.AlphanumericAscii + # + # source://rdoc//lib/rdoc/markdown.rb#14710 + def _AlphanumericAscii; end + + # AtxHeading = AtxStart:s @Sp AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1160 + def _AtxHeading; end + + # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline + # + # source://rdoc//lib/rdoc/markdown.rb#1078 + def _AtxInline; end + + # AtxStart = < /\#{1,6}/ > { text.length } + # + # source://rdoc//lib/rdoc/markdown.rb#1134 + def _AtxStart; end + + # AutoLink = (AutoLinkUrl | AutoLinkEmail) + # + # source://rdoc//lib/rdoc/markdown.rb#11572 + def _AutoLink; end + + # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" } + # + # source://rdoc//lib/rdoc/markdown.rb#11705 + def _AutoLinkEmail; end + + # AutoLinkUrl = "<" < /[A-Za-z]+/ "://" (!@Newline !">" .)+ > ">" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#11590 + def _AutoLinkUrl; end + + # BOM = %literals.BOM + # + # source://rdoc//lib/rdoc/markdown.rb#14717 + def _BOM; end + + # BlankLine = @Sp @Newline { "\n" } + # + # source://rdoc//lib/rdoc/markdown.rb#14146 + def _BlankLine; end + + # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain) + # + # source://rdoc//lib/rdoc/markdown.rb#937 + def _Block; end + + # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) } + # + # source://rdoc//lib/rdoc/markdown.rb#1564 + def _BlockQuote; end + + # BlockQuoteRaw = @StartList:a (">" " "? Line:l { a << l } (!">" !@BlankLine Line:c { a << c })* (@BlankLine:n { a << n })*)+ { inner_parse a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#1587 + def _BlockQuoteRaw; end + + # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+ + # + # source://rdoc//lib/rdoc/markdown.rb#2152 + def _Bullet; end + + # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) } + # + # source://rdoc//lib/rdoc/markdown.rb#2196 + def _BulletList; end + + # CharEntity = "&" < /[A-Za-z0-9]+/ > ";" { if entity = HTML_ENTITIES[text] then entity.pack 'U*' else "&#{text};" end } + # + # source://rdoc//lib/rdoc/markdown.rb#14810 + def _CharEntity; end + + # Code = (Ticks1 @Sp < ((!"`" Nonspacechar)+ | !Ticks1 /`+/ | !(@Sp Ticks1) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks1 | Ticks2 @Sp < ((!"`" Nonspacechar)+ | !Ticks2 /`+/ | !(@Sp Ticks2) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks2 | Ticks3 @Sp < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | !(@Sp Ticks3) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks3 | Ticks4 @Sp < ((!"`" Nonspacechar)+ | !Ticks4 /`+/ | !(@Sp Ticks4) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks4 | Ticks5 @Sp < ((!"`" Nonspacechar)+ | !Ticks5 /`+/ | !(@Sp Ticks5) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks5) { "#{text}" } + # + # source://rdoc//lib/rdoc/markdown.rb#12509 + def _Code; end + + # CodeFence = &{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text verbatim.format = format.intern if format.instance_of?(String) verbatim } + # + # source://rdoc//lib/rdoc/markdown.rb#15679 + def _CodeFence; end + + # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' } + # + # source://rdoc//lib/rdoc/markdown.rb#14774 + def _DecEntity; end + + # DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten } + # + # source://rdoc//lib/rdoc/markdown.rb#16337 + def _DefinitionList; end + + # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#16480 + def _DefinitionListDefinition; end + + # DefinitionListItem = DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = [] list_items << RDoc::Markup::ListItem.new(label, defns.shift) list_items.concat defns.map { |defn| RDoc::Markup::ListItem.new nil, defn } unless list_items.empty? list_items } + # + # source://rdoc//lib/rdoc/markdown.rb#16381 + def _DefinitionListItem; end + + # DefinitionListLabel = StrChunk:label @Sp @Newline { label } + # + # source://rdoc//lib/rdoc/markdown.rb#16447 + def _DefinitionListLabel; end + + # Digit = [0-9] + # + # source://rdoc//lib/rdoc/markdown.rb#14689 + def _Digit; end + + # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) } + # + # source://rdoc//lib/rdoc/markdown.rb#897 + def _Doc; end + + # Emph = (EmphStar | EmphUl) + # + # source://rdoc//lib/rdoc/markdown.rb#10281 + def _Emph; end + + # EmphStar = "*" !@Whitespace @StartList:a (!"*" Inline:b { a << b } | StrongStar:b { a << b })+ "*" { emphasis a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10317 + def _EmphStar; end + + # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10475 + def _EmphUl; end + + # EmptyTitle = "" + # + # source://rdoc//lib/rdoc/markdown.rb#12084 + def _EmptyTitle; end + + # Endline = (@LineBreak | @TerminalEndline | @NormalEndline) + # + # source://rdoc//lib/rdoc/markdown.rb#9915 + def _Endline; end + + # Entity = (HexEntity | DecEntity | CharEntity):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#9878 + def _Entity; end + + # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+ + # + # source://rdoc//lib/rdoc/markdown.rb#2685 + def _Enumerator; end + + # Eof = !. + # + # source://rdoc//lib/rdoc/markdown.rb#14540 + def _Eof; end + + # EscapedChar = "\\" !@Newline < /[:\\`|*_{}\[\]()#+.!><-]/ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#9839 + def _EscapedChar; end + + # ExplicitLink = Label:l "(" @Sp Source:s Spnl Title @Sp ")" { "{#{l}}[#{s}]" } + # + # source://rdoc//lib/rdoc/markdown.rb#11145 + def _ExplicitLink; end + + # ExtendedSpecialChar = &{ notes? } "^" + # + # source://rdoc//lib/rdoc/markdown.rb#15182 + def _ExtendedSpecialChar; end + + # Heading = (SetextHeading | AtxHeading) + # + # source://rdoc//lib/rdoc/markdown.rb#1546 + def _Heading; end + + # HexEntity = /&#x/i < /[0-9a-fA-F]+/ > ";" { [text.to_i(16)].pack 'U' } + # + # source://rdoc//lib/rdoc/markdown.rb#14738 + def _HexEntity; end + + # HorizontalRule = @NonindentSpace ("*" @Sp "*" @Sp "*" (@Sp "*")* | "-" @Sp "-" @Sp "-" (@Sp "-")* | "_" @Sp "_" @Sp "_" (@Sp "_")*) @Sp @Newline @BlankLine+ { RDoc::Markup::Rule.new 1 } + # + # source://rdoc//lib/rdoc/markdown.rb#1930 + def _HorizontalRule; end + + # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor + # + # source://rdoc//lib/rdoc/markdown.rb#2969 + def _HtmlAnchor; end + + # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl + # + # source://rdoc//lib/rdoc/markdown.rb#14271 + def _HtmlAttribute; end + + # HtmlBlock = < (HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing | HtmlUnclosed) > @BlankLine+ { if html? then RDoc::Markup::Raw.new text end } + # + # source://rdoc//lib/rdoc/markdown.rb#8766 + def _HtmlBlock; end + + # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress + # + # source://rdoc//lib/rdoc/markdown.rb#3135 + def _HtmlBlockAddress; end + + # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote + # + # source://rdoc//lib/rdoc/markdown.rb#3301 + def _HtmlBlockBlockquote; end + + # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter + # + # source://rdoc//lib/rdoc/markdown.rb#3467 + def _HtmlBlockCenter; end + + # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3083 + def _HtmlBlockCloseAddress; end + + # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3249 + def _HtmlBlockCloseBlockquote; end + + # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3415 + def _HtmlBlockCloseCenter; end + + # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6735 + def _HtmlBlockCloseDd; end + + # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3581 + def _HtmlBlockCloseDir; end + + # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3747 + def _HtmlBlockCloseDiv; end + + # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3913 + def _HtmlBlockCloseDl; end + + # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6901 + def _HtmlBlockCloseDt; end + + # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4079 + def _HtmlBlockCloseFieldset; end + + # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4245 + def _HtmlBlockCloseForm; end + + # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7067 + def _HtmlBlockCloseFrameset; end + + # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4411 + def _HtmlBlockCloseH1; end + + # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4577 + def _HtmlBlockCloseH2; end + + # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4743 + def _HtmlBlockCloseH3; end + + # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4909 + def _HtmlBlockCloseH4; end + + # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5075 + def _HtmlBlockCloseH5; end + + # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5241 + def _HtmlBlockCloseH6; end + + # HtmlBlockCloseHead = "<" Spnl "/" ("head" | "HEAD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8550 + def _HtmlBlockCloseHead; end + + # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7233 + def _HtmlBlockCloseLi; end + + # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5407 + def _HtmlBlockCloseMenu; end + + # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5573 + def _HtmlBlockCloseNoframes; end + + # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5739 + def _HtmlBlockCloseNoscript; end + + # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5905 + def _HtmlBlockCloseOl; end + + # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6071 + def _HtmlBlockCloseP; end + + # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6237 + def _HtmlBlockClosePre; end + + # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8395 + def _HtmlBlockCloseScript; end + + # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6403 + def _HtmlBlockCloseTable; end + + # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7399 + def _HtmlBlockCloseTbody; end + + # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7565 + def _HtmlBlockCloseTd; end + + # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7731 + def _HtmlBlockCloseTfoot; end + + # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7897 + def _HtmlBlockCloseTh; end + + # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8063 + def _HtmlBlockCloseThead; end + + # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8229 + def _HtmlBlockCloseTr; end + + # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6569 + def _HtmlBlockCloseUl; end + + # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd + # + # source://rdoc//lib/rdoc/markdown.rb#6787 + def _HtmlBlockDd; end + + # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir + # + # source://rdoc//lib/rdoc/markdown.rb#3633 + def _HtmlBlockDir; end + + # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv + # + # source://rdoc//lib/rdoc/markdown.rb#3799 + def _HtmlBlockDiv; end + + # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl + # + # source://rdoc//lib/rdoc/markdown.rb#3965 + def _HtmlBlockDl; end + + # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt + # + # source://rdoc//lib/rdoc/markdown.rb#6953 + def _HtmlBlockDt; end + + # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset + # + # source://rdoc//lib/rdoc/markdown.rb#4131 + def _HtmlBlockFieldset; end + + # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm + # + # source://rdoc//lib/rdoc/markdown.rb#4297 + def _HtmlBlockForm; end + + # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset + # + # source://rdoc//lib/rdoc/markdown.rb#7119 + def _HtmlBlockFrameset; end + + # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1 + # + # source://rdoc//lib/rdoc/markdown.rb#4463 + def _HtmlBlockH1; end + + # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2 + # + # source://rdoc//lib/rdoc/markdown.rb#4629 + def _HtmlBlockH2; end + + # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3 + # + # source://rdoc//lib/rdoc/markdown.rb#4795 + def _HtmlBlockH3; end + + # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4 + # + # source://rdoc//lib/rdoc/markdown.rb#4961 + def _HtmlBlockH4; end + + # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5 + # + # source://rdoc//lib/rdoc/markdown.rb#5127 + def _HtmlBlockH5; end + + # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6 + # + # source://rdoc//lib/rdoc/markdown.rb#5293 + def _HtmlBlockH6; end + + # HtmlBlockHead = HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead + # + # source://rdoc//lib/rdoc/markdown.rb#8602 + def _HtmlBlockHead; end + + # HtmlBlockInTags = (HtmlAnchor | HtmlBlockAddress | HtmlBlockBlockquote | HtmlBlockCenter | HtmlBlockDir | HtmlBlockDiv | HtmlBlockDl | HtmlBlockFieldset | HtmlBlockForm | HtmlBlockH1 | HtmlBlockH2 | HtmlBlockH3 | HtmlBlockH4 | HtmlBlockH5 | HtmlBlockH6 | HtmlBlockMenu | HtmlBlockNoframes | HtmlBlockNoscript | HtmlBlockOl | HtmlBlockP | HtmlBlockPre | HtmlBlockTable | HtmlBlockUl | HtmlBlockDd | HtmlBlockDt | HtmlBlockFrameset | HtmlBlockLi | HtmlBlockTbody | HtmlBlockTd | HtmlBlockTfoot | HtmlBlockTh | HtmlBlockThead | HtmlBlockTr | HtmlBlockScript | HtmlBlockHead) + # + # source://rdoc//lib/rdoc/markdown.rb#8649 + def _HtmlBlockInTags; end + + # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi + # + # source://rdoc//lib/rdoc/markdown.rb#7285 + def _HtmlBlockLi; end + + # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu + # + # source://rdoc//lib/rdoc/markdown.rb#5459 + def _HtmlBlockMenu; end + + # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes + # + # source://rdoc//lib/rdoc/markdown.rb#5625 + def _HtmlBlockNoframes; end + + # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript + # + # source://rdoc//lib/rdoc/markdown.rb#5791 + def _HtmlBlockNoscript; end + + # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl + # + # source://rdoc//lib/rdoc/markdown.rb#5957 + def _HtmlBlockOl; end + + # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3027 + def _HtmlBlockOpenAddress; end + + # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3193 + def _HtmlBlockOpenBlockquote; end + + # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3359 + def _HtmlBlockOpenCenter; end + + # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6679 + def _HtmlBlockOpenDd; end + + # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3525 + def _HtmlBlockOpenDir; end + + # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3691 + def _HtmlBlockOpenDiv; end + + # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3857 + def _HtmlBlockOpenDl; end + + # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6845 + def _HtmlBlockOpenDt; end + + # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4023 + def _HtmlBlockOpenFieldset; end + + # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4189 + def _HtmlBlockOpenForm; end + + # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7011 + def _HtmlBlockOpenFrameset; end + + # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4355 + def _HtmlBlockOpenH1; end + + # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4521 + def _HtmlBlockOpenH2; end + + # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4687 + def _HtmlBlockOpenH3; end + + # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4853 + def _HtmlBlockOpenH4; end + + # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5019 + def _HtmlBlockOpenH5; end + + # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5185 + def _HtmlBlockOpenH6; end + + # HtmlBlockOpenHead = "<" Spnl ("head" | "HEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8494 + def _HtmlBlockOpenHead; end + + # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7177 + def _HtmlBlockOpenLi; end + + # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5351 + def _HtmlBlockOpenMenu; end + + # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5517 + def _HtmlBlockOpenNoframes; end + + # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5683 + def _HtmlBlockOpenNoscript; end + + # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5849 + def _HtmlBlockOpenOl; end + + # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6015 + def _HtmlBlockOpenP; end + + # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6181 + def _HtmlBlockOpenPre; end + + # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8339 + def _HtmlBlockOpenScript; end + + # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6347 + def _HtmlBlockOpenTable; end + + # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7343 + def _HtmlBlockOpenTbody; end + + # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7509 + def _HtmlBlockOpenTd; end + + # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7675 + def _HtmlBlockOpenTfoot; end + + # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7841 + def _HtmlBlockOpenTh; end + + # HtmlBlockOpenThead = "<" Spnl ("thead" | "THEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8007 + def _HtmlBlockOpenThead; end + + # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8173 + def _HtmlBlockOpenTr; end + + # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6513 + def _HtmlBlockOpenUl; end + + # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP + # + # source://rdoc//lib/rdoc/markdown.rb#6123 + def _HtmlBlockP; end + + # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre + # + # source://rdoc//lib/rdoc/markdown.rb#6289 + def _HtmlBlockPre; end + + # HtmlBlockScript = HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript + # + # source://rdoc//lib/rdoc/markdown.rb#8447 + def _HtmlBlockScript; end + + # HtmlBlockSelfClosing = "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8894 + def _HtmlBlockSelfClosing; end + + # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable + # + # source://rdoc//lib/rdoc/markdown.rb#6455 + def _HtmlBlockTable; end + + # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody + # + # source://rdoc//lib/rdoc/markdown.rb#7451 + def _HtmlBlockTbody; end + + # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd + # + # source://rdoc//lib/rdoc/markdown.rb#7617 + def _HtmlBlockTd; end + + # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot + # + # source://rdoc//lib/rdoc/markdown.rb#7783 + def _HtmlBlockTfoot; end + + # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh + # + # source://rdoc//lib/rdoc/markdown.rb#7949 + def _HtmlBlockTh; end + + # HtmlBlockThead = HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead + # + # source://rdoc//lib/rdoc/markdown.rb#8115 + def _HtmlBlockThead; end + + # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr + # + # source://rdoc//lib/rdoc/markdown.rb#8281 + def _HtmlBlockTr; end + + # HtmlBlockType = ("ADDRESS" | "BLOCKQUOTE" | "CENTER" | "DD" | "DIR" | "DIV" | "DL" | "DT" | "FIELDSET" | "FORM" | "FRAMESET" | "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "HR" | "ISINDEX" | "LI" | "MENU" | "NOFRAMES" | "NOSCRIPT" | "OL" | "P" | "PRE" | "SCRIPT" | "TABLE" | "TBODY" | "TD" | "TFOOT" | "TH" | "THEAD" | "TR" | "UL" | "address" | "blockquote" | "center" | "dd" | "dir" | "div" | "dl" | "dt" | "fieldset" | "form" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "hr" | "isindex" | "li" | "menu" | "noframes" | "noscript" | "ol" | "p" | "pre" | "script" | "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "ul") + # + # source://rdoc//lib/rdoc/markdown.rb#8949 + def _HtmlBlockType; end + + # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl + # + # source://rdoc//lib/rdoc/markdown.rb#6621 + def _HtmlBlockUl; end + + # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#2917 + def _HtmlCloseAnchor; end + + # HtmlComment = "" .)* "-->" + # + # source://rdoc//lib/rdoc/markdown.rb#14413 + def _HtmlComment; end + + # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#2861 + def _HtmlOpenAnchor; end + + # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#14460 + def _HtmlTag; end + + # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8826 + def _HtmlUnclosed; end + + # HtmlUnclosedType = ("HR" | "hr") + # + # source://rdoc//lib/rdoc/markdown.rb#8876 + def _HtmlUnclosedType; end + + # Image = "!" (ExplicitLink | ReferenceLink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" } + # + # source://rdoc//lib/rdoc/markdown.rb#10970 + def _Image; end + + # InStyleTags = StyleOpen (!StyleClose .)* StyleClose + # + # source://rdoc//lib/rdoc/markdown.rb#9279 + def _InStyleTags; end + + # Indent = /\t| / + # + # source://rdoc//lib/rdoc/markdown.rb#14858 + def _Indent; end + + # IndentedLine = Indent Line + # + # source://rdoc//lib/rdoc/markdown.rb#14865 + def _IndentedLine; end + + # Inline = (Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol) + # + # source://rdoc//lib/rdoc/markdown.rb#9584 + def _Inline; end + + # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref } + # + # source://rdoc//lib/rdoc/markdown.rb#15429 + def _InlineNote; end + + # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks } + # + # source://rdoc//lib/rdoc/markdown.rb#9363 + def _Inlines; end + + # Label = "[" (!"^" &{ notes? } | &. &{ !notes? }) @StartList:a (!"]" Inline:l { a << l })* "]" { a.join.gsub(/\s+/, ' ') } + # + # source://rdoc//lib/rdoc/markdown.rb#11905 + def _Label; end + + # Line = @RawLine:a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#14936 + def _Line; end + + # LineBreak = " " @NormalEndline { RDoc::Markup::HardBreak.new } + # + # source://rdoc//lib/rdoc/markdown.rb#10040 + def _LineBreak; end + + # Link = (ExplicitLink | ReferenceLink | AutoLink) + # + # source://rdoc//lib/rdoc/markdown.rb#11009 + def _Link; end + + # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] } + # + # source://rdoc//lib/rdoc/markdown.rb#2546 + def _ListBlock; end + + # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine + # + # source://rdoc//lib/rdoc/markdown.rb#2791 + def _ListBlockLine; end + + # ListContinuationBlock = @StartList:a @BlankLine* { a << "\n" } (Indent ListBlock:b { a.concat b })+ { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2590 + def _ListContinuationBlock; end + + # ListItem = (Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a } + # + # source://rdoc//lib/rdoc/markdown.rb#2390 + def _ListItem; end + + # ListItemTight = (Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a } + # + # source://rdoc//lib/rdoc/markdown.rb#2466 + def _ListItemTight; end + + # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2302 + def _ListLoose; end + + # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2237 + def _ListTight; end + + # Newline = %literals.Newline + # + # source://rdoc//lib/rdoc/markdown.rb#14724 + def _Newline; end + + # NonblankIndentedLine = !@BlankLine IndentedLine + # + # source://rdoc//lib/rdoc/markdown.rb#1819 + def _NonblankIndentedLine; end + + # NonindentSpace = / {0,3}/ + # + # source://rdoc//lib/rdoc/markdown.rb#14851 + def _NonindentSpace; end + + # Nonspacechar = !@Spacechar !@Newline . + # + # source://rdoc//lib/rdoc/markdown.rb#14550 + def _Nonspacechar; end + + # NormalChar = !(@SpecialChar | @Spacechar | @Newline) . + # + # source://rdoc//lib/rdoc/markdown.rb#14651 + def _NormalChar; end + + # NormalEndline = @Sp @Newline !@BlankLine !">" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { "\n" } + # + # source://rdoc//lib/rdoc/markdown.rb#9936 + def _NormalEndline; end + + # Note = &{ notes? } @NonindentSpace RawNoteReference:ref ":" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a nil } + # + # source://rdoc//lib/rdoc/markdown.rb#15331 + def _Note; end + + # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref } + # + # source://rdoc//lib/rdoc/markdown.rb#15205 + def _NoteReference; end + + # Notes = (Note | SkipBlock)* + # + # source://rdoc//lib/rdoc/markdown.rb#15536 + def _Notes; end + + # OptionallyIndentedLine = Indent? Line + # + # source://rdoc//lib/rdoc/markdown.rb#14886 + def _OptionallyIndentedLine; end + + # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) } + # + # source://rdoc//lib/rdoc/markdown.rb#2750 + def _OrderedList; end + + # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#1012 + def _Para; end + + # Plain = Inlines:a { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#1055 + def _Plain; end + + # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'") + # + # source://rdoc//lib/rdoc/markdown.rb#14173 + def _Quoted; end + + # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end } + # + # source://rdoc//lib/rdoc/markdown.rb#14106 + def _RawHtml; end + + # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text } + # + # source://rdoc//lib/rdoc/markdown.rb#14959 + def _RawLine; end + + # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a } + # + # source://rdoc//lib/rdoc/markdown.rb#15558 + def _RawNoteBlock; end + + # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#15235 + def _RawNoteReference; end + + # RefSrc = < Nonspacechar+ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12024 + def _RefSrc; end + + # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle) + # + # source://rdoc//lib/rdoc/markdown.rb#12060 + def _RefTitle; end + + # RefTitleDouble = Spnl "\"" < (!("\"" @Sp @Newline | @Newline) .)* > "\"" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12183 + def _RefTitleDouble; end + + # RefTitleParens = Spnl "(" < (!(")" @Sp @Newline | @Newline) .)* > ")" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12275 + def _RefTitleParens; end + + # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12091 + def _RefTitleSingle; end + + # Reference = @NonindentSpace !"[]" Label:label ":" Spnl RefSrc:link RefTitle @BlankLine+ { # TODO use title reference label, link nil } + # + # source://rdoc//lib/rdoc/markdown.rb#11830 + def _Reference; end + + # ReferenceLink = (ReferenceLinkDouble | ReferenceLinkSingle) + # + # source://rdoc//lib/rdoc/markdown.rb#11030 + def _ReferenceLink; end + + # ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label { link_to content, label, text } + # + # source://rdoc//lib/rdoc/markdown.rb#11048 + def _ReferenceLinkDouble; end + + # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text } + # + # source://rdoc//lib/rdoc/markdown.rb#11094 + def _ReferenceLinkSingle; end + + # References = (Reference | SkipBlock)* + # + # source://rdoc//lib/rdoc/markdown.rb#12367 + def _References; end + + # SetextBottom1 = /={1,}/ @Newline + # + # source://rdoc//lib/rdoc/markdown.rb#1260 + def _SetextBottom1; end + + # SetextBottom2 = /-{1,}/ @Newline + # + # source://rdoc//lib/rdoc/markdown.rb#1281 + def _SetextBottom2; end + + # SetextHeading = (SetextHeading1 | SetextHeading2) + # + # source://rdoc//lib/rdoc/markdown.rb#1242 + def _SetextHeading; end + + # SetextHeading1 = &(@RawLine SetextBottom1) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom1 { RDoc::Markup::Heading.new(1, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1302 + def _SetextHeading1; end + + # SetextHeading2 = &(@RawLine SetextBottom2) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom2 { RDoc::Markup::Heading.new(2, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1424 + def _SetextHeading2; end + + # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine) + # + # source://rdoc//lib/rdoc/markdown.rb#15038 + def _SkipBlock; end + + # Source = ("<" < SourceContents > ">" | < SourceContents >) { text } + # + # source://rdoc//lib/rdoc/markdown.rb#11204 + def _Source; end + + # SourceContents = ((!"(" !")" !">" Nonspacechar)+ | "(" SourceContents ")")* + # + # source://rdoc//lib/rdoc/markdown.rb#11264 + def _SourceContents; end + + # Sp = @Spacechar* + # + # source://rdoc//lib/rdoc/markdown.rb#14582 + def _Sp; end + + # Space = @Spacechar+ { " " } + # + # source://rdoc//lib/rdoc/markdown.rb#9644 + def _Space; end + + # Spacechar = %literals.Spacechar + # + # source://rdoc//lib/rdoc/markdown.rb#14731 + def _Spacechar; end + + # SpecialChar = (/[~*_`&\[\]() { text } | < @Spacechar /\*+/ &@Spacechar > { text }) + # + # source://rdoc//lib/rdoc/markdown.rb#10127 + def _StarLine; end + + # StartList = &. { [] } + # + # source://rdoc//lib/rdoc/markdown.rb#14912 + def _StartList; end + + # Str = @StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a } + # + # source://rdoc//lib/rdoc/markdown.rb#9676 + def _Str; end + + # StrChunk = < (@NormalChar | /_+/ &Alphanumeric)+ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#9749 + def _StrChunk; end + + # Strike = &{ strike? } "~~" !@Whitespace @StartList:a (!"~~" Inline:b { a << b })+ "~~" { strike a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10859 + def _Strike; end + + # Strong = (StrongStar | StrongUl) + # + # source://rdoc//lib/rdoc/markdown.rb#10633 + def _Strong; end + + # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10651 + def _StrongStar; end + + # StrongUl = "__" !@Whitespace @StartList:a (!"__" Inline:b { a << b })+ "__" { strong a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10755 + def _StrongUl; end + + # StyleBlock = < InStyleTags > @BlankLine* { if css? then RDoc::Markup::Raw.new text end } + # + # source://rdoc//lib/rdoc/markdown.rb#9326 + def _StyleBlock; end + + # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#9227 + def _StyleClose; end + + # StyleOpen = "<" Spnl ("style" | "STYLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#9171 + def _StyleOpen; end + + # Symbol = < @SpecialChar > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#10067 + def _Symbol; end + + # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) } + # + # source://rdoc//lib/rdoc/markdown.rb#15935 + def _Table; end + + # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) } + # + # source://rdoc//lib/rdoc/markdown.rb#16302 + def _TableAlign; end + + # TableAlign2 = "|" @Sp TableAlign + # + # source://rdoc//lib/rdoc/markdown.rb#16276 + def _TableAlign2; end + + # TableHead = TableItem2+:items "|"? @Newline { items } + # + # source://rdoc//lib/rdoc/markdown.rb#15991 + def _TableHead; end + + # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') } + # + # source://rdoc//lib/rdoc/markdown.rb#16157 + def _TableItem; end + + # TableItem2 = "|" TableItem + # + # source://rdoc//lib/rdoc/markdown.rb#16136 + def _TableItem2; end + + # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line } + # + # source://rdoc//lib/rdoc/markdown.rb#16183 + def _TableLine; end + + # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row } + # + # source://rdoc//lib/rdoc/markdown.rb#16043 + def _TableRow; end + + # TerminalEndline = @Sp @Newline @Eof + # + # source://rdoc//lib/rdoc/markdown.rb#10014 + def _TerminalEndline; end + + # Ticks1 = "`" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12389 + def _Ticks1; end + + # Ticks2 = "``" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12413 + def _Ticks2; end + + # Ticks3 = "```" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12437 + def _Ticks3; end + + # Ticks4 = "````" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12461 + def _Ticks4; end + + # Ticks5 = "`````" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12485 + def _Ticks5; end + + # Title = (TitleSingle | TitleDouble | ""):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#11381 + def _Title; end + + # TitleDouble = "\"" (!("\"" @Sp (")" | @Newline)) .)* "\"" + # + # source://rdoc//lib/rdoc/markdown.rb#11495 + def _TitleDouble; end + + # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'" + # + # source://rdoc//lib/rdoc/markdown.rb#11418 + def _TitleSingle; end + + # UlLine = (< /_{4,}/ > { text } | < @Spacechar /_+/ &@Spacechar > { text }) + # + # source://rdoc//lib/rdoc/markdown.rb#10204 + def _UlLine; end + + # UlOrStarLine = (UlLine | StarLine):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#10093 + def _UlOrStarLine; end + + # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) } + # + # source://rdoc//lib/rdoc/markdown.rb#1893 + def _Verbatim; end + + # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b } + # + # source://rdoc//lib/rdoc/markdown.rb#1843 + def _VerbatimChunk; end + + # Whitespace = (@Spacechar | @Newline) + # + # source://rdoc//lib/rdoc/markdown.rb#10299 + def _Whitespace; end + + # root = Doc + # + # source://rdoc//lib/rdoc/markdown.rb#890 + def _root; end + + # source://rdoc//lib/rdoc/markdown.rb#501 + def apply(rule); end + + # source://rdoc//lib/rdoc/markdown.rb#468 + def apply_with_args(rule, *args); end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def break_on_newline=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def break_on_newline?; end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def css=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def css?; end + + # source://rdoc//lib/rdoc/markdown.rb#250 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#211 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#234 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#259 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def definition_lists=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def definition_lists?; end + + # Wraps `text` in emphasis for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#681 + def emphasis(text); end + + # :category: Extensions + # + # Enables or disables the extension with `name` + # + # source://rdoc//lib/rdoc/markdown.rb#703 + def extension(name, enable); end + + # :category: Extensions + # + # Is the extension `name` enabled? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markdown.rb#694 + def extension?(name); end + + # source://rdoc//lib/rdoc/markdown.rb#449 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//lib/rdoc/markdown.rb#371 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//lib/rdoc/markdown.rb#208 + def failing_rule_offset; end + + # source://rdoc//lib/rdoc/markdown.rb#318 + def failure_caret; end + + # source://rdoc//lib/rdoc/markdown.rb#323 + def failure_character; end + + # source://rdoc//lib/rdoc/markdown.rb#306 + def failure_info; end + + # source://rdoc//lib/rdoc/markdown.rb#327 + def failure_oneline; end + + # source://rdoc//lib/rdoc/markdown.rb#393 + def get_byte; end + + # source://rdoc//lib/rdoc/markdown.rb#271 + def get_line(no); end + + # source://rdoc//lib/rdoc/markdown.rb#285 + def get_text(start); end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def github=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def github?; end + + # source://rdoc//lib/rdoc/markdown.rb#533 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def html=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def html?; end + + # Parses `text` in a clone of this parser. This is used for handling nested + # lists the same way as markdown_parser. + # + # source://rdoc//lib/rdoc/markdown.rb#715 + def inner_parse(text); end + + # source://rdoc//lib/rdoc/markdown.rb#267 + def lines; end + + # Finds a link reference for `label` and creates a new link to it with + # `content` as the link text. If `label` was not encountered in the + # reference-gathering parser pass the label and content are reconstructed + # with the linking `text` (usually whitespace). + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown.rb#735 + def link_to(content, label = T.unsafe(nil), text = T.unsafe(nil)); end + + # Creates an RDoc::Markup::ListItem by parsing the `unparsed` content from + # the first parsing pass. + # + # source://rdoc//lib/rdoc/markdown.rb#752 + def list_item_from(unparsed); end + + # source://rdoc//lib/rdoc/markdown.rb#373 + def match_string(str); end + + # Stores `label` as a note and fills in previously unknown note references. + # + # source://rdoc//lib/rdoc/markdown.rb#760 + def note(label); end + + # Creates a new link for the footnote `reference` and adds the reference to + # the note order list for proper display at the end of the document. + # + # source://rdoc//lib/rdoc/markdown.rb#774 + def note_for(ref); end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def notes=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def notes?; end + + # Creates an RDoc::Markup::Paragraph from `parts` and including + # extension-specific behavior + # + # source://rdoc//lib/rdoc/markdown.rb#791 + def paragraph(parts); end + + # Parses `markdown` into an RDoc::Document + # + # source://rdoc//lib/rdoc/markdown.rb#806 + def parse(markdown); end + + # The internal kpeg parse method + # + # source://rdoc//lib/rdoc/markdown.rb#414 + def peg_parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def pos=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#221 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown.rb#341 + def raise_error; end + + # Stores `label` as a reference to `link` and fills in previously unknown + # link references. + # + # source://rdoc//lib/rdoc/markdown.rb#853 + def reference(label, link); end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def result=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#383 + def scan(reg); end + + # source://rdoc//lib/rdoc/markdown.rb#364 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//lib/rdoc/markdown.rb#290 + def set_string(string, pos); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markdown.rb#885 + def setup_foreign_grammar; end + + # Prepares for parsing +str+. If you define a custom initialize you must + # call this method before #parse + # + # source://rdoc//lib/rdoc/markdown.rb#196 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#345 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#297 + def show_pos; end + + # Wraps `text` in strike markup for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#875 + def strike(text); end + + # source://rdoc//lib/rdoc/markdown.rb#608 + def strike=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#604 + def strike?; end + + # Returns the value of attribute string. + # + # source://rdoc//lib/rdoc/markdown.rb#207 + def string; end + + # Wraps `text` in strong markup for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#864 + def strong(text); end + + private + + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # TODO remove when kpeg 0.10 is released + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//lib/rdoc/markdown.rb#188 + def orig_initialize(str, debug = T.unsafe(nil)); end + + class << self + # Creates extension methods for the `name` extension to enable and disable + # the extension and to query if they are active. + # + # source://rdoc//lib/rdoc/markdown.rb#601 + def extension(name); end + + # Parses the `markdown` document into an RDoc::Document using the default + # extensions. + # + # source://rdoc//lib/rdoc/markdown.rb#654 + def parse(markdown); end + + # source://rdoc//lib/rdoc/markdown.rb#564 + def rule_info(name, rendered); end + end +end + +# source://rdoc//lib/rdoc/markdown.rb#257 +class RDoc::Markdown::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# -- +# This set of literals is for Ruby 1.9 regular expressions and gives full +# unicode support. +# +# Unlike peg-markdown, this set of literals recognizes Unicode alphanumeric +# characters, newlines and spaces. +# +# source://rdoc//lib/rdoc/markdown/literals.rb#12 +class RDoc::Markdown::Literals + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # + # @return [Literals] a new instance of Literals + # + # source://rdoc//lib/rdoc/markdown/literals.rb#18 + def initialize(str, debug = T.unsafe(nil)); end + + # Alphanumeric = /\p{Word}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#383 + def _Alphanumeric; end + + # AlphanumericAscii = /[A-Za-z0-9]/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#390 + def _AlphanumericAscii; end + + # BOM = "uFEFF" + # + # source://rdoc//lib/rdoc/markdown/literals.rb#397 + def _BOM; end + + # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#404 + def _Newline; end + + # NonAlphanumeric = /\p{^Word}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#411 + def _NonAlphanumeric; end + + # Spacechar = /\t|\p{Zs}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#418 + def _Spacechar; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#310 + def apply(rule); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#277 + def apply_with_args(rule, *args); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#41 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#50 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#258 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#180 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def failing_rule_offset; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#117 + def failure_caret; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#125 + def failure_character; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#105 + def failure_info; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#131 + def failure_oneline; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#202 + def get_byte; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#85 + def get_text(start); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#342 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#77 + def lines; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#182 + def match_string(str); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#223 + def parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#39 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#39 + def pos=(_arg0); end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown/literals.rb#148 + def raise_error; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#39 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#39 + def result=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#192 + def scan(reg); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#173 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#90 + def set_string(string, pos); end + + # :startdoc: + # :stopdoc: + # + # source://rdoc//lib/rdoc/markdown/literals.rb#380 + def setup_foreign_grammar; end + + # Prepares for parsing +str+. If you define a custom initialize you must + # call this method before #parse + # + # source://rdoc//lib/rdoc/markdown/literals.rb#26 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#152 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#96 + def show_pos; end + + # Returns the value of attribute string. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#37 + def string; end + + class << self + # source://rdoc//lib/rdoc/markdown/literals.rb#373 + def rule_info(name, rendered); end + end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#237 +class RDoc::Markdown::Literals::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//lib/rdoc/markdown/literals.rb#238 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#246 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#247 + def left_rec; end + + # Sets the attribute left_rec + # + # @param value the value to set the attribute left_rec to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#247 + def left_rec=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#249 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#246 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#246 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#246 + def set; end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#364 +class RDoc::Markdown::Literals::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//lib/rdoc/markdown/literals.rb#365 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#370 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#370 + def rendered; end +end + +# source://rdoc//lib/rdoc/markdown.rb#428 +class RDoc::Markdown::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//lib/rdoc/markdown.rb#429 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//lib/rdoc/markdown.rb#438 + def left_rec; end + + # Sets the attribute left_rec + # + # @param value the value to set the attribute left_rec to. + # + # source://rdoc//lib/rdoc/markdown.rb#438 + def left_rec=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#440 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def set; end +end + +# source://rdoc//lib/rdoc/markdown.rb#555 +class RDoc::Markdown::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//lib/rdoc/markdown.rb#556 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//lib/rdoc/markdown.rb#561 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//lib/rdoc/markdown.rb#561 + def rendered; end +end + +# source://rdoc//lib/rdoc/markup.rb#106 +class RDoc::Markup + # Take a block of text and use various heuristics to determine its + # structure (paragraphs, lists, and so on). Invoke an event handler as we + # identify significant chunks. + # + # @return [Markup] a new instance of Markup + # + # source://rdoc//lib/rdoc/markup.rb#146 + def initialize(attribute_manager = T.unsafe(nil)); end + + # Add to the sequences recognized as general markup. + # + # source://rdoc//lib/rdoc/markup.rb#163 + def add_html(tag, name); end + + # Add to other inline sequences. For example, we could add WikiWords using + # something like: + # + # parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) + # + # Each wiki word will be presented to the output formatter. + # + # source://rdoc//lib/rdoc/markup.rb#175 + def add_regexp_handling(pattern, name); end + + # Add to the sequences used to add formatting to an individual word (such + # as *bold*). Matching entries will generate attributes that the output + # formatters can recognize by their +name+. + # + # source://rdoc//lib/rdoc/markup.rb#156 + def add_word_pair(start, stop, name); end + + # An AttributeManager which handles inline markup. + # + # source://rdoc//lib/rdoc/markup.rb#111 + def attribute_manager; end + + # We take +input+, parse it if necessary, then invoke the output +formatter+ + # using a Visitor to render the result. + # + # source://rdoc//lib/rdoc/markup.rb#183 + def convert(input, formatter); end + + class << self + # Parses +str+ into an RDoc::Markup::Document. + # + # source://rdoc//lib/rdoc/markup.rb#116 + def parse(str); end + end +end + +# An AttrChanger records a change in attributes. It contains a bitmap of the +# attributes to turn on, and a bitmap of those to turn off. +# +# source://rdoc//lib/rdoc/markup/attr_changer.rb#4 +class RDoc::Markup::AttrChanger < ::Struct + # source://rdoc//lib/rdoc/markup/attr_changer.rb#18 + def inspect; end + + # source://rdoc//lib/rdoc/markup/attr_changer.rb#14 + def to_s; end +end + +# An array of attributes which parallels the characters in a string. +# +# source://rdoc//lib/rdoc/markup/attr_span.rb#5 +class RDoc::Markup::AttrSpan + # Creates a new AttrSpan for +length+ characters + # + # @return [AttrSpan] a new instance of AttrSpan + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#10 + def initialize(length, exclusive); end + + # Accesses flags for character +n+ + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#31 + def [](n); end + + # Toggles +bits+ from +start+ to +length+ + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#17 + def set_attrs(start, length, bits); end +end + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#16 +class RDoc::Markup::AttributeManager + # Creates a new attribute manager that understands bold, emphasized and + # teletype text. + # + # @return [AttributeManager] a new instance of AttributeManager + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#80 + def initialize; end + + # Adds a markup class with +name+ for words surrounded by HTML tag +tag+. + # To process emphasis tags: + # + # am.add_html 'em', :EM + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#283 + def add_html(tag, name, exclusive = T.unsafe(nil)); end + + # Adds a regexp handling for +pattern+ with +name+. A simple URL handler + # would be: + # + # @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK) + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#295 + def add_regexp_handling(pattern, name, exclusive = T.unsafe(nil)); end + + # Adds a markup class with +name+ for words wrapped in the +start+ and + # +stop+ character. To make words wrapped with "*" bold: + # + # am.add_word_pair '*', '*', :BOLD + # + # @raise [ArgumentError] + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#258 + def add_word_pair(start, stop, name, exclusive = T.unsafe(nil)); end + + # Return an attribute object with the given turn_on and turn_off bits set + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#103 + def attribute(turn_on, turn_off); end + + # The attributes enabled for this markup object. + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#40 + def attributes; end + + # Changes the current attribute from +current+ to +new+ + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#110 + def change_attribute(current, new); end + + # Used by the tests to change attributes by name from +current_set+ to + # +new_set+ + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#119 + def changed_attribute_by_name(current_set, new_set); end + + # Map attributes like textto the sequence + # \001\002\001\003, where is a per-attribute specific + # character + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#153 + def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#158 + def convert_attrs_matching_word_pairs(str, attrs, exclusive); end + + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#182 + def convert_attrs_word_pair_map(str, attrs, exclusive); end + + # Converts HTML tags to RDoc attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#203 + def convert_html(str, attrs, exclusive = T.unsafe(nil)); end + + # Converts regexp handling sequences to RDoc attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#220 + def convert_regexp_handlings(str, attrs, exclusive = T.unsafe(nil)); end + + # Copies +start_pos+ to +end_pos+ from the current string + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#135 + def copy_string(start_pos, end_pos); end + + # Debug method that prints a string along with its attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#326 + def display_attributes; end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#141 + def exclusive?(attr); end + + # A bits of exclusive maps + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#74 + def exclusive_bitmap; end + + # Processes +str+ converting attributes, HTML and regexp handlings + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#304 + def flow(str); end + + # This maps HTML tags to the corresponding attribute char + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#58 + def html_tags; end + + # Escapes regexp handling sequences of text to prevent conversion to RDoc + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#236 + def mask_protected_sequences; end + + # This maps delimiters that occur around words (such as *bold* or +tt+) + # where the start and end delimiters and the same. This lets us optimize + # the regexp + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#47 + def matching_word_pairs; end + + # A \ in front of a character that would normally be processed turns off + # processing. We do this by turning \< into <#{PROTECT} + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#64 + def protectable; end + + # And this maps _regexp handling_ sequences to a name. A regexp handling + # sequence is something like a WikiWord + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#70 + def regexp_handlings; end + + # Splits the string into chunks by attribute change + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#351 + def split_into_flow; end + + # Unescapes regexp handling sequences of text + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#248 + def unmask_protected_sequences; end + + # And this is used when the delimiters aren't the same. In this case the + # hash maps a pattern to the attribute character + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#53 + def word_pair_map; end +end + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#146 +RDoc::Markup::AttributeManager::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#145 +RDoc::Markup::AttributeManager::NON_PRINTING_START = T.let(T.unsafe(nil), String) + +# We manage a set of attributes. Each attribute has a symbol name and a bit +# value. +# +# source://rdoc//lib/rdoc/markup/attributes.rb#6 +class RDoc::Markup::Attributes + # Creates a new attributes set. + # + # @return [Attributes] a new instance of Attributes + # + # source://rdoc//lib/rdoc/markup/attributes.rb#16 + def initialize; end + + # Returns a string representation of +bitmap+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#46 + def as_string(bitmap); end + + # Returns a unique bit for +name+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#29 + def bitmap_for(name); end + + # yields each attribute name in +bitmap+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#60 + def each_name_of(bitmap); end + + # The regexp handling attribute type. See RDoc::Markup#add_regexp_handling + # + # source://rdoc//lib/rdoc/markup/attributes.rb#11 + def regexp_handling; end +end + +# An empty line. This class is a singleton. +# +# source://rdoc//lib/rdoc/markup/blank_line.rb#5 +class RDoc::Markup::BlankLine + # Calls #accept_blank_line on +visitor+ + # + # source://rdoc//lib/rdoc/markup/blank_line.rb#19 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/blank_line.rb#23 + def pretty_print(q); end + + class << self + # RDoc::Markup::BlankLine is a singleton + # + # source://rdoc//lib/rdoc/markup/blank_line.rb#12 + def new; end + end +end + +# A quoted section which contains markup items. +# +# source://rdoc//lib/rdoc/markup/block_quote.rb#5 +class RDoc::Markup::BlockQuote < ::RDoc::Markup::Raw + # Calls #accept_block_quote on +visitor+ + # + # source://rdoc//lib/rdoc/markup/block_quote.rb#10 + def accept(visitor); end +end + +# A Document containing lists, headings, paragraphs, etc. +# +# source://rdoc//lib/rdoc/markup/document.rb#5 +class RDoc::Markup::Document + include ::Enumerable + + # Creates a new Document with +parts+ + # + # @return [Document] a new instance of Document + # + # source://rdoc//lib/rdoc/markup/document.rb#29 + def initialize(*parts); end + + # Appends +part+ to the document + # + # source://rdoc//lib/rdoc/markup/document.rb#40 + def <<(part); end + + # source://rdoc//lib/rdoc/markup/document.rb#56 + def ==(other); end + + # Runs this document and all its #items through +visitor+ + # + # source://rdoc//lib/rdoc/markup/document.rb#65 + def accept(visitor); end + + # Concatenates the given +parts+ onto the document + # + # source://rdoc//lib/rdoc/markup/document.rb#76 + def concat(parts); end + + # Enumerator for the parts of this document + # + # source://rdoc//lib/rdoc/markup/document.rb#83 + def each(&block); end + + # Does this document have no parts? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/document.rb#90 + def empty?; end + + # The file this document was created from. See also + # RDoc::ClassModule#add_comment + # + # source://rdoc//lib/rdoc/markup/document.rb#13 + def file; end + + # The file this Document was created from. + # + # source://rdoc//lib/rdoc/markup/document.rb#97 + def file=(location); end + + # When this is a collection of documents (#file is not set and this document + # contains only other documents as its direct children) #merge replaces + # documents in this class with documents from +other+ when the file matches + # and adds documents from +other+ when the files do not. + # + # The information in +other+ is preferred over the receiver + # + # source://rdoc//lib/rdoc/markup/document.rb#114 + def merge(other); end + + # Does this Document contain other Documents? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/document.rb#134 + def merged?; end + + # If a heading is below the given level it will be omitted from the + # table_of_contents + # + # source://rdoc//lib/rdoc/markup/document.rb#19 + def omit_headings_below; end + + # If a heading is below the given level it will be omitted from the + # table_of_contents + # + # source://rdoc//lib/rdoc/markup/document.rb#19 + def omit_headings_below=(_arg0); end + + # The parts of the Document + # + # source://rdoc//lib/rdoc/markup/document.rb#24 + def parts; end + + # source://rdoc//lib/rdoc/markup/document.rb#138 + def pretty_print(q); end + + # Appends +parts+ to the document + # + # source://rdoc//lib/rdoc/markup/document.rb#151 + def push(*parts); end + + # Returns an Array of headings in the document. + # + # Require 'rdoc/markup/formatter' before calling this method. + # + # source://rdoc//lib/rdoc/markup/document.rb#160 + def table_of_contents; end +end + +# Base class for RDoc markup formatters +# +# Formatters are a visitor that converts an RDoc::Markup tree (from a comment) +# into some kind of output. RDoc ships with formatters for converting back to +# rdoc, ANSI text, HTML, a Table of Contents and other formats. +# +# If you'd like to write your own Formatter use +# RDoc::Markup::FormatterTestCase. If you're writing a text-output formatter +# use RDoc::Markup::TextFormatterTestCase which provides extra test cases. +# +# source://rdoc//lib/rdoc/markup/formatter.rb#13 +class RDoc::Markup::Formatter + # Creates a new Formatter + # + # @return [Formatter] a new instance of Formatter + # + # source://rdoc//lib/rdoc/markup/formatter.rb#48 + def initialize(options, markup = T.unsafe(nil)); end + + # Adds +document+ to the output + # + # source://rdoc//lib/rdoc/markup/formatter.rb#69 + def accept_document(document); end + + # Adds a regexp handling for links of the form rdoc-...: + # + # source://rdoc//lib/rdoc/markup/formatter.rb#83 + def add_regexp_handling_RDOCLINK; end + + # Adds a regexp handling for links of the form {}[] and + # [] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#91 + def add_regexp_handling_TIDYLINK; end + + # Add a new set of tags for an attribute. We allow separate start and end + # tags for flexibility + # + # source://rdoc//lib/rdoc/markup/formatter.rb#105 + def add_tag(name, start, stop); end + + # Allows +tag+ to be decorated with additional information. + # + # source://rdoc//lib/rdoc/markup/formatter.rb#113 + def annotate(tag); end + + # Marks up +content+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#120 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#127 + def convert_flow(flow); end + + # Converts added regexp handlings. See RDoc::Markup#add_regexp_handling + # + # source://rdoc//lib/rdoc/markup/formatter.rb#150 + def convert_regexp_handling(target); end + + # Converts a string to be fancier if desired + # + # source://rdoc//lib/rdoc/markup/formatter.rb#176 + def convert_string(string); end + + # Use ignore in your subclass to ignore the content of a node. + # + # ## + # # We don't support raw nodes in ToNoRaw + # + # alias accept_raw ignore + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def ignore(*node); end + + # Are we currently inside tt tags? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#194 + def in_tt?; end + + # Turns off tags for +item+ on +res+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#216 + def off_tags(res, item); end + + # Turns on tags for +item+ on +res+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#201 + def on_tags(res, item); end + + # Extracts and a scheme, url and an anchor id from +url+ and returns them. + # + # source://rdoc//lib/rdoc/markup/formatter.rb#231 + def parse_url(url); end + + # Is +tag+ a tt tag? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#261 + def tt?(tag); end + + class << self + # Converts a target url to one that is relative to a given path + # + # source://rdoc//lib/rdoc/markup/formatter.rb#24 + def gen_relative_url(path, target); end + end +end + +# A hard-break in the middle of a paragraph. +# +# source://rdoc//lib/rdoc/markup/hard_break.rb#5 +class RDoc::Markup::HardBreak + # source://rdoc//lib/rdoc/markup/hard_break.rb#23 + def ==(other); end + + # Calls #accept_hard_break on +visitor+ + # + # source://rdoc//lib/rdoc/markup/hard_break.rb#19 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/hard_break.rb#27 + def pretty_print(q); end + + class << self + # RDoc::Markup::HardBreak is a singleton + # + # source://rdoc//lib/rdoc/markup/hard_break.rb#12 + def new; end + end +end + +# source://rdoc//lib/rdoc/markup/heading.rb#6 +class RDoc::Markup::Heading < ::Struct + # source://rdoc//lib/rdoc/markup/heading.rb#40 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/heading.rb#47 + def aref; end + + # source://rdoc//lib/rdoc/markup/heading.rb#55 + def label(context = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/heading.rb#68 + def plain_html; end + + # source://rdoc//lib/rdoc/markup/heading.rb#72 + def pretty_print(q); end + + class << self + # source://rdoc//lib/rdoc/markup/heading.rb#22 + def to_html; end + + # source://rdoc//lib/rdoc/markup/heading.rb#14 + def to_label; end + end +end + +# A file included at generation time. Objects of this class are created by +# RDoc::RD for an extension-less include. +# +# This implementation in incomplete. +# +# source://rdoc//lib/rdoc/markup/include.rb#8 +class RDoc::Markup::Include + # Creates a new include that will import +file+ from +include_path+ + # + # @return [Include] a new instance of Include + # + # source://rdoc//lib/rdoc/markup/include.rb#23 + def initialize(file, include_path); end + + # source://rdoc//lib/rdoc/markup/include.rb#28 + def ==(other); end + + # The filename to be included, without extension + # + # source://rdoc//lib/rdoc/markup/include.rb#13 + def file; end + + # Directories to search for #file + # + # source://rdoc//lib/rdoc/markup/include.rb#18 + def include_path; end + + # source://rdoc//lib/rdoc/markup/include.rb#33 + def pretty_print(q); end +end + +# An Indented Paragraph of text +# +# source://rdoc//lib/rdoc/markup/indented_paragraph.rb#5 +class RDoc::Markup::IndentedParagraph < ::RDoc::Markup::Raw + # Creates a new IndentedParagraph containing +parts+ indented with +indent+ + # spaces + # + # @return [IndentedParagraph] a new instance of IndentedParagraph + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#16 + def initialize(indent, *parts); end + + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#22 + def ==(other); end + + # Calls #accept_indented_paragraph on +visitor+ + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#29 + def accept(visitor); end + + # The indent in number of spaces + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#10 + def indent; end + + # Joins the raw paragraph text and converts inline HardBreaks to the + # +hard_break+ text followed by the indent. + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#37 + def text(hard_break = T.unsafe(nil)); end +end + +# A List is a homogeneous set of ListItems. +# +# The supported list types include: +# +# :BULLET:: +# An unordered list +# :LABEL:: +# An unordered definition list, but using an alternate RDoc::Markup syntax +# :LALPHA:: +# An ordered list using increasing lowercase English letters +# :NOTE:: +# An unordered definition list +# :NUMBER:: +# An ordered list using increasing Arabic numerals +# :UALPHA:: +# An ordered list using increasing uppercase English letters +# +# Definition lists behave like HTML definition lists. Each list item can +# describe multiple terms. See RDoc::Markup::ListItem for how labels and +# definition are stored as list items. +# +# source://rdoc//lib/rdoc/markup/list.rb#24 +class RDoc::Markup::List + # Creates a new list of +type+ with +items+. Valid list types are: + # +:BULLET+, +:LABEL+, +:LALPHA+, +:NOTE+, +:NUMBER+, +:UALPHA+ + # + # @return [List] a new instance of List + # + # source://rdoc//lib/rdoc/markup/list.rb#40 + def initialize(type = T.unsafe(nil), *items); end + + # Appends +item+ to the list + # + # source://rdoc//lib/rdoc/markup/list.rb#49 + def <<(item); end + + # source://rdoc//lib/rdoc/markup/list.rb#53 + def ==(other); end + + # Runs this list and all its #items through +visitor+ + # + # source://rdoc//lib/rdoc/markup/list.rb#62 + def accept(visitor); end + + # Is the list empty? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/list.rb#75 + def empty?; end + + # Items in the list + # + # source://rdoc//lib/rdoc/markup/list.rb#34 + def items; end + + # Returns the last item in the list + # + # source://rdoc//lib/rdoc/markup/list.rb#82 + def last; end + + # source://rdoc//lib/rdoc/markup/list.rb#86 + def pretty_print(q); end + + # Appends +items+ to the list + # + # source://rdoc//lib/rdoc/markup/list.rb#97 + def push(*items); end + + # The list's type + # + # source://rdoc//lib/rdoc/markup/list.rb#29 + def type; end + + # The list's type + # + # source://rdoc//lib/rdoc/markup/list.rb#29 + def type=(_arg0); end +end + +# An item within a List that contains paragraphs, headings, etc. +# +# For BULLET, NUMBER, LALPHA and UALPHA lists, the label will always be nil. +# For NOTE and LABEL lists, the list label may contain: +# +# * a single String for a single label +# * an Array of Strings for a list item with multiple terms +# * nil for an extra description attached to a previously labeled list item +# +# source://rdoc//lib/rdoc/markup/list_item.rb#12 +class RDoc::Markup::ListItem + # Creates a new ListItem with an optional +label+ containing +parts+ + # + # @return [ListItem] a new instance of ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#27 + def initialize(label = T.unsafe(nil), *parts); end + + # Appends +part+ to the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#36 + def <<(part); end + + # source://rdoc//lib/rdoc/markup/list_item.rb#40 + def ==(other); end + + # Runs this list item and all its #parts through +visitor+ + # + # source://rdoc//lib/rdoc/markup/list_item.rb#49 + def accept(visitor); end + + # Is the ListItem empty? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/list_item.rb#62 + def empty?; end + + # The label for the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#17 + def label; end + + # The label for the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#17 + def label=(_arg0); end + + # Length of parts in the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#69 + def length; end + + # Parts of the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#22 + def parts; end + + # source://rdoc//lib/rdoc/markup/list_item.rb#73 + def pretty_print(q); end + + # Adds +parts+ to the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#95 + def push(*parts); end +end + +# A Paragraph of text +# +# source://rdoc//lib/rdoc/markup/paragraph.rb#5 +class RDoc::Markup::Paragraph < ::RDoc::Markup::Raw + # Calls #accept_paragraph on +visitor+ + # + # source://rdoc//lib/rdoc/markup/paragraph.rb#10 + def accept(visitor); end + + # Joins the raw paragraph text and converts inline HardBreaks to the + # +hard_break+ text. + # + # source://rdoc//lib/rdoc/markup/paragraph.rb#18 + def text(hard_break = T.unsafe(nil)); end +end + +# A recursive-descent parser for RDoc markup. +# +# The parser tokenizes an input string then parses the tokens into a Document. +# Documents can be converted into output formats by writing a visitor like +# RDoc::Markup::ToHTML. +# +# The parser only handles the block-level constructs Paragraph, List, +# ListItem, Heading, Verbatim, BlankLine, Rule and BlockQuote. +# Inline markup such as \+blah\+ is handled separately by +# RDoc::Markup::AttributeManager. +# +# To see what markup the Parser implements read RDoc. To see how to use +# RDoc markup to format text in your program read RDoc::Markup. +# +# source://rdoc//lib/rdoc/markup/parser.rb#19 +class RDoc::Markup::Parser + include ::RDoc::Text + + # Creates a new Parser. See also ::parse + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//lib/rdoc/markup/parser.rb#79 + def initialize; end + + # Builds a Heading of +level+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#90 + def build_heading(level); end + + # Builds a List flush to +margin+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#108 + def build_list(margin); end + + # Builds a Paragraph that is flush to +margin+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#208 + def build_paragraph(margin); end + + # Builds a Verbatim that is indented from +margin+. + # + # The verbatim block is shifted left (the least indented lines start in + # column 0). Each part of the verbatim is one line of text, always + # terminated by a newline. Blank lines always consist of a single newline + # character, and there is never a single newline at the end of the verbatim. + # + # source://rdoc//lib/rdoc/markup/parser.rb#243 + def build_verbatim(margin); end + + # Enables display of debugging information + # + # source://rdoc//lib/rdoc/markup/parser.rb#48 + def debug; end + + # Enables display of debugging information + # + # source://rdoc//lib/rdoc/markup/parser.rb#48 + def debug=(_arg0); end + + # Pulls the next token from the stream. + # + # source://rdoc//lib/rdoc/markup/parser.rb#327 + def get; end + + # Parses the tokens into an array of RDoc::Markup::XXX objects, + # and appends them to the passed +parent+ RDoc::Markup::YYY object. + # + # Exits at the end of the token stream, or when it encounters a token + # in a column less than +indent+ (unless it is a NEWLINE). + # + # Returns +parent+. + # + # source://rdoc//lib/rdoc/markup/parser.rb#342 + def parse(parent, indent = T.unsafe(nil)); end + + # Small hook that is overridden by RDoc::TomDoc + # + # source://rdoc//lib/rdoc/markup/parser.rb#406 + def parse_text(parent, indent); end + + # Returns the next token on the stream without modifying the stream + # + # source://rdoc//lib/rdoc/markup/parser.rb#413 + def peek_token; end + + # Creates the StringScanner + # + # source://rdoc//lib/rdoc/markup/parser.rb#464 + def setup_scanner(input); end + + # Skips the next token if its type is +token_type+. + # + # Optionally raises an error if the next token is not of the expected type. + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markup/parser.rb#473 + def skip(token_type, error = T.unsafe(nil)); end + + # Turns text +input+ into a stream of tokens + # + # source://rdoc//lib/rdoc/markup/parser.rb#484 + def tokenize(input); end + + # Token accessor + # + # source://rdoc//lib/rdoc/markup/parser.rb#53 + def tokens; end + + # Returns the current token to the token stream + # + # @raise [Error] + # + # source://rdoc//lib/rdoc/markup/parser.rb#574 + def unget; end + + class << self + # Parses +str+ into a Document. + # + # Use RDoc::Markup#parse instead of this method. + # + # source://rdoc//lib/rdoc/markup/parser.rb#60 + def parse(str); end + + # Returns a token stream for +str+, for testing + # + # source://rdoc//lib/rdoc/markup/parser.rb#70 + def tokenize(str); end + end +end + +# A simple wrapper of StringScanner that is aware of the current column and lineno +# +# source://rdoc//lib/rdoc/markup/parser.rb#422 +class RDoc::Markup::Parser::MyStringScanner + # @return [MyStringScanner] a new instance of MyStringScanner + # + # source://rdoc//lib/rdoc/markup/parser.rb#423 + def initialize(input); end + + # source://rdoc//lib/rdoc/markup/parser.rb#456 + def [](i); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/parser.rb#448 + def eos?; end + + # source://rdoc//lib/rdoc/markup/parser.rb#452 + def matched; end + + # source://rdoc//lib/rdoc/markup/parser.rb#443 + def newline!; end + + # source://rdoc//lib/rdoc/markup/parser.rb#439 + def pos; end + + # source://rdoc//lib/rdoc/markup/parser.rb#428 + def scan(re); end + + # source://rdoc//lib/rdoc/markup/parser.rb#434 + def unscan(s); end +end + +# Handle common directives that can occur in a block of text: +# +# \:include: filename +# +# Directives can be escaped by preceding them with a backslash. +# +# RDoc plugin authors can register additional directives to be handled by +# using RDoc::Markup::PreProcess::register. +# +# Any directive that is not built-in to RDoc (including those registered via +# plugins) will be stored in the metadata hash on the CodeObject the comment +# is attached to. See RDoc::Markup@Directives for the list of built-in +# directives. +# +# source://rdoc//lib/rdoc/markup/pre_process.rb#17 +class RDoc::Markup::PreProcess + # Creates a new pre-processor for +input_file_name+ that will look for + # included files in +include_path+ + # + # @return [PreProcess] a new instance of PreProcess + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#78 + def initialize(input_file_name, include_path); end + + # Look for the given file in the directory containing the current file, + # and then in each of the directories specified in the RDOC_INCLUDE path + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#288 + def find_include_file(name); end + + # Look for directives in the given +text+. + # + # Options that we don't handle are yielded. If the block returns false the + # directive is restored to the text. If the block returns nil or no block + # was given the directive is handled according to the registered directives. + # If a String was returned the directive is replaced with the string. + # + # If no matching directive was registered the directive is restored to the + # text. + # + # If +code_object+ is given and the directive is unknown then the + # directive's parameter is set as metadata on the +code_object+. See + # RDoc::CodeObject#metadata for details. + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#99 + def handle(text, code_object = T.unsafe(nil), &block); end + + # Performs the actions described by +directive+ and its parameter +param+. + # + # +code_object+ is used for directives that operate on a class or module. + # +prefix+ is used to ensure the replacement for handled directives is + # correct. +encoding+ is used for the include directive. + # + # For a list of directives in RDoc see RDoc::Markup. + # -- + # When 1.8.7 support is ditched prefix can be defaulted to '' + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#150 + def handle_directive(prefix, directive, param, code_object = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Handles the :include: _filename_ directive. + # + # If the first line of the included file starts with '#', and contains + # an encoding information in the form 'coding:' or 'coding=', it is + # removed. + # + # If all lines in the included file start with a '#', this leading '#' + # is removed before inclusion. The included content is indented like + # the :include: directive. + # -- + # so all content will be verbatim because of the likely space after '#'? + # TODO shift left the whole file content in that case + # TODO comment stop/start #-- and #++ in included file must be processed here + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#262 + def include_file(name, indent, encoding); end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 + def options; end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 + def options=(_arg0); end + + class << self + # Adds a post-process handler for directives. The handler will be called + # with the result RDoc::Comment (or text String) and the code object for the + # comment (if any). + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#30 + def post_process(&block); end + + # Registered post-processors + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#37 + def post_processors; end + + # Registers +directive+ as one handled by RDoc. If a block is given the + # directive will be replaced by the result of the block, otherwise the + # directive will be removed from the processed text. + # + # The block will be called with the directive name and the directive + # parameter: + # + # RDoc::Markup::PreProcess.register 'my-directive' do |directive, param| + # # replace text, etc. + # end + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#53 + def register(directive, &block); end + + # Registered directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#60 + def registered; end + + # Clears all registered directives and post-processors + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#67 + def reset; end + end +end + +# A section of text that is added to the output document as-is +# +# source://rdoc//lib/rdoc/markup/raw.rb#5 +class RDoc::Markup::Raw + # Creates a new Raw containing +parts+ + # + # @return [Raw] a new instance of Raw + # + # source://rdoc//lib/rdoc/markup/raw.rb#15 + def initialize(*parts); end + + # Appends +text+ + # + # source://rdoc//lib/rdoc/markup/raw.rb#23 + def <<(text); end + + # source://rdoc//lib/rdoc/markup/raw.rb#27 + def ==(other); end + + # Calls #accept_raw+ on +visitor+ + # + # source://rdoc//lib/rdoc/markup/raw.rb#34 + def accept(visitor); end + + # Appends +other+'s parts + # + # source://rdoc//lib/rdoc/markup/raw.rb#41 + def merge(other); end + + # The component parts of the list + # + # source://rdoc//lib/rdoc/markup/raw.rb#10 + def parts; end + + # source://rdoc//lib/rdoc/markup/raw.rb#45 + def pretty_print(q); end + + # Appends +texts+ onto this Paragraph + # + # source://rdoc//lib/rdoc/markup/raw.rb#58 + def push(*texts); end + + # The raw text + # + # source://rdoc//lib/rdoc/markup/raw.rb#65 + def text; end +end + +# Hold details of a regexp handling sequence +# +# source://rdoc//lib/rdoc/markup/regexp_handling.rb#5 +class RDoc::Markup::RegexpHandling + # Creates a new regexp handling sequence of +type+ with +text+ + # + # @return [RegexpHandling] a new instance of RegexpHandling + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#20 + def initialize(type, text); end + + # Regexp handlings are equal when the have the same text and type + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#27 + def ==(o); end + + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#31 + def inspect; end + + # Regexp handling text + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 + def text; end + + # Regexp handling text + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 + def text=(_arg0); end + + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#36 + def to_s; end + + # Regexp handling type + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#10 + def type; end +end + +# A horizontal rule with a weight +# +# source://rdoc//lib/rdoc/markup/rule.rb#5 +class RDoc::Markup::Rule < ::Struct + # Calls #accept_rule on +visitor+ + # + # source://rdoc//lib/rdoc/markup/rule.rb#10 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/rule.rb#14 + def pretty_print(q); end +end + +# A section of table +# +# source://rdoc//lib/rdoc/markup/table.rb#5 +class RDoc::Markup::Table + # @return [Table] a new instance of Table + # + # source://rdoc//lib/rdoc/markup/table.rb#8 + def initialize(header, align, body); end + + # source://rdoc//lib/rdoc/markup/table.rb#12 + def ==(other); end + + # source://rdoc//lib/rdoc/markup/table.rb#19 + def accept(visitor); end + + # Returns the value of attribute align. + # + # source://rdoc//lib/rdoc/markup/table.rb#6 + def align; end + + # Sets the attribute align + # + # @param value the value to set the attribute align to. + # + # source://rdoc//lib/rdoc/markup/table.rb#6 + def align=(_arg0); end + + # Returns the value of attribute body. + # + # source://rdoc//lib/rdoc/markup/table.rb#6 + def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://rdoc//lib/rdoc/markup/table.rb#6 + def body=(_arg0); end + + # Returns the value of attribute header. + # + # source://rdoc//lib/rdoc/markup/table.rb#6 + def header; end + + # Sets the attribute header + # + # @param value the value to set the attribute header to. + # + # source://rdoc//lib/rdoc/markup/table.rb#6 + def header=(_arg0); end + + # source://rdoc//lib/rdoc/markup/table.rb#23 + def pretty_print(q); end +end + +# Outputs RDoc markup with vibrant ANSI color! +# +# source://rdoc//lib/rdoc/markup/to_ansi.rb#5 +class RDoc::Markup::ToAnsi < ::RDoc::Markup::ToRdoc + # Creates a new ToAnsi visitor that is ready to output vibrant ANSI color! + # + # @return [ToAnsi] a new instance of ToAnsi + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#10 + def initialize(markup = T.unsafe(nil)); end + + # Overrides indent width to ensure output lines up correctly. + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#31 + def accept_list_item_end(list_item); end + + # Adds coloring to note and label list items + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#55 + def accept_list_item_start(list_item); end + + # Maps attributes to ANSI sequences + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#22 + def init_tags; end + + # Starts accepting with a reset screen + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#87 + def start_accepting; end +end + +# Outputs RDoc markup with hot backspace action! You will probably need a +# pager to use this output format. +# +# This formatter won't work on 1.8.6 because it lacks String#chars. +# +# source://rdoc//lib/rdoc/markup/to_bs.rb#8 +class RDoc::Markup::ToBs < ::RDoc::Markup::ToRdoc + # Returns a new ToBs that is ready for hot backspace action! + # + # @return [ToBs] a new instance of ToBs + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#13 + def initialize(markup = T.unsafe(nil)); end + + # Makes heading text bold. + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#33 + def accept_heading(heading); end + + # Turns on or off regexp handling for +convert_string+ + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#46 + def annotate(tag); end + + # Calls convert_string on the result of convert_regexp_handling + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#59 + def convert_regexp_handling(target); end + + # Adds bold or underline mixed with backspaces + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#66 + def convert_string(string); end + + # Sets a flag that is picked up by #annotate to do the right thing in + # #convert_string + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#24 + def init_tags; end +end + +# Outputs RDoc markup as HTML. +# +# source://rdoc//lib/rdoc/markup/to_html.rb#7 +class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter + include ::RDoc::Text + + # Creates a new formatter that will output HTML + # + # @return [ToHtml] a new instance of ToHtml + # + # source://rdoc//lib/rdoc/markup/to_html.rb#45 + def initialize(options, markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#288 + def accept_blank_line(blank_line); end + + # Adds +block_quote+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#189 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output. The headings greater than 6 are trimmed to + # level 6. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#296 + def accept_heading(heading); end + + # Finishes consumption of +list+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#259 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#281 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#270 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#250 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#202 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#317 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#243 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#324 + def accept_table(header, body, aligns); end + + # Adds +verbatim+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#213 + def accept_verbatim(verbatim); end + + # The RDoc::CodeObject HTML is being generated for. This is used to + # generate namespaced URI fragments + # + # source://rdoc//lib/rdoc/markup/to_html.rb#33 + def code_object; end + + # The RDoc::CodeObject HTML is being generated for. This is used to + # generate namespaced URI fragments + # + # source://rdoc//lib/rdoc/markup/to_html.rb#33 + def code_object=(_arg0); end + + # CGI-escapes +text+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#349 + def convert_string(text); end + + # Returns the generated output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#182 + def end_accepting; end + + # Path to this document for relative links + # + # source://rdoc//lib/rdoc/markup/to_html.rb#38 + def from_path; end + + # Path to this document for relative links + # + # source://rdoc//lib/rdoc/markup/to_html.rb#38 + def from_path=(_arg0); end + + # Generate a link to +url+ with content +text+. Handles the special cases + # for img: and link: described under handle_regexp_HYPERLINK + # + # source://rdoc//lib/rdoc/markup/to_html.rb#357 + def gen_url(url, text); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#84 + def handle_RDOCLINK(url); end + + # +target+ is a
+ # + # source://rdoc//lib/rdoc/markup/to_html.rb#109 + def handle_regexp_HARD_BREAK(target); end + + # +target+ is a potential link. The following schemes are handled: + # + # mailto::: + # Inserted as-is. + # http::: + # Links are checked to see if they reference an image. If so, that image + # gets inserted using an tag. Otherwise a conventional + # is used. + # link::: + # Reference to a local file relative to the output directory. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#125 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # + # For the +rdoc-ref+ scheme the named reference will be returned without + # creating a link. + # + # For the +rdoc-label+ scheme the footnote and label prefixes are stripped + # when creating a link. All other contents will be linked verbatim. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#140 + def handle_regexp_RDOCLINK(target); end + + # This +target+ is a link where the label is different from the URL + # label[url] or {long label}[url] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#148 + def handle_regexp_TIDYLINK(target); end + + # Determines the HTML list element for +list_type+ and +open_tag+ + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#382 + def html_list_name(list_type, open_tag); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#26 + def in_list_entry; end + + # Adds regexp handlings about link notations. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#79 + def init_link_notation_regexp_handlings; end + + # Adds regexp handlings. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#69 + def init_regexp_handlings; end + + # Maps attributes to HTML tags + # + # source://rdoc//lib/rdoc/markup/to_html.rb#391 + def init_tags; end + + # source://rdoc//lib/rdoc/markup/to_html.rb#27 + def list; end + + # Returns the HTML end-tag for +list_type+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#417 + def list_end_for(list_type); end + + # Returns the HTML tag for +list_type+, possible using a label from + # +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#401 + def list_item_start(list_item, list_type); end + + # Returns true if text is valid ruby syntax + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#431 + def parseable?(text); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#25 + def res; end + + # Prepares the visitor for HTML generation + # + # source://rdoc//lib/rdoc/markup/to_html.rb#173 + def start_accepting; end + + # Converts +item+ to HTML using RDoc::Text#to_html + # + # source://rdoc//lib/rdoc/markup/to_html.rb#443 + def to_html(item); end +end + +# :section: Regexp Handling +# +# These methods are used by regexp handling markup added by RDoc::Markup#add_regexp_handling. +# +# source://rdoc//lib/rdoc/markup/to_html.rb#64 +RDoc::Markup::ToHtml::URL_CHARACTERS_REGEXP_STR = T.let(T.unsafe(nil), String) + +# Subclass of the RDoc::Markup::ToHtml class that supports looking up method +# names, classes, etc to create links. RDoc::CrossReference is used to +# generate those links based on the current context. +# +# source://rdoc//lib/rdoc/markup/to_html_crossref.rb#7 +class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml + # Creates a new crossref resolver that generates links relative to +context+ + # which lives at +from_path+ in the generated files. '#' characters on + # references are removed unless +show_hash+ is true. Only method names + # preceded by '#' or '::' are linked, unless +hyperlink_all+ is true. + # + # @raise [ArgumentError] + # @return [ToHtmlCrossref] a new instance of ToHtmlCrossref + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#32 + def initialize(options, from_path, context, markup = T.unsafe(nil)); end + + # RDoc::CodeObject for generating references + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 + def context; end + + # RDoc::CodeObject for generating references + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 + def context=(_arg0); end + + # Creates a link to the reference +name+ if the name exists. If +text+ is + # given it is used as the link text, otherwise +name+ is used. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#60 + def cross_reference(name, text = T.unsafe(nil), code = T.unsafe(nil)); end + + # Generates links for rdoc-ref: scheme URLs and allows + # RDoc::Markup::ToHtml to handle other schemes. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#130 + def gen_url(url, text); end + + # We're invoked when any text matches the CROSSREF pattern. If we find the + # corresponding reference, generate a link. If the name we're looking for + # contains no punctuation, we look for it up the module/class chain. For + # example, ToHtml is found, even without the RDoc::Markup:: prefix, + # because we look for it in module Markup first. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#82 + def handle_regexp_CROSSREF(target); end + + # Handles rdoc-ref: scheme links and allows RDoc::Markup::ToHtml to + # handle other schemes. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#101 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # For the rdoc-ref scheme the cross-reference will be looked up and the + # given name will be used. + # + # All other contents are handled by + # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK] + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#115 + def handle_regexp_RDOCLINK(target); end + + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#45 + def init_link_notation_regexp_handlings; end + + # Creates an HTML link to +name+ with the given +text+. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#140 + def link(name, text, code = T.unsafe(nil)); end + + # Should we show '#' characters on method references? + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 + def show_hash; end + + # Should we show '#' characters on method references? + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 + def show_hash=(_arg0); end +end + +# Outputs RDoc markup as paragraphs with inline markup only. +# +# source://rdoc//lib/rdoc/markup/to_html_snippet.rb#5 +class RDoc::Markup::ToHtmlSnippet < ::RDoc::Markup::ToHtml + # Creates a new ToHtmlSnippet formatter that will cut off the input on the + # next word boundary after the given number of +characters+ or +paragraphs+ + # of text have been encountered. + # + # @return [ToHtmlSnippet] a new instance of ToHtmlSnippet + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#37 + def initialize(options, characters = T.unsafe(nil), paragraphs = T.unsafe(nil), markup = T.unsafe(nil)); end + + # Adds +heading+ to the output as a paragraph + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#53 + def accept_heading(heading); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#82 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#88 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#95 + def accept_list_start(list); end + + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#69 + def accept_paragraph(paragraph); end + + # Raw sections are untrusted and ignored + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # Rules are ignored + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # Adds +verbatim+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#104 + def accept_verbatim(verbatim); end + + # Throws +:done+ when paragraph_limit paragraphs have been encountered + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#195 + def add_paragraph; end + + # After this many characters the input will be cut off. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#10 + def character_limit; end + + # The number of characters seen so far. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#15 + def characters; end + + # Marks up +content+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#204 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#215 + def convert_flow(flow); end + + # Returns just the text of +link+, +url+ is only used to determine the link + # type. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#168 + def gen_url(url, text); end + + # Removes escaping from the cross-references in +target+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#128 + def handle_regexp_CROSSREF(target); end + + # +target+ is a
+ # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#135 + def handle_regexp_HARD_BREAK(target); end + + # In snippets, there are no lists + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#188 + def html_list_name(list_type, open_tag); end + + # Lists are paragraphs, but notes and labels have a separator + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#143 + def list_item_start(list_item, list_type); end + + # The attribute bitmask + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#20 + def mask; end + + # Maintains a bitmask to allow HTML elements to be closed properly. See + # RDoc::Markup::Formatter. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#261 + def off_tags(res, item); end + + # Maintains a bitmask to allow HTML elements to be closed properly. See + # RDoc::Markup::Formatter. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#251 + def on_tags(res, item); end + + # After this many paragraphs the input will be cut off. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#25 + def paragraph_limit; end + + # Count of paragraphs found + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#30 + def paragraphs; end + + # Prepares the visitor for HTML snippet generation + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#119 + def start_accepting; end + + # Truncates +text+ at the end of the first word after the character_limit. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#270 + def truncate(text); end +end + +# Joins the parts of an RDoc::Markup::Paragraph into a single String. +# +# This allows for easier maintenance and testing of Markdown support. +# +# This formatter only works on Paragraph instances. Attempting to process +# other markup syntax items will not work. +# +# source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#10 +class RDoc::Markup::ToJoinedParagraph < ::RDoc::Markup::Formatter + # @return [ToJoinedParagraph] a new instance of ToJoinedParagraph + # + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#12 + def initialize; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # Converts the parts of +paragraph+ to a single entry. + # + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#25 + def accept_paragraph(paragraph); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#19 + def end_accepting; end + + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#16 + def start_accepting; end +end + +# Creates HTML-safe labels suitable for use in id attributes. Tidylinks are +# converted to their link part and cross-reference links have the suppression +# marks removed (\\SomeClass is converted to SomeClass). +# +# source://rdoc//lib/rdoc/markup/to_label.rb#9 +class RDoc::Markup::ToLabel < ::RDoc::Markup::Formatter + # Creates a new formatter that will output HTML-safe labels + # + # @return [ToLabel] a new instance of ToLabel + # + # source://rdoc//lib/rdoc/markup/to_label.rb#16 + def initialize(markup = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # Converts +text+ to an HTML-safe label + # + # source://rdoc//lib/rdoc/markup/to_label.rb#32 + def convert(text); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def end_accepting(*node); end + + # Converts the CROSSREF +target+ to plain text, removing the suppression + # marker, if any + # + # source://rdoc//lib/rdoc/markup/to_label.rb#42 + def handle_regexp_CROSSREF(target); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def handle_regexp_HARD_BREAK(*node); end + + # Converts the TIDYLINK +target+ to just the text part + # + # source://rdoc//lib/rdoc/markup/to_label.rb#51 + def handle_regexp_TIDYLINK(target); end + + # source://rdoc//lib/rdoc/markup/to_label.rb#11 + def res; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def start_accepting(*node); end +end + +# Outputs parsed markup as Markdown +# +# source://rdoc//lib/rdoc/markup/to_markdown.rb#7 +class RDoc::Markup::ToMarkdown < ::RDoc::Markup::ToRdoc + # Creates a new formatter that will output Markdown format text + # + # @return [ToMarkdown] a new instance of ToMarkdown + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#12 + def initialize(markup = T.unsafe(nil)); end + + # Finishes consumption of `list` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#47 + def accept_list_end(list); end + + # Finishes consumption of `list_item` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#56 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming `list_item` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#75 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming `list` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#100 + def accept_list_start(list); end + + # Adds `rule` to the output + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#117 + def accept_rule(rule); end + + # Outputs `verbatim` indented 4 columns + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#126 + def accept_verbatim(verbatim); end + + # Creates a Markdown-style URL from +url+ with +text+. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#140 + def gen_url(url, text); end + + # Handles rdoc- type links for footnotes. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#149 + def handle_rdoc_link(url); end + + # Adds a newline to the output + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#40 + def handle_regexp_HARD_BREAK(target); end + + # Converts the rdoc-...: links into a Markdown.style links. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#187 + def handle_regexp_RDOCLINK(target); end + + # Converts the RDoc markup tidylink into a Markdown.style link. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#169 + def handle_regexp_TIDYLINK(target); end + + # Maps attributes to HTML sequences + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#31 + def init_tags; end +end + +# Outputs RDoc markup as RDoc markup! (mostly) +# +# source://rdoc//lib/rdoc/markup/to_rdoc.rb#5 +class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter + # Creates a new formatter that will output (mostly) \RDoc markup + # + # @return [ToRdoc] a new instance of ToRdoc + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#45 + def initialize(markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#77 + def accept_blank_line(blank_line); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#84 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#99 + def accept_heading(heading); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#203 + def accept_indented_paragraph(paragraph); end + + # Finishes consumption of +list+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#110 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#119 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#143 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#168 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#195 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#213 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#220 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#243 + def accept_table(header, body, aligns); end + + # Outputs +verbatim+ indented 2 columns + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#229 + def accept_verbatim(verbatim); end + + # Applies attribute-specific markup to +text+ using RDoc::AttributeManager + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#271 + def attributes(text); end + + # Returns the generated output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#279 + def end_accepting; end + + # Adds a newline to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#295 + def handle_regexp_HARD_BREAK(target); end + + # Removes preceding \\ from the suppressed crossref +target+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#286 + def handle_regexp_SUPPRESSED_CROSSREF(target); end + + # Current indent amount for output in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 + def indent; end + + # Current indent amount for output in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 + def indent=(_arg0); end + + # Maps attributes to HTML sequences + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#68 + def init_tags; end + + # Stack of current list indexes for alphabetic and numeric lists + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#20 + def list_index; end + + # Stack of list types + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#25 + def list_type; end + + # Stack of list widths for indentation + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#30 + def list_width; end + + # Prefix for the next list item. See #use_prefix + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#35 + def prefix; end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#40 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#302 + def start_accepting; end + + # Adds the stored #prefix to the output and clears it. Lists generate a + # prefix for later consumption. + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#316 + def use_prefix; end + + # Output width in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 + def width; end + + # Output width in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 + def width=(_arg0); end + + # Wraps +text+ to #width + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#326 + def wrap(text); end +end + +# Extracts just the RDoc::Markup::Heading elements from a +# RDoc::Markup::Document to help build a table of contents +# +# source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#6 +class RDoc::Markup::ToTableOfContents < ::RDoc::Markup::Formatter + # @return [ToTableOfContents] a new instance of ToTableOfContents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#27 + def initialize; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # Adds +document+ to the output, using its heading cutoff if present + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#36 + def accept_document(document); end + + # Adds +heading+ to the table of contents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#45 + def accept_heading(heading); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end_bullet(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # Returns the table of contents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#52 + def end_accepting; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 + def omit_headings_below; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 + def omit_headings_below=(_arg0); end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#20 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#59 + def start_accepting; end + + # Returns true if +heading+ is below the display threshold + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#67 + def suppressed?(heading); end + + class << self + # Singleton for table-of-contents generation + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#13 + def to_toc; end + end +end + +# This Markup outputter is used for testing purposes. +# +# source://rdoc//lib/rdoc/markup/to_test.rb#5 +class RDoc::Markup::ToTest < ::RDoc::Markup::Formatter + # source://rdoc//lib/rdoc/markup/to_test.rb#55 + def accept_blank_line(blank_line); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#59 + def accept_heading(heading); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#44 + def accept_list_end(list); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#52 + def accept_list_item_end(list_item); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#48 + def accept_list_item_start(list_item); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#33 + def accept_list_start(list); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#21 + def accept_paragraph(paragraph); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#25 + def accept_raw(raw); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#63 + def accept_rule(rule); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#29 + def accept_verbatim(verbatim); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#17 + def end_accepting; end + + # :section: Visitor + # + # source://rdoc//lib/rdoc/markup/to_test.rb#12 + def start_accepting; end +end + +# Extracts sections of text enclosed in plus, tt or code. Used to discover +# undocumented parameters. +# +# source://rdoc//lib/rdoc/markup/to_tt_only.rb#6 +class RDoc::Markup::ToTtOnly < ::RDoc::Markup::Formatter + # Creates a new tt-only formatter. + # + # @return [ToTtOnly] a new instance of ToTtOnly + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#21 + def initialize(markup = T.unsafe(nil)); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_blank_line(markup_item); end + + # Adds tts from +block_quote+ to the output + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#30 + def accept_block_quote(block_quote); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_heading(markup_item); end + + # Pops the list type for +list+ from #list_type + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#37 + def accept_list_end(list); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_list_item_end(markup_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#51 + def accept_list_item_start(list_item); end + + # Pushes the list type for +list+ onto #list_type + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#44 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#63 + def accept_paragraph(paragraph); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_raw(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_rule(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_verbatim(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def do_nothing(markup_item); end + + # Returns an Array of items that were wrapped in plus, tt or code. + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#107 + def end_accepting; end + + # Stack of list types + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#11 + def list_type; end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#16 + def res; end + + # Prepares the visitor for gathering tt sections + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#114 + def start_accepting; end + + # Extracts tt sections from +text+ + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#84 + def tt_sections(text); end +end + +# A section of verbatim text +# +# source://rdoc//lib/rdoc/markup/verbatim.rb#5 +class RDoc::Markup::Verbatim < ::RDoc::Markup::Raw + # @return [Verbatim] a new instance of Verbatim + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#12 + def initialize(*parts); end + + # source://rdoc//lib/rdoc/markup/verbatim.rb#18 + def ==(other); end + + # Calls #accept_verbatim on +visitor+ + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#25 + def accept(visitor); end + + # Format of this verbatim section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 + def format; end + + # Format of this verbatim section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 + def format=(_arg0); end + + # Collapses 3+ newlines into two newlines + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#32 + def normalize; end + + # source://rdoc//lib/rdoc/markup/verbatim.rb#53 + def pretty_print(q); end + + # Is this verbatim section Ruby code? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#71 + def ruby?; end + + # The text of the section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#79 + def text; end +end + +# Abstract class representing either a method or an attribute. +# +# source://rdoc//lib/rdoc/method_attr.rb#5 +class RDoc::MethodAttr < ::RDoc::CodeObject + include ::Comparable + + # Creates a new MethodAttr from token stream +text+ and method or attribute + # name +name+. + # + # Usually this is called by super from a subclass. + # + # @return [MethodAttr] a new instance of MethodAttr + # + # source://rdoc//lib/rdoc/method_attr.rb#78 + def initialize(text, name); end + + # Order by #singleton then #name + # + # source://rdoc//lib/rdoc/method_attr.rb#113 + def <=>(other); end + + # source://rdoc//lib/rdoc/method_attr.rb#121 + def ==(other); end + + # Abstract method. Contexts in their building phase call this + # to register a new alias for this known method/attribute. + # + # - creates a new AnyMethod/Attribute named an_alias.new_name; + # - adds +self+ as an alias for the new method or attribute + # - adds the method or attribute to #aliases + # - adds the method or attribute to +context+. + # + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/method_attr.rb#209 + def add_alias(an_alias, context); end + + # Prepend +src+ with line numbers. Relies on the first line of a source + # code listing having: + # + # # File xxxxx, line dddd + # + # If it has this comment then line numbers are added to +src+ and the , + # line dddd portion of the comment is removed. + # + # source://rdoc//lib/rdoc/generator/markup.rb#77 + def add_line_numbers(src); end + + # Array of other names for this method/attribute + # + # source://rdoc//lib/rdoc/method_attr.rb#32 + def aliases; end + + # HTML fragment reference for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#216 + def aref; end + + # Prefix for +aref+, defined by subclasses. + # + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/method_attr.rb#225 + def aref_prefix; end + + # The call_seq or the param_seq with method name, if there is no call_seq. + # + # source://rdoc//lib/rdoc/method_attr.rb#64 + def arglists; end + + # Parameters yielded by the called block + # + # source://rdoc//lib/rdoc/method_attr.rb#49 + def block_params; end + + # Attempts to sanitize the content passed by the Ruby parser: + # remove outer parentheses, etc. + # + # source://rdoc//lib/rdoc/method_attr.rb#233 + def block_params=(value); end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/method_attr.rb#59 + def call_seq; end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/method_attr.rb#59 + def call_seq=(_arg0); end + + # A method/attribute is documented if any of the following is true: + # - it has a comment; + # - it is an alias for a documented method; + # - it has a +#see+ method that is documented. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/method_attr.rb#132 + def documented?; end + + # source://rdoc//lib/rdoc/method_attr.rb#178 + def find_method_or_attribute(name); end + + # source://rdoc//lib/rdoc/method_attr.rb#166 + def find_see; end + + # Full method/attribute name including namespace + # + # source://rdoc//lib/rdoc/method_attr.rb#300 + def full_name; end + + # HTML id-friendly method/attribute name + # + # source://rdoc//lib/rdoc/method_attr.rb#291 + def html_name; end + + # source://rdoc//lib/rdoc/method_attr.rb#105 + def initialize_visibility; end + + # source://rdoc//lib/rdoc/method_attr.rb#304 + def inspect; end + + # The method/attribute we're aliasing + # + # source://rdoc//lib/rdoc/method_attr.rb#37 + def is_alias_for; end + + # The method/attribute we're aliasing + # + # source://rdoc//lib/rdoc/method_attr.rb#37 + def is_alias_for=(_arg0); end + + # Turns the method's token stream into HTML. + # + # Prepends line numbers if +options.line_numbers+ is true. + # + # source://rdoc//lib/rdoc/generator/markup.rb#101 + def markup_code; end + + # Name of this method/attribute. + # + # source://rdoc//lib/rdoc/method_attr.rb#12 + def name; end + + # Name of this method/attribute. + # + # source://rdoc//lib/rdoc/method_attr.rb#12 + def name=(_arg0); end + + # '::' for a class method/attribute, '#' for an instance method. + # + # source://rdoc//lib/rdoc/method_attr.rb#319 + def name_prefix; end + + # Name for output to HTML. For class methods the full name with a "." is + # used like +SomeClass.method_name+. For instance methods the class name is + # used if +context+ does not match the parent. + # + # This is to help prevent people from using :: to call class methods. + # + # source://rdoc//lib/rdoc/method_attr.rb#330 + def output_name(context); end + + # Pretty parameter list for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#69 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#54 + def params; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#54 + def params=(_arg0); end + + # Name of our parent with special handling for un-marshaled methods + # + # source://rdoc//lib/rdoc/method_attr.rb#360 + def parent_name; end + + # Path to this method for use with HTML generator output. + # + # source://rdoc//lib/rdoc/method_attr.rb#353 + def path; end + + # Method/attribute name with class/instance indicator + # + # source://rdoc//lib/rdoc/method_attr.rb#339 + def pretty_name; end + + # source://rdoc//lib/rdoc/method_attr.rb#364 + def pretty_print(q); end + + # Used by RDoc::Generator::JsonIndex to create a record for the search + # engine. + # + # source://rdoc//lib/rdoc/method_attr.rb#398 + def search_record; end + + # A method/attribute to look at, + # in particular if this method/attribute has no documentation. + # + # It can be a method/attribute of the superclass or of an included module, + # including the Kernel module, which is always appended to the included + # modules. + # + # Returns +nil+ if there is no such method/attribute. + # The +#is_alias_for+ method/attribute, if any, is not included. + # + # Templates may generate a "see also ..." if this method/attribute + # has documentation, and "see ..." if it does not. + # + # source://rdoc//lib/rdoc/method_attr.rb#152 + def see; end + + # Is this a singleton method/attribute? + # + # source://rdoc//lib/rdoc/method_attr.rb#22 + def singleton; end + + # Is this a singleton method/attribute? + # + # source://rdoc//lib/rdoc/method_attr.rb#22 + def singleton=(_arg0); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/method_attr.rb#160 + def store=(store); end + + # Source file token stream + # + # source://rdoc//lib/rdoc/method_attr.rb#27 + def text; end + + # source://rdoc//lib/rdoc/method_attr.rb#410 + def to_s; end + + # Type of method/attribute (class or instance) + # + # source://rdoc//lib/rdoc/method_attr.rb#346 + def type; end + + # public, protected, private + # + # source://rdoc//lib/rdoc/method_attr.rb#17 + def visibility; end + + # public, protected, private + # + # source://rdoc//lib/rdoc/method_attr.rb#17 + def visibility=(_arg0); end + + private + + # Resets cached data for the object so it can be rebuilt by accessor methods + # + # source://rdoc//lib/rdoc/method_attr.rb#101 + def initialize_copy(other); end +end + +# A Mixin adds features from a module into another context. RDoc::Include and +# RDoc::Extend are both mixins. +# +# source://rdoc//lib/rdoc/mixin.rb#6 +class RDoc::Mixin < ::RDoc::CodeObject + # Creates a new Mixin for +name+ with +comment+ + # + # @return [Mixin] a new instance of Mixin + # + # source://rdoc//lib/rdoc/mixin.rb#16 + def initialize(name, comment); end + + # Mixins are sorted by name + # + # source://rdoc//lib/rdoc/mixin.rb#26 + def <=>(other); end + + # source://rdoc//lib/rdoc/mixin.rb#32 + def ==(other); end + + # source://rdoc//lib/rdoc/mixin.rb#32 + def eql?(other); end + + # Full name based on #module + # + # source://rdoc//lib/rdoc/mixin.rb#41 + def full_name; end + + # source://rdoc//lib/rdoc/mixin.rb#46 + def hash; end + + # source://rdoc//lib/rdoc/mixin.rb#50 + def inspect; end + + # Attempts to locate the included module object. Returns the name if not + # known. + # + # The scoping rules of Ruby to resolve the name of an included module are: + # - first look into the children of the current context; + # - if not found, look into the children of included modules, + # in reverse inclusion order; + # - if still not found, go up the hierarchy of names. + # + # This method has O(n!) behavior when the module calling + # include is referencing nonexistent modules. Avoid calling #module until + # after all the files are parsed. This behavior is due to ruby's constant + # lookup behavior. + # + # As of the beginning of October, 2011, no gem includes nonexistent modules. + # + # source://rdoc//lib/rdoc/mixin.rb#75 + def module; end + + # Name of included module + # + # source://rdoc//lib/rdoc/mixin.rb#11 + def name; end + + # Name of included module + # + # source://rdoc//lib/rdoc/mixin.rb#11 + def name=(_arg0); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/mixin.rb#110 + def store=(store); end + + # source://rdoc//lib/rdoc/mixin.rb#116 + def to_s; end +end + +# A normal class, neither singleton nor anonymous +# +# source://rdoc//lib/rdoc/normal_class.rb#5 +class RDoc::NormalClass < ::RDoc::ClassModule + # The ancestors of this class including modules. Unlike Module#ancestors, + # this class is not included in the result. The result will contain both + # RDoc::ClassModules and Strings. + # + # source://rdoc//lib/rdoc/normal_class.rb#12 + def ancestors; end + + # source://rdoc//lib/rdoc/normal_class.rb#24 + def aref_prefix; end + + # The definition of this class, class MyClassName + # + # source://rdoc//lib/rdoc/normal_class.rb#31 + def definition; end + + # source://rdoc//lib/rdoc/normal_class.rb#35 + def direct_ancestors; end + + # source://rdoc//lib/rdoc/normal_class.rb#39 + def inspect; end + + # source://rdoc//lib/rdoc/normal_class.rb#56 + def pretty_print(q); end + + # source://rdoc//lib/rdoc/normal_class.rb#47 + def to_s; end +end + +# A normal module, like NormalClass +# +# source://rdoc//lib/rdoc/normal_module.rb#5 +class RDoc::NormalModule < ::RDoc::ClassModule + # source://rdoc//lib/rdoc/normal_module.rb#7 + def aref_prefix; end + + # The definition of this module, module MyModuleName + # + # source://rdoc//lib/rdoc/normal_module.rb#21 + def definition; end + + # source://rdoc//lib/rdoc/normal_module.rb#11 + def inspect; end + + # This is a module, returns true + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/normal_module.rb#28 + def module?; end + + # source://rdoc//lib/rdoc/normal_module.rb#32 + def pretty_print(q); end + + # Modules don't have one, raises NoMethodError + # + # @raise [NoMethodError] + # + # source://rdoc//lib/rdoc/normal_module.rb#69 + def superclass; end +end + +# RDoc::Options handles the parsing and storage of options +# +# == Saved Options +# +# You can save some options like the markup format in the +# .rdoc_options file in your gem. The easiest way to do this is: +# +# rdoc --markup tomdoc --write-options +# +# Which will automatically create the file and fill it with the options you +# specified. +# +# The following options will not be saved since they interfere with the user's +# preferences or with the normal operation of RDoc: +# +# * +--coverage-report+ +# * +--dry-run+ +# * +--encoding+ +# * +--force-update+ +# * +--format+ +# * +--pipe+ +# * +--quiet+ +# * +--template+ +# * +--verbose+ +# +# == Custom Options +# +# Generators can hook into RDoc::Options to add generator-specific command +# line options. +# +# When --format is encountered in ARGV, RDoc calls ::setup_options on +# the generator class to add extra options to the option parser. Options for +# custom generators must occur after --format. rdoc --help +# will list options for all installed generators. +# +# Example: +# +# class RDoc::Generator::Spellcheck +# RDoc::RDoc.add_generator self +# +# def self.setup_options rdoc_options +# op = rdoc_options.option_parser +# +# op.on('--spell-dictionary DICTIONARY', +# RDoc::Options::Path) do |dictionary| +# rdoc_options.spell_dictionary = dictionary +# end +# end +# end +# +# Of course, RDoc::Options does not respond to +spell_dictionary+ by default +# so you will need to add it: +# +# class RDoc::Options +# +# ## +# # The spell dictionary used by the spell-checking plugin. +# +# attr_accessor :spell_dictionary +# +# end +# +# == Option Validators +# +# OptionParser validators will validate and cast user input values. In +# addition to the validators that ship with OptionParser (String, Integer, +# Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), +# RDoc::Options adds Path, PathArray and Template. +# +# source://rdoc//lib/rdoc/options.rb#75 +class RDoc::Options + # @return [Options] a new instance of Options + # + # source://rdoc//lib/rdoc/options.rb#346 + def initialize(loaded_options = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/options.rb#459 + def ==(other); end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//lib/rdoc/options.rb#151 + def charset; end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//lib/rdoc/options.rb#151 + def charset=(_arg0); end + + # Check that the files on the command line exist + # + # source://rdoc//lib/rdoc/options.rb#483 + def check_files; end + + # Ensure only one generator is loaded + # + # source://rdoc//lib/rdoc/options.rb#504 + def check_generator; end + + # If true, only report on undocumented files + # + # source://rdoc//lib/rdoc/options.rb#243 + def coverage_report; end + + # If true, only report on undocumented files + # + # source://rdoc//lib/rdoc/options.rb#243 + def coverage_report=(_arg0); end + + # Set the title, but only if not already set. Used to set the title + # from a source file, so that a title set from the command line + # will have the priority. + # + # source://rdoc//lib/rdoc/options.rb#516 + def default_title=(string); end + + # If true, RDoc will not write any files. + # + # source://rdoc//lib/rdoc/options.rb#156 + def dry_run; end + + # If true, RDoc will not write any files. + # + # source://rdoc//lib/rdoc/options.rb#156 + def dry_run=(_arg0); end + + # The output encoding. All input files will be transcoded to this encoding. + # + # The default encoding is UTF-8. This is set via --encoding. + # + # source://rdoc//lib/rdoc/options.rb#163 + def encoding; end + + # The output encoding. All input files will be transcoded to this encoding. + # + # The default encoding is UTF-8. This is set via --encoding. + # + # source://rdoc//lib/rdoc/options.rb#163 + def encoding=(_arg0); end + + # Create a regexp for #exclude + # + # source://rdoc//lib/rdoc/options.rb#544 + def exclude; end + + # Files matching this pattern will be excluded + # + # source://rdoc//lib/rdoc/options.rb#168 + def exclude=(_arg0); end + + # The list of files to be processed + # + # source://rdoc//lib/rdoc/options.rb#173 + def files; end + + # The list of files to be processed + # + # source://rdoc//lib/rdoc/options.rb#173 + def files=(_arg0); end + + # Completes any unfinished option setup business such as filtering for + # existent files, creating a regexp for #exclude and setting a default + # #template. + # + # source://rdoc//lib/rdoc/options.rb#560 + def finish; end + + # Fixes the page_dir to be relative to the root_dir and adds the page_dir to + # the files list. + # + # source://rdoc//lib/rdoc/options.rb#600 + def finish_page_dir; end + + # Create the output even if the output directory does not look + # like an rdoc output directory + # + # source://rdoc//lib/rdoc/options.rb#179 + def force_output; end + + # Create the output even if the output directory does not look + # like an rdoc output directory + # + # source://rdoc//lib/rdoc/options.rb#179 + def force_output=(_arg0); end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//lib/rdoc/options.rb#184 + def force_update; end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//lib/rdoc/options.rb#184 + def force_update=(_arg0); end + + # Formatter to mark up text with + # + # source://rdoc//lib/rdoc/options.rb#189 + def formatter; end + + # Formatter to mark up text with + # + # source://rdoc//lib/rdoc/options.rb#189 + def formatter=(_arg0); end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//lib/rdoc/options.rb#194 + def generator; end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//lib/rdoc/options.rb#194 + def generator=(_arg0); end + + # Returns a properly-space list of generators and their descriptions. + # + # source://rdoc//lib/rdoc/options.rb#619 + def generator_descriptions; end + + # For #== + # + # source://rdoc//lib/rdoc/options.rb#199 + def generator_name; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//lib/rdoc/options.rb#205 + def generator_options; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//lib/rdoc/options.rb#205 + def generator_options=(_arg0); end + + # Old rdoc behavior: hyperlink all words that match a method name, + # even if not preceded by '#' or '::' + # + # source://rdoc//lib/rdoc/options.rb#211 + def hyperlink_all; end + + # Old rdoc behavior: hyperlink all words that match a method name, + # even if not preceded by '#' or '::' + # + # source://rdoc//lib/rdoc/options.rb#211 + def hyperlink_all=(_arg0); end + + # source://rdoc//lib/rdoc/options.rb#351 + def init_ivars; end + + # source://rdoc//lib/rdoc/options.rb#396 + def init_with(map); end + + # Include line numbers in the source code + # + # source://rdoc//lib/rdoc/options.rb#216 + def line_numbers; end + + # Include line numbers in the source code + # + # source://rdoc//lib/rdoc/options.rb#216 + def line_numbers=(_arg0); end + + # The output locale. + # + # source://rdoc//lib/rdoc/options.rb#221 + def locale; end + + # The output locale. + # + # source://rdoc//lib/rdoc/options.rb#221 + def locale=(_arg0); end + + # The directory where locale data live. + # + # source://rdoc//lib/rdoc/options.rb#226 + def locale_dir; end + + # The directory where locale data live. + # + # source://rdoc//lib/rdoc/options.rb#226 + def locale_dir=(_arg0); end + + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + # + # source://rdoc//lib/rdoc/options.rb#232 + def main_page; end + + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + # + # source://rdoc//lib/rdoc/options.rb#232 + def main_page=(_arg0); end + + # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' + # and 'rd' are also built-in. + # + # source://rdoc//lib/rdoc/options.rb#238 + def markup; end + + # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' + # and 'rd' are also built-in. + # + # source://rdoc//lib/rdoc/options.rb#238 + def markup=(_arg0); end + + # The name of the output directory + # + # source://rdoc//lib/rdoc/options.rb#248 + def op_dir; end + + # The name of the output directory + # + # source://rdoc//lib/rdoc/options.rb#248 + def op_dir=(_arg0); end + + # The OptionParser for this instance + # + # source://rdoc//lib/rdoc/options.rb#253 + def option_parser; end + + # The OptionParser for this instance + # + # source://rdoc//lib/rdoc/options.rb#253 + def option_parser=(_arg0); end + + # Output heading decorations? + # + # source://rdoc//lib/rdoc/options.rb#257 + def output_decoration; end + + # Output heading decorations? + # + # source://rdoc//lib/rdoc/options.rb#257 + def output_decoration=(_arg0); end + + # source://rdoc//lib/rdoc/options.rb#427 + def override(map); end + + # Directory where guides, FAQ, and other pages not associated with a class + # live. You may leave this unset if these are at the root of your project. + # + # source://rdoc//lib/rdoc/options.rb#263 + def page_dir; end + + # Directory where guides, FAQ, and other pages not associated with a class + # live. You may leave this unset if these are at the root of your project. + # + # source://rdoc//lib/rdoc/options.rb#263 + def page_dir=(_arg0); end + + # Parses command line options. + # + # source://rdoc//lib/rdoc/options.rb#645 + def parse(argv); end + + # Is RDoc in pipe mode? + # + # source://rdoc//lib/rdoc/options.rb#268 + def pipe; end + + # Is RDoc in pipe mode? + # + # source://rdoc//lib/rdoc/options.rb#268 + def pipe=(_arg0); end + + # Don't display progress as we process the files + # + # source://rdoc//lib/rdoc/options.rb#1190 + def quiet; end + + # Set quietness to +bool+ + # + # source://rdoc//lib/rdoc/options.rb#1197 + def quiet=(bool); end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//lib/rdoc/options.rb#273 + def rdoc_include; end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//lib/rdoc/options.rb#273 + def rdoc_include=(_arg0); end + + # Root of the source documentation will be generated for. Set this when + # building documentation outside the source directory. Defaults to the + # current directory. + # + # source://rdoc//lib/rdoc/options.rb#280 + def root; end + + # Root of the source documentation will be generated for. Set this when + # building documentation outside the source directory. Defaults to the + # current directory. + # + # source://rdoc//lib/rdoc/options.rb#280 + def root=(_arg0); end + + # Removes directories from +path+ that are outside the current directory + # + # source://rdoc//lib/rdoc/options.rb#1204 + def sanitize_path(path); end + + # Set up an output generator for the named +generator_name+. + # + # If the found generator responds to :setup_options it will be called with + # the options instance. This allows generators to add custom options or set + # default options. + # + # source://rdoc//lib/rdoc/options.rb#1231 + def setup_generator(generator_name = T.unsafe(nil)); end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//lib/rdoc/options.rb#285 + def show_hash; end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//lib/rdoc/options.rb#285 + def show_hash=(_arg0); end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//lib/rdoc/options.rb#344 + def skip_tests; end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//lib/rdoc/options.rb#344 + def skip_tests=(_arg0); end + + # Directory to copy static files from + # + # source://rdoc//lib/rdoc/options.rb#290 + def static_path; end + + # Directory to copy static files from + # + # source://rdoc//lib/rdoc/options.rb#290 + def static_path=(_arg0); end + + # The number of columns in a tab + # + # source://rdoc//lib/rdoc/options.rb#295 + def tab_width; end + + # The number of columns in a tab + # + # source://rdoc//lib/rdoc/options.rb#295 + def tab_width=(_arg0); end + + # Template to be used when generating output + # + # source://rdoc//lib/rdoc/options.rb#300 + def template; end + + # Template to be used when generating output + # + # source://rdoc//lib/rdoc/options.rb#300 + def template=(_arg0); end + + # Directory the template lives in + # + # source://rdoc//lib/rdoc/options.rb#305 + def template_dir; end + + # Directory the template lives in + # + # source://rdoc//lib/rdoc/options.rb#305 + def template_dir=(_arg0); end + + # Finds the template dir for +template+ + # + # source://rdoc//lib/rdoc/options.rb#1253 + def template_dir_for(template); end + + # Additional template stylesheets + # + # source://rdoc//lib/rdoc/options.rb#310 + def template_stylesheets; end + + # Additional template stylesheets + # + # source://rdoc//lib/rdoc/options.rb#310 + def template_stylesheets=(_arg0); end + + # Documentation title + # + # source://rdoc//lib/rdoc/options.rb#315 + def title; end + + # Documentation title + # + # source://rdoc//lib/rdoc/options.rb#315 + def title=(_arg0); end + + # For dumping YAML + # + # source://rdoc//lib/rdoc/options.rb#523 + def to_yaml(*options); end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//lib/rdoc/options.rb#320 + def update_output_dir; end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//lib/rdoc/options.rb#320 + def update_output_dir=(_arg0); end + + # Verbosity, zero means quiet + # + # source://rdoc//lib/rdoc/options.rb#325 + def verbosity; end + + # Verbosity, zero means quiet + # + # source://rdoc//lib/rdoc/options.rb#325 + def verbosity=(_arg0); end + + # Minimum visibility of a documented method. One of +:public+, +:protected+, + # +:private+ or +:nodoc+. + # + # The +:nodoc+ visibility ignores all directives related to visibility. The + # directive. + # + # source://rdoc//lib/rdoc/options.rb#340 + def visibility; end + + # Sets the minimum visibility of a documented method. + # + # Accepts +:public+, +:protected+, +:private+, +:nodoc+, or +:all+. + # + # When +:all+ is passed, visibility is set to +:private+, similarly to + # RDOCOPT="--all", see #visibility for more information. + # + # source://rdoc//lib/rdoc/options.rb#1270 + def visibility=(visibility); end + + # Displays a warning using Kernel#warn if we're being verbose + # + # source://rdoc//lib/rdoc/options.rb#1282 + def warn(message); end + + # URL of web cvs frontend + # + # source://rdoc//lib/rdoc/options.rb#330 + def webcvs; end + + # URL of web cvs frontend + # + # source://rdoc//lib/rdoc/options.rb#330 + def webcvs=(_arg0); end + + # Writes the YAML file .rdoc_options to the current directory containing the + # parsed options. + # + # source://rdoc//lib/rdoc/options.rb#1290 + def write_options; end + + # source://rdoc//lib/rdoc/options.rb#423 + def yaml_initialize(tag, map); end + + class << self + # Loads options from .rdoc_options if the file exists, otherwise creates a + # new RDoc::Options instance. + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/options.rb#1304 + def load_options; end + end +end + +# A parser is simple a class that subclasses RDoc::Parser and implements #scan +# to fill in an RDoc::TopLevel with parsed data. +# +# The initialize method takes an RDoc::TopLevel to fill with parsed content, +# the name of the file to be parsed, the content of the file, an RDoc::Options +# object and an RDoc::Stats object to inform the user of parsed items. The +# scan method is then called to parse the file and must return the +# RDoc::TopLevel object. By calling super these items will be set for you. +# +# In order to be used by RDoc the parser needs to register the file extensions +# it can parse. Use ::parse_files_matching to register extensions. +# +# require 'rdoc' +# +# class RDoc::Parser::Xyz < RDoc::Parser +# parse_files_matching /\.xyz$/ +# +# def initialize top_level, file_name, content, options, stats +# super +# +# # extra initialization if needed +# end +# +# def scan +# # parse file and fill in @top_level +# end +# end +# +# source://rdoc//lib/rdoc/parser.rb#33 +class RDoc::Parser + # Creates a new Parser storing +top_level+, +file_name+, +content+, + # +options+ and +stats+ in instance variables. In +@preprocess+ an + # RDoc::Markup::PreProcess object is created which allows processing of + # directives. + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//lib/rdoc/parser.rb#252 + def initialize(top_level, file_name, content, options, stats); end + + # The name of the file being parsed + # + # source://rdoc//lib/rdoc/parser.rb#52 + def file_name; end + + # Normalizes tabs in +body+ + # + # source://rdoc//lib/rdoc/parser.rb#272 + def handle_tab_width(body); end + + class << self + # Alias an extension to another extension. After this call, files ending + # "new_ext" will be parsed using the same parser as "old_ext" + # + # source://rdoc//lib/rdoc/parser.rb#58 + def alias_extension(old_ext, new_ext); end + + # Determines if the file is a "binary" file which basically means it has + # content that an RDoc parser shouldn't try to consume. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser.rb#74 + def binary?(file); end + + # Return a parser that can handle a particular extension + # + # source://rdoc//lib/rdoc/parser.rb#107 + def can_parse(file_name); end + + # Returns a parser that can handle the extension for +file_name+. This does + # not depend upon the file being readable. + # + # source://rdoc//lib/rdoc/parser.rb#120 + def can_parse_by_name(file_name); end + + # Returns the file type from the modeline in +file_name+ + # + # source://rdoc//lib/rdoc/parser.rb#141 + def check_modeline(file_name); end + + # Finds and instantiates the correct parser for the given +file_name+ and + # +content+. + # + # source://rdoc//lib/rdoc/parser.rb#167 + def for(top_level, file_name, content, options, stats); end + + # Record which file types this parser can understand. + # + # It is ok to call this multiple times. + # + # source://rdoc//lib/rdoc/parser.rb#201 + def parse_files_matching(regexp); end + + # An Array of arrays that maps file extension (or name) regular + # expressions to parser classes that will parse matching filenames. + # + # Use parse_files_matching to register a parser's file extensions. + # + # source://rdoc//lib/rdoc/parser.rb#45 + def parsers; end + + # Removes an emacs-style modeline from the first line of the document + # + # source://rdoc//lib/rdoc/parser.rb#208 + def remove_modeline(content); end + + # If there is a markup: parser_name comment at the front of the + # file, use it to determine the parser. For example: + # + # # markup: rdoc + # # Class comment can go here + # + # class C + # end + # + # The comment should appear as the first line of the +content+. + # + # If the content contains a shebang or editor modeline the comment may + # appear on the second or third line. + # + # Any comment style may be used to hide the markup comment. + # + # source://rdoc//lib/rdoc/parser.rb#229 + def use_markup(content); end + + # Checks if +file+ is a zip file in disguise. Signatures from + # http://www.garykessler.net/library/file_sigs.html + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser.rb#94 + def zip?(file); end + end +end + +# RDoc::Parser::C attempts to parse C extension files. It looks for +# the standard patterns that you find in extensions: +rb_define_class+, +# +rb_define_method+ and so on. It tries to find the corresponding +# C source for the methods and extract comments, but if we fail +# we don't worry too much. +# +# The comments associated with a Ruby method are extracted from the C +# comment block associated with the routine that _implements_ that +# method, that is to say the method whose name is given in the +# +rb_define_method+ call. For example, you might write: +# +# /* +# * Returns a new array that is a one-dimensional flattening of this +# * array (recursively). That is, for every element that is an array, +# * extract its elements into the new array. +# * +# * s = [ 1, 2, 3 ] #=> [1, 2, 3] +# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] +# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] +# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +# */ +# static VALUE +# rb_ary_flatten(VALUE ary) +# { +# ary = rb_obj_dup(ary); +# rb_ary_flatten_bang(ary); +# return ary; +# } +# +# ... +# +# void +# Init_Array(void) +# { +# ... +# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); +# +# Here RDoc will determine from the +rb_define_method+ line that there's a +# method called "flatten" in class Array, and will look for the implementation +# in the method +rb_ary_flatten+. It will then use the comment from that +# method in the HTML output. This method must be in the same source file +# as the +rb_define_method+. +# +# The comment blocks may include special directives: +# +# [Document-class: +name+] +# Documentation for the named class. +# +# [Document-module: +name+] +# Documentation for the named module. +# +# [Document-const: +name+] +# Documentation for the named +rb_define_const+. +# +# Constant values can be supplied on the first line of the comment like so: +# +# /* 300: The highest possible score in bowling */ +# rb_define_const(cFoo, "PERFECT", INT2FIX(300)); +# +# The value can contain internal colons so long as they are escaped with a \ +# +# [Document-global: +name+] +# Documentation for the named +rb_define_global_const+ +# +# [Document-variable: +name+] +# Documentation for the named +rb_define_variable+ +# +# [Document-method\: +method_name+] +# Documentation for the named method. Use this when the method name is +# unambiguous. +# +# [Document-method\: ClassName::method_name] +# Documentation for a singleton method in the given class. Use this when +# the method name alone is ambiguous. +# +# [Document-method\: ClassName#method_name] +# Documentation for a instance method in the given class. Use this when the +# method name alone is ambiguous. +# +# [Document-attr: +name+] +# Documentation for the named attribute. +# +# [call-seq: text up to an empty line] +# Because C source doesn't give descriptive names to Ruby-level parameters, +# you need to document the calling sequence explicitly +# +# In addition, RDoc assumes by default that the C method implementing a +# Ruby function is in the same source file as the rb_define_method call. +# If this isn't the case, add the comment: +# +# rb_define_method(....); // in filename +# +# As an example, we might have an extension that defines multiple classes +# in its Init_xxx method. We could document them using +# +# /* +# * Document-class: MyClass +# * +# * Encapsulate the writing and reading of the configuration +# * file. ... +# */ +# +# /* +# * Document-method: read_value +# * +# * call-seq: +# * cfg.read_value(key) -> value +# * cfg.read_value(key} { |key| } -> value +# * +# * Return the value corresponding to +key+ from the configuration. +# * In the second form, if the key isn't found, invoke the +# * block and return its value. +# */ +# +# source://rdoc//lib/rdoc/parser/c.rb#119 +class RDoc::Parser::C < ::RDoc::Parser + include ::RDoc::Text + + # Prepares for parsing a C file. See RDoc::Parser#initialize for details on + # the arguments. + # + # @return [C] a new instance of C + # + # source://rdoc//lib/rdoc/parser/c.rb#171 + def initialize(top_level, file_name, content, options, stats); end + + # Add alias, either from a direct alias definition, or from two + # method that reference the same function. + # + # source://rdoc//lib/rdoc/parser/c.rb#250 + def add_alias(var_name, class_obj, old_name, new_name, comment); end + + # Maps C variable names to names of Ruby classes or modules + # + # source://rdoc//lib/rdoc/parser/c.rb#133 + def classes; end + + # C file the parser is parsing + # + # source://rdoc//lib/rdoc/parser/c.rb#138 + def content; end + + # C file the parser is parsing + # + # source://rdoc//lib/rdoc/parser/c.rb#138 + def content=(_arg0); end + + # Scans #content for rb_define_alias + # + # source://rdoc//lib/rdoc/parser/c.rb#222 + def do_aliases; end + + # Scans #content for rb_attr and rb_define_attr + # + # source://rdoc//lib/rdoc/parser/c.rb#263 + def do_attrs; end + + # Scans #content for boot_defclass + # + # source://rdoc//lib/rdoc/parser/c.rb#286 + def do_boot_defclass; end + + # Scans #content for rb_define_class, boot_defclass, rb_define_class_under + # and rb_singleton_class + # + # source://rdoc//lib/rdoc/parser/c.rb#298 + def do_classes_and_modules; end + + # Scans #content for rb_define_variable, rb_define_readonly_variable, + # rb_define_const and rb_define_global_const + # + # source://rdoc//lib/rdoc/parser/c.rb#396 + def do_constants; end + + # Scans #content for rb_include_module + # + # source://rdoc//lib/rdoc/parser/c.rb#442 + def do_includes; end + + # Scans #content for rb_define_method, rb_define_singleton_method, + # rb_define_module_function, rb_define_private_method, + # rb_define_global_function and define_filetest_function + # + # source://rdoc//lib/rdoc/parser/c.rb#458 + def do_methods; end + + # Creates classes and module that were missing were defined due to the file + # order being different than the declaration order. + # + # source://rdoc//lib/rdoc/parser/c.rb#507 + def do_missing; end + + # Dependencies from a missing enclosing class to the classes in + # missing_dependencies that depend upon it. + # + # source://rdoc//lib/rdoc/parser/c.rb#144 + def enclosure_dependencies; end + + # Finds the comment for an alias on +class_name+ from +new_name+ to + # +old_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#523 + def find_alias_comment(class_name, new_name, old_name); end + + # Finds a comment for rb_define_attr, rb_attr or Document-attr. + # + # +var_name+ is the C class variable the attribute is defined on. + # +attr_name+ is the attribute's name. + # + # +read+ and +write+ are the read/write flags ('1' or '0'). Either both or + # neither must be provided. + # + # source://rdoc//lib/rdoc/parser/c.rb#541 + def find_attr_comment(var_name, attr_name, read = T.unsafe(nil), write = T.unsafe(nil)); end + + # Find the C code corresponding to a Ruby method + # + # source://rdoc//lib/rdoc/parser/c.rb#599 + def find_body(class_name, meth_name, meth_obj, file_content, quiet = T.unsafe(nil)); end + + # Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#683 + def find_class(raw_name, name, base_name = T.unsafe(nil)); end + + # Look for class or module documentation above Init_+class_name+(void), + # in a Document-class +class_name+ (or module) comment or above an + # rb_define_class (or module). If a comment is supplied above a matching + # Init_ and a rb_define_class the Init_ comment is used. + # + # /* + # * This is a comment for Foo + # */ + # Init_Foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * Document-class: Foo + # * This is a comment for Foo + # */ + # Init_foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * This is a comment for Foo + # */ + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # + # source://rdoc//lib/rdoc/parser/c.rb#724 + def find_class_comment(class_name, class_mod); end + + # Finds a comment matching +type+ and +const_name+ either above the + # comment or in the matching Document- section. + # + # source://rdoc//lib/rdoc/parser/c.rb#780 + def find_const_comment(type, const_name, class_name = T.unsafe(nil)); end + + # Handles modifiers in +comment+ and updates +meth_obj+ as appropriate. + # + # source://rdoc//lib/rdoc/parser/c.rb#797 + def find_modifiers(comment, meth_obj); end + + # Finds a Document-method override for +meth_obj+ on +class_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#807 + def find_override_comment(class_name, meth_obj); end + + # Generate a Ruby-method table + # + # source://rdoc//lib/rdoc/parser/c.rb#574 + def gen_body_table(file_content); end + + # Generate a const table + # + # source://rdoc//lib/rdoc/parser/c.rb#757 + def gen_const_table(file_content); end + + # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either + # +read+, +write+ or both + # + # source://rdoc//lib/rdoc/parser/c.rb#829 + def handle_attr(var_name, attr_name, read, write); end + + # Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+ + # named +class_name+ in +parent+ which was assigned to the C +var_name+. + # + # source://rdoc//lib/rdoc/parser/c.rb#858 + def handle_class_module(var_name, type, class_name, parent, in_module); end + + # Adds constants. By providing some_value: at the start of the comment you + # can override the C value of the comment to give a friendly definition. + # + # /* 300: The perfect score in bowling */ + # rb_define_const(cFoo, "PERFECT", INT2FIX(300)); + # + # Will override INT2FIX(300) with the value +300+ in the output + # RDoc. Values may include quotes and escaped colons (\:). + # + # source://rdoc//lib/rdoc/parser/c.rb#923 + def handle_constants(type, var_name, const_name, definition); end + + # Removes #ifdefs that would otherwise confuse us + # + # source://rdoc//lib/rdoc/parser/c.rb#974 + def handle_ifdefs_in(body); end + + # Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned + # to +var_name+. +type+ is the type of method definition function used. + # +singleton_method+ and +module_function+ create a singleton method. + # + # source://rdoc//lib/rdoc/parser/c.rb#983 + def handle_method(type, var_name, meth_name, function, param_count, source_file = T.unsafe(nil)); end + + # Registers a singleton class +sclass_var+ as a singleton of +class_var+ + # + # source://rdoc//lib/rdoc/parser/c.rb#1053 + def handle_singleton(sclass_var, class_var); end + + # Maps C variable names to names of Ruby classes (and singleton classes) + # + # source://rdoc//lib/rdoc/parser/c.rb#149 + def known_classes; end + + # Loads the variable map with the given +name+ from the RDoc::Store, if + # present. + # + # source://rdoc//lib/rdoc/parser/c.rb#1064 + def load_variable_map(map_name); end + + # Look for directives in a normal comment block: + # + # /* + # * :title: My Awesome Project + # */ + # + # This method modifies the +comment+ + # + # source://rdoc//lib/rdoc/parser/c.rb#1093 + def look_for_directives_in(context, comment); end + + # Classes found while parsing the C file that were not yet registered due to + # a missing enclosing class. These are processed by do_missing + # + # source://rdoc//lib/rdoc/parser/c.rb#155 + def missing_dependencies; end + + # source://rdoc//lib/rdoc/parser/c.rb#1220 + def new_comment(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end + + # Extracts parameters from the +method_body+ and returns a method + # parameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT + # + # source://rdoc//lib/rdoc/parser/c.rb#1112 + def rb_scan_args(method_body); end + + # Removes lines that are commented out that might otherwise get picked up + # when scanning for classes and methods + # + # source://rdoc//lib/rdoc/parser/c.rb#1195 + def remove_commented_out_lines; end + + # Extracts the classes, modules, methods, attributes, constants and aliases + # from a C file and returns an RDoc::TopLevel for this file + # + # source://rdoc//lib/rdoc/parser/c.rb#1203 + def scan; end + + # Maps C variable names to names of Ruby singleton classes + # + # source://rdoc//lib/rdoc/parser/c.rb#160 + def singleton_classes; end + + # The TopLevel items in the parsed file belong to + # + # source://rdoc//lib/rdoc/parser/c.rb#165 + def top_level; end +end + +# :stopdoc: +# +# source://rdoc//lib/rdoc/parser/c.rb#126 +RDoc::Parser::C::BOOL_ARG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//lib/rdoc/parser/c.rb#127 +RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) + +# A ChangeLog file parser. +# +# This parser converts a ChangeLog into an RDoc::Markup::Document. When +# viewed as HTML a ChangeLog page will have an entry for each day's entries in +# the sidebar table of contents. +# +# This parser is meant to parse the MRI ChangeLog, but can be used to parse any +# {GNU style Change +# Log}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html]. +# +# source://rdoc//lib/rdoc/parser/changelog.rb#14 +class RDoc::Parser::ChangeLog < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Attaches the +continuation+ of the previous line to the +entry_body+. + # + # Continued function listings are joined together as a single entry. + # Continued descriptions are joined to make a single paragraph. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#26 + def continue_entry_body(entry_body, continuation); end + + # Creates an RDoc::Markup::Document given the +groups+ of ChangeLog entries. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#44 + def create_document(groups); end + + # Returns a list of ChangeLog entries an RDoc::Markup nodes for the given + # +entries+. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#66 + def create_entries(entries); end + + # Returns an RDoc::Markup::List containing the given +items+ in the + # ChangeLog + # + # source://rdoc//lib/rdoc/parser/changelog.rb#83 + def create_items(items); end + + # Groups +entries+ by date. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#103 + def group_entries(entries); end + + # Parse date in ISO-8601, RFC-2822, or default of Git + # + # source://rdoc//lib/rdoc/parser/changelog.rb#119 + def parse_date(date); end + + # Parses the entries in the ChangeLog. + # + # Returns an Array of each ChangeLog entry in order of parsing. + # + # A ChangeLog entry is an Array containing the ChangeLog title (date and + # committer) and an Array of ChangeLog items (file and function changed with + # description). + # + # An example result would be: + # + # [ 'Tue Dec 4 08:33:46 2012 Eric Hodel ', + # [ 'README.EXT: Converted to RDoc format', + # 'README.EXT.ja: ditto']] + # + # source://rdoc//lib/rdoc/parser/changelog.rb#149 + def parse_entries; end + + # Converts the ChangeLog into an RDoc::Markup::Document + # + # source://rdoc//lib/rdoc/parser/changelog.rb#206 + def scan; end +end + +# source://rdoc//lib/rdoc/parser/changelog.rb#219 +module RDoc::Parser::ChangeLog::Git + # source://rdoc//lib/rdoc/parser/changelog.rb#247 + def create_entries(entries); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#225 + def parse_entries; end + + # source://rdoc//lib/rdoc/parser/changelog.rb#220 + def parse_info(info); end +end + +# source://rdoc//lib/rdoc/parser/changelog.rb#256 +RDoc::Parser::ChangeLog::Git::HEADING_LEVEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/changelog.rb#255 +class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct + # @return [LogEntry] a new instance of LogEntry + # + # source://rdoc//lib/rdoc/parser/changelog.rb#258 + def initialize(base, commit, author, email, date, contents); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#298 + def accept(visitor); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#279 + def aref; end + + # Returns the value of attribute author + # + # @return [Object] the current value of author + def author; end + + # Sets the attribute author + # + # @param value [Object] the value to set the attribute author to. + # @return [Object] the newly set value + def author=(_); end + + # Returns the value of attribute base + # + # @return [Object] the current value of base + def base; end + + # Sets the attribute base + # + # @param value [Object] the value to set the attribute base to. + # @return [Object] the newly set value + def base=(_); end + + # Returns the value of attribute commit + # + # @return [Object] the current value of commit + def commit; end + + # Sets the attribute commit + # + # @param value [Object] the value to set the attribute commit to. + # @return [Object] the newly set value + def commit=(_); end + + # Returns the value of attribute contents + # + # @return [Object] the current value of contents + def contents; end + + # Sets the attribute contents + # + # @param value [Object] the value to set the attribute contents to. + # @return [Object] the newly set value + def contents=(_); end + + # Returns the value of attribute date + # + # @return [Object] the current value of date + def date; end + + # Sets the attribute date + # + # @param value [Object] the value to set the attribute date to. + # @return [Object] the newly set value + def date=(_); end + + # Returns the value of attribute email + # + # @return [Object] the current value of email + def email; end + + # Sets the attribute email + # + # @param value [Object] the value to set the attribute email to. + # @return [Object] the newly set value + def email=(_); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#283 + def label(context = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#275 + def level; end + + # source://rdoc//lib/rdoc/parser/changelog.rb#315 + def pretty_print(q); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#287 + def text; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Parse a Markdown format file. The parsed RDoc::Markup::Document is attached +# as a file comment. +# +# source://rdoc//lib/rdoc/parser/markdown.rb#6 +class RDoc::Parser::Markdown < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Creates an Markdown-format TopLevel for the given file. + # + # source://rdoc//lib/rdoc/parser/markdown.rb#15 + def scan; end +end + +# Parse a RD format file. The parsed RDoc::Markup::Document is attached as a +# file comment. +# +# source://rdoc//lib/rdoc/parser/rd.rb#6 +class RDoc::Parser::RD < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Creates an rd-format TopLevel for the given file. + # + # source://rdoc//lib/rdoc/parser/rd.rb#15 + def scan; end +end + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#4 +class RDoc::Parser::RipperStateLex + # @return [RipperStateLex] a new instance of RipperStateLex + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#568 + def initialize(code); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#317 + def get_squashed_tk; end + + private + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#460 + def get_embdoc_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#469 + def get_heredoc_tk(heredoc_name, indent); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#544 + def get_op_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#442 + def get_regexp_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#415 + def get_string_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#368 + def get_symbol_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#506 + def get_words_tk(tk); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#494 + def heredoc_end?(name, indent, tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#488 + def retrieve_heredoc_info(tk); end + + class << self + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#587 + def end?(token); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#575 + def parse(code); end + end +end + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#15 +RDoc::Parser::RipperStateLex::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#26 +RDoc::Parser::RipperStateLex::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#11 +RDoc::Parser::RipperStateLex::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#25 +RDoc::Parser::RipperStateLex::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#20 +RDoc::Parser::RipperStateLex::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#16 +RDoc::Parser::RipperStateLex::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#19 +RDoc::Parser::RipperStateLex::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#12 +RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#13 +RDoc::Parser::RipperStateLex::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#14 +RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#27 +RDoc::Parser::RipperStateLex::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#23 +RDoc::Parser::RipperStateLex::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#18 +RDoc::Parser::RipperStateLex::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#21 +RDoc::Parser::RipperStateLex::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#22 +RDoc::Parser::RipperStateLex::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#17 +RDoc::Parser::RipperStateLex::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#10 +RDoc::Parser::RipperStateLex::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#24 +RDoc::Parser::RipperStateLex::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#307 +class RDoc::Parser::RipperStateLex::InnerStateLex < ::Ripper::Filter + # @return [InnerStateLex] a new instance of InnerStateLex + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#308 + def initialize(code); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#312 + def on_default(event, tok, data); end +end + +# TODO: Remove this constants after Ruby 2.4 EOL +# +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#6 +RDoc::Parser::RipperStateLex::RIPPER_HAS_LEX_STATE = T.let(T.unsafe(nil), TrueClass) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#8 +class RDoc::Parser::RipperStateLex::Token < ::Struct + # Returns the value of attribute char_no + # + # @return [Object] the current value of char_no + def char_no; end + + # Sets the attribute char_no + # + # @param value [Object] the value to set the attribute char_no to. + # @return [Object] the newly set value + def char_no=(_); end + + # Returns the value of attribute kind + # + # @return [Object] the current value of kind + def kind; end + + # Sets the attribute kind + # + # @param value [Object] the value to set the attribute kind to. + # @return [Object] the newly set value + def kind=(_); end + + # Returns the value of attribute line_no + # + # @return [Object] the current value of line_no + def line_no; end + + # Sets the attribute line_no + # + # @param value [Object] the value to set the attribute line_no to. + # @return [Object] the newly set value + def line_no=(_); end + + # Returns the value of attribute state + # + # @return [Object] the current value of state + def state; end + + # Sets the attribute state + # + # @param value [Object] the value to set the attribute state to. + # @return [Object] the newly set value + def state=(_); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + def text=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rdoc//lib/rdoc/parser/ruby.rb#144 +class RDoc::Parser::Ruby < ::RDoc::Parser + include ::RDoc::TokenStream + include ::RDoc::Parser::RubyTools + + # Creates a new Ruby parser. + # + # @return [Ruby] a new instance of Ruby + # + # source://rdoc//lib/rdoc/parser/ruby.rb#164 + def initialize(top_level, file_name, content, options, stats); end + + # Look for the first comment in a file that isn't a shebang line. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#233 + def collect_first_comment; end + + # Consumes trailing whitespace from the token stream + # + # source://rdoc//lib/rdoc/parser/ruby.rb#276 + def consume_trailing_spaces; end + + # Creates a new attribute in +container+ with +name+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#283 + def create_attr(container, single, name, rw, comment); end + + # Creates a module alias in +container+ at +rhs_name+ (or at the top-level + # for "::") with the name from +constant+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#297 + def create_module_alias(container, constant, rhs_name); end + + # Aborts with +msg+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#310 + def error(msg); end + + # Looks for a true or false token. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#319 + def get_bool; end + + # Look for the name of a class of module (optionally with a leading :: or + # with :: separated named) and return the ultimate name, the associated + # container, and the given name (with the ::). + # + # source://rdoc//lib/rdoc/parser/ruby.rb#337 + def get_class_or_module(container, ignore_constants = T.unsafe(nil)); end + + # Return a superclass, which can be either a constant of an expression + # + # source://rdoc//lib/rdoc/parser/ruby.rb#420 + def get_class_specification; end + + # Parse a constant, which might be qualified by one or more class or module + # names + # + # source://rdoc//lib/rdoc/parser/ruby.rb#453 + def get_constant; end + + # Little hack going on here. In the statement: + # + # f = 2*(1+yield) + # + # We see the RPAREN as the next token, so we need to exit early. This still + # won't catch all cases (such as "a = yield + 1" + # + # source://rdoc//lib/rdoc/parser/ruby.rb#555 + def get_end_token(tk); end + + # Get an included module that may be surrounded by parens + # + # source://rdoc//lib/rdoc/parser/ruby.rb#470 + def get_included_module_with_optional_parens; end + + # Retrieves the method container for a singleton method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#575 + def get_method_container(container, name_t); end + + # Extracts a name or symbol from the token stream. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#618 + def get_symbol_or_name; end + + # Retrieves the read token stream and replaces +pattern+ with +replacement+ + # using gsub. If the result is only a ";" returns an empty string. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#191 + def get_tkread_clean(pattern, replacement); end + + # Extracts the visibility information for the visibility token +tk+ + # and +single+ class type identifier. + # + # Returns the visibility type (a string), the visibility (a symbol) and + # +singleton+ if the methods following should be converted to singleton + # methods. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#205 + def get_visibility_information(tk, single); end + + # Look for directives in a normal comment block: + # + # # :stopdoc: + # # Don't display comment from this point forward + # + # This routine modifies its +comment+ parameter. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#658 + def look_for_directives_in(container, comment); end + + # Adds useful info about the parser to +message+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#678 + def make_message(message); end + + # Creates a comment with the correct format + # + # source://rdoc//lib/rdoc/parser/ruby.rb#690 + def new_comment(comment, line_no = T.unsafe(nil)); end + + # Parses an +alias+ in +context+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#759 + def parse_alias(context, single, tk, comment); end + + # Creates an RDoc::Attr for the name following +tk+, setting the comment to + # +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#701 + def parse_attr(context, single, tk, comment); end + + # Creates an RDoc::Attr for each attribute listed after +tk+, setting the + # comment for each to +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#730 + def parse_attr_accessor(context, single, tk, comment); end + + # Extracts call parameters from the token stream. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#798 + def parse_call_parameters(tk); end + + # Parses a class in +context+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#841 + def parse_class(container, single, tk, comment); end + + # Parses and creates a regular class + # + # source://rdoc//lib/rdoc/parser/ruby.rb#875 + def parse_class_regular(container, declaration_context, single, name_t, given_name, comment); end + + # Parses a singleton class in +container+ with the given +name+ and + # +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#915 + def parse_class_singleton(container, name, comment); end + + # Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for + # :method: or :attr: directives in +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1080 + def parse_comment(container, tk, comment); end + + # Parse a comment that is describing an attribute in +container+ with the + # given +name+ and +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1108 + def parse_comment_attr(container, type, name, comment); end + + # source://rdoc//lib/rdoc/parser/ruby.rb#1120 + def parse_comment_ghost(container, text, name, column, line_no, comment); end + + # Creates an RDoc::Method on +container+ from +comment+ if there is a + # Signature section in the comment + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1159 + def parse_comment_tomdoc(container, tk, comment); end + + # Parses a constant in +context+ with +comment+. If +ignore_constants+ is + # true, no found constants will be added to RDoc. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#954 + def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/parser/ruby.rb#1021 + def parse_constant_body(container, constant, is_array_or_hash); end + + # Parses a Module#private_constant or Module#public_constant call from +tk+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2091 + def parse_constant_visibility(container, single, tk); end + + # Parses an +include+ or +extend+, indicated by the +klass+ and adds it to + # +container+ # with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1194 + def parse_extend_or_include(klass, container, comment); end + + # Parses identifiers that can create new methods or change visibility. + # + # Returns true if the comment was not consumed. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1232 + def parse_identifier(container, single, tk, comment); end + + # Parses an +included+ with a block feature of ActiveSupport::Concern. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1214 + def parse_included_with_activesupport_concern(container, comment); end + + # Parses a meta-programmed attribute and creates an RDoc::Attr. + # + # To create foo and bar attributes on class C with comment "My attributes": + # + # class C + # + # ## + # # :attr: + # # + # # My attributes + # + # my_attr :foo, :bar + # + # end + # + # To create a foo attribute on class C with comment "My attribute": + # + # class C + # + # ## + # # :attr: foo + # # + # # My attribute + # + # my_attr :foo, :bar + # + # end + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1296 + def parse_meta_attr(context, single, tk, comment); end + + # Parses a meta-programmed method + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1330 + def parse_meta_method(container, single, tk, comment); end + + # Parses the name of a metaprogrammed method. +comment+ is used to + # determine the name while +tk+ is used in an error message if the name + # cannot be determined. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1376 + def parse_meta_method_name(comment, tk); end + + # Parses the parameters and block for a meta-programmed method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1400 + def parse_meta_method_params(container, single, meth, tk, comment); end + + # Parses a normal method defined by +def+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1432 + def parse_method(container, single, tk, comment); end + + # Parses a method that needs to be ignored. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1511 + def parse_method_dummy(container); end + + # Parses the name of a method in +container+. + # + # Returns the method name, the container it is in (for def Foo.name) and if + # it is a singleton or regular method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1524 + def parse_method_name(container); end + + # For the given +container+ and initial name token +name_t+ the method name + # is parsed from the token stream for a regular method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1551 + def parse_method_name_regular(container, name_t); end + + # For the given +container+ and initial name token +name_t+ the method name + # and the new +container+ (if necessary) are parsed from the token stream + # for a singleton method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1569 + def parse_method_name_singleton(container, name_t); end + + # Extracts +yield+ parameters from +method+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1613 + def parse_method_or_yield_parameters(method = T.unsafe(nil), modifiers = T.unsafe(nil)); end + + # Capture the method's parameters. Along the way, look for a comment + # containing: + # + # # yields: .... + # + # and add this as the block_params for the method + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1680 + def parse_method_parameters(method); end + + # Parses the parameters and body of +meth+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1481 + def parse_method_params_and_body(container, single, meth, added_container); end + + # Parses an RDoc::NormalModule in +container+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1695 + def parse_module(container, single, tk, comment); end + + # Parses an RDoc::Require in +context+ containing +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1717 + def parse_require(context, comment); end + + # Parses a rescue + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1738 + def parse_rescue; end + + # The core of the Ruby parser. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1769 + def parse_statements(container, single = T.unsafe(nil), current_method = T.unsafe(nil), comment = T.unsafe(nil)); end + + # Parse up to +no+ symbol arguments + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1959 + def parse_symbol_arg(no = T.unsafe(nil)); end + + # Parses up to +no+ symbol arguments surrounded by () and places them in + # +args+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1974 + def parse_symbol_arg_paren(no); end + + # Parses up to +no+ symbol arguments separated by spaces and places them in + # +args+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2002 + def parse_symbol_arg_space(no, tk); end + + # Returns symbol text from the next token + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2033 + def parse_symbol_in_arg; end + + # Parses statements in the top-level +container+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2050 + def parse_top_level_statements(container); end + + # Determines the visibility in +container+ from +tk+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2068 + def parse_visibility(container, single, tk); end + + # Determines the block parameter for +context+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2107 + def parse_yield(context, single, tk, method); end + + # Directives are modifier comments that can appear after class, module, or + # method names. For example: + # + # def fred # :yields: a, b + # + # or: + # + # + # We return the directive name and any parameters as a two element array if + # the name is in +allowed+. A directive can be found anywhere up to the end + # of the current line. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2128 + def read_directive(allowed); end + + # Handles directives following the definition for +context+ (any + # RDoc::CodeObject) if the directives are +allowed+ at this point. + # + # See also RDoc::Markup::PreProcess#handle_directive + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2160 + def read_documentation_modifiers(context, allowed); end + + # Records the location of this +container+ in the file for this parser and + # adds it to the list of classes and modules in the file. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2179 + def record_location(container); end + + # Retrieve comment body without =begin/=end + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1758 + def retrieve_comment_body(tk); end + + # Scans this Ruby file for Ruby constructs + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2191 + def scan; end + + # skip the var [in] part of a 'for' statement + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2279 + def skip_for_variable; end + + # Skips the next method in +container+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2290 + def skip_method(container); end + + # while, until, and for have an optional do + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2238 + def skip_optional_do_after_expression; end + + # Skip opening parentheses and yield the block. + # Skip closing parentheses too when exists. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#398 + def skip_parentheses(&block); end + + # Skip spaces until a comment is found + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2299 + def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end + + # Marks containers between +container+ and +ancestor+ as ignored + # + # source://rdoc//lib/rdoc/parser/ruby.rb#643 + def suppress_parents(container, ancestor); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ruby.rb#183 + def tk_nl?(tk); end + + # Updates visibility in +container+ from +vis_type+ and +vis+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2311 + def update_visibility(container, vis_type, vis, singleton); end + + # Prints +message+ to +$stderr+ unless we're being quiet + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2356 + def warn(message); end +end + +# Collection of methods for writing parsers +# +# source://rdoc//lib/rdoc/parser/ruby_tools.rb#5 +module RDoc::Parser::RubyTools + # Adds a token listener +obj+, but you should probably use token_listener + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#10 + def add_token_listener(obj); end + + # Fetches the next token from the scanner + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#18 + def get_tk; end + + # Reads and returns all tokens up to one of +tokens+. Leaves the matched + # token in the token list. + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#52 + def get_tk_until(*tokens); end + + # Retrieves a String representation of the read tokens + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#73 + def get_tkread; end + + # Peek equivalent for get_tkread + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#82 + def peek_read; end + + # Peek at the next token, but don't remove it from the stream + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#89 + def peek_tk; end + + # Removes the token listener +obj+ + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#97 + def remove_token_listener(obj); end + + # Resets the tools + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#104 + def reset; end + + # Skips whitespace tokens including newlines + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#115 + def skip_tkspace; end + + # Skips whitespace tokens excluding newlines + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#129 + def skip_tkspace_without_nl; end + + # Has +obj+ listen to tokens + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#143 + def token_listener(obj); end + + # Returns +tk+ to the scanner + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#153 + def unget_tk(tk); end +end + +# Parse a non-source file. We basically take the whole thing as one big +# comment. +# +# source://rdoc//lib/rdoc/parser/simple.rb#6 +class RDoc::Parser::Simple < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Prepare to parse a plain file + # + # @return [Simple] a new instance of Simple + # + # source://rdoc//lib/rdoc/parser/simple.rb#17 + def initialize(top_level, file_name, content, options, stats); end + + # source://rdoc//lib/rdoc/parser/simple.rb#12 + def content; end + + # Removes the encoding magic comment from +text+ + # + # source://rdoc//lib/rdoc/parser/simple.rb#41 + def remove_coding_comment(text); end + + # Removes private comments. + # + # Unlike RDoc::Comment#remove_private this implementation only looks for two + # dashes at the beginning of the line. Three or more dashes are considered + # to be a rule and ignored. + # + # source://rdoc//lib/rdoc/parser/simple.rb#52 + def remove_private_comment(comment); end + + # Extract the file contents and attach them to the TopLevel as a comment + # + # source://rdoc//lib/rdoc/parser/simple.rb#28 + def scan; end +end + +# source://rdoc//lib/rdoc/rd.rb#72 +class RDoc::RD + class << self + # Parses +rd+ source and returns an RDoc::Markup::Document. If the + # =begin or =end lines are missing they will be added. + # + # source://rdoc//lib/rdoc/rd.rb#78 + def parse(rd); end + end +end + +# RD format parser for headings, paragraphs, lists, verbatim sections that +# exist as blocks. +# +# source://rdoc//lib/rdoc/rd/block_parser.rb#16 +class RDoc::RD::BlockParser < ::Racc::Parser + # Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format + # document. + # + # @return [BlockParser] a new instance of BlockParser + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#51 + def initialize; end + + # reduce 0 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#684 + def _reduce_1(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#726 + def _reduce_10(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#731 + def _reduce_11(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#736 + def _reduce_12(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#744 + def _reduce_13(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#750 + def _reduce_14(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#757 + def _reduce_15(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#762 + def _reduce_16(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#767 + def _reduce_17(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#778 + def _reduce_18(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#789 + def _reduce_19(val, _values, result); end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#689 + def _reduce_2(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#795 + def _reduce_20(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#801 + def _reduce_21(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#807 + def _reduce_22(val, _values, result); end + + # reduce 26 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#823 + def _reduce_27(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#829 + def _reduce_28(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#835 + def _reduce_29(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#694 + def _reduce_3(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#841 + def _reduce_30(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#846 + def _reduce_31(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#851 + def _reduce_32(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#857 + def _reduce_33(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#862 + def _reduce_34(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#867 + def _reduce_35(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#873 + def _reduce_36(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#879 + def _reduce_37(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#884 + def _reduce_38(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#889 + def _reduce_39(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#699 + def _reduce_4(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#895 + def _reduce_40(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#901 + def _reduce_41(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#906 + def _reduce_42(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#911 + def _reduce_43(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#919 + def _reduce_44(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#925 + def _reduce_45(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#930 + def _reduce_46(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#935 + def _reduce_47(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#941 + def _reduce_48(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#947 + def _reduce_49(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#704 + def _reduce_5(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#953 + def _reduce_50(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#959 + def _reduce_51(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#965 + def _reduce_52(val, _values, result); end + + # reduce 53 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#972 + def _reduce_54(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#977 + def _reduce_55(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#984 + def _reduce_57(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#709 + def _reduce_6(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#997 + def _reduce_62(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1003 + def _reduce_63(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1009 + def _reduce_64(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1015 + def _reduce_65(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1021 + def _reduce_66(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1027 + def _reduce_67(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1032 + def _reduce_68(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1037 + def _reduce_69(val, _values, result); end + + # reduce 70 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1044 + def _reduce_71(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1049 + def _reduce_72(val, _values, result); end + + # reduce 7 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#716 + def _reduce_8(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#721 + def _reduce_9(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1054 + def _reduce_none(val, _values, result); end + + # Adds footnote +content+ to the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#401 + def add_footnote(content); end + + # Adds label +label+ to the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#415 + def add_label(label); end + + # Retrieves the content of +values+ as a single String + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#384 + def content(values); end + + # Footnotes for this document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#35 + def footnotes; end + + # Path to find included files in + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#45 + def include_path; end + + # Path to find included files in + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#45 + def include_path=(_arg0); end + + # Labels for items in this document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#40 + def labels; end + + # Current line number + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#339 + def line_index; end + + # Returns the next token from the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#107 + def next_token; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#323 + def on_error(et, ev, _values); end + + # Creates a paragraph for +value+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#391 + def paragraph(value); end + + # Parses +src+ and returns an RDoc::Markup::Document. + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#63 + def parse(src); end + + private + + # Cuts off excess whitespace in +src+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#287 + def cut_off(src); end + + # Formats line numbers +line_numbers+ prettily + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#375 + def format_line_num(*line_numbers); end + + # Retrieves the content for +file+ from the include_path + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#356 + def get_included(file); end + + # Yields to the given block if +indent+ matches the current indent, otherwise + # an indentation token is processed. + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#269 + def if_current_indent_equal(indent); end + + # Parses subtree +src+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#346 + def parse_subtree(src); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#314 + def set_term_to_element(parent, term); end +end + +# source://rdoc//lib/rdoc/rd/block_parser.rb#678 +RDoc::RD::BlockParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# Inline keeps track of markup and labels to create proper links. +# +# source://rdoc//lib/rdoc/rd/inline.rb#5 +class RDoc::RD::Inline + # Initializes the Inline with +rdoc+ and +inline+ + # + # @return [Inline] a new instance of Inline + # + # source://rdoc//lib/rdoc/rd/inline.rb#34 + def initialize(rdoc, reference); end + + # source://rdoc//lib/rdoc/rd/inline.rb#42 + def ==(other); end + + # Appends +more+ to this inline. +more+ may be a String or another Inline. + # + # source://rdoc//lib/rdoc/rd/inline.rb#50 + def append(more); end + + # source://rdoc//lib/rdoc/rd/inline.rb#65 + def inspect; end + + # The markup of this reference in RDoc format + # + # source://rdoc//lib/rdoc/rd/inline.rb#15 + def rdoc; end + + # The text of the reference + # + # source://rdoc//lib/rdoc/rd/inline.rb#10 + def reference; end + + # The markup of this reference in RDoc format + # + # source://rdoc//lib/rdoc/rd/inline.rb#15 + def to_s; end + + class << self + # Creates a new Inline for +rdoc+ and +reference+. + # + # +rdoc+ may be another Inline or a String. If +reference+ is not given it + # will use the text from +rdoc+. + # + # source://rdoc//lib/rdoc/rd/inline.rb#23 + def new(rdoc, reference = T.unsafe(nil)); end + end +end + +# RD format parser for inline markup such as emphasis, links, footnotes, etc. +# +# source://rdoc//lib/rdoc/rd/inline_parser.rb#17 +class RDoc::RD::InlineParser < ::Racc::Parser + # Creates a new parser for inline markup in the rd format. The +block_parser+ + # is used to for footnotes and labels in the inline text. + # + # @return [InlineParser] a new instance of InlineParser + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#90 + def initialize(block_parser); end + + # reduce 100 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1100 + def _reduce_101(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1107 + def _reduce_102(val, _values, result); end + + # reduce 108 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1125 + def _reduce_109(val, _values, result); end + + # reduce 110 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1132 + def _reduce_111(val, _values, result); end + + # reduce 112 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1140 + def _reduce_113(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1145 + def _reduce_114(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1150 + def _reduce_115(val, _values, result); end + + # reduce 12 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#763 + def _reduce_13(val, _values, result); end + + # reduce 135 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1195 + def _reduce_136(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#770 + def _reduce_14(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#777 + def _reduce_15(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#784 + def _reduce_16(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#791 + def _reduce_17(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#799 + def _reduce_18(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#805 + def _reduce_19(val, _values, result); end + + # reduce 1 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#735 + def _reduce_2(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#813 + def _reduce_20(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#819 + def _reduce_21(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#828 + def _reduce_22(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#834 + def _reduce_23(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#840 + def _reduce_24(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#846 + def _reduce_25(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#855 + def _reduce_26(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#861 + def _reduce_27(val, _values, result); end + + # reduce 28 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#870 + def _reduce_29(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#740 + def _reduce_3(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#875 + def _reduce_30(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#880 + def _reduce_31(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#886 + def _reduce_32(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#892 + def _reduce_33(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#898 + def _reduce_34(val, _values, result); end + + # reduce 35 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#906 + def _reduce_36(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#911 + def _reduce_37(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#916 + def _reduce_38(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#922 + def _reduce_39(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#928 + def _reduce_40(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#934 + def _reduce_41(val, _values, result); end + + # reduce 42 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#942 + def _reduce_43(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#948 + def _reduce_44(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#954 + def _reduce_45(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#960 + def _reduce_46(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#986 + def _reduce_57(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#992 + def _reduce_58(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#998 + def _reduce_59(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1004 + def _reduce_60(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1011 + def _reduce_62(val, _values, result); end + + # reduce 63 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1019 + def _reduce_64(val, _values, result); end + + # reduce 77 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1051 + def _reduce_78(val, _values, result); end + + # reduce 137 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1202 + def _reduce_none(val, _values, result); end + + # Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+ + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#239 + def inline(rdoc, reference = T.unsafe(nil)); end + + # Returns the next token from the inline text + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#108 + def next_token; end + + # Returns words following an error + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#228 + def next_words_on_error; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#188 + def on_error(et, ev, values); end + + # Parses the +inline+ text from RD format into RDoc format. + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#97 + def parse(inline); end + + # Returns words before the error + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#205 + def prev_words_on_error(ev); end + + private + + # Returns the last line of +src+ + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#216 + def last_line(src); end +end + +# source://rdoc//lib/rdoc/rd/inline_parser.rb#727 +RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This is the driver for generating RDoc output. It handles file parsing and +# generation of output. +# +# To use this class to generate RDoc output via the API, the recommended way +# is: +# +# rdoc = RDoc::RDoc.new +# options = RDoc::Options.load_options # returns an RDoc::Options instance +# # set extra options +# rdoc.document options +# +# You can also generate output like the +rdoc+ executable: +# +# rdoc = RDoc::RDoc.new +# rdoc.document argv +# +# Where +argv+ is an array of strings, each corresponding to an argument you'd +# give rdoc on the command line. See rdoc --help for details. +# +# source://rdoc//lib/rdoc/rdoc.rb#29 +class RDoc::RDoc + # Creates a new RDoc::RDoc instance. Call #document to parse files and + # generate documentation. + # + # @return [RDoc] a new instance of RDoc + # + # source://rdoc//lib/rdoc/rdoc.rb#100 + def initialize; end + + # Generates documentation or a coverage report depending upon the settings + # in +options+. + # + # +options+ can be either an RDoc::Options instance or an array of strings + # equivalent to the strings that would be passed on the command line like + # %w[-q -o doc -t My\ Doc\ Title]. #document will automatically + # call RDoc::Options#finish if an options instance was given. + # + # For a list of options, see either RDoc::Options or rdoc --help. + # + # By default, output will be stored in a directory called "doc" below the + # current directory, so make sure you're somewhere writable before invoking. + # + # source://rdoc//lib/rdoc/rdoc.rb#452 + def document(options); end + + # Report an error message and exit + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/rdoc.rb#113 + def error(msg); end + + # Gathers a set of parseable files from the files and directories listed in + # +files+. + # + # source://rdoc//lib/rdoc/rdoc.rb#121 + def gather_files(files); end + + # Generates documentation for +file_info+ (from #parse_files) into the + # output dir using the generator selected + # by the RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#517 + def generate; end + + # Generator instance used for creating output + # + # source://rdoc//lib/rdoc/rdoc.rb#52 + def generator; end + + # Generator instance used for creating output + # + # source://rdoc//lib/rdoc/rdoc.rb#52 + def generator=(_arg0); end + + # Turns RDoc from stdin into HTML + # + # source://rdoc//lib/rdoc/rdoc.rb#142 + def handle_pipe; end + + # Installs a siginfo handler that prints the current filename. + # + # source://rdoc//lib/rdoc/rdoc.rb#157 + def install_siginfo_handler; end + + # Hash of files and their last modified times. + # + # source://rdoc//lib/rdoc/rdoc.rb#57 + def last_modified; end + + # Return a list of the files to be processed in a directory. We know that + # this directory doesn't have a .document file, so we're looking for real + # files. However we may well contain subdirectories which must be tested + # for .document files. + # + # source://rdoc//lib/rdoc/rdoc.rb#323 + def list_files_in_directory(dir); end + + # Given a list of files and directories, create a list of all the Ruby + # files they contain. + # + # If +force_doc+ is true we always add the given files, if false, only + # add files that we guarantee we can parse. It is true when looking at + # files given on the command line, false when recursing through + # subdirectories. + # + # The effect of this is that if you want a file with a non-standard + # extension parsed, you must name it explicitly. + # + # source://rdoc//lib/rdoc/rdoc.rb#275 + def normalized_file_list(relative_files, force_doc = T.unsafe(nil), exclude_pattern = T.unsafe(nil)); end + + # RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#62 + def options; end + + # RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#62 + def options=(_arg0); end + + # Return the path name of the flag file in an output directory. + # + # source://rdoc//lib/rdoc/rdoc.rb#240 + def output_flag_file(op_dir); end + + # The .document file contains a list of file and directory name patterns, + # representing candidates for documentation. It may also contain comments + # (starting with '#') + # + # source://rdoc//lib/rdoc/rdoc.rb#249 + def parse_dot_doc_file(in_dir, filename); end + + # Parses +filename+ and returns an RDoc::TopLevel + # + # source://rdoc//lib/rdoc/rdoc.rb#332 + def parse_file(filename); end + + # Parse each file on the command line, recursively entering directories. + # + # source://rdoc//lib/rdoc/rdoc.rb#404 + def parse_files(files); end + + # Removes a siginfo handler and replaces the previous + # + # source://rdoc//lib/rdoc/rdoc.rb#536 + def remove_siginfo_handler; end + + # Removes file extensions known to be unparseable from +files+ and TAGS + # files for emacs and vim. + # + # source://rdoc//lib/rdoc/rdoc.rb#428 + def remove_unparseable(files); end + + # Create an output dir if it doesn't exist. If it does exist, but doesn't + # contain the flag file created.rid then we refuse to use it, as + # we may clobber some manually generated documentation + # + # source://rdoc//lib/rdoc/rdoc.rb#170 + def setup_output_dir(dir, force); end + + # Accessor for statistics. Available after each call to parse_files + # + # source://rdoc//lib/rdoc/rdoc.rb#67 + def stats; end + + # The current documentation store + # + # source://rdoc//lib/rdoc/rdoc.rb#72 + def store; end + + # Sets the current documentation tree to +store+ and sets the store's rdoc + # driver to this instance. + # + # source://rdoc//lib/rdoc/rdoc.rb#215 + def store=(store); end + + # Update the flag file in an output directory. + # + # source://rdoc//lib/rdoc/rdoc.rb#223 + def update_output_dir(op_dir, time, last = T.unsafe(nil)); end + + class << self + # Add +klass+ that can generate output after parsing + # + # source://rdoc//lib/rdoc/rdoc.rb#77 + def add_generator(klass); end + + # Active RDoc::RDoc instance + # + # source://rdoc//lib/rdoc/rdoc.rb#85 + def current; end + + # Sets the active RDoc::RDoc instance + # + # source://rdoc//lib/rdoc/rdoc.rb#92 + def current=(rdoc); end + end +end + +# List of directory names skipped if test suites should be skipped +# +# source://rdoc//lib/rdoc/rdoc.rb#46 +RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES = T.let(T.unsafe(nil), Array) + +# List of directory names always skipped +# +# source://rdoc//lib/rdoc/rdoc.rb#41 +RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES = T.let(T.unsafe(nil), Array) + +# The RI driver implements the command-line ri tool. +# +# The driver supports: +# * loading RI data from: +# * Ruby's standard library +# * RubyGems +# * ~/.rdoc +# * A user-supplied directory +# * Paging output (uses RI_PAGER environment variable, PAGER environment +# variable or the less, more and pager programs) +# * Interactive mode with tab-completion +# * Abbreviated names (ri Zl shows Zlib documentation) +# * Colorized output +# * Merging output from multiple RI data sources +# +# source://rdoc//lib/rdoc/ri/driver.rb#25 +class RDoc::RI::Driver + # Creates a new driver using +initial_options+ from ::process_args + # + # @return [Driver] a new instance of Driver + # + # source://rdoc//lib/rdoc/ri/driver.rb#390 + def initialize(initial_options = T.unsafe(nil)); end + + # Adds paths for undocumented classes +also_in+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#428 + def add_also_in(out, also_in); end + + # Adds a class header to +out+ for class +name+ which is described in + # +classes+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#445 + def add_class(out, name, classes); end + + # Adds +extends+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#472 + def add_extends(out, extends); end + + # Adds a list of +extensions+ to this module of the given +type+ to +out+. + # add_includes and add_extends call this, so you should use those directly. + # + # source://rdoc//lib/rdoc/ri/driver.rb#480 + def add_extension_modules(out, type, extensions); end + + # Renders multiple included +modules+ from +store+ to +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#498 + def add_extension_modules_multiple(out, store, modules); end + + # Adds a single extension module +include+ from +store+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#525 + def add_extension_modules_single(out, store, include); end + + # Adds "(from ...)" to +out+ for +store+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#465 + def add_from(out, store); end + + # Adds +includes+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#539 + def add_includes(out, includes); end + + # Looks up the method +name+ and adds it to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#546 + def add_method(out, name); end + + # Adds documentation for all methods in +klass+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#557 + def add_method_documentation(out, klass); end + + # Adds a list of +methods+ to +out+ with a heading of +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#570 + def add_method_list(out, methods, name); end + + # Returns ancestor classes of +klass+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#590 + def ancestors_of(klass); end + + # source://rdoc//lib/rdoc/ri/driver.rb#925 + def check_did_you_mean; end + + # For RubyGems backwards compatibility + # + # source://rdoc//lib/rdoc/ri/driver.rb#621 + def class_cache; end + + # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#627 + def class_document(name, found, klasses, includes, extends); end + + # Adds the class +comment+ to +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#649 + def class_document_comment(out, comment); end + + # Adds the constants from +klass+ to the Document +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#669 + def class_document_constants(out, klass); end + + # Hash mapping a known class or module to the stores it can be loaded from + # + # source://rdoc//lib/rdoc/ri/driver.rb#693 + def classes; end + + # Returns the stores wherein +name+ is found along with the classes, + # extends and includes that match it + # + # source://rdoc//lib/rdoc/ri/driver.rb#713 + def classes_and_includes_and_extends_for(name); end + + # Completes +name+ based on the caches. For Readline + # + # source://rdoc//lib/rdoc/ri/driver.rb#738 + def complete(name); end + + # source://rdoc//lib/rdoc/ri/driver.rb#749 + def complete_klass(name, klass, selector, method, completions); end + + # source://rdoc//lib/rdoc/ri/driver.rb#768 + def complete_method(name, klass, selector, completions); end + + # Converts +document+ to text and writes it to the pager + # + # source://rdoc//lib/rdoc/ri/driver.rb#788 + def display(document); end + + # Outputs formatted RI data for class +name+. Groups undocumented classes + # + # source://rdoc//lib/rdoc/ri/driver.rb#801 + def display_class(name); end + + # Outputs formatted RI data for method +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#817 + def display_method(name); end + + # Outputs formatted RI data for the class or method +name+. + # + # Returns true if +name+ was found, false if it was not an alternative could + # be guessed, raises an error if +name+ couldn't be guessed. + # + # source://rdoc//lib/rdoc/ri/driver.rb#831 + def display_name(name); end + + # Displays each name in +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#860 + def display_names(names); end + + # Outputs formatted RI data for page +name+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#871 + def display_page(name); end + + # Outputs a formatted RI page list for the pages in +store+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#902 + def display_page_list(store, pages = T.unsafe(nil), search = T.unsafe(nil)); end + + # Expands abbreviated klass +klass+ into a fully-qualified class. "Zl::Da" + # will be expanded to Zlib::DataError. + # + # source://rdoc//lib/rdoc/ri/driver.rb#946 + def expand_class(klass); end + + # Expands the class portion of +name+ into a fully-qualified class. See + # #expand_class. + # + # source://rdoc//lib/rdoc/ri/driver.rb#964 + def expand_name(name); end + + # Filters the methods in +found+ trying to find a match for +name+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#980 + def filter_methods(found, name); end + + # Yields items matching +name+ including the store they were found in, the + # class being searched for, the class they were found in (an ancestor) the + # types of methods to look up (from #method_type), and the method name being + # searched for + # + # source://rdoc//lib/rdoc/ri/driver.rb#998 + def find_methods(name); end + + # Finds a store that matches +name+ which can be the name of a gem, "ruby", + # "home" or "site". + # + # See also RDoc::Store#source + # + # @raise [RDoc::RI::Driver::NotFoundError] + # + # source://rdoc//lib/rdoc/ri/driver.rb#1044 + def find_store(name); end + + # Creates a new RDoc::Markup::Formatter. If a formatter is given with -f, + # use it. If we're outputting to a pager, use bs, otherwise ansi. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1061 + def formatter(io); end + + # Runs ri interactively using Readline if it is available. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1074 + def interactive; end + + # Lists classes known to ri starting with +names+. If +names+ is empty all + # known classes are shown. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1113 + def list_known_classes(names = T.unsafe(nil)); end + + # Returns an Array of methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1145 + def list_methods_matching(name); end + + # Loads RI data for method +name+ on +klass+ from +store+. +type+ and + # +cache+ indicate if it is a class or instance method. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1184 + def load_method(store, cache, klass, type, name); end + + # Returns an Array of RI data for methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1207 + def load_methods_matching(name); end + + # Returns a filtered list of methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1228 + def lookup_method(name); end + + # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1253 + def method_document(name, filtered); end + + # Returns the type of method (:both, :instance, :class) for +selector+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1271 + def method_type(selector); end + + # Returns a regular expression for +name+ that will match an + # RDoc::AnyMethod's name. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1283 + def name_regexp(name); end + + # Paginates output through a pager program. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1297 + def page; end + + # Are we using a pager? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/ri/driver.rb#1315 + def paging?; end + + # Extracts the class, selector and method name parts from +name+ like + # Foo::Bar#baz. + # + # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a + # method + # + # source://rdoc//lib/rdoc/ri/driver.rb#1326 + def parse_name(name); end + + # Renders the +klass+ from +store+ to +out+. If the klass has no + # documentable items the class is added to +also_in+ instead. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1358 + def render_class(out, store, klass, also_in); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1388 + def render_method(out, store, method, name); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1408 + def render_method_arguments(out, arglists); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1417 + def render_method_comment(out, method, alias_for = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1435 + def render_method_superclass(out, method); end + + # Looks up and displays ri data according to the options given. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1447 + def run; end + + # Sets up a pager program to pass output through. Tries the RI_PAGER and + # PAGER environment variables followed by pager, less then more. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1467 + def setup_pager; end + + # Show all method documentation following a class or module + # + # source://rdoc//lib/rdoc/ri/driver.rb#61 + def show_all; end + + # Show all method documentation following a class or module + # + # source://rdoc//lib/rdoc/ri/driver.rb#61 + def show_all=(_arg0); end + + # Starts a WEBrick server for ri. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1493 + def start_server; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//lib/rdoc/ri/driver.rb#66 + def stores; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//lib/rdoc/ri/driver.rb#66 + def stores=(_arg0); end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//lib/rdoc/ri/driver.rb#71 + def use_stdout; end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//lib/rdoc/ri/driver.rb#71 + def use_stdout=(_arg0); end + + class << self + # Default options for ri + # + # source://rdoc//lib/rdoc/ri/driver.rb#76 + def default_options; end + + # Dump +data_path+ using pp + # + # source://rdoc//lib/rdoc/ri/driver.rb#97 + def dump(data_path); end + + # Parses +argv+ and returns a Hash of options + # + # source://rdoc//lib/rdoc/ri/driver.rb#108 + def process_args(argv); end + + # Runs the ri command line executable using +argv+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#375 + def run(argv = T.unsafe(nil)); end + end +end + +# Raised when a name isn't found in the ri data stores +# +# source://rdoc//lib/rdoc/ri/driver.rb#35 +class RDoc::RI::Driver::NotFoundError < ::RDoc::RI::Driver::Error + # @return [NotFoundError] a new instance of NotFoundError + # + # source://rdoc//lib/rdoc/ri/driver.rb#37 + def initialize(klass, suggestions = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/ri/driver.rb#49 + def message; end + + # Name that wasn't found + # + # source://rdoc//lib/rdoc/ri/driver.rb#45 + def name; end +end + +# For RubyGems backwards compatibility +# +# source://rdoc//lib/rdoc/ri/formatter.rb#5 +module RDoc::RI::Formatter; end + +# source://rdoc//lib/rdoc/ri/store.rb#4 +RDoc::RI::Store = RDoc::Store + +# A file loaded by \#require +# +# source://rdoc//lib/rdoc/require.rb#5 +class RDoc::Require < ::RDoc::CodeObject + # Creates a new Require that loads +name+ with +comment+ + # + # @return [Require] a new instance of Require + # + # source://rdoc//lib/rdoc/require.rb#15 + def initialize(name, comment); end + + # source://rdoc//lib/rdoc/require.rb#22 + def inspect; end + + # Name of the required file + # + # source://rdoc//lib/rdoc/require.rb#10 + def name; end + + # Name of the required file + # + # source://rdoc//lib/rdoc/require.rb#10 + def name=(_arg0); end + + # source://rdoc//lib/rdoc/require.rb#31 + def to_s; end + + # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. + # + # source://rdoc//lib/rdoc/require.rb#38 + def top_level; end +end + +# This is a WEBrick servlet that allows you to browse ri documentation. +# +# You can show documentation through either `ri --server` or, with RubyGems +# 2.0 or newer, `gem server`. For ri, the server runs on port 8214 by +# default. For RubyGems the server runs on port 8808 by default. +# +# You can use this servlet in your own project by mounting it on a WEBrick +# server: +# +# require 'webrick' +# +# server = WEBrick::HTTPServer.new Port: 8000 +# +# server.mount '/', RDoc::Servlet +# +# If you want to mount the servlet some other place than the root, provide the +# base path when mounting: +# +# server.mount '/rdoc', RDoc::Servlet, '/rdoc' +# +# source://rdoc//lib/rdoc/servlet.rb#34 +class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new WEBrick servlet. + # + # Use +mount_path+ when mounting the servlet somewhere other than /. + # + # Use +extra_doc_dirs+ for additional documentation directories. + # + # +server+ is provided automatically by WEBrick when mounting. +stores+ and + # +cache+ are provided automatically by the servlet. + # + # @return [Servlet] a new instance of Servlet + # + # source://rdoc//lib/rdoc/servlet.rb#69 + def initialize(server, stores, cache, mount_path = T.unsafe(nil), extra_doc_dirs = T.unsafe(nil)); end + + # Serves the asset at the path in +req+ for +generator_name+ via +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#100 + def asset(generator_name, req, res); end + + # Maps an asset type to its path on the filesystem + # + # source://rdoc//lib/rdoc/servlet.rb#42 + def asset_dirs; end + + # GET request entry point. Fills in +res+ for the path, etc. in +req+. + # + # source://rdoc//lib/rdoc/servlet.rb#119 + def do_GET(req, res); end + + # Fills in +res+ with the class, module or page for +req+ from +store+. + # + # +path+ is relative to the mount_path and is used to determine the class, + # module or page name (/RDoc/Servlet.html becomes RDoc::Servlet). + # +generator+ is used to create the page. + # + # source://rdoc//lib/rdoc/servlet.rb#152 + def documentation_page(store, generator, path, req, res); end + + # Creates the JSON search index on +res+ for the given +store+. +generator+ + # must respond to \#json_index to build. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#171 + def documentation_search(store, generator, req, res); end + + # Returns the RDoc::Store and path relative to +mount_path+ for + # documentation at +path+. + # + # source://rdoc//lib/rdoc/servlet.rb#185 + def documentation_source(path); end + + # Generates an error page for the +exception+ while handling +req+ on +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#203 + def error(exception, req, res); end + + # Instantiates a Darkfish generator for +store+ + # + # source://rdoc//lib/rdoc/servlet.rb#246 + def generator_for(store); end + + # Handles the If-Modified-Since HTTP header on +req+ for +path+. If the + # file has not been modified a Not Modified response is returned. If the + # file has been modified a Last-Modified header is added to +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#267 + def if_modified_since(req, res, path = T.unsafe(nil)); end + + # Returns an Array of installed documentation. + # + # Each entry contains the documentation name (gem name, 'Ruby + # Documentation', etc.), the path relative to the mount point, whether the + # documentation exists, the type of documentation (See RDoc::RI::Paths#each) + # and the filesystem to the RDoc::Store for the documentation. + # + # source://rdoc//lib/rdoc/servlet.rb#290 + def installed_docs; end + + # Returns a 404 page built by +generator+ for +req+ on +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#318 + def not_found(generator, req, res, message = T.unsafe(nil)); end + + # An RDoc::Options instance used for rendering options + # + # source://rdoc//lib/rdoc/servlet.rb#47 + def options; end + + # Enumerates the ri paths. See RDoc::RI::Paths#each + # + # source://rdoc//lib/rdoc/servlet.rb#327 + def ri_paths(&block); end + + # Generates the root page on +res+. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#334 + def root(req, res); end + + # Generates a search index for the root page on +res+. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#345 + def root_search(req, res); end + + # Displays documentation for +req+ on +res+, whether that be HTML or some + # asset. + # + # source://rdoc//lib/rdoc/servlet.rb#395 + def show_documentation(req, res); end + + # Returns an RDoc::Store for the given +source_name+ ('ruby' or a gem name). + # + # source://rdoc//lib/rdoc/servlet.rb#419 + def store_for(source_name); end + + class << self + # Creates an instance of this servlet that shares cached data between + # requests. + # + # source://rdoc//lib/rdoc/servlet.rb#53 + def get_instance(server, *options); end + end +end + +# A singleton class +# +# source://rdoc//lib/rdoc/single_class.rb#5 +class RDoc::SingleClass < ::RDoc::ClassModule + # Adds the superclass to the included modules. + # + # source://rdoc//lib/rdoc/single_class.rb#10 + def ancestors; end + + # source://rdoc//lib/rdoc/single_class.rb#14 + def aref_prefix; end + + # The definition of this singleton class, class << MyClassName + # + # source://rdoc//lib/rdoc/single_class.rb#21 + def definition; end + + # source://rdoc//lib/rdoc/single_class.rb#25 + def pretty_print(q); end +end + +# RDoc statistics collector which prints a summary and report of a project's +# documentation totals. +# +# source://rdoc//lib/rdoc/stats.rb#6 +class RDoc::Stats + include ::RDoc::Text + + # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1 + # which will create an RDoc::Stats::Normal outputter. + # + # @return [Stats] a new instance of Stats + # + # source://rdoc//lib/rdoc/stats.rb#29 + def initialize(store, num_files, verbosity = T.unsafe(nil)); end + + # Records the parsing of an alias +as+. + # + # source://rdoc//lib/rdoc/stats.rb#52 + def add_alias(as); end + + # Records the parsing of an attribute +attribute+ + # + # source://rdoc//lib/rdoc/stats.rb#59 + def add_attribute(attribute); end + + # Records the parsing of a class +klass+ + # + # source://rdoc//lib/rdoc/stats.rb#66 + def add_class(klass); end + + # Records the parsing of +constant+ + # + # source://rdoc//lib/rdoc/stats.rb#73 + def add_constant(constant); end + + # Records the parsing of +file+ + # + # source://rdoc//lib/rdoc/stats.rb#80 + def add_file(file); end + + # Records the parsing of +method+ + # + # source://rdoc//lib/rdoc/stats.rb#88 + def add_method(method); end + + # Records the parsing of a module +mod+ + # + # source://rdoc//lib/rdoc/stats.rb#95 + def add_module(mod); end + + # Call this to mark the beginning of parsing for display purposes + # + # source://rdoc//lib/rdoc/stats.rb#102 + def begin_adding; end + + # Calculates documentation totals and percentages for classes, modules, + # constants, attributes and methods. + # + # source://rdoc//lib/rdoc/stats.rb#110 + def calculate; end + + # Output level for the coverage report + # + # source://rdoc//lib/rdoc/stats.rb#13 + def coverage_level; end + + # Sets coverage report level. Accepted values are: + # + # false or nil:: No report + # 0:: Classes, modules, constants, attributes, methods + # 1:: Level 0 + method parameters + # + # source://rdoc//lib/rdoc/stats.rb#158 + def coverage_level=(level); end + + # Returns the length and number of undocumented items in +collection+. + # + # source://rdoc//lib/rdoc/stats.rb#167 + def doc_stats(collection); end + + # Call this to mark the end of parsing for display purposes + # + # source://rdoc//lib/rdoc/stats.rb#175 + def done_adding; end + + # Count of files parsed during parsing + # + # source://rdoc//lib/rdoc/stats.rb#18 + def files_so_far; end + + # The documentation status of this project. +true+ when 100%, +false+ when + # less than 100% and +nil+ when unknown. + # + # Set by calling #calculate + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/stats.rb#185 + def fully_documented?; end + + # A report that says you did a great job! + # + # source://rdoc//lib/rdoc/stats.rb#192 + def great_job; end + + # Total number of files found + # + # source://rdoc//lib/rdoc/stats.rb#23 + def num_files; end + + # Calculates the percentage of items documented. + # + # source://rdoc//lib/rdoc/stats.rb#204 + def percent_doc; end + + # Returns a report on which items are not documented + # + # source://rdoc//lib/rdoc/stats.rb#218 + def report; end + + # Returns a report on undocumented attributes in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#259 + def report_attributes(cm); end + + # Returns a report on undocumented items in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#277 + def report_class_module(cm); end + + # Returns a report on undocumented constants in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#329 + def report_constants(cm); end + + # Returns a report on undocumented methods in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#351 + def report_methods(cm); end + + # Returns a summary of the collected statistics. + # + # source://rdoc//lib/rdoc/stats.rb#389 + def summary; end + + # Determines which parameters in +method+ were not documented. Returns a + # total parameter count and an Array of undocumented methods. + # + # source://rdoc//lib/rdoc/stats.rb#439 + def undoc_params(method); end +end + +# Stats printer that prints just the files being documented with a progress +# bar +# +# source://rdoc//lib/rdoc/stats/normal.rb#13 +class RDoc::Stats::Normal < ::RDoc::Stats::Quiet + # source://rdoc//lib/rdoc/stats/normal.rb#15 + def begin_adding; end + + # source://rdoc//lib/rdoc/stats/normal.rb#54 + def done_adding; end + + # Prints a file with a progress bar + # + # source://rdoc//lib/rdoc/stats/normal.rb#23 + def print_file(files_so_far, filename); end +end + +# Stats printer that prints nothing +# +# source://rdoc//lib/rdoc/stats/quiet.rb#5 +class RDoc::Stats::Quiet + # Creates a new Quiet that will print nothing + # + # @return [Quiet] a new instance of Quiet + # + # source://rdoc//lib/rdoc/stats/quiet.rb#10 + def initialize(num_files); end + + # Prints a message at the beginning of parsing + # + # source://rdoc//lib/rdoc/stats/quiet.rb#17 + def begin_adding(*_arg0); end + + # Prints when RDoc is done + # + # source://rdoc//lib/rdoc/stats/quiet.rb#57 + def done_adding(*_arg0); end + + # Prints when an alias is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#22 + def print_alias(*_arg0); end + + # Prints when an attribute is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#27 + def print_attribute(*_arg0); end + + # Prints when a class is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#32 + def print_class(*_arg0); end + + # Prints when a constant is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#37 + def print_constant(*_arg0); end + + # Prints when a file is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#42 + def print_file(*_arg0); end + + # Prints when a method is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#47 + def print_method(*_arg0); end + + # Prints when a module is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#52 + def print_module(*_arg0); end +end + +# Stats printer that prints everything documented, including the documented +# status +# +# source://rdoc//lib/rdoc/stats/verbose.rb#6 +class RDoc::Stats::Verbose < ::RDoc::Stats::Normal + # Returns a marker for RDoc::CodeObject +co+ being undocumented + # + # source://rdoc//lib/rdoc/stats/verbose.rb#11 + def nodoc(co); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#15 + def print_alias(as); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#19 + def print_attribute(attribute); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#23 + def print_class(klass); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#27 + def print_constant(constant); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#31 + def print_file(files_so_far, file); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#36 + def print_method(method); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#40 + def print_module(mod); end +end + +# A set of rdoc data for a single project (gem, path, etc.). +# +# The store manages reading and writing ri data for a project and maintains a +# cache of methods, classes and ancestors in the store. +# +# The store maintains a #cache of its contents for faster lookup. After +# adding items to the store it must be flushed using #save_cache. The cache +# contains the following structures: +# +# @cache = { +# :ancestors => {}, # class name => ancestor names +# :attributes => {}, # class name => attributes +# :class_methods => {}, # class name => class methods +# :instance_methods => {}, # class name => instance methods +# :modules => [], # classes and modules in this store +# :pages => [], # page names +# } +# -- +# TODO need to prune classes +# +# source://rdoc//lib/rdoc/store.rb#25 +class RDoc::Store + # Creates a new Store of +type+ that will load or save to +path+ + # + # @return [Store] a new instance of Store + # + # source://rdoc//lib/rdoc/store.rb#127 + def initialize(path = T.unsafe(nil), type = T.unsafe(nil)); end + + # Adds +module+ as an enclosure (namespace) for the given +variable+ for C + # files. + # + # source://rdoc//lib/rdoc/store.rb#169 + def add_c_enclosure(variable, namespace); end + + # Adds C variables from an RDoc::Parser::C + # + # source://rdoc//lib/rdoc/store.rb#176 + def add_c_variables(c_parser); end + + # Adds the file with +name+ as an RDoc::TopLevel to the store. Returns the + # created RDoc::TopLevel. + # + # source://rdoc//lib/rdoc/store.rb#188 + def add_file(absolute_name, relative_name: T.unsafe(nil), parser: T.unsafe(nil)); end + + # Returns all classes discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#209 + def all_classes; end + + # Returns all classes and modules discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#216 + def all_classes_and_modules; end + + # All TopLevels known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#223 + def all_files; end + + # Returns all modules discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#230 + def all_modules; end + + # Ancestors cache accessor. Maps a klass name to an Array of its ancestors + # in this store. If Foo in this store inherits from Object, Kernel won't be + # listed (it will be included from ruby's ri store). + # + # source://rdoc//lib/rdoc/store.rb#239 + def ancestors; end + + # Attributes cache accessor. Maps a class to an Array of its attributes. + # + # source://rdoc//lib/rdoc/store.rb#246 + def attributes; end + + # Maps C variables to class or module names for each parsed C file. + # + # source://rdoc//lib/rdoc/store.rb#80 + def c_class_variables; end + + # Stores the name of the C variable a class belongs to. This helps wire up + # classes defined from C across files. + # + # source://rdoc//lib/rdoc/store.rb#73 + def c_enclosure_classes; end + + # source://rdoc//lib/rdoc/store.rb#75 + def c_enclosure_names; end + + # Maps C variables to singleton class names for each parsed C file. + # + # source://rdoc//lib/rdoc/store.rb#85 + def c_singleton_class_variables; end + + # The contents of the Store + # + # source://rdoc//lib/rdoc/store.rb#112 + def cache; end + + # Path to the cache file + # + # source://rdoc//lib/rdoc/store.rb#253 + def cache_path; end + + # Path to the ri data for +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#260 + def class_file(klass_name); end + + # Class methods cache accessor. Maps a class to an Array of its class + # methods (not full name). + # + # source://rdoc//lib/rdoc/store.rb#269 + def class_methods; end + + # Path where data for +klass_name+ will be stored (methods or class data) + # + # source://rdoc//lib/rdoc/store.rb#276 + def class_path(klass_name); end + + # Hash of all classes known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#283 + def classes_hash; end + + # Removes empty items and ensures item in each collection are unique and + # sorted + # + # source://rdoc//lib/rdoc/store.rb#291 + def clean_cache_collection(collection); end + + # Prepares the RDoc code object tree for use by a generator. + # + # It finds unique classes/modules defined, and replaces classes/modules that + # are aliases for another one by a copy with RDoc::ClassModule#is_alias_for + # set. + # + # It updates the RDoc::ClassModule#constant_aliases attribute of "real" + # classes or modules. + # + # It also completely removes the classes and modules that should be removed + # from the documentation and the methods that have a visibility below + # +min_visibility+, which is the --visibility option. + # + # See also RDoc::Context#remove_from_documentation? + # + # source://rdoc//lib/rdoc/store.rb#319 + def complete(min_visibility); end + + # If true this Store will not write any files + # + # source://rdoc//lib/rdoc/store.rb#90 + def dry_run; end + + # If true this Store will not write any files + # + # source://rdoc//lib/rdoc/store.rb#90 + def dry_run=(_arg0); end + + # The encoding of the contents in the Store + # + # source://rdoc//lib/rdoc/store.rb#117 + def encoding; end + + # The encoding of the contents in the Store + # + # source://rdoc//lib/rdoc/store.rb#117 + def encoding=(_arg0); end + + # Hash of all files known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#359 + def files_hash; end + + # Finds the enclosure (namespace) for the given C +variable+. + # + # source://rdoc//lib/rdoc/store.rb#366 + def find_c_enclosure(variable); end + + # Finds the class with +name+ in all discovered classes + # + # source://rdoc//lib/rdoc/store.rb#391 + def find_class_named(name); end + + # Finds the class with +name+ starting in namespace +from+ + # + # source://rdoc//lib/rdoc/store.rb#398 + def find_class_named_from(name, from); end + + # Finds the class or module with +name+ + # + # source://rdoc//lib/rdoc/store.rb#416 + def find_class_or_module(name); end + + # Finds the file with +name+ in all discovered files + # + # source://rdoc//lib/rdoc/store.rb#424 + def find_file_named(name); end + + # Finds the module with +name+ in all discovered modules + # + # source://rdoc//lib/rdoc/store.rb#431 + def find_module_named(name); end + + # Returns the RDoc::TopLevel that is a text file and has the given + # +file_name+ + # + # source://rdoc//lib/rdoc/store.rb#439 + def find_text_page(file_name); end + + # Finds unique classes/modules defined in +all_hash+, + # and returns them as an array. Performs the alias + # updates in +all_hash+: see ::complete. + # -- + # TODO aliases should be registered by Context#add_module_alias + # + # source://rdoc//lib/rdoc/store.rb#452 + def find_unique(all_hash); end + + # Fixes the erroneous BasicObject < Object in 1.9. + # + # Because we assumed all classes without a stated superclass + # inherit from Object, we have the above wrong inheritance. + # + # We fix BasicObject right away if we are running in a Ruby + # version >= 1.9. + # + # source://rdoc//lib/rdoc/store.rb#471 + def fix_basic_object_inheritance; end + + # Friendly rendition of #path + # + # source://rdoc//lib/rdoc/store.rb#480 + def friendly_path; end + + # source://rdoc//lib/rdoc/store.rb#492 + def inspect; end + + # Instance methods cache accessor. Maps a class to an Array of its + # instance methods (not full name). + # + # source://rdoc//lib/rdoc/store.rb#500 + def instance_methods; end + + # Loads all items from this store into memory. This recreates a + # documentation tree for use by a generator + # + # source://rdoc//lib/rdoc/store.rb#508 + def load_all; end + + # Loads cache file for this store + # + # source://rdoc//lib/rdoc/store.rb#556 + def load_cache; end + + # Loads ri data for +klass_name+ and hooks it up to this store. + # + # source://rdoc//lib/rdoc/store.rb#597 + def load_class(klass_name); end + + # Loads ri data for +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#615 + def load_class_data(klass_name); end + + # Loads ri data for +method_name+ in +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#630 + def load_method(klass_name, method_name); end + + # Loads ri data for +page_name+ + # + # source://rdoc//lib/rdoc/store.rb#650 + def load_page(page_name); end + + # Gets the main page for this RDoc store. This page is used as the root of + # the RDoc server. + # + # source://rdoc//lib/rdoc/store.rb#668 + def main; end + + # Sets the main page for this RDoc store. + # + # source://rdoc//lib/rdoc/store.rb#675 + def main=(page); end + + # Converts the variable => ClassModule map +variables+ from a C parser into + # a variable => class name map. + # + # source://rdoc//lib/rdoc/store.rb#683 + def make_variable_map(variables); end + + # Path to the ri data for +method_name+ in +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#696 + def method_file(klass_name, method_name); end + + # Modules cache accessor. An Array of all the module (and class) names in + # the store. + # + # source://rdoc//lib/rdoc/store.rb#710 + def module_names; end + + # Hash of all modules known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#717 + def modules_hash; end + + # Returns the RDoc::TopLevel that is a text file and has the given +name+ + # + # source://rdoc//lib/rdoc/store.rb#724 + def page(name); end + + # Path to the ri data for +page_name+ + # + # source://rdoc//lib/rdoc/store.rb#733 + def page_file(page_name); end + + # Path this store reads or writes + # + # source://rdoc//lib/rdoc/store.rb#95 + def path; end + + # Path this store reads or writes + # + # source://rdoc//lib/rdoc/store.rb#95 + def path=(_arg0); end + + # The RDoc::RDoc driver for this parse tree. This allows classes consulting + # the documentation tree to access user-set options, for example. + # + # source://rdoc//lib/rdoc/store.rb#101 + def rdoc; end + + # The RDoc::RDoc driver for this parse tree. This allows classes consulting + # the documentation tree to access user-set options, for example. + # + # source://rdoc//lib/rdoc/store.rb#101 + def rdoc=(_arg0); end + + # Removes from +all_hash+ the contexts that are nodoc or have no content. + # + # See RDoc::Context#remove_from_documentation? + # + # source://rdoc//lib/rdoc/store.rb#744 + def remove_nodoc(all_hash); end + + # Saves all entries in the store + # + # source://rdoc//lib/rdoc/store.rb#754 + def save; end + + # Writes the cache file for this store + # + # source://rdoc//lib/rdoc/store.rb#779 + def save_cache; end + + # Writes the ri data for +klass+ (or module) + # + # source://rdoc//lib/rdoc/store.rb#806 + def save_class(klass); end + + # Writes the ri data for +method+ on +klass+ + # + # source://rdoc//lib/rdoc/store.rb#880 + def save_method(klass, method); end + + # Writes the ri data for +page+ + # + # source://rdoc//lib/rdoc/store.rb#903 + def save_page(page); end + + # Source of the contents of this store. + # + # For a store from a gem the source is the gem name. For a store from the + # home directory the source is "home". For system ri store (the standard + # library documentation) the source is"ruby". For a store from the site + # ri directory the store is "site". For other stores the source is the + # #path. + # + # source://rdoc//lib/rdoc/store.rb#929 + def source; end + + # Gets the title for this RDoc store. This is used as the title in each + # page on the RDoc server + # + # source://rdoc//lib/rdoc/store.rb#943 + def title; end + + # Sets the title page for this RDoc store. + # + # source://rdoc//lib/rdoc/store.rb#950 + def title=(title); end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//lib/rdoc/store.rb#107 + def type; end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//lib/rdoc/store.rb#107 + def type=(_arg0); end + + # Returns the unique classes discovered by RDoc. + # + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#959 + def unique_classes; end + + # Returns the unique classes and modules discovered by RDoc. + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#967 + def unique_classes_and_modules; end + + # Returns the unique modules discovered by RDoc. + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#975 + def unique_modules; end + + # The lazy constants alias will be discovered in passing + # + # source://rdoc//lib/rdoc/store.rb#122 + def unmatched_constant_alias; end + + # source://rdoc//lib/rdoc/store.rb#200 + def update_parser_of_file(absolute_name, parser); end +end + +# Raised when a stored file for a class, module, page or method is missing. +# +# source://rdoc//lib/rdoc/store.rb#36 +class RDoc::Store::MissingFileError < ::RDoc::Store::Error + # Creates a new MissingFileError for the missing +file+ for the given + # +name+ that should have been in the +store+. + # + # @return [MissingFileError] a new instance of MissingFileError + # + # source://rdoc//lib/rdoc/store.rb#57 + def initialize(store, file, name); end + + # The file the #name should be saved as + # + # source://rdoc//lib/rdoc/store.rb#46 + def file; end + + # source://rdoc//lib/rdoc/store.rb#63 + def message; end + + # The name of the object the #file would be loaded from + # + # source://rdoc//lib/rdoc/store.rb#51 + def name; end + + # The store the file should exist in + # + # source://rdoc//lib/rdoc/store.rb#41 + def store; end +end + +# RDoc::Task creates the following rake tasks to generate and clean up RDoc +# output: +# +# [rdoc] +# Main task for this RDoc task. +# +# [clobber_rdoc] +# Delete all the rdoc files. This target is automatically added to the main +# clobber target. +# +# [rerdoc] +# Rebuild the rdoc files from scratch, even if they are not out of date. +# +# Simple Example: +# +# require 'rdoc/task' +# +# RDoc::Task.new do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# end +# +# The +rdoc+ object passed to the block is an RDoc::Task object. See the +# attributes list for the RDoc::Task class for available customization options. +# +# == Specifying different task names +# +# You may wish to give the task a different name, such as if you are +# generating two sets of documentation. For instance, if you want to have a +# development set of documentation including private methods: +# +# require 'rdoc/task' +# +# RDoc::Task.new :rdoc_dev do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# rdoc.options << "--all" +# end +# +# The tasks would then be named :rdoc_dev, +# :clobber_rdoc_dev, and :rerdoc_dev. +# +# If you wish to have completely different task names, then pass a Hash as +# first argument. With the :rdoc, :clobber_rdoc and +# :rerdoc options, you can customize the task names to your liking. +# +# For example: +# +# require 'rdoc/task' +# +# RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", +# :rerdoc => "rdoc:force") +# +# This will create the tasks :rdoc, :rdoc:clean and +# :rdoc:force. +# +# source://rdoc//lib/rdoc/task.rb#96 +class RDoc::Task < ::Rake::TaskLib + # Create an RDoc task with the given name. See the RDoc::Task class overview + # for documentation. + # + # @return [Task] a new instance of Task + # @yield [_self] + # @yieldparam _self [RDoc::Task] the object that the method was called on + # + # source://rdoc//lib/rdoc/task.rb#155 + def initialize(name = T.unsafe(nil)); end + + # The block passed to this method will be called just before running the + # RDoc generator. It is allowed to modify RDoc::Task attributes inside the + # block. + # + # source://rdoc//lib/rdoc/task.rb#273 + def before_running_rdoc(&block); end + + # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and + # :rerdoc. If other names are given an ArgumentError is raised. + # + # source://rdoc//lib/rdoc/task.rb#171 + def check_names(names); end + + # Task description for the clobber rdoc task or its renamed equivalent + # + # source://rdoc//lib/rdoc/task.rb#185 + def clobber_task_description; end + + # Sets default task values + # + # source://rdoc//lib/rdoc/task.rb#192 + def defaults; end + + # Create the tasks defined by this task lib. + # + # source://rdoc//lib/rdoc/task.rb#221 + def define; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//lib/rdoc/task.rb#149 + def external; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//lib/rdoc/task.rb#149 + def external=(_arg0); end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#134 + def generator; end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#134 + def generator=(_arg0); end + + # All source is inline now. This method is deprecated + # + # source://rdoc//lib/rdoc/task.rb#206 + def inline_source; end + + # All source is inline now. This method is deprecated + # + # source://rdoc//lib/rdoc/task.rb#214 + def inline_source=(value); end + + # Name of file to be used as the main, top level file of the RDoc. (default + # is none) + # + # source://rdoc//lib/rdoc/task.rb#123 + def main; end + + # Name of file to be used as the main, top level file of the RDoc. (default + # is none) + # + # source://rdoc//lib/rdoc/task.rb#123 + def main=(_arg0); end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//lib/rdoc/task.rb#107 + def markup; end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//lib/rdoc/task.rb#107 + def markup=(_arg0); end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//lib/rdoc/task.rb#101 + def name; end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//lib/rdoc/task.rb#101 + def name=(_arg0); end + + # List of options that will be supplied to RDoc + # + # source://rdoc//lib/rdoc/task.rb#257 + def option_list; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#144 + def options; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#144 + def options=(_arg0); end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//lib/rdoc/task.rb#112 + def rdoc_dir; end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//lib/rdoc/task.rb#112 + def rdoc_dir=(_arg0); end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#139 + def rdoc_files; end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#139 + def rdoc_files=(_arg0); end + + # Task description for the rdoc task or its renamed equivalent + # + # source://rdoc//lib/rdoc/task.rb#280 + def rdoc_task_description; end + + # Task description for the rerdoc task or its renamed description + # + # source://rdoc//lib/rdoc/task.rb#287 + def rerdoc_task_description; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#128 + def template; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#128 + def template=(_arg0); end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#117 + def title; end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#117 + def title=(_arg0); end + + private + + # source://rdoc//lib/rdoc/task.rb#304 + def clobber_task_name; end + + # source://rdoc//lib/rdoc/task.rb#293 + def rdoc_target; end + + # source://rdoc//lib/rdoc/task.rb#297 + def rdoc_task_name; end + + # source://rdoc//lib/rdoc/task.rb#311 + def rerdoc_task_name; end +end + +# Methods for manipulating comment text +# +# source://rdoc//lib/rdoc/text.rb#11 +module RDoc::Text + # Expands tab characters in +text+ to eight spaces + # + # source://rdoc//lib/rdoc/text.rb#59 + def expand_tabs(text); end + + # Flush +text+ left based on the shortest line + # + # source://rdoc//lib/rdoc/text.rb#78 + def flush_left(text); end + + # Returns the value of attribute language. + # + # source://rdoc//lib/rdoc/text.rb#13 + def language; end + + # Sets the attribute language + # + # @param value the value to set the attribute language to. + # + # source://rdoc//lib/rdoc/text.rb#13 + def language=(_arg0); end + + # Convert a string in markup format into HTML. + # + # Requires the including class to implement #formatter + # + # source://rdoc//lib/rdoc/text.rb#97 + def markup(text); end + + # Strips hashes, expands tabs then flushes +text+ to the left + # + # source://rdoc//lib/rdoc/text.rb#113 + def normalize_comment(text); end + + # Normalizes +text+ then builds a RDoc::Markup::Document from it + # + # source://rdoc//lib/rdoc/text.rb#131 + def parse(text, format = T.unsafe(nil)); end + + # The first +limit+ characters of +text+ as HTML + # + # source://rdoc//lib/rdoc/text.rb#145 + def snippet(text, limit = T.unsafe(nil)); end + + # Strips leading # characters from +text+ + # + # source://rdoc//lib/rdoc/text.rb#154 + def strip_hashes(text); end + + # Strips leading and trailing \n characters from +text+ + # + # source://rdoc//lib/rdoc/text.rb#166 + def strip_newlines(text); end + + # Strips /* */ style comments + # + # source://rdoc//lib/rdoc/text.rb#173 + def strip_stars(text); end + + # source://rdoc//lib/rdoc/text.rb#196 + def to_html(text); end + + # Wraps +txt+ to +line_len+ + # + # source://rdoc//lib/rdoc/text.rb#283 + def wrap(txt, line_len = T.unsafe(nil)); end + + class << self + # Transcodes +character+ to +encoding+ with a +fallback+ character. + # + # source://rdoc//lib/rdoc/text.rb#51 + def encode_fallback(character, encoding, fallback); end + end +end + +# A TokenStream is a list of tokens, gathered during the parse of some entity +# (say a method). Entities populate these streams by being registered with the +# lexer. Any class can collect tokens by including TokenStream. From the +# outside, you use such an object by calling the start_collecting_tokens +# method, followed by calls to add_token and pop_token. +# +# source://rdoc//lib/rdoc/token_stream.rb#9 +module RDoc::TokenStream + # Adds one +token+ to the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#84 + def add_token(token); end + + # Adds +tokens+ to the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#77 + def add_tokens(tokens); end + + # Starts collecting tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#91 + def collect_tokens; end + + # Remove the last token from the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#100 + def pop_token; end + + # Starts collecting tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#91 + def start_collecting_tokens; end + + # Current token stream + # + # source://rdoc//lib/rdoc/token_stream.rb#107 + def token_stream; end + + # Returns a string representation of the token stream + # + # source://rdoc//lib/rdoc/token_stream.rb#114 + def tokens_to_s; end + + class << self + # Converts +token_stream+ to HTML wrapping various tokens with + # elements. Some tokens types are wrapped in spans + # with the given class names. Other token types are not wrapped in spans. + # + # source://rdoc//lib/rdoc/token_stream.rb#16 + def to_html(token_stream); end + end +end + +# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a) +# +# The TomDoc specification can be found at: +# +# http://tomdoc.org +# +# The latest version of the TomDoc specification can be found at: +# +# https://github.com/mojombo/tomdoc/blob/master/tomdoc.md +# +# To choose TomDoc as your only default format see RDoc::Options@Saved+Options +# for instructions on setting up a .rdoc_options file to store +# your project default. +# +# There are a few differences between this parser and the specification. A +# best-effort was made to follow the specification as closely as possible but +# some choices to deviate were made. +# +# A future version of RDoc will warn when a MUST or MUST NOT is violated and +# may warn when a SHOULD or SHOULD NOT is violated. RDoc will always try +# to emit documentation even if given invalid TomDoc. +# +# Here are some implementation choices this parser currently makes: +# +# This parser allows rdoc-style inline markup but you should not depended on +# it. +# +# This parser allows a space between the comment and the method body. +# +# This parser does not require the default value to be described for an +# optional argument. +# +# This parser does not examine the order of sections. An Examples section may +# precede the Arguments section. +# +# This class is documented in TomDoc format. Since this is a subclass of the +# RDoc markup parser there isn't much to see here, unfortunately. +# +# source://rdoc//lib/rdoc/tom_doc.rb#42 +class RDoc::TomDoc < ::RDoc::Markup::Parser + # Public: Creates a new TomDoc parser. See also RDoc::Markup::parse + # + # @return [TomDoc] a new instance of TomDoc + # + # source://rdoc//lib/rdoc/tom_doc.rb#130 + def initialize; end + + # Internal: Builds a heading from the token stream + # + # level - The level of heading to create + # + # Returns an RDoc::Markup::Heading + # + # source://rdoc//lib/rdoc/tom_doc.rb#143 + def build_heading(level); end + + # Internal: Builds a paragraph from the token stream + # + # margin - Unused + # + # Returns an RDoc::Markup::Paragraph. + # + # source://rdoc//lib/rdoc/tom_doc.rb#173 + def build_paragraph(margin); end + + # Internal: Builds a verbatim from the token stream. A verbatim in the + # Examples section will be marked as in Ruby format. + # + # margin - The indentation from the margin for lines that belong to this + # verbatim section. + # + # Returns an RDoc::Markup::Verbatim + # + # source://rdoc//lib/rdoc/tom_doc.rb#159 + def build_verbatim(margin); end + + # Detects a section change to "Returns" and adds a heading + # + # source://rdoc//lib/rdoc/tom_doc.rb#213 + def parse_text(parent, indent); end + + # Internal: Turns text into an Array of tokens + # + # text - A String containing TomDoc-format text. + # + # Returns self. + # + # source://rdoc//lib/rdoc/tom_doc.rb#231 + def tokenize(text); end + + # Internal: Token accessor + # + # source://rdoc//lib/rdoc/tom_doc.rb#46 + def tokens; end + + class << self + # Internal: Adds a post-processor which sets the RDoc section based on the + # comment's status. + # + # Returns nothing. + # + # source://rdoc//lib/rdoc/tom_doc.rb#53 + def add_post_processor; end + + # Public: Parses TomDoc from text + # + # text - A String containing TomDoc-format text. + # + # Examples + # + # RDoc::TomDoc.parse <<-TOMDOC + # This method does some things + # + # Returns nothing. + # TOMDOC + # # => # + # + # Returns an RDoc::Markup::Document representing the TomDoc format. + # + # source://rdoc//lib/rdoc/tom_doc.rb#84 + def parse(text); end + + # Internal: Extracts the Signature section's method signature + # + # comment - An RDoc::Comment that will be parsed and have the signature + # extracted + # + # Returns a String containing the signature and nil if not + # + # source://rdoc//lib/rdoc/tom_doc.rb#100 + def signature(comment); end + end +end + +# A TopLevel context is a representation of the contents of a single file +# +# source://rdoc//lib/rdoc/top_level.rb#5 +class RDoc::TopLevel < ::RDoc::Context + # Creates a new TopLevel for the file at +absolute_name+. If documentation + # is being generated outside the source dir +relative_name+ is relative to + # the source directory. + # + # @return [TopLevel] a new instance of TopLevel + # + # source://rdoc//lib/rdoc/top_level.rb#43 + def initialize(absolute_name, relative_name = T.unsafe(nil)); end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#64 + def ==(other); end + + # Absolute name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#22 + def absolute_name; end + + # Absolute name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#22 + def absolute_name=(_arg0); end + + # Adds +an_alias+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#73 + def add_alias(an_alias); end + + # Adds +constant+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#82 + def add_constant(constant); end + + # Adds +include+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#91 + def add_include(include); end + + # Adds +method+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#100 + def add_method(method); end + + # Adds class or module +mod+. Used in the building phase + # by the Ruby parser. + # + # source://rdoc//lib/rdoc/top_level.rb#110 + def add_to_classes_or_modules(mod); end + + # Base name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#117 + def base_name; end + + # All the classes or modules that were declared in + # this file. These are assigned to either +#classes_hash+ + # or +#modules_hash+ once we know what they really are. + # + # source://rdoc//lib/rdoc/top_level.rb#29 + def classes_or_modules; end + + # Returns a URL for this source file on some web repository. Use the -W + # command line option to set. + # + # source://rdoc//lib/rdoc/generator/markup.rb#149 + def cvs_url; end + + # source://rdoc//lib/rdoc/top_level.rb#31 + def diagram; end + + # source://rdoc//lib/rdoc/top_level.rb#31 + def diagram=(_arg0); end + + # Only a TopLevel that contains text file) will be displayed. See also + # RDoc::CodeObject#display? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/top_level.rb#127 + def display?; end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#64 + def eql?(other); end + + # This TopLevel's File::Stat struct + # + # source://rdoc//lib/rdoc/top_level.rb#12 + def file_stat; end + + # This TopLevel's File::Stat struct + # + # source://rdoc//lib/rdoc/top_level.rb#12 + def file_stat=(_arg0); end + + # See RDoc::TopLevel::find_class_or_module + # -- + # TODO Why do we search through all classes/modules found, not just the + # ones of this instance? + # + # source://rdoc//lib/rdoc/top_level.rb#137 + def find_class_or_module(name); end + + # Finds a class or module named +symbol+ + # + # source://rdoc//lib/rdoc/top_level.rb#144 + def find_local_symbol(symbol); end + + # Finds a module or class with +name+ + # + # source://rdoc//lib/rdoc/top_level.rb#151 + def find_module_named(name); end + + # Returns the relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#158 + def full_name; end + + # An RDoc::TopLevel has the same hash as another with the same + # relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#166 + def hash; end + + # URL for this with a +prefix+ + # + # source://rdoc//lib/rdoc/top_level.rb#173 + def http_url(prefix); end + + # source://rdoc//lib/rdoc/top_level.rb#179 + def inspect; end + + # Time this file was last modified, if known + # + # source://rdoc//lib/rdoc/top_level.rb#191 + def last_modified; end + + # Dumps this TopLevel for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/top_level.rb#198 + def marshal_dump; end + + # Loads this TopLevel from +array+. + # + # source://rdoc//lib/rdoc/top_level.rb#210 + def marshal_load(array); end + + # Base name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#117 + def name; end + + # Returns the NormalClass "Object", creating it if not found. + # + # Records +self+ as a location in "Object". + # + # source://rdoc//lib/rdoc/top_level.rb#224 + def object_class; end + + # Base name of this file without the extension + # + # source://rdoc//lib/rdoc/top_level.rb#235 + def page_name; end + + # The parser class that processed this file + # + # source://rdoc//lib/rdoc/top_level.rb#36 + def parser; end + + # source://rdoc//lib/rdoc/top_level.rb#55 + def parser=(val); end + + # Path to this file for use with HTML generator output. + # + # source://rdoc//lib/rdoc/top_level.rb#245 + def path; end + + # source://rdoc//lib/rdoc/top_level.rb#249 + def pretty_print(q); end + + # Relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#17 + def relative_name; end + + # Relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#17 + def relative_name=(_arg0); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//lib/rdoc/top_level.rb#263 + def search_record; end + + # Is this TopLevel from a text file instead of a source code file? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/top_level.rb#280 + def text?; end + + # source://rdoc//lib/rdoc/top_level.rb#284 + def to_s; end +end + +# :stopdoc: +# +# source://rdoc//lib/rdoc/task.rb#321 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils +end + +# For backwards compatibility +# +# source://rdoc//lib/rdoc/task.rb#326 +Rake::RDocTask = RDoc::Task diff --git a/sorbet/rbi/gems/reek@6.1.4.rbi b/sorbet/rbi/gems/reek@6.1.4.rbi new file mode 100644 index 0000000000..219d19d93b --- /dev/null +++ b/sorbet/rbi/gems/reek@6.1.4.rbi @@ -0,0 +1,5549 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reek` gem. +# Please instead update this file by running `bin/tapioca gem reek`. + +# source://reek//lib/reek/version.rb#4 +module Reek; end + +# Represents functionality related to an Abstract Syntax Tree. +# +# source://reek//lib/reek/ast/object_refs.rb#5 +module Reek::AST; end + +# Maps AST node types to sublasses of ASTNode extended with the relevant +# utility modules. +# +# source://reek//lib/reek/ast/ast_node_class_map.rb#11 +class Reek::AST::ASTNodeClassMap + # @return [ASTNodeClassMap] a new instance of ASTNodeClassMap + # + # source://reek//lib/reek/ast/ast_node_class_map.rb#12 + def initialize; end + + # source://reek//lib/reek/ast/ast_node_class_map.rb#24 + def extension_map; end + + # source://reek//lib/reek/ast/ast_node_class_map.rb#16 + def klass_for(type); end + + private + + # Returns the value of attribute klass_map. + # + # source://reek//lib/reek/ast/ast_node_class_map.rb#39 + def klass_map; end +end + +# An AST Builder for ruby parser. +# +# source://reek//lib/reek/ast/builder.rb#10 +class Reek::AST::Builder < ::Parser::Builders::Default + # This is a work around for parsing ruby code that has a string with invalid sequence as UTF-8. + # See. https://github.com/whitequark/parser/issues/283 + # + # source://reek//lib/reek/ast/builder.rb#11 + def string_value(token); end +end + +# Base class for AST nodes extended with utility methods. Contains some +# methods to ease the transition from Sexp to AST::Node. +# +# source://reek//lib/reek/ast/node.rb#11 +class Reek::AST::Node < ::Parser::AST::Node + # @return [Node] a new instance of Node + # + # source://reek//lib/reek/ast/node.rb#12 + def initialize(type, children = T.unsafe(nil), options = T.unsafe(nil)); end + + # Method will be overridden by the code in the IfNode, CaseNode, and LogicOperatorBase sexp extensions. + # + # source://reek//lib/reek/ast/node.rb#106 + def condition; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/node.rb#68 + def contains_nested_node?(target_type); end + + # Carries out a depth-first traversal of this syntax tree, yielding every + # Sexp of the searched for type or types. The traversal stops at any node + # whose type is listed in `ignoring`. + # + # If a type is searched for *and* listed in ignoring, it will be yielded + # but traversal will not continue to its children. + # + # If the root's type is ignored, traversal does not stop, unless the root + # is of a target type. + # + # Takes a block as well. + # + # Returns an array with all matching nodes. + # + # @example + # node.each_node(:send, [:mlhs]) do |call_node| .... end + # node.each_node(:lvar).any? { |it| it.var_name == 'something' } + # node.each_node([:block]).flat_map do |elem| ... end + # @param target_types [Symbol, Array] the type or types to look + # for + # @param ignoring [Array] types to ignore + # @param blk block to execute for every hit. Gets passed in the + # matching element itself. + # + # source://reek//lib/reek/ast/node.rb#62 + def each_node(target_types, ignoring = T.unsafe(nil), &blk); end + + # source://reek//lib/reek/ast/node.rb#74 + def format_to_ruby; end + + # source://reek//lib/reek/ast/node.rb#17 + def full_comment; end + + # source://reek//lib/reek/ast/node.rb#21 + def leading_comment; end + + # Provide length for statement counting. A sexp counts as one statement. + # + # source://reek//lib/reek/ast/node.rb#88 + def length; end + + # source://reek//lib/reek/ast/node.rb#29 + def line; end + + # source://reek//lib/reek/ast/node.rb#33 + def name; end + + # source://reek//lib/reek/ast/node.rb#101 + def source; end + + # Most nodes represent only one statement (although they can have nested + # statements). The special type :begin exists primarily to contain more + # statements. + # + # @return Array of unique outer-level statements contained in this node + # + # source://reek//lib/reek/ast/node.rb#97 + def statements; end + + protected + + # See ".each_node" for documentation. + # + # source://reek//lib/reek/ast/node.rb#111 + def look_for(target_types, ignoring, &blk); end + + # See ".each_node" for documentation. + # + # @yield [_self] + # @yieldparam _self [Reek::AST::Node] the object that the method was called on + # + # source://reek//lib/reek/ast/node.rb#122 + def look_for_recurse(target_types, ignoring, &blk); end + + private + + # Returns the value of attribute comments. + # + # source://reek//lib/reek/ast/node.rb#133 + def comments; end + + # source://reek//lib/reek/ast/node.rb#135 + def each_sexp; end +end + +# ObjectRefs is used in CodeContexts. +# It manages and counts the references out of a method to other objects and to `self`. +# +# E.g. this code: +# def foo(thing) +# bar.call_me +# bar.maybe(thing.wat) +# end +# +# would make "@refs" below look like this after the TreeWalker has done his job: +# { +# :self=>[2, 3], # `bar.call_me` and `bar.maybe` count as refs to `self` in line 2 and 3 +# :thing=>[3] # `thing.wat` in `bar.maybe()` counts as one reference to `thing` +# } +# +# source://reek//lib/reek/ast/object_refs.rb#22 +class Reek::AST::ObjectRefs + # @return [ObjectRefs] a new instance of ObjectRefs + # + # source://reek//lib/reek/ast/object_refs.rb#23 + def initialize; end + + # E.g. for + # { foo: [2], self: [2,3], bar: [3,4] } + # this would return + # { self: [2,3], bar: [3,4] } + # + # @return [Hash] The most popular references. + # + # source://reek//lib/reek/ast/object_refs.rb#43 + def most_popular; end + + # Records the references a given method in a CodeContext has including + # `self` (see the example at the beginning of this file). + # + # @param name [Symbol] The name of the object that the method references or `self`. + # @param line [Int] The line number where this reference occurs. + # @return [Int|nil] The line number that was added (which might be nil). + # + # source://reek//lib/reek/ast/object_refs.rb#34 + def record_reference(name:, line: T.unsafe(nil)); end + + # source://reek//lib/reek/ast/object_refs.rb#48 + def references_to(name); end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/object_refs.rb#52 + def self_is_max?; end + + private + + # Returns the value of attribute refs. + # + # source://reek//lib/reek/ast/object_refs.rb#58 + def refs; end +end + +# Locates references to the current object within a portion +# of an abstract syntax tree. +# +# source://reek//lib/reek/ast/reference_collector.rb#9 +class Reek::AST::ReferenceCollector + # @return [ReferenceCollector] a new instance of ReferenceCollector + # + # source://reek//lib/reek/ast/reference_collector.rb#10 + def initialize(ast); end + + # source://reek//lib/reek/ast/reference_collector.rb#14 + def num_refs_to_self; end + + private + + # Returns the value of attribute ast. + # + # source://reek//lib/reek/ast/reference_collector.rb#20 + def ast; end + + # source://reek//lib/reek/ast/reference_collector.rb#22 + def explicit_self_calls; end + + # source://reek//lib/reek/ast/reference_collector.rb#26 + def implicit_self_calls; end +end + +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#5 +module Reek::AST::SexpExtensions; end + +# Utility methods for :and nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/logical_operators.rb#18 +module Reek::AST::SexpExtensions::AndNode + include ::Reek::AST::SexpExtensions::LogicOperatorBase +end + +# Utility methods for :arg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#38 +module Reek::AST::SexpExtensions::ArgNode + include ::Reek::AST::SexpExtensions::ArgNodeBase +end + +# Base module for utility methods for argument nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#7 +module Reek::AST::SexpExtensions::ArgNodeBase + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#28 + def anonymous_splat?; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#20 + def block?; end + + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#32 + def components; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#12 + def marked_unused?; end + + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#8 + def name; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#24 + def optional_argument?; end + + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#16 + def plain_name; end +end + +# Utility methods for :args nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/nested_assignables.rb#15 +module Reek::AST::SexpExtensions::ArgsNode + include ::Reek::AST::SexpExtensions::NestedAssignables +end + +# Utility methods for :begin nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/begin.rb#7 +module Reek::AST::SexpExtensions::BeginNode + # The special type :begin exists primarily to contain more statements. + # Therefore, this method overrides the default implementation to return + # this node's children. + # + # source://reek//lib/reek/ast/sexp_extensions/begin.rb#11 + def statements; end +end + +# Utility methods for :block nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/block.rb#7 +module Reek::AST::SexpExtensions::BlockNode + # source://reek//lib/reek/ast/sexp_extensions/block.rb#12 + def args; end + + # source://reek//lib/reek/ast/sexp_extensions/block.rb#16 + def block; end + + # source://reek//lib/reek/ast/sexp_extensions/block.rb#8 + def call; end + + # source://reek//lib/reek/ast/sexp_extensions/block.rb#24 + def parameter_names; end + + # source://reek//lib/reek/ast/sexp_extensions/block.rb#20 + def parameters; end + + # source://reek//lib/reek/ast/sexp_extensions/block.rb#28 + def simple_name; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/block.rb#32 + def without_block_arguments?; end +end + +# Utility methods for :blockarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#66 +module Reek::AST::SexpExtensions::BlockargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#69 + def block?; end +end + +# source://reek//lib/reek/ast/sexp_extensions/send.rb#53 +Reek::AST::SexpExtensions::CSendNode = Reek::AST::SexpExtensions::SendNode + +# Utility methods for :case nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/case.rb#7 +module Reek::AST::SexpExtensions::CaseNode + # source://reek//lib/reek/ast/sexp_extensions/case.rb#12 + def body_nodes(type, ignoring = T.unsafe(nil)); end + + # source://reek//lib/reek/ast/sexp_extensions/case.rb#8 + def condition; end + + # source://reek//lib/reek/ast/sexp_extensions/case.rb#18 + def else_body; end +end + +# Utility methods for constant assignment (:casgn) nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/module.rb#100 +module Reek::AST::SexpExtensions::CasgnNode + include ::Reek::AST::SexpExtensions::ConstantDefiningNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#103 + def defines_module?; end + + # source://reek//lib/reek/ast/sexp_extensions/module.rb#129 + def name; end + + # Sometimes we assign classes like: + # + # Foo = Class.new(Bar) + # + # This is mapped into the following expression: + # + # s(:casgn, nil :Foo, + # s(:send, + # s(:const, nil, :Class), :new, + # s(:const, nil, :Bar) + # ) + # ) + # + # And we are only looking for s(:const, nil, :Bar) + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#123 + def superclass; end + + # there are two valid forms of the casgn sexp + # (casgn ) and + # (casgn ) used in or-asgn and mlhs + # + # source = "class Hi; THIS ||= 3; end" + # (class + # (const nil :Hi) nil + # (or-asgn + # (casgn nil :THIS) + # (int 3))) + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#143 + def value; end + + private + + # This is the right hand side of a constant + # assignment. + # + # This can be simple: + # + # Foo = 23 + # + # s(:casgn, nil, :Foo, + # s(:int, 23)) + # + # In this cases we do not care and return nil. + # + # Or complicated: + # + # Iterator = Struct.new :exp do ... end + # + # s(:casgn, nil, :Iterator, + # s(:block, + # s(:send, + # s(:const, nil, :Struct), :new, + # s(:sym, :exp) + # ), + # s(:args), + # ... + # ) + # ) + # + # In this cases we return the Struct.new part + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#178 + def constant_definition; end +end + +# Utility methods for class definition (:class) nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/module.rb#93 +module Reek::AST::SexpExtensions::ClassNode + include ::Reek::AST::SexpExtensions::ConstantDefiningNodeBase + include ::Reek::AST::SexpExtensions::ModuleNodeBase + + # source://reek//lib/reek/ast/sexp_extensions/module.rb#96 + def superclass; end +end + +# Utility methods for :const nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/constant.rb#7 +module Reek::AST::SexpExtensions::ConstNode + # TODO: name -> full_name, simple_name -> name + # + # source://reek//lib/reek/ast/sexp_extensions/constant.rb#9 + def name; end + + # source://reek//lib/reek/ast/sexp_extensions/constant.rb#21 + def namespace; end + + # source://reek//lib/reek/ast/sexp_extensions/constant.rb#17 + def simple_name; end +end + +# Base module for utility methods for nodes that define constants: module +# definition, class definition and constant assignment. +# +# source://reek//lib/reek/ast/sexp_extensions/module.rb#8 +module Reek::AST::SexpExtensions::ConstantDefiningNodeBase + # The full name of the constant, including the name of any + # module or class it is nested inside of. + # + # For example, given code like this: + # + # module Foo + # class Bar::Baz + # end + # end + # + # The full name for the inner class will be 'Foo::Bar::Baz'. To return + # the correct name, the name of the outer context has to be passed into + # this method. + # + # @param outer [String] full name of the wrapping module or class + # @return the module's full name + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#25 + def full_name(outer); end + + # The final section of the module or class name. For example, for a + # module with name 'Foo::Bar' this will return 'Bar'; for a module with + # name 'Foo' this will return 'Foo'. + # + # @return [String] the final section of the name + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#34 + def simple_name; end +end + +# Utility methods for :cvar nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#14 +module Reek::AST::SexpExtensions::CvarNode + include ::Reek::AST::SexpExtensions::VariableBase +end + +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#41 +Reek::AST::SexpExtensions::CvasgnNode = Reek::AST::SexpExtensions::CvarNode + +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#42 +Reek::AST::SexpExtensions::CvdeclNode = Reek::AST::SexpExtensions::CvarNode + +# Utility methods for :def nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/methods.rb#41 +module Reek::AST::SexpExtensions::DefNode + include ::Reek::AST::SexpExtensions::MethodNodeBase + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#48 + def argslist; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#52 + def body; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#60 + def depends_on_instance?; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#56 + def full_name(outer); end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#44 + def name; end +end + +# Utility methods for :defs nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/methods.rb#66 +module Reek::AST::SexpExtensions::DefsNode + include ::Reek::AST::SexpExtensions::MethodNodeBase + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#77 + def argslist; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#81 + def body; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#90 + def depends_on_instance?; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#85 + def full_name(outer); end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#73 + def name; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#69 + def receiver; end +end + +# Utility methods for :forward_arg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#110 +module Reek::AST::SexpExtensions::Forward_ArgNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#113 + def anonymous_splat?; end +end + +# Utility methods for :forward_args nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#99 +module Reek::AST::SexpExtensions::Forward_ArgsNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#102 + def anonymous_splat?; end +end + +# Utility methods for :gvar nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#36 +module Reek::AST::SexpExtensions::GvarNode + include ::Reek::AST::SexpExtensions::VariableBase +end + +# Utility methods for :if nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/if.rb#7 +module Reek::AST::SexpExtensions::IfNode + # source://reek//lib/reek/ast/sexp_extensions/if.rb#33 + def body_nodes(type, ignoring = T.unsafe(nil)); end + + # @return [Reek::AST::Node] the condition that is associated with a conditional node. + # For instance, this code + # + # if charlie(bravo) then delta end + # + # would be parsed into this AST: + # + # s(:if, + # s(:send, nil, :charlie, + # s(:lvar, :bravo)), + # s(:send, nil, :delta), nil) + # + # so in this case we would return this + # + # s(:send, nil, :charlie, + # s(:lvar, :bravo)) + # + # as condition. + # + # source://reek//lib/reek/ast/sexp_extensions/if.rb#28 + def condition; end +end + +# Utility methods for :ivar nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#19 +module Reek::AST::SexpExtensions::IvarNode + include ::Reek::AST::SexpExtensions::VariableBase +end + +# Utility methods for :ivasgn nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#24 +module Reek::AST::SexpExtensions::IvasgnNode + include ::Reek::AST::SexpExtensions::VariableBase +end + +# Utility methods for :kwarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#43 +module Reek::AST::SexpExtensions::KwargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase +end + +# Utility methods for :kwnilarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#120 +module Reek::AST::SexpExtensions::KwnilargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#123 + def anonymous_splat?; end +end + +# Utility methods for :kwoptarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#57 +module Reek::AST::SexpExtensions::KwoptargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#60 + def optional_argument?; end +end + +# Utility methods for :kwrestarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#84 +module Reek::AST::SexpExtensions::KwrestargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#87 + def anonymous_splat?; end +end + +# Utility methods for :lambda nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/lambda.rb#7 +module Reek::AST::SexpExtensions::LambdaNode + # source://reek//lib/reek/ast/sexp_extensions/lambda.rb#8 + def name; end +end + +# Base module for utility methods for :and and :or nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/logical_operators.rb#7 +module Reek::AST::SexpExtensions::LogicOperatorBase + # source://reek//lib/reek/ast/sexp_extensions/logical_operators.rb#12 + def body_nodes(type, ignoring = T.unsafe(nil)); end + + # source://reek//lib/reek/ast/sexp_extensions/logical_operators.rb#8 + def condition; end +end + +# Utility methods for :lvar nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#29 +module Reek::AST::SexpExtensions::LvarNode + include ::Reek::AST::SexpExtensions::VariableBase + + # source://reek//lib/reek/ast/sexp_extensions/variables.rb#8 + def var_name; end +end + +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#40 +Reek::AST::SexpExtensions::LvasgnNode = Reek::AST::SexpExtensions::LvarNode + +# Base module for utility methods for :def and :defs nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/methods.rb#7 +module Reek::AST::SexpExtensions::MethodNodeBase + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#12 + def arg_names; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#8 + def arguments; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#32 + def body_nodes(types, ignoring = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#28 + def ends_with_bang?; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#24 + def name_without_bang; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#20 + def parameter_names; end + + # source://reek//lib/reek/ast/sexp_extensions/methods.rb#16 + def parameters; end +end + +# Utility methods for :mlhs nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/nested_assignables.rb#20 +module Reek::AST::SexpExtensions::MlhsNode + include ::Reek::AST::SexpExtensions::NestedAssignables +end + +# Utility methods for module definition (:module) nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/module.rb#88 +module Reek::AST::SexpExtensions::ModuleNode + include ::Reek::AST::SexpExtensions::ConstantDefiningNodeBase + include ::Reek::AST::SexpExtensions::ModuleNodeBase +end + +# Base module for utility methods for module nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/module.rb#40 +module Reek::AST::SexpExtensions::ModuleNodeBase + include ::Reek::AST::SexpExtensions::ConstantDefiningNodeBase + + # In the AST, the set of children of a module that a human might identify + # is coded in three different ways. + # + # If there are no children, the last element of the module node is nil, + # like so: + # + # s(:class, + # s(:const, nil, :C), + # nil, + # nil) + # + # If there is one child, the last element of the module node is that + # child, like so: + # + # s(:class, + # s(:const, nil, :C), + # nil, + # s(:def, :f, s(:args), nil)) + # + # If there is more than one child, those are wrapped as children in a + # node of type :begin, like so: + # + # s(:class, + # s(:const, nil, :Alfa), + # nil, + # s(:begin, + # s(:def, :bravo, s(:args), nil), + # s(:class, s(:const, nil, :Charlie), nil, nil))) + # + # This method unifies those three ways to avoid having to handle them + # differently. + # + # @return an array of directly visible children of the module + # + # source://reek//lib/reek/ast/sexp_extensions/module.rb#81 + def direct_children; end + + # source://reek//lib/reek/ast/sexp_extensions/module.rb#43 + def name; end +end + +# Base module for utility methods for nodes that can contain argument +# nodes nested through :mlhs nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/nested_assignables.rb#8 +module Reek::AST::SexpExtensions::NestedAssignables + # source://reek//lib/reek/ast/sexp_extensions/nested_assignables.rb#9 + def components; end +end + +# source://reek//lib/reek/ast/sexp_extensions/send.rb#52 +Reek::AST::SexpExtensions::Op_AsgnNode = Reek::AST::SexpExtensions::SendNode + +# Utility methods for :optarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#48 +module Reek::AST::SexpExtensions::OptargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#51 + def optional_argument?; end +end + +# Utility methods for :or nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/logical_operators.rb#23 +module Reek::AST::SexpExtensions::OrNode + include ::Reek::AST::SexpExtensions::LogicOperatorBase +end + +# Utility methods for :restarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#75 +module Reek::AST::SexpExtensions::RestargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/arguments.rb#78 + def anonymous_splat?; end +end + +# Utility methods for :self nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/self.rb#7 +module Reek::AST::SexpExtensions::SelfNode + # source://reek//lib/reek/ast/sexp_extensions/self.rb#8 + def name; end +end + +# Utility methods for :send nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/send.rb#7 +module Reek::AST::SexpExtensions::SendNode + # source://reek//lib/reek/ast/sexp_extensions/send.rb#18 + def args; end + + # Handles the case where we create an attribute writer via: + # attr :foo, true + # + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/send.rb#47 + def attr_with_writable_flag?; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/send.rb#40 + def attribute_writer?; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/send.rb#26 + def module_creation_call?; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/send.rb#30 + def module_creation_receiver?; end + + # source://reek//lib/reek/ast/sexp_extensions/send.rb#14 + def name; end + + # @return [Boolean] + # + # source://reek//lib/reek/ast/sexp_extensions/send.rb#36 + def object_creation_call?; end + + # source://reek//lib/reek/ast/sexp_extensions/send.rb#22 + def participants; end + + # source://reek//lib/reek/ast/sexp_extensions/send.rb#10 + def receiver; end +end + +# source://reek//lib/reek/ast/sexp_extensions/send.rb#8 +Reek::AST::SexpExtensions::SendNode::ATTR_DEFN_METHODS = T.let(T.unsafe(nil), Array) + +# Utility methods for :shadowarg nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/arguments.rb#93 +module Reek::AST::SexpExtensions::ShadowargNode + include ::Reek::AST::SexpExtensions::ArgNodeBase +end + +# Utility methods for :super nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/super.rb#7 +module Reek::AST::SexpExtensions::SuperNode + # source://reek//lib/reek/ast/sexp_extensions/super.rb#8 + def name; end +end + +# Utility methods for :sym nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/symbols.rb#7 +module Reek::AST::SexpExtensions::SymNode + # source://reek//lib/reek/ast/sexp_extensions/symbols.rb#12 + def full_name(outer); end + + # source://reek//lib/reek/ast/sexp_extensions/symbols.rb#8 + def name; end +end + +# Base module for utility methods for nodes representing variables. +# +# source://reek//lib/reek/ast/sexp_extensions/variables.rb#7 +module Reek::AST::SexpExtensions::VariableBase + # source://reek//lib/reek/ast/sexp_extensions/variables.rb#8 + def name; end +end + +# Utility methods for :when nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/when.rb#7 +module Reek::AST::SexpExtensions::WhenNode + # source://reek//lib/reek/ast/sexp_extensions/when.rb#12 + def body; end + + # source://reek//lib/reek/ast/sexp_extensions/when.rb#8 + def condition_list; end +end + +# Utility methods for :yield nodes. +# +# source://reek//lib/reek/ast/sexp_extensions/yield.rb#7 +module Reek::AST::SexpExtensions::YieldNode + # source://reek//lib/reek/ast/sexp_extensions/yield.rb#8 + def args; end +end + +# source://reek//lib/reek/ast/sexp_extensions/super.rb#13 +Reek::AST::SexpExtensions::ZsuperNode = Reek::AST::SexpExtensions::SuperNode + +# source://reek//lib/reek/cli/silencer.rb#6 +module Reek::CLI; end + +# CLI silencer +# +# source://reek//lib/reek/cli/silencer.rb#8 +module Reek::CLI::Silencer + private + + # source://reek//lib/reek/cli/silencer.rb#12 + def silently; end + + # source://reek//lib/reek/cli/silencer.rb#27 + def without_warnings; end + + class << self + # source://reek//lib/reek/cli/silencer.rb#12 + def silently; end + + # source://reek//lib/reek/cli/silencer.rb#27 + def without_warnings; end + end +end + +# A comment header from an abstract syntax tree; found directly above +# module, class and method definitions. +# +# source://reek//lib/reek/code_comment.rb#16 +class Reek::CodeComment + # @param comment [String] the original comment as found in the source code + # @param line [Integer] start of the expression the comment belongs to + # @param source [String] Path to source file or "string" + # @return [CodeComment] a new instance of CodeComment + # + # source://reek//lib/reek/code_comment.rb#34 + def initialize(comment:, line: T.unsafe(nil), source: T.unsafe(nil)); end + + # Returns the value of attribute config. + # + # source://reek//lib/reek/code_comment.rb#27 + def config; end + + # @return [Boolean] + # + # source://reek//lib/reek/code_comment.rb#52 + def descriptive?; end + + private + + # @raise [Errors::LegacyCommentSeparatorError] + # + # source://reek//lib/reek/code_comment.rb#67 + def escalate_legacy_separator(separator); end + + # Returns the value of attribute line. + # + # source://reek//lib/reek/code_comment.rb#58 + def line; end + + # Returns the value of attribute original_comment. + # + # source://reek//lib/reek/code_comment.rb#58 + def original_comment; end + + # source://reek//lib/reek/code_comment.rb#60 + def sanitized_comment; end + + # Returns the value of attribute source. + # + # source://reek//lib/reek/code_comment.rb#58 + def source; end +end + +# source://reek//lib/reek/code_comment.rb#17 +Reek::CodeComment::CONFIGURATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# A typical configuration via code comment looks like this: +# +# :reek:DuplicateMethodCall { enabled: false } +# +# There are a lot of ways a user can introduce some errors here: +# +# 1.) Unknown smell detector +# 2.) Garbage in the detector configuration like { thats: a: bad: config } +# 3.) Unknown configuration keys (e.g. by doing a simple typo: "exclude" vs. "exlude" ) +# 4.) Bad data types given as values for those keys +# This class validates [1], [2] and [3] at the moment but will also validate +# [4] in the future. +# +# source://reek//lib/reek/code_comment.rb#90 +class Reek::CodeComment::CodeCommentValidator + # @param detector_name [String] the detector class that was parsed out of the original + # comment, e.g. "DuplicateMethodCall" or "UnknownSmellDetector" + # @param original_comment [String] the original comment as found in the source code + # @param line [Integer] start of the expression the comment belongs to + # @param source [String] path to source file or "string" + # @param options [String] the configuration options as String for the detector that were + # extracted from the original comment + # @return [CodeCommentValidator] a new instance of CodeCommentValidator + # + # source://reek//lib/reek/code_comment.rb#99 + def initialize(detector_name:, original_comment:, line:, source:, options:); end + + # source://reek//lib/reek/code_comment.rb#118 + def parsed_options; end + + # Method can raise the following errors: + # * Errors::LegacyCommentSeparatorError + # * Errors::BadDetectorInCommentError + # * Errors::GarbageDetectorConfigurationInCommentError + # * Errors::BadDetectorConfigurationKeyInCommentError + # + # @return [undefined] + # + # source://reek//lib/reek/code_comment.rb#114 + def validate; end + + private + + # @return [String] all keys from the code comment that look bad + # + # source://reek//lib/reek/code_comment.rb#177 + def configuration_keys_difference; end + + # source://reek//lib/reek/code_comment.rb#152 + def detector_class; end + + # Returns the value of attribute detector_name. + # + # source://reek//lib/reek/code_comment.rb#135 + def detector_name; end + + # @raise [Errors::BadDetectorConfigurationKeyInCommentError] + # + # source://reek//lib/reek/code_comment.rb#142 + def escalate_unknown_configuration_key; end + + # @return [Set] the configuration keys that are found in the code comment + # + # source://reek//lib/reek/code_comment.rb#172 + def given_configuration_keys; end + + # @return [Boolean] all keys in code comment are applicable to the detector in question + # + # source://reek//lib/reek/code_comment.rb#167 + def given_keys_legit?; end + + # @return [Boolean] comment uses legacy three-colon format + # + # source://reek//lib/reek/code_comment.rb#162 + def legacy_format?; end + + # Returns the value of attribute line. + # + # source://reek//lib/reek/code_comment.rb#135 + def line; end + + # Returns the value of attribute options. + # + # source://reek//lib/reek/code_comment.rb#135 + def options; end + + # Returns the value of attribute original_comment. + # + # source://reek//lib/reek/code_comment.rb#135 + def original_comment; end + + # Returns the value of attribute separator. + # + # source://reek//lib/reek/code_comment.rb#135 + def separator; end + + # Returns the value of attribute source. + # + # source://reek//lib/reek/code_comment.rb#135 + def source; end + + # @return [Set] all keys that are legit for the given detector + # + # source://reek//lib/reek/code_comment.rb#184 + def valid_detector_keys; end +end + +# source://reek//lib/reek/code_comment.rb#24 +Reek::CodeComment::DISABLE_DETECTOR_CONFIGURATION = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/code_comment.rb#25 +Reek::CodeComment::MINIMUM_CONTENT_LENGTH = T.let(T.unsafe(nil), Integer) + +# Matches '#', newlines and > 1 whitespaces. +# +# source://reek//lib/reek/code_comment.rb#23 +Reek::CodeComment::SANITIZE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://reek//lib/reek/configuration/configuration_validator.rb#6 +module Reek::Configuration; end + +# Reek's application configuration. +# +# source://reek//lib/reek/configuration/app_configuration.rb#16 +class Reek::Configuration::AppConfiguration + include ::Reek::Configuration::ConfigurationValidator + + # @return [AppConfiguration] a new instance of AppConfiguration + # + # source://reek//lib/reek/configuration/app_configuration.rb#86 + def initialize(values: T.unsafe(nil)); end + + # Returns the directive for a given directory. + # + # @param source_via [String] the source of the code inspected + # @return [Hash] the directory directive for the source with the default directive + # reverse-merged into it. + # + # source://reek//lib/reek/configuration/app_configuration.rb#64 + def directive_for(source_via); end + + # source://reek//lib/reek/configuration/app_configuration.rb#73 + def load_values(values); end + + # @return [Boolean] + # + # source://reek//lib/reek/configuration/app_configuration.rb#69 + def path_excluded?(path); end + + private + + # source://reek//lib/reek/configuration/app_configuration.rb#98 + def default_directive; end + + # Sets the attribute default_directive + # + # @param value the value to set the attribute default_directive to. + # + # source://reek//lib/reek/configuration/app_configuration.rb#92 + def default_directive=(_arg0); end + + # source://reek//lib/reek/configuration/app_configuration.rb#94 + def directory_directives; end + + # Sets the attribute directory_directives + # + # @param value the value to set the attribute directory_directives to. + # + # source://reek//lib/reek/configuration/app_configuration.rb#92 + def directory_directives=(_arg0); end + + # source://reek//lib/reek/configuration/app_configuration.rb#102 + def excluded_paths; end + + # Sets the attribute excluded_paths + # + # @param value the value to set the attribute excluded_paths to. + # + # source://reek//lib/reek/configuration/app_configuration.rb#92 + def excluded_paths=(_arg0); end + + class << self + # source://reek//lib/reek/configuration/app_configuration.rb#54 + def default; end + + # Instantiate a configuration via the default path. + # + # @return [AppConfiguration] + # + # source://reek//lib/reek/configuration/app_configuration.rb#36 + def from_default_path; end + + # Instantiate a configuration by passing everything in. + # + # Loads the configuration from a hash of the form that is loaded from a + # +.reek+ config file. + # + # @param hash [Hash] The configuration hash to load. + # @return [AppConfiguration] + # + # source://reek//lib/reek/configuration/app_configuration.rb#50 + def from_hash(hash); end + + # Instantiate a configuration via the given path. + # + # @param path [Pathname] the path to the config file. + # @return [AppConfiguration] + # + # source://reek//lib/reek/configuration/app_configuration.rb#26 + def from_path(path); end + end +end + +# Responsible for converting marked strings coming from the outside world +# into proper regexes. +# +# source://reek//lib/reek/configuration/configuration_converter.rb#9 +class Reek::Configuration::ConfigurationConverter + include ::Reek::Configuration::ConfigurationValidator + + # @param configuration [Hash] e.g. + # + # detectors => { + # "UnusedPrivateMethod" => {"exclude"=>["/exclude regexp/"]}, + # "UncommunicativeMethodName"=>{"reject"=>["reject name"], "accept"=>["accept name"] + # }, + # directories => { + # "app/controllers" => { + # "UnusedPrivateMethod" => {"exclude"=>["/exclude regexp/"]}, + # "UncommunicativeMethodName"=>{"reject"=>["reject name"], "accept"=>["accept name"]} + # } + # } + # @return [ConfigurationConverter] a new instance of ConfigurationConverter + # + # source://reek//lib/reek/configuration/configuration_converter.rb#26 + def initialize(configuration); end + + # Returns the value of attribute configuration. + # + # source://reek//lib/reek/configuration/configuration_converter.rb#12 + def configuration; end + + # Converts all marked strings across the whole configuration to regexes. + # + # @return [Hash] + # + # source://reek//lib/reek/configuration/configuration_converter.rb#33 + def convert; end + + private + + # @param detector_configuration [Hash] e.g. + # { "UnusedPrivateMethod" => {"exclude"=>["/exclude regexp/"] } + # @return [Array] all the attributes from the detector configuration that potentially contain regexes. + # Using this example above this would just be "exclude". + # + # source://reek//lib/reek/configuration/configuration_converter.rb#63 + def convertible_attributes(detector_configuration); end + + # @param value [String] String that is potentially marked as regex, e.g. "/foobar/". + # @return [Bool] if the string in question is marked as regex. + # + # source://reek//lib/reek/configuration/configuration_converter.rb#46 + def marked_as_regex?(value); end + + # Iterates over our detector configuration and converts all marked strings into regexes. + # + # @return nil + # + # source://reek//lib/reek/configuration/configuration_converter.rb#73 + def strings_to_regexes_for_detectors; end + + # Iterates over our directory configuration and converts all marked strings into regexes. + # + # @return nil + # + # source://reek//lib/reek/configuration/configuration_converter.rb#93 + def strings_to_regexes_for_directories; end + + # @param value [value] String that is potentially marked as regex, e.g. "/foobar/". + # @return [Regexp] e.g. /foobar/. + # + # source://reek//lib/reek/configuration/configuration_converter.rb#53 + def to_regex(value); end +end + +# source://reek//lib/reek/configuration/configuration_converter.rb#10 +Reek::Configuration::ConfigurationConverter::REGEXABLE_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# ConfigurationFileFinder is responsible for finding Reek's configuration. +# +# There are 3 ways of passing `reek` a configuration file: +# 1. Using the cli "-c" switch +# 2. Having a file .reek.yml either in your current working +# directory or in a parent directory +# 3. Having a file .reek.yml in your HOME directory +# +# The order in which ConfigurationFileFinder tries to find such a +# configuration file is exactly like above. +# +# source://reek//lib/reek/configuration/configuration_file_finder.rb#21 +module Reek::Configuration::ConfigurationFileFinder + extend ::Reek::Configuration::ConfigurationValidator + + class << self + # Tries to find a configuration file via: + # * given path (e.g. via cli switch) + # * ascending down from the current directory + # * looking into the home directory + # + # @return [File|nil] + # + # source://reek//lib/reek/configuration/configuration_file_finder.rb#44 + def find(path: T.unsafe(nil), current: T.unsafe(nil), home: T.unsafe(nil)); end + + # Finds and loads a configuration file from a given path. + # + # @return [Hash] + # + # source://reek//lib/reek/configuration/configuration_file_finder.rb#31 + def find_and_load(path: T.unsafe(nil)); end + + # Loads a configuration file from a given path. + # Raises on invalid data. + # + # @param path [String] + # @return [Hash] + # + # source://reek//lib/reek/configuration/configuration_file_finder.rb#56 + def load_from_file(path); end + + private + + # Recursively traverse directories down to find a configuration file. + # + # @return [File|nil] + # + # source://reek//lib/reek/configuration/configuration_file_finder.rb#76 + def find_by_dir(start); end + + # Checks a given directory for a configuration file and returns it. + # + # @return [File|nil] + # + # source://reek//lib/reek/configuration/configuration_file_finder.rb#89 + def find_in_dir(dir); end + end +end + +# source://reek//lib/reek/configuration/configuration_file_finder.rb#22 +Reek::Configuration::ConfigurationFileFinder::DEFAULT_FILE_NAME = T.let(T.unsafe(nil), String) + +# Configuration validator module. +# +# source://reek//lib/reek/configuration/configuration_validator.rb#10 +module Reek::Configuration::ConfigurationValidator + private + + # source://reek//lib/reek/configuration/configuration_validator.rb#21 + def key_to_smell_detector(key); end + + # @return [Boolean] + # + # source://reek//lib/reek/configuration/configuration_validator.rb#14 + def smell_type?(key); end + + # @yield [directory] + # + # source://reek//lib/reek/configuration/configuration_validator.rb#25 + def with_valid_directory(path); end +end + +# Hash extension for the default directive. +# +# source://reek//lib/reek/configuration/default_directive.rb#10 +module Reek::Configuration::DefaultDirective + include ::Reek::Configuration::ConfigurationValidator + + # Adds the configuration for detectors as default directive. + # + # @param detectors_configuration [Hash] the configuration e.g.: + # { + # :IrresponsibleModule => {:enabled=>false}, + # :Attribute => {:enabled=>true} + # } + # @return [self] + # + # source://reek//lib/reek/configuration/default_directive.rb#22 + def add(detectors_configuration); end +end + +# Hash extension for directory directives. +# +# source://reek//lib/reek/configuration/directory_directives.rb#10 +module Reek::Configuration::DirectoryDirectives + include ::Reek::Configuration::ConfigurationValidator + + # Adds a directive and returns self. + # + # @param directory_config [Hash] the configuration e.g.: + # { + # "samples/two_smelly_files" => {:IrresponsibleModule=>{:enabled=>false}}, + # "samples/three_clean_files" => {:Attribute=>{:enabled=>true}} + # } + # @return [self] + # + # source://reek//lib/reek/configuration/directory_directives.rb#38 + def add(directory_config); end + + # Returns the directive for a given source. + # + # @param source_via [String] the source of the code inspected + # @return [Hash | nil] the configuration for the source or nil + # + # source://reek//lib/reek/configuration/directory_directives.rb#18 + def directive_for(source_via); end + + private + + # source://reek//lib/reek/configuration/directory_directives.rb#54 + def best_match_for(source_base_dir); end + + # source://reek//lib/reek/configuration/directory_directives.rb#93 + def error_message_for_invalid_smell_type(klass); end + + # Transform a glob pattern to a regexp. + # + # It changes: + # - /** to .*, + # - ** to .*, + # - * to [^\/]*. + # + # source://reek//lib/reek/configuration/directory_directives.rb#75 + def glob_to_regexp(glob); end + + # @return [Boolean] + # + # source://reek//lib/reek/configuration/directory_directives.rb#62 + def match?(source_base_dir, pathname); end +end + +# Array extension for excluded paths. +# +# source://reek//lib/reek/configuration/excluded_paths.rb#11 +module Reek::Configuration::ExcludedPaths + include ::Reek::Configuration::ConfigurationValidator + + # @param paths [String] + # @return [undefined] + # + # source://reek//lib/reek/configuration/excluded_paths.rb#16 + def add(paths); end +end + +# Schema validator module. +# +# source://reek//lib/reek/configuration/schema_validator.rb#13 +class Reek::Configuration::SchemaValidator + # @return [SchemaValidator] a new instance of SchemaValidator + # + # source://reek//lib/reek/configuration/schema_validator.rb#16 + def initialize(configuration); end + + # @raise [Errors::ConfigFileError] + # + # source://reek//lib/reek/configuration/schema_validator.rb#24 + def validate; end + + private + + # :reek:UtilityFunction + # + # source://reek//lib/reek/configuration/schema_validator.rb#34 + def error_message(errors); end +end + +# source://reek//lib/reek/configuration/schema_validator.rb#14 +Reek::Configuration::SchemaValidator::SCHEMA_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/context/statement_counter.rb#6 +module Reek::Context; end + +# A context wrapper for attribute definitions found in a syntax tree. +# +# source://reek//lib/reek/context/attribute_context.rb#11 +class Reek::Context::AttributeContext < ::Reek::Context::CodeContext + # @return [AttributeContext] a new instance of AttributeContext + # + # source://reek//lib/reek/context/attribute_context.rb#14 + def initialize(exp, send_expression); end + + # source://reek//lib/reek/context/attribute_context.rb#28 + def apply_current_visibility(current_visibility); end + + # source://reek//lib/reek/context/attribute_context.rb#20 + def full_comment; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/attribute_context.rb#24 + def instance_method?; end + + # Returns the value of attribute visibility. + # + # source://reek//lib/reek/context/attribute_context.rb#12 + def visibility; end + + # Sets the attribute visibility + # + # @param value the value to set the attribute visibility to. + # + # source://reek//lib/reek/context/attribute_context.rb#12 + def visibility=(_arg0); end + + private + + # Returns the value of attribute send_expression. + # + # source://reek//lib/reek/context/attribute_context.rb#34 + def send_expression; end +end + +# A context wrapper for any class found in a syntax tree. +# +# source://reek//lib/reek/context/class_context.rb#10 +class Reek::Context::ClassContext < ::Reek::Context::ModuleContext; end + +# Superclass for all types of source code context. Each instance represents +# a code element of some kind, and each provides behaviour relevant to that +# code element. CodeContexts form a tree in the same way the code does, +# with each context holding a reference to a unique outer context. +# +# source://reek//lib/reek/context/code_context.rb#19 +class Reek::Context::CodeContext + include ::Enumerable + extend ::Forwardable + + # Initializes a new CodeContext. + # + # @param exp [Reek::AST::Node] The code described by this context + # @return [CodeContext] a new instance of CodeContext + # + # source://reek//lib/reek/context/code_context.rb#29 + def initialize(exp); end + + # Register a context as a child context of this context. This is + # generally used by a child context to register itself with its parent. + # + # @param child [CodeContext] the child context to register + # + # source://reek//lib/reek/context/code_context.rb#108 + def append_child_context(child); end + + # source://reek//lib/reek/context/code_context.rb#160 + def apply_current_visibility(_current_visibility); end + + # Returns the value of attribute children. + # + # source://reek//lib/reek/context/code_context.rb#24 + def children; end + + # source://reek//lib/reek/context/code_context.rb#143 + def config_for(detector_class); end + + # Iterate over `self` and child contexts. + # The main difference (among others) to `local_nodes` is that we are traversing + # `CodeContexts` here, not AST nodes (see `Reek::AST::Node`). + # + # @return [Enumerator] + # @yield block that is executed for every node. + # + # source://reek//lib/reek/context/code_context.rb#53 + def each(&block); end + + # Returns the value of attribute exp. + # + # source://reek//lib/reek/context/code_context.rb#24 + def exp; end + + # source://reek//lib/reek/context/code_context.rb#139 + def full_name; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/code_context.rb#156 + def instance_method?; end + + # Iterate over each AST node (see `Reek::AST::Node`) of a given type for the current expression. + # + # @param type [Symbol] the type of the nodes we are looking for, e.g. :defs. + # @yield block that is executed for every node. + # + # source://reek//lib/reek/context/code_context.rb#41 + def local_nodes(type, ignored = T.unsafe(nil), &blk); end + + # @return [Boolean] + # + # source://reek//lib/reek/context/code_context.rb#131 + def matches?(candidates); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def name(*args, **_arg1, &block); end + + # source://reek//lib/reek/context/code_context.rb#148 + def number_of_statements; end + + # Returns the value of attribute parent. + # + # source://reek//lib/reek/context/code_context.rb#24 + def parent; end + + # source://reek//lib/reek/context/code_context.rb#115 + def record_call_to(exp); end + + # source://reek//lib/reek/context/code_context.rb#127 + def record_use_of_self; end + + # Link the present context to its parent. + # + # For example, given the following code: + # + # class Omg + # def foo(x) + # puts x + # end + # end + # + # The {ContextBuilder} object first instantiates a {RootContext}, which has no parent. + # + # Next, it instantiates a {ModuleContext}, with +exp+ looking like this: + # + # (class + # (const nil :Omg) nil + # (def :foo + # (args + # (arg :x)) + # (send nil :puts + # (lvar :x)))) + # + # It will then call #register_with_parent on the {ModuleContext}, passing + # in the parent {RootContext}. + # + # Finally, {ContextBuilder} will instantiate a {MethodContext}. This time, + # +exp+ is: + # + # (def :foo + # (args + # (arg :x)) + # (send nil :puts + # (lvar :x))) + # + # Then it will call #register_with_parent on the {MethodContext}, passing + # in the parent {ModuleContext}. + # + # @param parent [Reek::AST::Node] The parent context of the code described by this context + # + # source://reek//lib/reek/context/code_context.rb#100 + def register_with_parent(parent); end + + # @return [Boolean] + # + # source://reek//lib/reek/context/code_context.rb#152 + def singleton_method?; end + + # Returns the value of attribute statement_counter. + # + # source://reek//lib/reek/context/code_context.rb#24 + def statement_counter; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def type(*args, **_arg1, &block); end + + private + + # source://reek//lib/reek/context/code_context.rb#168 + def configuration_via_code_commment; end + + # source://reek//lib/reek/context/code_context.rb#174 + def full_comment; end + + # source://reek//lib/reek/context/code_context.rb#178 + def parent_config_for(detector_class); end + + # Returns the value of attribute refs. + # + # source://reek//lib/reek/context/code_context.rb#166 + def refs; end +end + +# Semi-transparent context to represent a metaclass while building the +# context tree. This context will not be part of the resulting tree, but +# will track context and visibility separately while building is in +# progress. +# +# source://reek//lib/reek/context/ghost_context.rb#12 +class Reek::Context::GhostContext < ::Reek::Context::ModuleContext + # source://reek//lib/reek/context/ghost_context.rb#19 + def append_child_context(child); end + + # Return the correct class for child attribute contexts. For + # GhostContext, this is the class that represents singleton attributes. + # + # source://reek//lib/reek/context/ghost_context.rb#34 + def attribute_context_class; end + + # Returns the value of attribute children. + # + # source://reek//lib/reek/context/ghost_context.rb#13 + def children; end + + # Return the correct class for child method contexts (representing nodes + # of type `:def`). For GhostContext, this is the class that represents + # singleton methods. + # + # source://reek//lib/reek/context/ghost_context.rb#28 + def method_context_class; end + + # source://reek//lib/reek/context/ghost_context.rb#44 + def record_use_of_self; end + + # source://reek//lib/reek/context/ghost_context.rb#15 + def register_with_parent(parent); end + + # source://reek//lib/reek/context/ghost_context.rb#48 + def statement_counter; end + + # source://reek//lib/reek/context/ghost_context.rb#38 + def track_visibility(visibility, names); end +end + +# A context wrapper for any method definition found in a syntax tree. +# +# source://reek//lib/reek/context/method_context.rb#11 +class Reek::Context::MethodContext < ::Reek::Context::CodeContext + # @return [MethodContext] a new instance of MethodContext + # + # source://reek//lib/reek/context/method_context.rb#15 + def initialize(exp, parent_exp); end + + # source://reek//lib/reek/context/method_context.rb#68 + def apply_current_visibility(current_visibility); end + + # source://reek//lib/reek/context/method_context.rb#51 + def default_assignments; end + + # source://reek//lib/reek/context/method_context.rb#80 + def full_comment; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#64 + def instance_method?; end + + # source://reek//lib/reek/context/method_context.rb#56 + def method_context_class; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#72 + def module_function?; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#76 + def non_public_visibility?; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#21 + def references_self?; end + + # Returns the value of attribute refs. + # + # source://reek//lib/reek/context/method_context.rb#13 + def refs; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#60 + def singleton_method?; end + + # source://reek//lib/reek/context/method_context.rb#39 + def unused_params; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#25 + def uses_param?(param); end + + # @return [Boolean] + # + # source://reek//lib/reek/context/method_context.rb#47 + def uses_super_with_implicit_arguments?; end + + # Returns the value of attribute visibility. + # + # source://reek//lib/reek/context/method_context.rb#12 + def visibility; end + + # Sets the attribute visibility + # + # @param value the value to set the attribute visibility to. + # + # source://reek//lib/reek/context/method_context.rb#12 + def visibility=(_arg0); end + + private + + # Returns the value of attribute parent_exp. + # + # source://reek//lib/reek/context/method_context.rb#90 + def parent_exp; end +end + +# A context wrapper for any module found in a syntax tree. +# +# source://reek//lib/reek/context/module_context.rb#13 +class Reek::Context::ModuleContext < ::Reek::Context::CodeContext + # @return [ModuleContext] a new instance of ModuleContext + # + # source://reek//lib/reek/context/module_context.rb#16 + def initialize(exp); end + + # Register a child context. The child's parent context should be equal to + # the current context. + # + # This makes the current context responsible for setting the child's + # visibility. + # + # @param child [CodeContext] the child context to register + # + # source://reek//lib/reek/context/module_context.rb#28 + def append_child_context(child); end + + # Return the correct class for child attribute contexts. For + # ModuleContext, this is the class that represents instance attributes. + # + # source://reek//lib/reek/context/module_context.rb#42 + def attribute_context_class; end + + # source://reek//lib/reek/context/module_context.rb#46 + def defined_instance_methods(visibility: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reek//lib/reek/context/module_context.rb#69 + def descriptively_commented?; end + + # source://reek//lib/reek/context/module_context.rb#52 + def instance_method_calls; end + + # source://reek//lib/reek/context/module_context.rb#58 + def instance_method_names_via_to_call; end + + # Return the correct class for child method contexts (representing nodes + # of type `:def`). For ModuleContext, this is the class that represents + # instance methods. + # + # source://reek//lib/reek/context/module_context.rb#36 + def method_context_class; end + + # A namespace module is a module (or class) that is only there for namespacing + # purposes, and thus contains only nested constants, modules or classes. + # + # However, if the module is empty, it is not considered a namespace module. + # + # @return [Boolean] true if the module is a namespace module + # + # source://reek//lib/reek/context/module_context.rb#83 + def namespace_module?; end + + # @deprecated use `defined_instance_methods` instead + # + # source://reek//lib/reek/context/module_context.rb#65 + def node_instance_methods; end + + # source://reek//lib/reek/context/module_context.rb#90 + def track_visibility(visibility, names); end + + # Returns the value of attribute visibility_tracker. + # + # source://reek//lib/reek/context/module_context.rb#14 + def visibility_tracker; end + + private + + # source://reek//lib/reek/context/module_context.rb#101 + def instance_method_children; end + + # source://reek//lib/reek/context/module_context.rb#105 + def singleton_method_children; end +end + +# source://reek//lib/reek/context/module_context.rb#73 +Reek::Context::ModuleContext::CONSTANT_SEXP_TYPES = T.let(T.unsafe(nil), Array) + +# A context wrapper for any refinement blocks found in a syntax tree. +# +# source://reek//lib/reek/context/refinement_context.rb#10 +class Reek::Context::RefinementContext < ::Reek::Context::ModuleContext + # source://reek//lib/reek/context/refinement_context.rb#11 + def full_name; end +end + +# A context wrapper representing the root of an abstract syntax tree. +# +# source://reek//lib/reek/context/root_context.rb#11 +class Reek::Context::RootContext < ::Reek::Context::CodeContext + # source://reek//lib/reek/context/root_context.rb#16 + def full_name; end + + # Return the correct class for child method contexts (representing nodes + # of type `:def`). For RootContext, this is the class that represents + # instance methods. + # + # source://reek//lib/reek/context/root_context.rb#23 + def method_context_class; end + + # source://reek//lib/reek/context/root_context.rb#12 + def type; end +end + +# A context wrapper for method calls found in a syntax tree. +# +# source://reek//lib/reek/context/send_context.rb#10 +class Reek::Context::SendContext < ::Reek::Context::CodeContext + # @return [SendContext] a new instance of SendContext + # + # source://reek//lib/reek/context/send_context.rb#13 + def initialize(exp, name); end + + # source://reek//lib/reek/context/send_context.rb#18 + def method_name_called_to_call; end + + # Returns the value of attribute name. + # + # source://reek//lib/reek/context/send_context.rb#11 + def name; end +end + +# A context wrapper for any singleton attribute definition found in a +# syntax tree. +# +# source://reek//lib/reek/context/singleton_attribute_context.rb#11 +class Reek::Context::SingletonAttributeContext < ::Reek::Context::AttributeContext + # @return [Boolean] + # + # source://reek//lib/reek/context/singleton_attribute_context.rb#12 + def instance_method?; end +end + +# A context wrapper for any singleton method definition found in a syntax tree. +# +# source://reek//lib/reek/context/singleton_method_context.rb#10 +class Reek::Context::SingletonMethodContext < ::Reek::Context::MethodContext + # source://reek//lib/reek/context/singleton_method_context.rb#28 + def apply_current_visibility(current_visibility); end + + # Was this singleton method defined with an instance method-like syntax? + # + # @return [Boolean] + # + # source://reek//lib/reek/context/singleton_method_context.rb#24 + def defined_as_instance_method?; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/singleton_method_context.rb#15 + def instance_method?; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/singleton_method_context.rb#19 + def module_function?; end + + # @return [Boolean] + # + # source://reek//lib/reek/context/singleton_method_context.rb#11 + def singleton_method?; end +end + +# Responsible for counting the statements in a `CodeContext`. +# +# source://reek//lib/reek/context/statement_counter.rb#8 +class Reek::Context::StatementCounter + # @return [StatementCounter] a new instance of StatementCounter + # + # source://reek//lib/reek/context/statement_counter.rb#11 + def initialize; end + + # source://reek//lib/reek/context/statement_counter.rb#19 + def decrease_by(number); end + + # source://reek//lib/reek/context/statement_counter.rb#15 + def increase_by(sexp); end + + # Returns the value of attribute value. + # + # source://reek//lib/reek/context/statement_counter.rb#9 + def value; end + + private + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://reek//lib/reek/context/statement_counter.rb#25 + def value=(_arg0); end +end + +# Responsible for tracking visibilities in regards to CodeContexts. +# +# source://reek//lib/reek/context/visibility_tracker.rb#6 +class Reek::Context::VisibilityTracker + # @return [VisibilityTracker] a new instance of VisibilityTracker + # + # source://reek//lib/reek/context/visibility_tracker.rb#10 + def initialize; end + + # Sets the visibility of a CodeContext to the tracked visibility. + # + # @param context [CodeContext] + # + # source://reek//lib/reek/context/visibility_tracker.rb#59 + def apply_visibility(context); end + + # Handle the effects of a singleton visibility modifier. These can only + # be used to modify existing children. + # + # @example + # track_singleton_visibility children, :private_class_method, + # [:hide_me, :implementation_detail] + # @param children [Array] + # @param visibility [Symbol] + # @param names [Array] + # + # source://reek//lib/reek/context/visibility_tracker.rb#46 + def track_singleton_visibility(children:, visibility:, names:); end + + # Handle the effects of a visibility modifier. + # + # @example Modifying the visibility of existing children + # track_visibility children, :private, [:hide_me, :implementation_detail] + # @param children [Array] + # @param visibility [Symbol] + # @param names [Array] + # + # source://reek//lib/reek/context/visibility_tracker.rb#23 + def track_visibility(children:, visibility:, names:); end + + private + + # Returns the value of attribute tracked_visibility. + # + # source://reek//lib/reek/context/visibility_tracker.rb#65 + def tracked_visibility; end + + # Sets the attribute tracked_visibility + # + # @param value the value to set the attribute tracked_visibility to. + # + # source://reek//lib/reek/context/visibility_tracker.rb#65 + def tracked_visibility=(_arg0); end +end + +# source://reek//lib/reek/context/visibility_tracker.rb#8 +Reek::Context::VisibilityTracker::VISIBILITY_MAP = T.let(T.unsafe(nil), Hash) + +# source://reek//lib/reek/context/visibility_tracker.rb#7 +Reek::Context::VisibilityTracker::VISIBILITY_MODIFIERS = T.let(T.unsafe(nil), Array) + +# Traverses an abstract syntax tree and fires events whenever it encounters +# specific node types. +# +# TODO: This class is responsible for statements and reference +# counting. Ideally `ContextBuilder` would only build up the context tree and leave the +# statement and reference counting to the contexts. +# +# source://reek//lib/reek/context_builder.rb#27 +class Reek::ContextBuilder + # @return [ContextBuilder] a new instance of ContextBuilder + # + # source://reek//lib/reek/context_builder.rb#30 + def initialize(syntax_tree); end + + # Returns the value of attribute context_tree. + # + # source://reek//lib/reek/context_builder.rb#28 + def context_tree; end + + private + + # Appends a new child context to the current context but does not change + # the current context. + # + # @param klass [Context::*Context] context class + # @param args arguments for the class initializer + # @return [Context::*Context] the context that was appended + # + # source://reek//lib/reek/context_builder.rb#513 + def append_new_context(klass, *args); end + + # Processes the given AST, memoizes it and returns a tree of nested + # contexts. + # + # For example this ruby code: + # + # class Car; def drive; end; end + # + # would get compiled into this AST: + # + # (class + # (const nil :Car) nil + # (def :drive + # (args) nil)) + # + # Processing this AST would result in a context tree where each node + # contains the outer context, the AST and the child contexts. The top + # node is always Reek::Context::RootContext. Using the example above, + # the tree would look like this: + # + # RootContext -> children: 1 ModuleContext -> children: 1 MethodContext + # + # @return [Reek::Context::RootContext] tree of nested contexts + # + # source://reek//lib/reek/context_builder.rb#63 + def build(exp, parent_exp = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reek//lib/reek/context_builder.rb#477 + def context_processor_exists?(name); end + + # Returns the value of attribute current_context. + # + # source://reek//lib/reek/context_builder.rb#38 + def current_context; end + + # Sets the attribute current_context + # + # @param value the value to set the attribute current_context to. + # + # source://reek//lib/reek/context_builder.rb#38 + def current_context=(_arg0); end + + # source://reek//lib/reek/context_builder.rb#486 + def decrease_statement_count; end + + # Returns the value of attribute exp. + # + # source://reek//lib/reek/context_builder.rb#39 + def exp; end + + # source://reek//lib/reek/context_builder.rb#519 + def handle_refinement_block(exp); end + + # source://reek//lib/reek/context_builder.rb#531 + def handle_send_for_methods(exp); end + + # source://reek//lib/reek/context_builder.rb#525 + def handle_send_for_modules(exp); end + + # source://reek//lib/reek/context_builder.rb#482 + def increase_statement_count_by(sexp); end + + # Stores a reference to the current context, creates a nested new one, + # yields to the given block and then restores the previous context. + # + # @param klass [Context::*Context] context class + # @param args arguments for the class initializer + # @yield block + # + # source://reek//lib/reek/context_builder.rb#497 + def inside_new_context(klass, *args); end + + # Handles every node for which we have no context_processor. + # + # source://reek//lib/reek/context_builder.rb#75 + def process(exp); end + + # Handles `begin` and `kwbegin` nodes. `begin` nodes are created implicitly + # e.g. when parsing method bodies (see example below), `kwbegin` nodes are created + # by explicitly using the `begin` keyword. + # + # An input example that would trigger this method would be: + # + # def foo; call_me(); @x = 5; end + # + # In this case the whole method body would be hanging below the `begin` node. + # + # Counts all statements in the method body. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # source://reek//lib/reek/context_builder.rb#294 + def process_begin(exp, _parent); end + + # Handles `block` nodes. + # + # An input example that would trigger this method would be: + # + # list.map { |element| puts element } + # + # Counts non-empty blocks as one statement. + # + # A refinement block is handled differently and causes a RefinementContext + # to be opened. + # + # source://reek//lib/reek/context_builder.rb#270 + def process_block(exp, _parent); end + + # Handles `case` nodes. + # + # An input example that would trigger this method would be: + # + # foo = 5 + # case foo + # when 1..100 + # puts 'In between' + # else + # puts 'Not sure what I got here' + # end + # + # Counts the `else` body. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # source://reek//lib/reek/context_builder.rb#446 + def process_case(exp, _parent); end + + # Handles `casgn` ("class assign") nodes. + # + # An input example that would trigger this method would be: + # + # Foo = Class.new Bar + # + # source://reek//lib/reek/context_builder.rb#108 + def process_casgn(exp, parent); end + + # Handles `module` and `class` nodes. + # + # source://reek//lib/reek/context_builder.rb#81 + def process_class(exp, _parent); end + + # Handles `def` nodes. + # + # An input example that would trigger this method would be: + # + # def call_me; foo = 2; bar = 5; end + # + # Given the above example we would count 2 statements overall. + # + # source://reek//lib/reek/context_builder.rb#124 + def process_def(exp, parent); end + + # Handles `defs` nodes ("define singleton"). + # + # An input example that would trigger this method would be: + # + # def self.call_me; foo = 2; bar = 5; end + # + # Given the above example we would count 2 statements overall. + # + # source://reek//lib/reek/context_builder.rb#139 + def process_defs(exp, parent); end + + # Handles `for` nodes. + # + # An input example that would trigger this method would be: + # + # for i in [1,2,3,4] + # puts i + # end + # + # Counts the `for` body as one statement. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # `children[2]` below refers to the `while` body (so `puts i` from above) + # + # source://reek//lib/reek/context_builder.rb#366 + def process_for(exp, _parent); end + + # Handles `if` nodes. + # + # An input example that would trigger this method would be: + # + # if a > 5 && b < 3 + # puts 'bingo' + # else + # 3 + # end + # + # Counts the `if` body as one statement and the `else` body as another statement. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # `children[1]` refers to the `if` body (so `puts 'bingo'` from above) and + # `children[2]` to the `else` body (so `3` from above), which might be nil. + # + # source://reek//lib/reek/context_builder.rb#320 + def process_if(exp, _parent); end + + # Handles `ivasgn` and `ivar` nodes a.k.a. nodes related to instance variables. + # + # An input example that would trigger this method would be: + # + # @item = 5 + # + # for instance assignments (`ivasgn`) and + # + # call_me(@item) + # + # for just using instance variables (`ivar`). + # + # We record one reference to `self`. + # + # source://reek//lib/reek/context_builder.rb#197 + def process_ivar(exp, _parent); end + + # Handles `ivasgn` and `ivar` nodes a.k.a. nodes related to instance variables. + # + # An input example that would trigger this method would be: + # + # @item = 5 + # + # for instance assignments (`ivasgn`) and + # + # call_me(@item) + # + # for just using instance variables (`ivar`). + # + # We record one reference to `self`. + # + # source://reek//lib/reek/context_builder.rb#197 + def process_ivasgn(exp, _parent); end + + # Handles `begin` and `kwbegin` nodes. `begin` nodes are created implicitly + # e.g. when parsing method bodies (see example below), `kwbegin` nodes are created + # by explicitly using the `begin` keyword. + # + # An input example that would trigger this method would be: + # + # def foo; call_me(); @x = 5; end + # + # In this case the whole method body would be hanging below the `begin` node. + # + # Counts all statements in the method body. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # source://reek//lib/reek/context_builder.rb#294 + def process_kwbegin(exp, _parent); end + + # Handles `module` and `class` nodes. + # + # source://reek//lib/reek/context_builder.rb#81 + def process_module(exp, _parent); end + + # Handles `op_asgn` nodes a.k.a. Ruby's assignment operators. + # + # An input example that would trigger this method would be: + # + # x += 5 + # + # or + # + # x *= 3 + # + # We record one reference to `x` given the example above. + # + # source://reek//lib/reek/context_builder.rb#178 + def process_op_asgn(exp, _parent); end + + # Handles `resbody` nodes. + # + # An input example that would trigger this method would be: + # + # def simple + # raise ArgumentError, 'raising...' + # rescue => e + # puts 'rescued!' + # end + # + # Counts the exception capturing and every statement related to it. + # + # So `exp.children[1..-1]` from the code below would be an array with the following 2 elements: + # [ + # (lvasgn :e), + # (send nil :puts (str "rescued!")) + # ] + # + # which thus counts as 2 statements. + # `exp` would be the whole `rescue` body. + # See `process_rescue` for additional reference. + # + # source://reek//lib/reek/context_builder.rb#424 + def process_resbody(exp, _parent); end + + # Handles `rescue` nodes. + # + # An input example that would trigger this method would be: + # + # def simple + # raise ArgumentError, 'raising...' + # rescue => e + # puts 'rescued!' + # end + # + # Counts everything before the `rescue` body as one statement. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # `exp.children.first` below refers to everything before the actual `rescue` + # which would be the + # + # raise ArgumentError, 'raising...' + # + # in the example above. + # `exp` would be the whole method body wrapped under a `rescue` node. + # See `process_resbody` for additional reference. + # + # source://reek//lib/reek/context_builder.rb#396 + def process_rescue(exp, _parent); end + + # Handles `sclass` nodes + # + # An input example that would trigger this method would be: + # + # class << self + # end + # + # source://reek//lib/reek/context_builder.rb#96 + def process_sclass(exp, _parent); end + + # Handles `self` nodes. + # + # An input example that would trigger this method would be: + # + # def self.foo; end + # + # source://reek//lib/reek/context_builder.rb#210 + def process_self(_exp, _parent); end + + # Handles `send` nodes a.k.a. method calls. + # + # An input example that would trigger this method would be: + # + # call_me() + # + # Besides checking if it's a visibility modifier or an attribute writer + # we also record to what the method call is referring to + # which we later use for smell detectors like FeatureEnvy. + # + # source://reek//lib/reek/context_builder.rb#156 + def process_send(exp, _parent); end + + # Handles `super` nodes a.k.a. calls to `super` with arguments + # + # An input example that would trigger this method would be: + # + # def call_me; super(); end + # + # or + # + # def call_me; super(bar); end + # + # but not + # + # def call_me; super; end + # + # and not + # + # def call_me; super do end; end + # + # We record one reference to `self`. + # + # source://reek//lib/reek/context_builder.rb#254 + def process_super(exp, _parent); end + + # Handles `while` and `until` nodes. + # + # An input example that would trigger this method would be: + # + # while x < 5 + # puts 'bingo' + # end + # + # Counts the `while` body as one statement. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # `children[1]` below refers to the `while` body (so `puts 'bingo'` from above) + # + # source://reek//lib/reek/context_builder.rb#343 + def process_until(exp, _parent); end + + # Handles `when` nodes. + # + # An input example that would trigger this method would be: + # + # foo = 5 + # case foo + # when (1..100) + # puts 'In between' + # else + # puts 'Not sure what I got here' + # end + # + # Note that input like + # + # if foo then :holla else :nope end + # + # does not trigger this method. + # + # Counts the `when` body. + # + # source://reek//lib/reek/context_builder.rb#472 + def process_when(exp, _parent); end + + # Handles `while` and `until` nodes. + # + # An input example that would trigger this method would be: + # + # while x < 5 + # puts 'bingo' + # end + # + # Counts the `while` body as one statement. + # + # At the end we subtract one statement because the surrounding context was already counted + # as one (e.g. via `process_def`). + # + # `children[1]` below refers to the `while` body (so `puts 'bingo'` from above) + # + # source://reek//lib/reek/context_builder.rb#343 + def process_while(exp, _parent); end + + # Handles `zsuper` nodes a.k.a. calls to `super` without any arguments but a block possibly. + # + # An input example that would trigger this method would be: + # + # def call_me; super; end + # + # or + # + # def call_me; super do end; end + # + # but not + # + # def call_me; super(); end + # + # We record one reference to `self`. + # + # source://reek//lib/reek/context_builder.rb#230 + def process_zsuper(_exp, _parent); end + + # source://reek//lib/reek/context_builder.rb#536 + def register_attributes(exp); end +end + +# source://reek//lib/reek.rb#12 +Reek::DEFAULT_CONFIGURATION_FILE_NAME = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek.rb#11 +Reek::DEFAULT_SMELL_CONFIGURATION = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek.rb#13 +Reek::DETECTORS_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek.rb#15 +Reek::DIRECTORIES_KEY = T.let(T.unsafe(nil), String) + +# Contains all the existing smell detectors and exposes operations on them. +# +# source://reek//lib/reek/detector_repository.rb#11 +class Reek::DetectorRepository + # @return [DetectorRepository] a new instance of DetectorRepository + # + # source://reek//lib/reek/detector_repository.rb#35 + def initialize(smell_types: T.unsafe(nil), configuration: T.unsafe(nil)); end + + # source://reek//lib/reek/detector_repository.rb#41 + def examine(context); end + + private + + # Returns the value of attribute configuration. + # + # source://reek//lib/reek/detector_repository.rb#56 + def configuration; end + + # source://reek//lib/reek/detector_repository.rb#58 + def configuration_for(klass); end + + # source://reek//lib/reek/detector_repository.rb#62 + def smell_detectors_for(type); end + + # Returns the value of attribute smell_types. + # + # source://reek//lib/reek/detector_repository.rb#56 + def smell_types; end + + class << self + # @return [Array] The names of all known SmellDetectors + # e.g. ["BooleanParameter", "ClassVariable"]. + # + # source://reek//lib/reek/detector_repository.rb#50 + def available_detector_names; end + + # @param filter_by_smells [Array] List of smell types to filter by, e.g. "DuplicateMethodCall". + # More precisely it should be whatever is returned by `BaseDetector`.smell_type. + # This means that you can write the "DuplicateMethodCall" from above also like this: + # Reek::SmellDetectors::DuplicateMethodCall.smell_type + # if you want to make sure you do not fat-finger strings. + # @return [Array] All SmellDetectors that we want to filter for + # e.g. [Reek::SmellDetectors::Attribute]. + # + # source://reek//lib/reek/detector_repository.rb#27 + def eligible_smell_types(filter_by_smells = T.unsafe(nil)); end + + # @return [Array] All known SmellDetectors + # e.g. [Reek::SmellDetectors::BooleanParameter, Reek::SmellDetectors::ClassVariable]. + # + # source://reek//lib/reek/detector_repository.rb#14 + def smell_types; end + end +end + +# Generate versioned links to our documentation +# +# source://reek//lib/reek/documentation_link.rb#5 +module Reek::DocumentationLink + private + + # Build link to the documentation about the given subject for the current + # version of Reek. The subject can be either a smell type like + # 'FeatureEnvy' or a general subject like 'Rake Task'. + # + # @param subject [String] + # @return [String] the full URL for the relevant documentation + # + # source://reek//lib/reek/documentation_link.rb#16 + def build(subject); end + + # Convert the given subject name to a form that is acceptable in a URL. + # + # source://reek//lib/reek/documentation_link.rb#21 + def name_to_param(name); end + + class << self + # Build link to the documentation about the given subject for the current + # version of Reek. The subject can be either a smell type like + # 'FeatureEnvy' or a general subject like 'Rake Task'. + # + # @param subject [String] + # @return [String] the full URL for the relevant documentation + # + # source://reek//lib/reek/documentation_link.rb#16 + def build(subject); end + + # Convert the given subject name to a form that is acceptable in a URL. + # + # source://reek//lib/reek/documentation_link.rb#21 + def name_to_param(name); end + end +end + +# source://reek//lib/reek/documentation_link.rb#6 +Reek::DocumentationLink::HELP_LINK_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek.rb#14 +Reek::EXCLUDE_PATHS_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/errors/base_error.rb#4 +module Reek::Errors; end + +# Gets raised when trying to configure a detector with an option +# which is unknown to it. +# +# source://reek//lib/reek/errors/bad_detector_configuration_key_in_comment_error.rb#10 +class Reek::Errors::BadDetectorConfigurationKeyInCommentError < ::Reek::Errors::BaseError + # @return [BadDetectorConfigurationKeyInCommentError] a new instance of BadDetectorConfigurationKeyInCommentError + # + # source://reek//lib/reek/errors/bad_detector_configuration_key_in_comment_error.rb#28 + def initialize(detector_name:, offensive_keys:, source:, line:, original_comment:); end +end + +# source://reek//lib/reek/errors/bad_detector_configuration_key_in_comment_error.rb#11 +Reek::Errors::BadDetectorConfigurationKeyInCommentError::UNKNOWN_SMELL_DETECTOR_MESSAGE = T.let(T.unsafe(nil), String) + +# Gets raised when trying to configure a detector which is unknown to us. +# This might happen for multiple reasons. The users might have a typo in +# his comment or he might use a detector that does not exist anymore. +# +# source://reek//lib/reek/errors/bad_detector_in_comment_error.rb#11 +class Reek::Errors::BadDetectorInCommentError < ::Reek::Errors::BaseError + # @return [BadDetectorInCommentError] a new instance of BadDetectorInCommentError + # + # source://reek//lib/reek/errors/bad_detector_in_comment_error.rb#28 + def initialize(detector_name:, source:, line:, original_comment:); end +end + +# source://reek//lib/reek/errors/bad_detector_in_comment_error.rb#12 +Reek::Errors::BadDetectorInCommentError::UNKNOWN_SMELL_DETECTOR_MESSAGE = T.let(T.unsafe(nil), String) + +# Base class for all runtime Reek errors +# +# source://reek//lib/reek/errors/base_error.rb#6 +class Reek::Errors::BaseError < ::RuntimeError + # source://reek//lib/reek/errors/base_error.rb#7 + def long_message; end +end + +# Gets raised when Reek is unable to process the source due to bad config file +# +# source://reek//lib/reek/errors/config_file_error.rb#8 +class Reek::Errors::ConfigFileError < ::Reek::Errors::BaseError; end + +# Gets raised when Reek is unable to process the source due to an EncodingError +# +# source://reek//lib/reek/errors/encoding_error.rb#8 +class Reek::Errors::EncodingError < ::Reek::Errors::BaseError + # @return [EncodingError] a new instance of EncodingError + # + # source://reek//lib/reek/errors/encoding_error.rb#31 + def initialize(origin:); end + + # source://reek//lib/reek/errors/encoding_error.rb#35 + def long_message; end +end + +# source://reek//lib/reek/errors/encoding_error.rb#11 +Reek::Errors::EncodingError::LONG_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/errors/encoding_error.rb#9 +Reek::Errors::EncodingError::TEMPLATE = T.let(T.unsafe(nil), String) + +# Gets raised when trying to use a configuration for a detector +# that can't be parsed into a hash. +# +# source://reek//lib/reek/errors/garbage_detector_configuration_in_comment_error.rb#10 +class Reek::Errors::GarbageDetectorConfigurationInCommentError < ::Reek::Errors::BaseError + # @return [GarbageDetectorConfigurationInCommentError] a new instance of GarbageDetectorConfigurationInCommentError + # + # source://reek//lib/reek/errors/garbage_detector_configuration_in_comment_error.rb#27 + def initialize(detector_name:, source:, line:, original_comment:); end +end + +# source://reek//lib/reek/errors/garbage_detector_configuration_in_comment_error.rb#11 +Reek::Errors::GarbageDetectorConfigurationInCommentError::BAD_DETECTOR_CONFIGURATION_MESSAGE = T.let(T.unsafe(nil), String) + +# Gets raised when Reek is unable to process the source +# +# source://reek//lib/reek/errors/incomprehensible_source_error.rb#8 +class Reek::Errors::IncomprehensibleSourceError < ::Reek::Errors::BaseError + # @return [IncomprehensibleSourceError] a new instance of IncomprehensibleSourceError + # + # source://reek//lib/reek/errors/incomprehensible_source_error.rb#34 + def initialize(origin:); end + + # source://reek//lib/reek/errors/incomprehensible_source_error.rb#38 + def long_message; end +end + +# source://reek//lib/reek/errors/incomprehensible_source_error.rb#11 +Reek::Errors::IncomprehensibleSourceError::LONG_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/errors/incomprehensible_source_error.rb#9 +Reek::Errors::IncomprehensibleSourceError::TEMPLATE = T.let(T.unsafe(nil), String) + +# Gets raised for old-style comment configuration format. +# +# source://reek//lib/reek/errors/legacy_comment_separator_error.rb#8 +class Reek::Errors::LegacyCommentSeparatorError < ::Reek::Errors::BaseError + # @return [LegacyCommentSeparatorError] a new instance of LegacyCommentSeparatorError + # + # source://reek//lib/reek/errors/legacy_comment_separator_error.rb#27 + def initialize(source:, line:, original_comment:); end +end + +# source://reek//lib/reek/errors/legacy_comment_separator_error.rb#9 +Reek::Errors::LegacyCommentSeparatorError::MESSAGE = T.let(T.unsafe(nil), String) + +# Gets raised when Reek is unable to process the source due to a SyntaxError +# +# source://reek//lib/reek/errors/syntax_error.rb#8 +class Reek::Errors::SyntaxError < ::Reek::Errors::BaseError + # @return [SyntaxError] a new instance of SyntaxError + # + # source://reek//lib/reek/errors/syntax_error.rb#33 + def initialize(origin:); end + + # source://reek//lib/reek/errors/syntax_error.rb#37 + def long_message; end +end + +# source://reek//lib/reek/errors/syntax_error.rb#11 +Reek::Errors::SyntaxError::LONG_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/errors/syntax_error.rb#9 +Reek::Errors::SyntaxError::TEMPLATE = T.let(T.unsafe(nil), String) + +# Applies all available smell detectors to a source. +# +# source://reek//lib/reek/examiner.rb#16 +class Reek::Examiner + # Creates an Examiner which scans the given +source+ for code smells. + # + # @param source [File, IO, String] If +source+ is a String it is assumed to be Ruby source code; + # if it is a File or IO, it is opened and Ruby source code is read from it; + # @param filter_by_smells [Array] List of smell types to filter by, e.g. "DuplicateMethodCall". + # @param configuration [Configuration::AppConfiguration] The configuration for this Examiner. + # @return [Examiner] a new instance of Examiner + # + # source://reek//lib/reek/examiner.rb#38 + def initialize(source, filter_by_smells: T.unsafe(nil), configuration: T.unsafe(nil), detector_repository_class: T.unsafe(nil), error_handler: T.unsafe(nil)); end + + # @return [String] origin of the source being analysed + # + # source://reek//lib/reek/examiner.rb#54 + def origin; end + + # @return [Array] the smells found in the source + # + # source://reek//lib/reek/examiner.rb#60 + def smells; end + + # @return [Integer] the number of smells found in the source + # + # source://reek//lib/reek/examiner.rb#68 + def smells_count; end + + # @return [Boolean] true if and only if there are code smells in the source. + # + # source://reek//lib/reek/examiner.rb#76 + def smelly?; end + + private + + # Returns the value of attribute detector_repository. + # + # source://reek//lib/reek/examiner.rb#82 + def detector_repository; end + + # source://reek//lib/reek/examiner.rb#119 + def examine_tree; end + + # Runs the Examiner on the given source to scan for code smells. + # + # In case one of the smell detectors raises an exception we probably hit a Reek bug. + # So we catch the exception here, let the user know something went wrong + # and continue with the analysis. + # + # @return [Array] the smells found in the source + # + # source://reek//lib/reek/examiner.rb#92 + def run; end + + # Returns the value of attribute source. + # + # source://reek//lib/reek/examiner.rb#82 + def source; end + + # source://reek//lib/reek/examiner.rb#115 + def syntax_tree; end + + # source://reek//lib/reek/examiner.rb#103 + def wrap_exceptions; end +end + +# Handles no errors +# +# source://reek//lib/reek/examiner.rb#18 +class Reek::Examiner::NullHandler + # source://reek//lib/reek/examiner.rb#19 + def handle(_exception); end +end + +# A set of context-specific overrides for smell detectors. +# +# source://reek//lib/reek/smell_configuration.rb#50 +class Reek::Overrides + # @return [Overrides] a new instance of Overrides + # + # source://reek//lib/reek/smell_configuration.rb#51 + def initialize(hash); end + + # Find any overrides that match the supplied context + # + # source://reek//lib/reek/smell_configuration.rb#56 + def for_context(context); end + + private + + # Returns the value of attribute hash. + # + # source://reek//lib/reek/smell_configuration.rb#63 + def hash; end +end + +# Reek reporting functionality. +# +# source://reek//lib/reek/report/base_report.rb#9 +module Reek::Report + class << self + # Map heading format symbol to a report class. + # + # @param heading_format [Symbol] The format to map + # @return The mapped heading class + # + # source://reek//lib/reek/report.rb#73 + def heading_formatter(heading_format); end + + # Map location format symbol to a report class. + # + # @param location_format [Symbol] The format to map + # @return The mapped location class + # + # source://reek//lib/reek/report.rb#63 + def location_formatter(location_format); end + + # Map progress format symbol to a report class. + # + # @param progress_format [Symbol] The format to map + # @return The mapped progress class + # + # source://reek//lib/reek/report.rb#83 + def progress_formatter(progress_format); end + + # Map report format symbol to a report class. + # + # @param report_format [Symbol] The format to map + # @return The mapped report class + # + # source://reek//lib/reek/report.rb#53 + def report_class(report_format); end + + # Map warning format symbol to a report class. + # + # @param warning_format [Symbol] The format to map + # @return The mapped warning class + # + # source://reek//lib/reek/report.rb#93 + def warning_formatter_class(warning_format); end + end +end + +# A report that contains the smells and smell counts following source code analysis. +# +# @abstract Subclass and override {#show} to create a concrete report class. +# +# source://reek//lib/reek/report/base_report.rb#18 +class Reek::Report::BaseReport + # @return [BaseReport] a new instance of BaseReport + # + # source://reek//lib/reek/report/base_report.rb#25 + def initialize(heading_formatter: T.unsafe(nil), sort_by_issue_count: T.unsafe(nil), warning_formatter: T.unsafe(nil), progress_formatter: T.unsafe(nil)); end + + # Add Examiner to report on. The report will output results for all + # added examiners. + # + # @param examiner [Reek::Examiner] object to report on + # + # source://reek//lib/reek/report/base_report.rb#43 + def add_examiner(examiner); end + + # Render the report results on STDOUT + # + # @raise [NotImplementedError] + # + # source://reek//lib/reek/report/base_report.rb#52 + def show; end + + # source://reek//lib/reek/report/base_report.rb#60 + def smells; end + + # @return [Boolean] + # + # source://reek//lib/reek/report/base_report.rb#56 + def smells?; end + + protected + + # Returns the value of attribute total_smell_count. + # + # source://reek//lib/reek/report/base_report.rb#66 + def total_smell_count; end + + # Sets the attribute total_smell_count + # + # @param value the value to set the attribute total_smell_count to. + # + # source://reek//lib/reek/report/base_report.rb#66 + def total_smell_count=(_arg0); end + + private + + # Returns the value of attribute examiners. + # + # source://reek//lib/reek/report/base_report.rb#70 + def examiners; end + + # Returns the value of attribute heading_formatter. + # + # source://reek//lib/reek/report/base_report.rb#70 + def heading_formatter; end + + # Returns the value of attribute progress_formatter. + # + # source://reek//lib/reek/report/base_report.rb#70 + def progress_formatter; end + + # Returns the value of attribute sort_by_issue_count. + # + # source://reek//lib/reek/report/base_report.rb#70 + def sort_by_issue_count; end + + # Returns the value of attribute warning_formatter. + # + # source://reek//lib/reek/report/base_report.rb#70 + def warning_formatter; end +end + +# source://reek//lib/reek/report/base_report.rb#19 +Reek::Report::BaseReport::NO_WARNINGS_COLOR = T.let(T.unsafe(nil), Symbol) + +# source://reek//lib/reek/report/base_report.rb#20 +Reek::Report::BaseReport::WARNINGS_COLOR = T.let(T.unsafe(nil), Symbol) + +# Formats the location of a warning as an empty string. +# +# source://reek//lib/reek/report/location_formatter.rb#8 +module Reek::Report::BlankLocationFormatter + private + + # source://reek//lib/reek/report/location_formatter.rb#11 + def format(_warning); end + + class << self + # source://reek//lib/reek/report/location_formatter.rb#11 + def format(_warning); end + end +end + +# Formats the location of a warning as an array of line numbers. +# +# source://reek//lib/reek/report/location_formatter.rb#19 +module Reek::Report::DefaultLocationFormatter + private + + # source://reek//lib/reek/report/location_formatter.rb#22 + def format(warning); end + + class << self + # source://reek//lib/reek/report/location_formatter.rb#22 + def format(warning); end + end +end + +# Formatter that adds a link to the docs to the basic message from +# SimpleWarningFormatter. +# +# source://reek//lib/reek/report/documentation_link_warning_formatter.rb#11 +class Reek::Report::DocumentationLinkWarningFormatter < ::Reek::Report::SimpleWarningFormatter + # source://reek//lib/reek/report/documentation_link_warning_formatter.rb#12 + def format(warning); end +end + +# source://reek//lib/reek/report.rb#32 +Reek::Report::HEADING_FORMATTERS = T.let(T.unsafe(nil), Hash) + +# Saves the report as a HTML file +# +# source://reek//lib/reek/report/html_report.rb#12 +class Reek::Report::HTMLReport < ::Reek::Report::BaseReport + # source://reek//lib/reek/report/html_report.rb#16 + def show; end +end + +# Base class for heading formatters. +# Is responsible for formatting the heading emitted for each examiner +# +# @abstract Override {#show_header?} to implement a heading formatter. +# +# source://reek//lib/reek/report/heading_formatter.rb#10 +class Reek::Report::HeadingFormatterBase + # source://reek//lib/reek/report/heading_formatter.rb#16 + def header(examiner); end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://reek//lib/reek/report/heading_formatter.rb#12 + def show_header?(_examiner); end + + private + + # source://reek//lib/reek/report/heading_formatter.rb#26 + def formatted_header(examiner); end +end + +# Displays a list of smells in JSON format +# JSON with empty array for 0 smells +# +# source://reek//lib/reek/report/json_report.rb#13 +class Reek::Report::JSONReport < ::Reek::Report::BaseReport + # source://reek//lib/reek/report/json_report.rb#14 + def show(out = T.unsafe(nil)); end +end + +# source://reek//lib/reek/report.rb#26 +Reek::Report::LOCATION_FORMATTERS = T.let(T.unsafe(nil), Hash) + +# source://reek//lib/reek/report.rb#37 +Reek::Report::PROGRESS_FORMATTERS = T.let(T.unsafe(nil), Hash) + +# source://reek//lib/reek/report/progress_formatter.rb#5 +module Reek::Report::ProgressFormatter; end + +# Base class for progress formatters. +# Is responsible for formatting the progress emitted for each examiner +# +# @abstract Override {#header, #progress, #footer} to implement a progress formatter. +# +# source://reek//lib/reek/report/progress_formatter.rb#11 +class Reek::Report::ProgressFormatter::Base + # @return [Base] a new instance of Base + # + # source://reek//lib/reek/report/progress_formatter.rb#14 + def initialize(sources_count); end + + # @raise [NotImplementedError] + # + # source://reek//lib/reek/report/progress_formatter.rb#26 + def footer; end + + # @raise [NotImplementedError] + # + # source://reek//lib/reek/report/progress_formatter.rb#18 + def header; end + + # @raise [NotImplementedError] + # + # source://reek//lib/reek/report/progress_formatter.rb#22 + def progress(_examiner); end + + # Returns the value of attribute sources_count. + # + # source://reek//lib/reek/report/progress_formatter.rb#12 + def sources_count; end +end + +# Shows the status of each source as either a dot (.) or an S +# +# source://reek//lib/reek/report/progress_formatter.rb#34 +class Reek::Report::ProgressFormatter::Dots < ::Reek::Report::ProgressFormatter::Base + # source://reek//lib/reek/report/progress_formatter.rb#46 + def footer; end + + # source://reek//lib/reek/report/progress_formatter.rb#38 + def header; end + + # source://reek//lib/reek/report/progress_formatter.rb#42 + def progress(examiner); end + + private + + # source://reek//lib/reek/report/progress_formatter.rb#52 + def display_clean; end + + # source://reek//lib/reek/report/progress_formatter.rb#56 + def display_smelly; end +end + +# source://reek//lib/reek/report/progress_formatter.rb#35 +Reek::Report::ProgressFormatter::Dots::NO_WARNINGS_COLOR = T.let(T.unsafe(nil), Symbol) + +# source://reek//lib/reek/report/progress_formatter.rb#36 +Reek::Report::ProgressFormatter::Dots::WARNINGS_COLOR = T.let(T.unsafe(nil), Symbol) + +# Does not show progress +# +# source://reek//lib/reek/report/progress_formatter.rb#64 +class Reek::Report::ProgressFormatter::Quiet < ::Reek::Report::ProgressFormatter::Base + # source://reek//lib/reek/report/progress_formatter.rb#73 + def footer; end + + # source://reek//lib/reek/report/progress_formatter.rb#65 + def header; end + + # source://reek//lib/reek/report/progress_formatter.rb#69 + def progress(_examiner); end +end + +# Lists only smelly examiners +# +# source://reek//lib/reek/report/heading_formatter.rb#48 +class Reek::Report::QuietHeadingFormatter < ::Reek::Report::HeadingFormatterBase + # @return [Boolean] + # + # source://reek//lib/reek/report/heading_formatter.rb#49 + def show_header?(examiner); end +end + +# source://reek//lib/reek/report.rb#18 +Reek::Report::REPORT_CLASSES = T.let(T.unsafe(nil), Hash) + +# Basic formatter that just shows a simple message for each warning, +# prepended with the result of the passed-in location formatter. +# +# source://reek//lib/reek/report/simple_warning_formatter.rb#9 +class Reek::Report::SimpleWarningFormatter + # @return [SimpleWarningFormatter] a new instance of SimpleWarningFormatter + # + # source://reek//lib/reek/report/simple_warning_formatter.rb#10 + def initialize(location_formatter: T.unsafe(nil)); end + + # source://reek//lib/reek/report/simple_warning_formatter.rb#14 + def format(warning); end + + # source://reek//lib/reek/report/simple_warning_formatter.rb#18 + def format_list(warnings); end + + private + + # Returns the value of attribute location_formatter. + # + # source://reek//lib/reek/report/simple_warning_formatter.rb#24 + def location_formatter; end +end + +# Formats the location of a warning as a combination of source file name +# and line number. In this format, it is not possible to show more than +# one line number, so the first number is displayed. +# +# source://reek//lib/reek/report/location_formatter.rb#32 +module Reek::Report::SingleLineLocationFormatter + private + + # source://reek//lib/reek/report/location_formatter.rb#35 + def format(warning); end + + class << self + # source://reek//lib/reek/report/location_formatter.rb#35 + def format(warning); end + end +end + +# Generates a sorted, text summary of smells in examiners +# +# source://reek//lib/reek/report/text_report.rb#13 +class Reek::Report::TextReport < ::Reek::Report::BaseReport + # @return [TextReport] a new instance of TextReport + # + # source://reek//lib/reek/report/text_report.rb#14 + def initialize(**args); end + + # source://reek//lib/reek/report/text_report.rb#21 + def add_examiner(examiner); end + + # source://reek//lib/reek/report/text_report.rb#27 + def show; end + + private + + # source://reek//lib/reek/report/text_report.rb#40 + def display_summary; end + + # source://reek//lib/reek/report/text_report.rb#44 + def display_total_smell_count; end + + # source://reek//lib/reek/report/text_report.rb#36 + def smell_summaries; end + + # source://reek//lib/reek/report/text_report.rb#59 + def sort_examiners; end + + # source://reek//lib/reek/report/text_report.rb#50 + def summarize_single_examiner(examiner); end + + # source://reek//lib/reek/report/text_report.rb#63 + def total_smell_count_message; end +end + +# Lists out each examiner, even if it has no smell +# +# source://reek//lib/reek/report/heading_formatter.rb#38 +class Reek::Report::VerboseHeadingFormatter < ::Reek::Report::HeadingFormatterBase + # @return [Boolean] + # + # source://reek//lib/reek/report/heading_formatter.rb#39 + def show_header?(_examiner); end +end + +# source://reek//lib/reek/report.rb#42 +Reek::Report::WARNING_FORMATTER_CLASSES = T.let(T.unsafe(nil), Hash) + +# Generates a list of smells in XML format +# +# source://reek//lib/reek/report/xml_report.rb#12 +class Reek::Report::XMLReport < ::Reek::Report::BaseReport + # source://reek//lib/reek/report/xml_report.rb#16 + def show; end + + private + + # source://reek//lib/reek/report/xml_report.rb#29 + def checkstyle; end + + # source://reek//lib/reek/report/xml_report.rb#23 + def document; end + + # source://reek//lib/reek/report/xml_report.rb#51 + def error(smell, line); end + + # source://reek//lib/reek/report/xml_report.rb#39 + def file(name, smells); end +end + +# Displays a list of smells in YAML format +# YAML with empty array for 0 smells +# +# source://reek//lib/reek/report/yaml_report.rb#13 +class Reek::Report::YAMLReport < ::Reek::Report::BaseReport + # source://reek//lib/reek/report/yaml_report.rb#14 + def show(out = T.unsafe(nil)); end +end + +# Represents a single set of configuration options for a smell detector +# +# source://reek//lib/reek/smell_configuration.rb#7 +class Reek::SmellConfiguration + # @return [SmellConfiguration] a new instance of SmellConfiguration + # + # source://reek//lib/reek/smell_configuration.rb#16 + def initialize(hash); end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_configuration.rb#24 + def enabled?; end + + # source://reek//lib/reek/smell_configuration.rb#20 + def merge(new_options); end + + # source://reek//lib/reek/smell_configuration.rb#28 + def overrides_for(context); end + + # Retrieves the value, if any, for the given +key+ in the given +context+. + # + # Raises an error if neither the context nor this config have a value for + # the key. + # + # source://reek//lib/reek/smell_configuration.rb#37 + def value(key, context); end + + private + + # Returns the value of attribute options. + # + # source://reek//lib/reek/smell_configuration.rb#44 + def options; end +end + +# The name of the config field that specifies whether a smell is +# enabled. Set to +true+ or +false+. +# +# source://reek//lib/reek/smell_configuration.rb#10 +Reek::SmellConfiguration::ENABLED_KEY = T.let(T.unsafe(nil), String) + +# The name of the config field that sets scope-specific overrides +# for other values in the current smell detector's configuration. +# +# source://reek//lib/reek/smell_configuration.rb#14 +Reek::SmellConfiguration::OVERRIDES_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/smell_detectors/base_detector.rb#8 +module Reek::SmellDetectors; end + +# A class that publishes a getter or setter for an instance variable +# invites client classes to become too intimate with its inner workings, +# and in particular with its representation of state. +# +# This detector raises a warning for every public +attr_writer+, +# +attr_accessor+, and +attr+ with the writable flag set to +true+. +# +# See {file:docs/Attribute.md} for details. +# +# TODO: Catch attributes declared "by hand" +# +# source://reek//lib/reek/smell_detectors/attribute.rb#18 +class Reek::SmellDetectors::Attribute < ::Reek::SmellDetectors::BaseDetector + # Checks whether the given class declares any attributes. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/attribute.rb#28 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/attribute.rb#38 + def attributes_in_context; end + + class << self + # source://reek//lib/reek/smell_detectors/attribute.rb#19 + def contexts; end + end +end + +# Shared responsibilities of all smell detectors. +# +# See +# - {file:docs/Basic-Smell-Options.md} +# - {file:docs/Code-Smells.md} +# - {file:README.md} +# for details. +# +# source://reek//lib/reek/smell_detectors/base_detector.rb#20 +class Reek::SmellDetectors::BaseDetector + # @return [BaseDetector] a new instance of BaseDetector + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#32 + def initialize(configuration: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute config. + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#21 + def config; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#41 + def run; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#37 + def smell_type; end + + private + + # source://reek//lib/reek/smell_detectors/base_detector.rb#78 + def config_for(ctx); end + + # Returns the value of attribute context. + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#56 + def context; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#70 + def enabled?; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#66 + def exception?; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#58 + def expression; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#82 + def smell_warning(**options); end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#62 + def source_line; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#74 + def value(key, ctx); end + + class << self + # @return [Set] all configuration keys that are available for this detector + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#139 + def configuration_keys; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#96 + def contexts; end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#101 + def default_config; end + + # Returns all descendants of BaseDetector + # + # @return [Array] , e.g.: + # [Reek::SmellDetectors::Attribute, + # Reek::SmellDetectors::BooleanParameter, + # Reek::SmellDetectors::ClassVariable, + # ...] + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#121 + def descendants; end + + # @private + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#108 + def inherited(subclass); end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#92 + def smell_type; end + + # Transform a detector name to the corresponding constant. + # Note that we assume a valid name - exceptions are not handled here. + # + # @param detector_name [String] the detector in question, e.g. 'DuplicateMethodCall' + # @return [SmellDetector] this will return the class, not an instance + # + # source://reek//lib/reek/smell_detectors/base_detector.rb#132 + def to_detector(detector_name); end + + # source://reek//lib/reek/smell_detectors/base_detector.rb#48 + def todo_configuration_for(smells); end + end +end + +# The default value for the +EXCLUDE_KEY+ if it isn't specified +# in any configuration file. +# +# source://reek//lib/reek/smell_detectors/base_detector.rb#30 +Reek::SmellDetectors::BaseDetector::DEFAULT_EXCLUDE_SET = T.let(T.unsafe(nil), Array) + +# The name of the config field that lists the names of code contexts +# that should not be checked. Add this field to the config for each +# smell that should ignore this code element. +# +# source://reek//lib/reek/smell_detectors/base_detector.rb#26 +Reek::SmellDetectors::BaseDetector::EXCLUDE_KEY = T.let(T.unsafe(nil), String) + +# A Boolean parameter effectively permits a method's caller +# to decide which execution path to take. The +# offending parameter is a kind of Control Couple. +# +# Currently Reek can only detect a Boolean parameter when it has a +# default initializer. +# +# See {file:docs/Boolean-Parameter.md} for details. +# +# source://reek//lib/reek/smell_detectors/boolean_parameter.rb#16 +class Reek::SmellDetectors::BooleanParameter < ::Reek::SmellDetectors::BaseDetector + # Checks whether the given method has any Boolean parameters. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/boolean_parameter.rb#24 + def sniff; end +end + +# source://reek//lib/reek/smell_detectors/boolean_parameter.rb#17 +Reek::SmellDetectors::BooleanParameter::BOOLEAN_VALUES = T.let(T.unsafe(nil), Array) + +# Class variables form part of the global runtime state, and as such make +# it easy for one part of the system to accidentally or inadvertently +# depend on another part of the system. So the system becomes more prone to +# problems where changing something over here breaks something over there. +# In particular, class variables can make it hard to set up tests (because +# the context of the test includes all global state). +# +# See {file:docs/Class-Variable.md} for details. +# +# source://reek//lib/reek/smell_detectors/class_variable.rb#17 +class Reek::SmellDetectors::ClassVariable < ::Reek::SmellDetectors::BaseDetector + # Collects the names of the class variables declared and/or used + # in the given module. + # + # source://reek//lib/reek/smell_detectors/class_variable.rb#41 + def class_variables_in_context; end + + # Checks whether the given class or module declares any class variables. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/class_variable.rb#27 + def sniff; end + + class << self + # source://reek//lib/reek/smell_detectors/class_variable.rb#18 + def contexts; end + end +end + +# Control Coupling occurs when a method or block checks the value of +# a parameter in order to decide which execution path to take. The +# offending parameter is often called a Control Couple. +# +# A simple example would be the quoted parameter +# in the following method: +# +# def write(quoted) +# if quoted +# write_quoted(@value) +# else +# puts @value +# end +# end +# +# Control Coupling is a kind of duplication, because the calling method +# already knows which path should be taken. +# +# Control Coupling reduces the code's flexibility by creating a +# dependency between the caller and callee: +# any change to the possible values of the controlling parameter must +# be reflected on both sides of the call. +# +# A Control Couple also reveals a loss of simplicity: the called +# method probably has more than one responsibility, +# because it includes at least two different code paths. +# +# One possible solution is to use the Strategy Pattern +# to pass into the callee what must be done. This is +# not considered to be control coupling because the +# callee will do the same thing with the strategy, +# whatever it happens to be. Sometimes in Ruby the +# strategy may actually just be a block passed in, and +# that remains next to where the caller invokes it in +# the source code. +# +# See {file:docs/Control-Parameter.md} for details. +# +# source://reek//lib/reek/smell_detectors/control_parameter.rb#53 +class Reek::SmellDetectors::ControlParameter < ::Reek::SmellDetectors::BaseDetector + # Checks whether the given method chooses its execution path + # by testing the value of one of its parameters. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/control_parameter.rb#54 + def sniff; end + + private + + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/control_parameter.rb#69 + def control_parameters; end + + # @param parameter [Symbol] the name of the parameter + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/control_parameter.rb#86 + def find_matches(parameter); end + + # @return [Array] e.g. [:bravo, :charlie] + # + # source://reek//lib/reek/smell_detectors/control_parameter.rb#78 + def potential_parameters; end +end + +# source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#5 +module Reek::SmellDetectors::ControlParameterHelpers; end + +# CallInConditionFinder finds usages of the given parameter +# in the context of a method call in a condition, e.g.: +# +# def alfa(bravo) +# if charlie(bravo) +# delta +# end +# end +# +# or +# +# def alfa(bravo) +# if bravo.charlie? +# delta +# end +# end +# +# Those usages are legit and should not trigger the ControlParameter smell warning. +# +# source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#26 +class Reek::SmellDetectors::ControlParameterHelpers::CallInConditionFinder + # @param node [Reek::AST::Node] the node in our current scope, + # e.g. s(:def, :alfa, + # s(:args, + # s(:arg, :bravo), + # @param parameter [Symbol] the parameter name in question + # e.g. in the example above this would be :bravo + # @return [CallInConditionFinder] a new instance of CallInConditionFinder + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#37 + def initialize(node, parameter); end + + # @return [Boolean] if the parameter in question has been used in the context of a + # method call in a condition + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#46 + def uses_param_in_call_in_condition?; end + + private + + # @return [Boolean] if the parameter is used in the given method call + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#77 + def call_involving_param?(call_node); end + + # :reek:UtilityFunction + # + # @return [Boolean] if the given method call is a comparison call + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#85 + def comparison_call?(call_node); end + + # Returns the value of attribute node. + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#58 + def node; end + + # Returns the value of attribute parameter. + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#58 + def parameter; end + + # @return [Boolean] if the parameter is used in a method call that is not a comparison call + # e.g. this would return true given that "bravo" is the parameter in question: + # + # if charlie(bravo) then delta end + # + # while this would return false (since its a comparison): + # + # if bravo == charlie then charlie end + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#70 + def regular_call_involving_param?(call_node); end +end + +# source://reek//lib/reek/smell_detectors/control_parameter_helpers/call_in_condition_finder.rb#27 +Reek::SmellDetectors::ControlParameterHelpers::CallInConditionFinder::COMPARISON_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# Collects information about a single control parameter. +# +# source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#9 +class Reek::SmellDetectors::ControlParameterHelpers::Candidate + # @param parameter [Symbol] the parameter name + # @param occurrences [Array] the occurrences of the ControlParameter smell + # e.g. [s(:lvar, :bravo), s(:lvar, :bravo)] + # @return [Candidate] a new instance of Candidate + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#15 + def initialize(parameter, occurrences); end + + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#24 + def lines; end + + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#28 + def name; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#20 + def smells?; end + + private + + # Returns the value of attribute occurrences. + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#34 + def occurrences; end + + # Returns the value of attribute parameter. + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/candidate.rb#34 + def parameter; end +end + +# Finds cases of ControlParameter in a particular node for a particular parameter +# +# source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#10 +class Reek::SmellDetectors::ControlParameterHelpers::ControlParameterFinder + # @param node [Reek::AST::Node] the node in our current scope, + # e.g. s(:def, :alfa, + # s(:args, + # s(:arg, :bravo), + # @param parameter [Symbol] the parameter name in question + # e.g. in the example above this would be :bravo + # @return [ControlParameterFinder] a new instance of ControlParameterFinder + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#20 + def initialize(node, parameter); end + + # @return [Array] all nodes where the parameter is used for control flow + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#28 + def find_matches; end + + # @return [Boolean] true if the parameter is not used for control flow + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#37 + def legitimate_uses?; end + + private + + # @return [Array] the conditional nodes scoped below the current node + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#88 + def conditional_nodes; end + + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#68 + def nested_finders; end + + # Returns the value of attribute node. + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#47 + def node; end + + # Returns the value of attribute parameter. + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#47 + def parameter; end + + # @return [Boolean] if the parameter is used in the body of the method + # e.g. this + # + # def alfa(bravo) + # puts bravo + # if bravo then charlie end + # end + # + # would cause this method to return true because of the "puts bravo" + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#60 + def parameter_used_in_body?; end + + # @return [Array] all nodes where the parameter is part of a condition, + # e.g. [s(:lvar, :charlie)] + # + # source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#78 + def uses_of_param_in_condition; end +end + +# source://reek//lib/reek/smell_detectors/control_parameter_helpers/control_parameter_finder.rb#11 +Reek::SmellDetectors::ControlParameterHelpers::ControlParameterFinder::CONDITIONAL_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# A Data Clump occurs when the same two or three items frequently +# appear together in classes and parameter lists, or when a group +# of instance variable names start or end with similar substrings. +# +# The recurrence of the items often means there is duplicate code +# spread around to handle them. There may be an abstraction missing +# from the code, making the system harder to understand. +# +# Currently Reek looks for a group of two or more parameters with +# the same names that are expected by three or more methods of a class. +# +# See {file:docs/Data-Clump.md} for details. +# +# source://reek//lib/reek/smell_detectors/data_clump.rb#26 +class Reek::SmellDetectors::DataClump < ::Reek::SmellDetectors::BaseDetector + # Checks the given class or module for multiple identical parameter sets. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/data_clump.rb#53 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/data_clump.rb#86 + def candidate_clumps; end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#82 + def candidate_methods; end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#103 + def clumps; end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#95 + def common_argument_names_for(methods); end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#74 + def max_copies; end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#99 + def methods_containing_clump(clump); end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#78 + def min_clump_size; end + + class << self + # source://reek//lib/reek/smell_detectors/data_clump.rb#38 + def contexts; end + + # source://reek//lib/reek/smell_detectors/data_clump.rb#42 + def default_config; end + + # @private + # + # source://reek//lib/reek/smell_detectors/data_clump.rb#68 + def print_clump(clump); end + end +end + +# source://reek//lib/reek/smell_detectors/data_clump.rb#28 +Reek::SmellDetectors::DataClump::DEFAULT_MAX_COPIES = T.let(T.unsafe(nil), Integer) + +# source://reek//lib/reek/smell_detectors/data_clump.rb#36 +Reek::SmellDetectors::DataClump::DEFAULT_MIN_CLUMP_SIZE = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum allowed +# copies of any clump. No group of common parameters will be +# reported as a DataClump unless there are more than this many +# methods containing those parameters. +# +# source://reek//lib/reek/smell_detectors/data_clump.rb#27 +Reek::SmellDetectors::DataClump::MAX_COPIES_KEY = T.let(T.unsafe(nil), String) + +# The name of the config field that sets the minimum clump +# size. No group of common parameters will be reported as +# a DataClump unless it contains at least this many parameters. +# +# source://reek//lib/reek/smell_detectors/data_clump.rb#35 +Reek::SmellDetectors::DataClump::MIN_CLUMP_SIZE_KEY = T.let(T.unsafe(nil), String) + +# Duplication occurs when two fragments of code look nearly identical, +# or when two fragments of code have nearly identical effects +# at some conceptual level. +# +# +DuplicateMethodCall+ checks for repeated identical method calls +# within any one method definition. For example, the following method +# will report a warning: +# +# def double_thing() +# @other.thing + @other.thing +# end +# +# See {file:docs/Duplicate-Method-Call.md} for details. +# +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#23 +class Reek::SmellDetectors::DuplicateMethodCall < ::Reek::SmellDetectors::BaseDetector + # Looks for duplicate calls within the body of the method context. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#44 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#62 + def allow_calls; end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#58 + def max_allowed_calls; end + + class << self + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#33 + def default_config; end + end +end + +# The name of the config field that sets the names of any +# methods for which identical calls should be to be permitted +# within any single method. +# +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#30 +Reek::SmellDetectors::DuplicateMethodCall::ALLOW_CALLS_KEY = T.let(T.unsafe(nil), String) + +# Collects all calls in a given context +# +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#97 +class Reek::SmellDetectors::DuplicateMethodCall::CallCollector + # @return [CallCollector] a new instance of CallCollector + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#100 + def initialize(context, max_allowed_calls, allow_calls); end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#106 + def calls; end + + # Returns the value of attribute context. + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#98 + def context; end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#112 + def smelly_calls; end + + private + + # Returns the value of attribute allow_calls. + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#118 + def allow_calls; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#143 + def allow_calls?(method); end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#122 + def collect_calls(result); end + + # Returns the value of attribute max_allowed_calls. + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#118 + def max_allowed_calls; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#139 + def simple_method_call?(call_node); end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#134 + def smelly_call?(found_call); end +end + +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#31 +Reek::SmellDetectors::DuplicateMethodCall::DEFAULT_ALLOW_CALLS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#25 +Reek::SmellDetectors::DuplicateMethodCall::DEFAULT_MAX_CALLS = T.let(T.unsafe(nil), Integer) + +# Collects information about a single found call +# +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#67 +class Reek::SmellDetectors::DuplicateMethodCall::FoundCall + # @return [FoundCall] a new instance of FoundCall + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#68 + def initialize(call_node); end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#77 + def call; end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#85 + def lines; end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#81 + def occurs; end + + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#73 + def record(occurence); end + + private + + # Returns the value of attribute call_node. + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#91 + def call_node; end + + # Returns the value of attribute occurrences. + # + # source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#91 + def occurrences; end +end + +# The name of the config field that sets the maximum number of +# identical calls to be permitted within any single method. +# +# source://reek//lib/reek/smell_detectors/duplicate_method_call.rb#24 +Reek::SmellDetectors::DuplicateMethodCall::MAX_ALLOWED_CALLS_KEY = T.let(T.unsafe(nil), String) + +# Feature Envy occurs when a code fragment references another object +# more often than it references itself, or when several clients do +# the same series of manipulations on a particular type of object. +# +# A simple example would be the following method, which "belongs" +# on the Item class and not on the Cart class: +# +# class Cart +# def price +# @item.price + @item.tax +# end +# end +# +# Feature Envy reduces the code's ability to communicate intent: +# code that "belongs" on one class but which is located in another +# can be hard to find, and may upset the "System of Names" +# in the host class. +# +# Feature Envy also affects the design's flexibility: A code fragment +# that is in the wrong class creates couplings that may not be natural +# within the application's domain, and creates a loss of cohesion +# in the unwilling host class. +# +# Currently +FeatureEnvy+ reports any method that refers to self less +# often than it refers to (ie. send messages to) some other object. +# +# If the method doesn't reference self at all, +UtilityFunction+ is +# reported instead. +# +# See {file:docs/Feature-Envy.md} for details. +# +# source://reek//lib/reek/smell_detectors/feature_envy.rb#44 +class Reek::SmellDetectors::FeatureEnvy < ::Reek::SmellDetectors::BaseDetector + # Checks whether the given +context+ includes any code fragment that + # might "belong" on another class. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/feature_envy.rb#45 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/feature_envy.rb#63 + def envious_receivers; end + + # source://reek//lib/reek/smell_detectors/feature_envy.rb#59 + def refs; end +end + +# The +InstanceVariableAssumption+ class is responsible for +# detecting directly access of instance variables in a class +# that does not define them in its initialize method. +# +# source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#12 +class Reek::SmellDetectors::InstanceVariableAssumption < ::Reek::SmellDetectors::BaseDetector + # Checks +klass+ for instance + # variables assumptions. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#22 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#36 + def build_smell_warning(assumption); end + + # source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#32 + def method_expressions; end + + # source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#55 + def variables_from_context; end + + # source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#45 + def variables_from_initialize; end + + class << self + # source://reek//lib/reek/smell_detectors/instance_variable_assumption.rb#13 + def contexts; end + end +end + +# It is considered good practice to annotate every class and module +# with a brief comment outlining its responsibilities. +# +# See {file:docs/Irresponsible-Module.md} for details. +# +# source://reek//lib/reek/smell_detectors/irresponsible_module.rb#12 +class Reek::SmellDetectors::IrresponsibleModule < ::Reek::SmellDetectors::BaseDetector + # Checks the given class or module for a descriptive comment. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/irresponsible_module.rb#22 + def sniff; end + + private + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/irresponsible_module.rb#32 + def descriptive_context?; end + + class << self + # source://reek//lib/reek/smell_detectors/irresponsible_module.rb#13 + def contexts; end + end +end + +# A Long Parameter List occurs when a method has more than one +# or two parameters, or when a method yields more than one or +# two objects to an associated block. +# +# Currently +LongParameterList+ reports any method or block with too +# many parameters. +# +# See {file:docs/Long-Parameter-List.md} for details. +# +# source://reek//lib/reek/smell_detectors/long_parameter_list.rb#18 +class Reek::SmellDetectors::LongParameterList < ::Reek::SmellDetectors::BaseDetector + # Checks the number of parameters in the given method. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/long_parameter_list.rb#35 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/long_parameter_list.rb#47 + def max_allowed_params; end + + class << self + # source://reek//lib/reek/smell_detectors/long_parameter_list.rb#22 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/long_parameter_list.rb#20 +Reek::SmellDetectors::LongParameterList::DEFAULT_MAX_ALLOWED_PARAMS = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum number of +# parameters permitted in any method or block. +# +# source://reek//lib/reek/smell_detectors/long_parameter_list.rb#19 +Reek::SmellDetectors::LongParameterList::MAX_ALLOWED_PARAMS_KEY = T.let(T.unsafe(nil), String) + +# A variant on LongParameterList that checks the number of items +# passed to a block by a +yield+ call. +# +# See {file:docs/Long-Yield-List.md} for details. +# +# source://reek//lib/reek/smell_detectors/long_yield_list.rb#14 +class Reek::SmellDetectors::LongYieldList < ::Reek::SmellDetectors::BaseDetector + # Checks the number of parameters in the given scope. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/long_yield_list.rb#28 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/long_yield_list.rb#42 + def max_allowed_params; end + + class << self + # source://reek//lib/reek/smell_detectors/long_yield_list.rb#18 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/long_yield_list.rb#16 +Reek::SmellDetectors::LongYieldList::DEFAULT_MAX_ALLOWED_PARAMS = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum number of +# parameters permitted in any method or block. +# +# source://reek//lib/reek/smell_detectors/long_yield_list.rb#15 +Reek::SmellDetectors::LongYieldList::MAX_ALLOWED_PARAMS_KEY = T.let(T.unsafe(nil), String) + +# A Manual Dispatch occurs when a method is only called after a +# manual check that the method receiver is of the correct type. +# +# The +ManualDispatch+ checker reports any invocation of +respond_to?+ +# +# See {file:docs/Manual-Dispatch.md} for details. +# +# source://reek//lib/reek/smell_detectors/manual_dispatch.rb#14 +class Reek::SmellDetectors::ManualDispatch < ::Reek::SmellDetectors::BaseDetector + # Checks for +respond_to?+ usage within the given method + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/manual_dispatch.rb#22 + def sniff; end +end + +# source://reek//lib/reek/smell_detectors/manual_dispatch.rb#15 +Reek::SmellDetectors::ManualDispatch::MESSAGE = T.let(T.unsafe(nil), String) + +# Excerpt from: +# http://dablog.rubypal.com/2007/8/15/bang-methods-or-danger-will-rubyist +# since this sums it up really well: +# +# The ! in method names that end with ! means, "This method is dangerous" +# -- or, more precisely, this method is the "dangerous" version of an +# equivalent method, with the same name minus the !. "Danger" is +# relative; the ! doesn't mean anything at all unless the method name +# it's in corresponds to a similar but bang-less method name. +# +# Don't add ! to your destructive (receiver-changing) methods' names, +# unless you consider the changing to be "dangerous" and you have a +# "non-dangerous" equivalent method without the !. If some arbitrary +# subset of destructive methods end with !, then the whole point of ! +# gets distorted and diluted, and ! ceases to convey any information +# whatsoever. +# +# Such a method is called MissingSafeMethod and is reported as a smell. +# +# See {file:docs/Missing-Safe-Method.md} for details. +# +# source://reek//lib/reek/smell_detectors/missing_safe_method.rb#27 +class Reek::SmellDetectors::MissingSafeMethod < ::Reek::SmellDetectors::BaseDetector + # Given this code: + # + # class Alfa + # def bravo! + # end + # end + # + # An example context could look like this: + # + # s(:class, + # s(:const, nil, :Alfa), nil, + # s(:def, :bravo!, + # s(:args), nil)) + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/missing_safe_method.rb#49 + def sniff; end + + private + + # @param method_node [Reek::AST::Node] , + # e.g. s(:def, :bravo!, s(:args), nil) + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/missing_safe_method.rb#82 + def ignore_method?(method_node); end + + # e.g. ["bravo!"] + # + # source://reek//lib/reek/smell_detectors/missing_safe_method.rb#87 + def ignore_method_names; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/missing_safe_method.rb#63 + def missing_safe_method?(method_sexp); end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/missing_safe_method.rb#71 + def version_without_bang_exists?(method_sexp); end + + class << self + # source://reek//lib/reek/smell_detectors/missing_safe_method.rb#28 + def contexts; end + end +end + +# a module is usually a mixin, so when initialize method is present it is +# hard to tell initialization order and parameters so having 'initialize' +# in a module is usually a bad idea +# +# See {file:docs/Module-Initialize.md} for details. +# +# source://reek//lib/reek/smell_detectors/module_initialize.rb#13 +class Reek::SmellDetectors::ModuleInitialize < ::Reek::SmellDetectors::BaseDetector + # Checks whether module has method 'initialize'. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/module_initialize.rb#23 + def sniff; end + + class << self + # source://reek//lib/reek/smell_detectors/module_initialize.rb#14 + def contexts; end + end +end + +# A Nested Iterator occurs when a block contains another block. +# +# +NestedIterators+ reports failing methods only once. +# +# See {file:docs/Nested-Iterators.md} for details. +# +# source://reek//lib/reek/smell_detectors/nested_iterators.rb#14 +class Reek::SmellDetectors::NestedIterators < ::Reek::SmellDetectors::BaseDetector + # Generates a smell warning for each independent deepest nesting depth + # that is greater than our allowed maximum. This means if two iterators + # with the same depth were found, we combine them into one warning and + # merge the line information. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#44 + def sniff; end + + private + + # Finds the set of independent most deeply nested iterators regardless of + # nesting depth. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#75 + def find_candidates; end + + # Finds the set of independent most deeply nested iterators that are + # nested more deeply than allowed. + # + # Here, independent means that if iterator A is contained within iterator + # B, we only include A. But if iterators A and B are both contained in + # iterator C, but A is not contained in B, nor B in A, both A and B are + # included. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#66 + def find_violations; end + + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#117 + def ignore_iterators; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#130 + def ignored_iterator?(exp); end + + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#121 + def increment_depth(iterator, depth); end + + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#125 + def max_allowed_nesting; end + + # A little digression into parser's sexp is necessary here: + # + # Given + # foo.each() do ... end + # this will end up as: + # + # "foo.each() do ... end" -> one of the :block nodes + # "each()" -> the node's "call" + # "do ... end" -> the node's "block" + # + # @param exp [AST::Node] The given expression to analyze. + # @param depth [Integer] + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#97 + def scout(exp:, depth:); end + + class << self + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#31 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/nested_iterators.rb#29 +Reek::SmellDetectors::NestedIterators::DEFAULT_IGNORE_ITERATORS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/nested_iterators.rb#24 +Reek::SmellDetectors::NestedIterators::DEFAULT_MAX_ALLOWED_NESTING = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the names of any +# methods for which nesting should not be considered +# +# source://reek//lib/reek/smell_detectors/nested_iterators.rb#28 +Reek::SmellDetectors::NestedIterators::IGNORE_ITERATORS_KEY = T.let(T.unsafe(nil), String) + +# Struct for conveniently associating iterators with their depth (that is, their nesting). +# +# source://reek//lib/reek/smell_detectors/nested_iterators.rb#15 +class Reek::SmellDetectors::NestedIterators::Iterator < ::Struct + # Returns the value of attribute depth + # + # @return [Object] the current value of depth + def depth; end + + # Sets the attribute depth + # + # @param value [Object] the value to set the attribute depth to. + # @return [Object] the newly set value + def depth=(_); end + + # Returns the value of attribute exp + # + # @return [Object] the current value of exp + def exp; end + + # Sets the attribute exp + # + # @param value [Object] the value to set the attribute exp to. + # @return [Object] the newly set value + def exp=(_); end + + # source://reek//lib/reek/smell_detectors/nested_iterators.rb#16 + def line; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# The name of the config field that sets the maximum depth +# of nested iterators to be permitted within any single method. +# +# source://reek//lib/reek/smell_detectors/nested_iterators.rb#23 +Reek::SmellDetectors::NestedIterators::MAX_ALLOWED_NESTING_KEY = T.let(T.unsafe(nil), String) + +# Checking for nil is a special kind of type check, and therefore a case of +# SimulatedPolymorphism. +# +# See {file:docs/Nil-Check.md} for details. +# +# source://reek//lib/reek/smell_detectors/nil_check.rb#11 +class Reek::SmellDetectors::NilCheck < ::Reek::SmellDetectors::BaseDetector + # source://reek//lib/reek/smell_detectors/nil_check.rb#12 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/nil_check.rb#25 + def detect_nodes; end +end + +# Detect 'call' nodes which perform a nil check. +# +# source://reek//lib/reek/smell_detectors/nil_check.rb#54 +module Reek::SmellDetectors::NilCheck::NilCallNodeDetector + private + + # source://reek//lib/reek/smell_detectors/nil_check.rb#69 + def comparison_call?(call); end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#77 + def comparison_methods; end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#57 + def detect(node); end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#73 + def involves_nil?(call); end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#65 + def nil_comparison?(call); end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#61 + def nil_query?(call); end + + class << self + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#69 + def comparison_call?(call); end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#77 + def comparison_methods; end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#57 + def detect(node); end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#73 + def involves_nil?(call); end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#65 + def nil_comparison?(call); end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#61 + def nil_query?(call); end + end +end + +# Detect 'when' statements that perform a nil check. +# +# source://reek//lib/reek/smell_detectors/nil_check.rb#83 +module Reek::SmellDetectors::NilCheck::NilWhenNodeDetector + private + + # source://reek//lib/reek/smell_detectors/nil_check.rb#86 + def detect(node); end + + class << self + # source://reek//lib/reek/smell_detectors/nil_check.rb#86 + def detect(node); end + end +end + +# A base class that allows to work on all nodes of a certain type. +# +# source://reek//lib/reek/smell_detectors/nil_check.rb#34 +class Reek::SmellDetectors::NilCheck::NodeFinder + # @return [NodeFinder] a new instance of NodeFinder + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#35 + def initialize(ctx, type, detector); end + + # source://reek//lib/reek/smell_detectors/nil_check.rb#40 + def smelly_nodes; end + + private + + # Returns the value of attribute detector. + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#48 + def detector; end + + # Returns the value of attribute nodes. + # + # source://reek//lib/reek/smell_detectors/nil_check.rb#48 + def nodes; end +end + +# Simulated Polymorphism occurs when +# * code uses a case statement (especially on a type field); +# * or code has several if statements in a row +# (especially if they're comparing against the same value); +# * or code uses instance_of?, kind_of?, is_a?, or === +# to decide what type it's working with; +# * or multiple conditionals in different places test the same value. +# +# Conditional code is hard to read and understand, because the reader must +# hold more state in his head. +# When the same value is tested in multiple places throughout an application, +# any change to the set of possible values will require many methods and +# classes to change. Tests for the type of an object may indicate that the +# abstraction represented by that type is not completely defined (or understood). +# +# +RepeatedConditional+ checks for multiple conditionals +# testing the same value throughout a single class. +# +# See {file:docs/Repeated-Conditional.md} for details. +# +# source://reek//lib/reek/smell_detectors/repeated_conditional.rb#30 +class Reek::SmellDetectors::RepeatedConditional < ::Reek::SmellDetectors::BaseDetector + # Checks the given class for multiple identical conditional tests. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/repeated_conditional.rb#50 + def sniff; end + + private + + # Returns a Hash listing all of the conditional expressions in + # the given syntax tree together with the number of times each + # occurs. Ignores nested classes and modules. + # + # source://reek//lib/reek/smell_detectors/repeated_conditional.rb#75 + def conditional_counts; end + + # source://reek//lib/reek/smell_detectors/repeated_conditional.rb#65 + def max_identical_ifs; end + + class << self + # source://reek//lib/reek/smell_detectors/repeated_conditional.rb#36 + def contexts; end + + # source://reek//lib/reek/smell_detectors/repeated_conditional.rb#40 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/repeated_conditional.rb#34 +Reek::SmellDetectors::RepeatedConditional::BLOCK_GIVEN_CONDITION = T.let(T.unsafe(nil), Parser::AST::Node) + +# source://reek//lib/reek/smell_detectors/repeated_conditional.rb#32 +Reek::SmellDetectors::RepeatedConditional::DEFAULT_MAX_IFS = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum number of +# identical conditionals permitted within any single class. +# +# source://reek//lib/reek/smell_detectors/repeated_conditional.rb#31 +Reek::SmellDetectors::RepeatedConditional::MAX_IDENTICAL_IFS_KEY = T.let(T.unsafe(nil), String) + +# Subclassing core classes in Ruby can lead to unexpected side effects. +# Knowing that Ruby has a core library, which is written in C, and a standard +# library, which is written in Ruby, if you do not know exactly how these core +# classes operate at the C level, you are gonna have a bad time. +# +# Source: http://words.steveklabnik.com/beware-subclassing-ruby-core-classes +# +# source://reek//lib/reek/smell_detectors/subclassed_from_core_class.rb#15 +class Reek::SmellDetectors::SubclassedFromCoreClass < ::Reek::SmellDetectors::BaseDetector + # Checks +ctx+ for either expressions: + # + # Foo = Class.new(Bar) + # + # class Foo < Bar; end; + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/subclassed_from_core_class.rb#29 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/subclassed_from_core_class.rb#45 + def build_smell_warning(ancestor_name); end + + # source://reek//lib/reek/smell_detectors/subclassed_from_core_class.rb#39 + def sniff_superclass(superclass_name); end + + class << self + # source://reek//lib/reek/smell_detectors/subclassed_from_core_class.rb#18 + def contexts; end + end +end + +# source://reek//lib/reek/smell_detectors/subclassed_from_core_class.rb#16 +Reek::SmellDetectors::SubclassedFromCoreClass::CORE_CLASSES = T.let(T.unsafe(nil), Array) + +# A Large Class is a class or module that has a large number of +# instance variables, methods, constants or lines of code. +# +# +TooManyConstants' reports classes having more than a +# configurable number of constants. +# +# See {file:docs/Too-Many-Constants.md} for details. +# +# source://reek//lib/reek/smell_detectors/too_many_constants.rb#17 +class Reek::SmellDetectors::TooManyConstants < ::Reek::SmellDetectors::BaseDetector + # Checks +klass+ for too many constants. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/too_many_constants.rb#37 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/too_many_constants.rb#51 + def build_smell_warning(count); end + + # source://reek//lib/reek/smell_detectors/too_many_constants.rb#47 + def max_allowed_constants; end + + class << self + # source://reek//lib/reek/smell_detectors/too_many_constants.rb#22 + def contexts; end + + # source://reek//lib/reek/smell_detectors/too_many_constants.rb#26 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/too_many_constants.rb#19 +Reek::SmellDetectors::TooManyConstants::DEFAULT_MAX_CONSTANTS = T.let(T.unsafe(nil), Integer) + +# source://reek//lib/reek/smell_detectors/too_many_constants.rb#20 +Reek::SmellDetectors::TooManyConstants::IGNORED_NODES = T.let(T.unsafe(nil), Array) + +# The name of the config field that sets the maximum number +# of constants permitted in a class. +# +# source://reek//lib/reek/smell_detectors/too_many_constants.rb#18 +Reek::SmellDetectors::TooManyConstants::MAX_ALLOWED_CONSTANTS_KEY = T.let(T.unsafe(nil), String) + +# A Large Class is a class or module that has a large number of +# instance variables, methods or lines of code. +# +# +TooManyInstanceVariables' reports classes having more than a +# configurable number of instance variables. +# +# See {file:docs/Too-Many-Instance-Variables.md} for details. +# +# source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#17 +class Reek::SmellDetectors::TooManyInstanceVariables < ::Reek::SmellDetectors::BaseDetector + # Checks +klass+ for too many instance variables. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#36 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#49 + def max_allowed_ivars; end + + class << self + # source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#21 + def contexts; end + + # source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#25 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#19 +Reek::SmellDetectors::TooManyInstanceVariables::DEFAULT_MAX_IVARS = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum number of instance +# variables permitted in a class. +# +# source://reek//lib/reek/smell_detectors/too_many_instance_variables.rb#18 +Reek::SmellDetectors::TooManyInstanceVariables::MAX_ALLOWED_IVARS_KEY = T.let(T.unsafe(nil), String) + +# A Large Class is a class or module that has a large number of +# instance variables, methods or lines of code. +# +# +TooManyMethods+ reports classes having more than a configurable number +# of methods. The method count includes public, protected and private +# methods, and excludes methods inherited from superclasses or included +# modules. +# +# See {file:docs/Too-Many-Methods.md} for details. +# +# source://reek//lib/reek/smell_detectors/too_many_methods.rb#19 +class Reek::SmellDetectors::TooManyMethods < ::Reek::SmellDetectors::BaseDetector + # Checks context for too many methods + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/too_many_methods.rb#38 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/too_many_methods.rb#51 + def max_allowed_methods; end + + class << self + # source://reek//lib/reek/smell_detectors/too_many_methods.rb#23 + def contexts; end + + # source://reek//lib/reek/smell_detectors/too_many_methods.rb#27 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/too_many_methods.rb#21 +Reek::SmellDetectors::TooManyMethods::DEFAULT_MAX_METHODS = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum number of methods +# permitted in a class. +# +# source://reek//lib/reek/smell_detectors/too_many_methods.rb#20 +Reek::SmellDetectors::TooManyMethods::MAX_ALLOWED_METHODS_KEY = T.let(T.unsafe(nil), String) + +# A Long Method is any method that has a large number of lines. +# +# +TooManyStatements+ reports any method with more than 5 statements. +# +# See {file:docs/Too-Many-Statements.md} for details. +# +# source://reek//lib/reek/smell_detectors/too_many_statements.rb#15 +class Reek::SmellDetectors::TooManyStatements < ::Reek::SmellDetectors::BaseDetector + # Checks the length of the given +method+. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/too_many_statements.rb#30 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/too_many_statements.rb#42 + def max_allowed_statements; end + + class << self + # source://reek//lib/reek/smell_detectors/too_many_statements.rb#19 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/too_many_statements.rb#17 +Reek::SmellDetectors::TooManyStatements::DEFAULT_MAX_STATEMENTS = T.let(T.unsafe(nil), Integer) + +# The name of the config field that sets the maximum number of +# statements permitted in any method. +# +# source://reek//lib/reek/smell_detectors/too_many_statements.rb#16 +Reek::SmellDetectors::TooManyStatements::MAX_ALLOWED_STATEMENTS_KEY = T.let(T.unsafe(nil), String) + +# An Uncommunicative Name is a name that doesn't communicate its intent +# well enough. +# +# Poor names make it hard for the reader to build a mental picture +# of what's going on in the code. They can also be mis-interpreted; +# and they hurt the flow of reading, because the reader must slow +# down to interpret the names. +# +# Currently +UncommunicativeMethodName+ checks for +# * 1-character names +# * names ending with a number +# * names containing a capital letter (assuming camelCase) +# +# See {file:docs/Uncommunicative-Method-Name.md} for details. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#22 +class Reek::SmellDetectors::UncommunicativeMethodName < ::Reek::SmellDetectors::BaseDetector + # Checks the given +context+ for uncommunicative names. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#39 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#60 + def accept_patterns; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#51 + def acceptable_name?(name); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#56 + def reject_patterns; end + + class << self + # source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#28 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#24 +Reek::SmellDetectors::UncommunicativeMethodName::ACCEPT_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#26 +Reek::SmellDetectors::UncommunicativeMethodName::DEFAULT_ACCEPT_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#25 +Reek::SmellDetectors::UncommunicativeMethodName::DEFAULT_REJECT_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/uncommunicative_method_name.rb#23 +Reek::SmellDetectors::UncommunicativeMethodName::REJECT_KEY = T.let(T.unsafe(nil), String) + +# An Uncommunicative Name is a name that doesn't communicate its intent +# well enough. +# +# Poor names make it hard for the reader to build a mental picture +# of what's going on in the code. They can also be mis-interpreted; +# and they hurt the flow of reading, because the reader must slow +# down to interpret the names. +# +# Currently +UncommunicativeModuleName+ checks for +# * 1-character names +# * names ending with a number +# +# See {file:docs/Uncommunicative-Module-Name.md} for details. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#23 +class Reek::SmellDetectors::UncommunicativeModuleName < ::Reek::SmellDetectors::BaseDetector + # Checks the detector's context for uncommunicative names. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#48 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#72 + def accept_patterns; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#63 + def acceptable_name?(module_name:, fully_qualified_name:); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#68 + def reject_patterns; end + + class << self + # source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#39 + def contexts; end + + # source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#33 + def default_config; end + end +end + +# The name of the config field that lists the specific names that are +# to be treated as exceptions; these names will not be reported as +# uncommunicative. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#30 +Reek::SmellDetectors::UncommunicativeModuleName::ACCEPT_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#31 +Reek::SmellDetectors::UncommunicativeModuleName::DEFAULT_ACCEPT_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#25 +Reek::SmellDetectors::UncommunicativeModuleName::DEFAULT_REJECT_PATTERNS = T.let(T.unsafe(nil), Array) + +# The name of the config field that lists the regexps of +# smelly names to be reported. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_module_name.rb#24 +Reek::SmellDetectors::UncommunicativeModuleName::REJECT_KEY = T.let(T.unsafe(nil), String) + +# An Uncommunicative Name is a name that doesn't communicate its intent +# well enough. +# +# Poor names make it hard for the reader to build a mental picture +# of what's going on in the code. They can also be mis-interpreted; +# and they hurt the flow of reading, because the reader must slow +# down to interpret the names. +# +# Currently +UncommunicativeParameterName+ checks for +# * 1-character names +# * names ending with a number +# * names beginning with an underscore +# * names containing a capital letter (assuming camelCase) +# +# See {file:docs/Uncommunicative-Parameter-Name.md} for details. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#23 +class Reek::SmellDetectors::UncommunicativeParameterName < ::Reek::SmellDetectors::BaseDetector + # Checks the given +context+ for uncommunicative names. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#41 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#70 + def accept_patterns; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#61 + def acceptable_name?(name); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#66 + def reject_patterns; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#56 + def uncommunicative_parameter?(parameter); end + + class << self + # source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#30 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#27 +Reek::SmellDetectors::UncommunicativeParameterName::ACCEPT_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#28 +Reek::SmellDetectors::UncommunicativeParameterName::DEFAULT_ACCEPT_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#25 +Reek::SmellDetectors::UncommunicativeParameterName::DEFAULT_REJECT_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/uncommunicative_parameter_name.rb#24 +Reek::SmellDetectors::UncommunicativeParameterName::REJECT_KEY = T.let(T.unsafe(nil), String) + +# An Uncommunicative Name is a name that doesn't communicate its intent +# well enough. +# +# Poor names make it hard for the reader to build a mental picture +# of what's going on in the code. They can also be mis-interpreted; +# and they hurt the flow of reading, because the reader must slow +# down to interpret the names. +# +# Currently +UncommunicativeName+ checks for: +# +# * single-character names +# * any name ending with a number +# * camelCaseVariableNames +# +# See {file:docs/Uncommunicative-Variable-Name.md} for details. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#26 +class Reek::SmellDetectors::UncommunicativeVariableName < ::Reek::SmellDetectors::BaseDetector + # Checks the given +context+ for uncommunicative names. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#55 + def sniff; end + + private + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#72 + def accept_names; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#81 + def acceptable_name?(name); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#93 + def find_assignment_variable_names(accumulator); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#105 + def find_block_argument_variable_names(accumulator); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#134 + def record_variable_name(exp, symbol, accumulator); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#122 + def recursively_record_variable_names(accumulator, exp); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#68 + def reject_names; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#76 + def uncommunicative_variable_name?(name); end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#86 + def variable_names; end + + class << self + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#46 + def contexts; end + + # source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#40 + def default_config; end + end +end + +# The name of the config field that lists the specific names that are +# to be treated as exceptions; these names will not be reported as +# uncommunicative. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#37 +Reek::SmellDetectors::UncommunicativeVariableName::ACCEPT_KEY = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#38 +Reek::SmellDetectors::UncommunicativeVariableName::DEFAULT_ACCEPT_SET = T.let(T.unsafe(nil), Array) + +# source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#28 +Reek::SmellDetectors::UncommunicativeVariableName::DEFAULT_REJECT_SET = T.let(T.unsafe(nil), Array) + +# The name of the config field that lists the regexps of +# smelly names to be reported. +# +# source://reek//lib/reek/smell_detectors/uncommunicative_variable_name.rb#27 +Reek::SmellDetectors::UncommunicativeVariableName::REJECT_KEY = T.let(T.unsafe(nil), String) + +# Methods should use their parameters. +# +# See {file:docs/Unused-Parameters.md} for details. +# +# source://reek//lib/reek/smell_detectors/unused_parameters.rb#16 +class Reek::SmellDetectors::UnusedParameters < ::Reek::SmellDetectors::BaseDetector + # Checks whether the given method has any unused parameters. + # + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/unused_parameters.rb#17 + def sniff; end +end + +# Classes should use their private methods. Otherwise this is dead +# code which is confusing and bad for maintenance. +# +# See {file:docs/Unused-Private-Method.md} for details. +# +# source://reek//lib/reek/smell_detectors/unused_private_method.rb#13 +class Reek::SmellDetectors::UnusedPrivateMethod < ::Reek::SmellDetectors::BaseDetector + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/unused_private_method.rb#37 + def sniff; end + + private + + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/unused_private_method.rb#52 + def hits; end + + # @param method [Context::MethodContext] + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/unused_private_method.rb#75 + def ignore_method?(method); end + + # @return [Array] + # + # source://reek//lib/reek/smell_detectors/utility_function.rb#59 + def sniff; end + + private + + # @return [Boolean] + # + # source://reek//lib/reek/smell_detectors/utility_function.rb#76 + def ignore_method?; end + + # source://reek//lib/reek/smell_detectors/utility_function.rb#72 + def num_helper_methods; end + + class << self + # source://reek//lib/reek/smell_detectors/utility_function.rb#49 + def contexts; end + + # source://reek//lib/reek/smell_detectors/utility_function.rb#44 + def default_config; end + end +end + +# source://reek//lib/reek/smell_detectors/utility_function.rb#42 +Reek::SmellDetectors::UtilityFunction::PUBLIC_METHODS_ONLY_DEFAULT = T.let(T.unsafe(nil), FalseClass) + +# source://reek//lib/reek/smell_detectors/utility_function.rb#41 +Reek::SmellDetectors::UtilityFunction::PUBLIC_METHODS_ONLY_KEY = T.let(T.unsafe(nil), String) + +# Reports a warning that a smell has been found. +# +# source://reek//lib/reek/smell_warning.rb#13 +class Reek::SmellWarning + include ::Comparable + extend ::Forwardable + + # @note When using Reek's public API, you should not create SmellWarning + # objects yourself. This is why the initializer is not part of the + # public API. + # @param smell_type [String] type of detected smell; corresponds to + # detector#smell_type + # @param context [String] name of the context in which the smell occured + # @param lines [Array] list of lines on which the smell occured + # @param message [String] text describing the smell in more detail + # @param source [String] name of the source (e.g., the file name) in which + # the smell occured + # @param parameters [Hash] smell-specific parameters + # @return [SmellWarning] a new instance of SmellWarning + # + # source://reek//lib/reek/smell_warning.rb#34 + def initialize(smell_type, lines:, message:, source:, context: T.unsafe(nil), parameters: T.unsafe(nil)); end + + # source://reek//lib/reek/smell_warning.rb#51 + def <=>(other); end + + # source://reek//lib/reek/smell_warning.rb#70 + def base_message; end + + # Returns the value of attribute context. + # + # source://reek//lib/reek/smell_warning.rb#18 + def context; end + + # @return [Boolean] + # + # source://reek//lib/reek/smell_warning.rb#56 + def eql?(other); end + + # source://reek//lib/reek/smell_warning.rb#74 + def explanatory_link; end + + # source://reek//lib/reek/smell_warning.rb#46 + def hash; end + + # Returns the value of attribute lines. + # + # source://reek//lib/reek/smell_warning.rb#18 + def lines; end + + # Returns the value of attribute message. + # + # source://reek//lib/reek/smell_warning.rb#18 + def message; end + + # Returns the value of attribute parameters. + # + # source://reek//lib/reek/smell_warning.rb#18 + def parameters; end + + # Returns the value of attribute smell_type. + # + # source://reek//lib/reek/smell_warning.rb#18 + def smell_type; end + + # Returns the value of attribute source. + # + # source://reek//lib/reek/smell_warning.rb#18 + def source; end + + # source://reek//lib/reek/smell_warning.rb#61 + def to_hash; end + + # source://reek//lib/reek/smell_warning.rb#66 + def yaml_hash; end + + protected + + # source://reek//lib/reek/smell_warning.rb#80 + def identifying_values; end + + private + + # source://reek//lib/reek/smell_warning.rb#86 + def base_hash; end +end + +# source://reek//lib/reek/source/source_code.rb#14 +module Reek::Source; end + +# A +SourceCode+ object represents a chunk of Ruby source code. +# +# source://reek//lib/reek/source/source_code.rb#18 +class Reek::Source::SourceCode + # Initializer. + # + # @param source [File|Pathname|IO|String] Ruby source code + # @param origin [String] Origin of the source code. Will be determined + # automatically if left blank. + # @param parser the parser to use for generating AST's out of the given code + # @return [SourceCode] a new instance of SourceCode + # + # source://reek//lib/reek/source/source_code.rb#28 + def initialize(source:, origin: T.unsafe(nil), parser: T.unsafe(nil)); end + + # source://reek//lib/reek/source/source_code.rb#64 + def origin; end + + # source://reek//lib/reek/source/source_code.rb#52 + def syntax_tree; end + + private + + # source://reek//lib/reek/source/source_code.rb#76 + def code; end + + # Parses the given code into an AST and associates the source code comments with it. + # This AST is then traversed by a TreeDresser which adorns the nodes in the AST + # with our SexpExtensions. + # Finally this AST is returned where each node is an anonymous subclass of Reek::AST::Node + # + # Given this @code: + # + # # comment about C + # class C + # def m + # puts 'nada' + # end + # end + # + # this method would return something that looks like + # + # (class + # (const nil :C) nil + # (def :m + # (args) + # (send nil :puts + # (str "nada")))) + # + # where each node is possibly adorned with our SexpExtensions (see ast/ast_node_class_map + # and ast/sexp_extensions for details). + # + # @return Reek::AST::Node the AST presentation for the given code + # + # source://reek//lib/reek/source/source_code.rb#114 + def parse; end + + # Returns the value of attribute parser. + # + # source://reek//lib/reek/source/source_code.rb#85 + def parser; end + + # Returns the value of attribute source. + # + # source://reek//lib/reek/source/source_code.rb#85 + def source; end + + class << self + # source://reek//lib/reek/source/source_code.rb#56 + def default_parser; end + + # Initializes an instance of SourceCode given a source. + # This source can come via several different ways: + # - from Files or Pathnames a la `reek lib/reek/` + # - from IO (STDIN) a la `echo "class Foo; end" | reek` + # - from String via our rspec matchers a la `expect("class Foo; end").to reek` + # - from an existing SourceCode object. This is passed through unchanged + # + # @param source [SourceCode|File|Pathname|IO|String] the given source + # @param origin [String|nil] + # @return an instance of SourceCode + # + # source://reek//lib/reek/source/source_code.rb#45 + def from(source, origin: T.unsafe(nil)); end + end +end + +# source://reek//lib/reek/source/source_code.rb#19 +Reek::Source::SourceCode::IO_IDENTIFIER = T.let(T.unsafe(nil), String) + +# source://reek//lib/reek/source/source_code.rb#20 +Reek::Source::SourceCode::STRING_IDENTIFIER = T.let(T.unsafe(nil), String) + +# Adorns an abstract syntax tree with mix-in modules to make accessing +# the tree more understandable and less implementation-dependent. +# +# source://reek//lib/reek/tree_dresser.rb#10 +class Reek::TreeDresser + # @return [TreeDresser] a new instance of TreeDresser + # + # source://reek//lib/reek/tree_dresser.rb#11 + def initialize(klass_map: T.unsafe(nil)); end + + # Recursively enhance an AST with type-dependent mixins, and comments. + # + # See {file:docs/How-reek-works-internally.md} for the big picture of how this works. + # Example: + # This + # class Klazz; def meth(argument); argument.call_me; end; end + # corresponds to this sexp: + # (class + # (const nil :Klazz) nil + # (def :meth + # (args + # (arg :argument)) + # (send + # (lvar :argument) :call_me))) + # where every node is of type Parser::AST::Node. + # Passing this into `dress` will return the exact same structure, but this + # time the nodes will contain type-dependent mixins, e.g. this: + # (const nil :Klazz) + # will be of type Reek::AST::Node with Reek::AST::SexpExtensions::ConstNode mixed in. + # + # @param sexp [Parser::AST::Node] the given sexp + # @param comment_map [Hash] see the documentation for SourceCode#syntax_tree + # @return an instance of Reek::AST::Node with type-dependent sexp extensions mixed in. + # + # source://reek//lib/reek/tree_dresser.rb#42 + def dress(sexp, comment_map); end + + private + + # Returns the value of attribute klass_map. + # + # source://reek//lib/reek/tree_dresser.rb#54 + def klass_map; end +end + +# This module holds the Reek version information +# +# source://reek//lib/reek/version.rb#9 +module Reek::Version; end + +# source://reek//lib/reek/version.rb#11 +Reek::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi b/sorbet/rbi/gems/regexp_parser@2.8.1.rbi new file mode 100644 index 0000000000..4f257283fc --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.8.1.rbi @@ -0,0 +1,3749 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#1 +module Regexp::Expression; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#5 +class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def alternatives; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#9 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#6 +Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative + +# A sequence of expressions, used by Alternation as one of its alternatives. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#3 +class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#10 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#2 +module Regexp::Expression::Anchor; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#18 +Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#20 +Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#3 +class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#5 +class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#11 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#8 +class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#12 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#19 +Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#21 +Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#22 +Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#6 +class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#13 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#9 +class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#14 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#11 +class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#15 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#16 +class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#16 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#14 +class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#17 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#13 +class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#18 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#64 +module Regexp::Expression::Assertion; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#65 +class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#67 +class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#19 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#70 +class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#20 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#68 +class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#21 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#71 +class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#22 + def human_name; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#74 +Regexp::Expression::Backref = Regexp::Expression::Backreference + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#2 +module Regexp::Expression::Backreference; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#3 +class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#155 + def match_length; end + + # Returns the value of attribute referenced_expression. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 + def referenced_expression; end + + # Sets the attribute referenced_expression + # + # @param value the value to set the attribute referenced_expression to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 + def referenced_expression=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#6 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#140 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#34 +class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base + # @return [Name] a new instance of Name + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#38 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#23 + def human_name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 + def name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 +class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#24 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#62 +class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name + # @return [NameRecursionLevel] a new instance of NameRecursionLevel + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#65 + def initialize(token, options = T.unsafe(nil)); end + + # Returns the value of attribute recursion_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#63 + def recursion_level; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#24 +class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base + # @return [Number] a new instance of Number + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#28 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#25 + def human_name; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 + def number; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#49 +class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#27 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#51 +class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#28 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#53 +class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative + # @return [NumberRecursionLevel] a new instance of NumberRecursionLevel + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#56 + def initialize(token, options = T.unsafe(nil)); end + + # Returns the value of attribute recursion_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#54 + def recursion_level; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#44 +class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number + # Returns the value of attribute effective_number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 + def effective_number; end + + # Sets the attribute effective_number + # + # @param value the value to set the attribute effective_number to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 + def effective_number=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#26 + def human_name; end + + # Returns the value of attribute effective_number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/base.rb#2 +class Regexp::Expression::Base + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # @return [Base] a new instance of Base + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 + def =~(string, offset = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 + def a?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 + def ascii_classes?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 + def attributes; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def case_insensitive?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 + def d?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 + def default_classes?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def extended?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def free_spacing?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#47 + def greedy?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def i?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def ignore_case?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 + def lazy?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 + def m?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 + def match(string, offset = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 + def match?(string); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#3 + def matches?(string); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 + def multiline?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def nesting_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#56 + def possessive?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def quantifier; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#17 + def quantify(*args); end + + # Deprecated. Prefer `#repetitions` which has a more uniform interface. + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#26 + def quantity; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 + def reluctant?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#31 + def repetitions; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level=(_arg0); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 + def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#37 + def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 + def to_h; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#9 + def to_re(format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 + def u?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 + def unicode_classes?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#21 + def unquantified_clone; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def x?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#2 +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + # @return [CharacterSet] a new instance of CharacterSet + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#9 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#19 + def close; end + + # Returns the value of attribute closed. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def closed; end + + # Sets the attribute closed + # + # @param value the value to set the attribute closed to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def closed=(_arg0); end + + # Returns the value of attribute closed. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def closed?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#15 + def negate; end + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negated?; end + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negative; end + + # Sets the attribute negative + # + # @param value the value to set the attribute negative to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negative=(_arg0); end + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#15 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#3 +class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#29 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#5 +class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#30 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#6 +Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#3 +class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#8 + def <<(exp); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#14 + def complete?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#31 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#16 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#4 + def ts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#2 +module Regexp::Expression::CharacterType; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#5 +class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#32 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#3 +class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#6 +class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#15 +class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#8 +class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#14 +class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#7 +class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#9 +class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#13 +class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#11 +class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#12 +class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#10 +class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#8 +class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#33 + def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#130 + def comment?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#2 +module Regexp::Expression::Conditional; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#25 +class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#34 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#9 +class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#35 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end + + # Name or number of the referenced capturing group that determines state. + # Returns a String if reference is by name, Integer if by number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#14 + def reference; end + + # Returns the value of attribute referenced_expression. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 + def referenced_expression; end + + # Sets the attribute referenced_expression + # + # @param value the value to set the attribute referenced_expression to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 + def referenced_expression=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#19 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#141 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#27 +class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#30 + def <<(exp); end + + # @raise [TooManyBranches] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # @raise [TooManyBranches] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#50 + def branches; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#46 + def condition; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#41 + def condition=(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#36 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#17 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#54 + def reference; end + + # Returns the value of attribute referenced_expression. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 + def referenced_expression; end + + # Sets the attribute referenced_expression + # + # @param value the value to set the attribute referenced_expression to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 + def referenced_expression=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#58 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#142 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#3 +class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error + # @return [TooManyBranches] a new instance of TooManyBranches + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#4 + def initialize; end +end + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#101 +Regexp::Expression::Escape = Regexp::Expression::EscapeSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#2 +module Regexp::Expression::EscapeSequence; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#63 +class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#64 + def char; end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#70 + def control_sequence_to_s(control_sequence); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#75 + def meta_char_to_codepoint(meta_char); end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#27 +class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#28 +class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#3 +class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 + def char; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#4 + def codepoint; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#29 +class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#37 +class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#39 +class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base + # @raise [NoMethodError] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#40 + def char; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#48 + def chars; end + + # @raise [NoMethodError] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#44 + def codepoint; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#52 + def codepoints; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#164 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#81 +class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#82 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#30 +class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#36 +class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#21 +class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 + def char; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#87 +class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#88 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#93 +class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#94 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#31 +class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#57 +class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#58 + def char; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#32 +class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#33 +class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#34 +class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#2 +class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end + + # @raise [Regexp::Parser::Error] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#3 + def quantify(*_args); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#135 + def decorative?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#2 +module Regexp::Expression::Group; end + +# Special case. Absence group can match 0.. chars, irrespective of content. +# TODO: in theory, they *can* exclude match lengths with `.`: `(?~.{3})` +# +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#19 +class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#172 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#20 +class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#3 +class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#18 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#40 +class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#37 + def human_name; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def identifier; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number; end + + # Sets the attribute number + # + # @param value the value to set the attribute number to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number=(_arg0); end + + # Returns the value of attribute number_at_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number_at_level; end + + # Sets the attribute number_at_level + # + # @param value the value to set the attribute number_at_level to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + def number_at_level=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#126 + def capturing?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#60 +class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#20 + def parts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#131 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#136 + def decorative?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#45 +class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture + # @return [Named] a new instance of Named + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#49 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#38 + def human_name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 + def identifier; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 + def name; end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#54 + def initialize_copy(orig); end +end + +# TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no +# longer inherit from Group because it is effectively a terminal expression. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#23 +class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base + # Returns the value of attribute option_changes. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 + def option_changes; end + + # Sets the attribute option_changes + # + # @param value the value to set the attribute option_changes to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 + def option_changes=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#31 + def quantify(*args); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#26 + def initialize_copy(orig); end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#6 +class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base + # @return [Passive] a new instance of Passive + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#9 + def initialize(*_arg0); end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#7 + def implicit=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#14 + def implicit?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#19 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 +module Regexp::Expression::Keep; end + +# TOOD: in regexp_parser v3.0.0 this should possibly be a Subexpression +# that contains all expressions to its left. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#5 +class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#39 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/literal.rb#2 +class Regexp::Expression::Literal < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#40 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#105 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#85 +Regexp::Expression::MatchLength = Regexp::MatchLength + +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#14 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#121 +Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#2 +class Regexp::Expression::PosixClass < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#7 + def name; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 + 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#13 +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#120 +Regexp::Expression::Property = Regexp::Expression::UnicodeProperty + +# TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and +# call super in #initialize, but raise in #quantifier= and #quantify, +# or introduce an Expression::Quantifiable intermediate class. +# Or actually allow chaining as a more concise but tricky solution than PR#69. +# +# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#6 +class Regexp::Expression::Quantifier + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # @return [Quantifier] a new instance of Quantifier + # + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 + def initialize(*args); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def conditional_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def greedy?; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def lazy?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#42 + def max; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#38 + def min; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#46 + def mode; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def nesting_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def possessive?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 + def quantifier; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 + def reluctant?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def set_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def te=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def text=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#19 + def to_h; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def token=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def ts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def type=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#52 + def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#64 + def derived_data; end +end + +# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 +Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#2 +class Regexp::Expression::Root < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#41 + def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#3 + def build(options = T.unsafe(nil)); end + end +end + +# A sequence of expressions. Differs from a Subexpressions by how it handles +# quantifiers, as it applies them to its last element instead of itself as +# a whole subexpression. +# +# Used as the base class for the Alternation alternatives, Conditional +# branches, and CharacterSet::Intersection intersected sequences. +# +# source://regexp_parser//lib/regexp_parser/expression/sequence.rb#8 +class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#27 + def quantify(token, *args); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#23 + def ts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#10 + def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end + end +end + +# abstract class +# +# source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#3 +class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#12 + def <<(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#16 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def operands; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def operator; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#22 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def sequences; end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#8 + def ts; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#25 +Regexp::Expression::Set = Regexp::Expression::CharacterSet + +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#2 +module Regexp::Expression::Shared + mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 + def ==(other); end + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 + def ===(other); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#51 + def base_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#124 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#96 + def coded_offset; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#128 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#133 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#47 + def ends_at(include_quantifier = T.unsafe(nil)); end + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 + def eql?(other); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#55 + def full_length; end + + # default implementation, e.g. "atomic group", "hex escape", "word type", .. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#4 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#3 + def inspect; end + + # Test if this expression has the given test_token, and optionally a given + # test_type. + # + # # Any expressions + # exp.is? :* # always returns true + # + # # is it a :capture + # exp.is? :capture + # + # # is it a :character and a :set + # exp.is? :character, :set + # + # # is it a :meta :dot + # exp.is? :dot, :meta + # + # # is it a :meta or :escape :dot + # exp.is? :dot, [:meta, :escape] + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#36 + def is?(test_token, test_type = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#100 + def nesting_level=(lvl); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#92 + def offset; end + + # Test if this expression matches an entry in the given scope spec. + # + # A scope spec can be one of: + # + # . An array: Interpreted as a set of tokens, tested for inclusion + # of the expression's token. + # + # . A hash: Where the key is interpreted as the expression type + # and the value is either a symbol or an array. In this + # case, when the scope is a hash, one_of? calls itself to + # evaluate the key's value. + # + # . A symbol: matches the expression's token or type, depending on + # the level of the call. If one_of? is called directly with + # a symbol then it will always be checked against the + # type of the expression. If it's being called for a value + # from a hash, it will be checked against the token of the + # expression. + # + # # any expression + # exp.one_of?(:*) # always true + # + # # like exp.type?(:group) + # exp.one_of?(:group) + # + # # any expression of type meta + # exp.one_of?(:meta => :*) + # + # # meta dots and alternations + # exp.one_of?(:meta => [:dot, :alternation]) + # + # # meta dots and any set tokens + # exp.one_of?({meta: [:dot], set: :*}) + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#75 + def one_of?(scope, top = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#111 + def optional?; end + + # default implementation + # + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#4 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#84 + def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end + + # Make pretty-print work despite #inspect implementation. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#12 + def pretty_print(q); end + + # Called by pretty_print (ruby/pp) and #inspect. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#17 + def pretty_print_instance_variables; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#115 + def quantified?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#106 + def quantifier=(qtf); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#88 + def quantifier_affix(expression_format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#138 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#43 + def starts_at; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#120 + def terminal?; end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 + def to_s(format = T.unsafe(nil)); end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 + def to_str(format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#37 + def token_class; end + + # Test if this expression has the given test_type, which can be either + # a symbol or an array of symbols to check against the expression's type. + # + # # is it a :group expression + # exp.type? :group + # + # # is it a :set, or :meta + # exp.type? [:set, :meta] + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#13 + def type?(test_type); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#18 + def init_from_token_and_options(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#32 + def initialize_copy(orig); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#10 + def intersperse(expressions, separator); end + + class << self + # @private + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#5 + def included(mod); end + end +end + +# filled in ./methods/*.rb +# +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#3 +module Regexp::Expression::Shared::ClassMethods + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#125 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#129 + def comment?; end + + # Convenience method to init a valid Expression without a Regexp::Token + # + # @raise [ArgumentError] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#5 + def construct(params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#15 + def construct_defaults; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#134 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#139 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#121 + def terminal?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#25 + def token_class; end +end + +# source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#2 +class Regexp::Expression::Subexpression < ::Regexp::Expression::Base + include ::Enumerable + + # @return [Subexpression] a new instance of Subexpression + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#7 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#20 + def <<(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def [](*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def at(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#33 + def dig(*indices); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def each(*args, &block); end + + # Traverses the expression, passing each recursive child to the + # given block. + # If the block takes two arguments, the indices of the children within + # their parents are also passed to it. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#8 + def each_expression(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def empty?(*args, &block); end + + # Returns the value of attribute expressions. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def expressions; end + + # Sets the attribute expressions + # + # @param value the value to set the attribute expressions to. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 + def expressions=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#50 + def extract_quantifier_target(quantifier_description); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def fetch(*args, &block); end + + # Returns a new array with the results of calling the given block once + # for every expression. If a block is not given, returns an array with + # each expression and its level index as an array. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#56 + def flat_map(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def index(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#118 + def inner_match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def join(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def last(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def length(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#111 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#21 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 + def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 + def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#39 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#43 + def to_h; end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 + def traverse(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 + def values_at(*args, &block); end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 + def walk(include_self = T.unsafe(nil), &block); end + + protected + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#66 + def each_expression_with_index(&block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#73 + def each_expression_without_index(&block); end + + private + + # Override base method to clone the expressions as well. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#13 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#122 + def terminal?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#2 +module Regexp::Expression::UnicodeProperty; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 +class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 +class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 +class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 +class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 +class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#36 +class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#3 +class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#8 + def name; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#12 + def shortcut; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 +class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#116 +class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 +class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 +module Regexp::Expression::UnicodeProperty::Codepoint; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 +class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 +class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 +class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#106 +class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 +class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#107 +class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 +class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 +class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 +class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#114 +class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 +class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 +module Regexp::Expression::UnicodeProperty::Letter; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 +class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 +class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 +class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#44 +class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 +class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 +class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#45 +class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 +class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 +class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 +module Regexp::Expression::UnicodeProperty::Mark; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 +class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 +class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#54 +class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 +class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#55 +class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 +class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#33 +class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 +module Regexp::Expression::UnicodeProperty::Number; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#63 +class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 +class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#64 +class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 +class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 +class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 +class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 +class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 +module Regexp::Expression::UnicodeProperty::Punctuation; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 +class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 +class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#76 +class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 +class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 +class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 +class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#77 +class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 +class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 +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#82 +module Regexp::Expression::UnicodeProperty::Separator; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#85 +class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 +class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 +class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 +class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#86 +class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 +class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 +module Regexp::Expression::UnicodeProperty::Symbol; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 +class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 +class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#96 +class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#95 +class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 +class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 +class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#28 +class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 +class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 +class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#30 +class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#11 +class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#42 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#12 + def merge(exp); end +end + +# A very thin wrapper around the scanner that breaks quantified literal runs, +# collects emitted tokens into an array, calculates their nesting depth, and +# normalizes tokens for the parser, and checks if they are implemented by the +# given syntax flavor. +# +# source://regexp_parser//lib/regexp_parser/lexer.rb#5 +class Regexp::Lexer + # source://regexp_parser//lib/regexp_parser/lexer.rb#71 + def emit(token); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#20 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # source://regexp_parser//lib/regexp_parser/lexer.rb#91 + def ascend(type, token); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def block=(_arg0); end + + # if a codepoint list is followed by a quantifier, that quantifier applies + # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' + # c.f. #break_literal. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#143 + def break_codepoint_list(token); end + + # called by scan to break a literal run that is longer than one character + # into two separate tokens when it is followed by a quantifier + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#123 + def break_literal(token); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def collect_tokens; end + + # Sets the attribute collect_tokens + # + # @param value the value to set the attribute collect_tokens to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def conditional_nesting; end + + # Sets the attribute conditional_nesting + # + # @param value the value to set the attribute conditional_nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def conditional_nesting=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#106 + def descend(type, token); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#162 + def merge_condition(current, last); end + + # Returns the value of attribute nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def nesting; end + + # Sets the attribute nesting + # + # @param value the value to set the attribute nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def nesting=(_arg0); end + + # Returns the value of attribute preprev_token. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def preprev_token; end + + # Sets the attribute preprev_token + # + # @param value the value to set the attribute preprev_token to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def preprev_token=(_arg0); end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def prev_token; end + + # Sets the attribute prev_token + # + # @param value the value to set the attribute prev_token to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def prev_token=(_arg0); end + + # Returns the value of attribute set_nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def set_nesting; end + + # Sets the attribute set_nesting + # + # @param value the value to set the attribute set_nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def set_nesting=(_arg0); end + + # Returns the value of attribute shift. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def shift; end + + # Sets the attribute shift + # + # @param value the value to set the attribute shift to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def shift=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#87 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/lexer.rb#16 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#16 + def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + end +end + +# source://regexp_parser//lib/regexp_parser/lexer.rb#12 +Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/lexer.rb#14 +Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/lexer.rb#7 +Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#1 +class Regexp::MatchLength + include ::Enumerable + + # @return [MatchLength] a new instance of MatchLength + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#9 + def initialize(exp, opts = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#24 + def each(opts = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#35 + def endless_each; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#44 + def fixed?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#40 + def include?(length); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#60 + def inspect; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#52 + def max; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#48 + def min; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#56 + def minmax; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#65 + def to_re; end + + private + + # Returns the value of attribute base_max. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_max; end + + # Sets the attribute base_max + # + # @param value the value to set the attribute base_max to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_max=(_arg0); end + + # Returns the value of attribute base_min. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_min; end + + # Sets the attribute base_min + # + # @param value the value to set the attribute base_min to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def base_min=(_arg0); end + + # Returns the value of attribute exp_class. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def exp_class; end + + # Sets the attribute exp_class + # + # @param value the value to set the attribute exp_class to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def exp_class=(_arg0); end + + # Returns the value of attribute max_rep. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def max_rep; end + + # Sets the attribute max_rep + # + # @param value the value to set the attribute max_rep to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def max_rep=(_arg0); end + + # Returns the value of attribute min_rep. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def min_rep; end + + # Sets the attribute min_rep + # + # @param value the value to set the attribute min_rep to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def min_rep=(_arg0); end + + # Returns the value of attribute reify. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def reify; end + + # Sets the attribute reify + # + # @param value the value to set the attribute reify to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#71 + def reify=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#74 + def test_regexp; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#4 + def of(obj); end + end +end + +# source://regexp_parser//lib/regexp_parser/version.rb#2 +class Regexp::Parser + include ::Regexp::Expression + + # source://regexp_parser//lib/regexp_parser/parser.rb#25 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + + private + + # source://regexp_parser//lib/regexp_parser/parser.rb#573 + def active_opts; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#99 + def anchor(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#262 + def assign_effective_number(exp); end + + # Assigns referenced expressions to refering 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#580 + def assign_referenced_expressions; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#227 + def backref(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#202 + def captured_group_count_at_level; end + + # Returns the value of attribute captured_group_counts. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def captured_group_counts; end + + # Sets the attribute captured_group_counts + # + # @param value the value to set the attribute captured_group_counts to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def captured_group_counts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#569 + def close_completed_character_set_range; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#210 + def close_group; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#537 + def close_set; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#269 + def conditional(token); end + + # Returns the value of attribute conditional_nesting. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def conditional_nesting; end + + # Sets the attribute conditional_nesting + # + # @param value the value to set the attribute conditional_nesting to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def conditional_nesting=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#206 + def count_captured_group; end + + # @yield [node] + # + # source://regexp_parser//lib/regexp_parser/parser.rb#216 + def decrease_nesting; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#305 + def escape(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#60 + def extract_options(input, options); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#349 + def free_space(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#114 + def group(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#508 + def increase_group_level(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#548 + def intersection(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#360 + def keep(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#364 + def literal(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#368 + def meta(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#533 + def negate_set; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#299 + def nest(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#294 + def nest_conditional(exp); end + + # Returns the value of attribute nesting. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def nesting; end + + # Sets the attribute nesting + # + # @param value the value to set the attribute nesting to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def nesting=(_arg0); end + + # Returns the value of attribute node. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def node; end + + # Sets the attribute node + # + # @param value the value to set the attribute node to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def node=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#165 + def open_group(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#526 + def open_set(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#130 + def options_group(token); end + + # Returns the value of attribute options_stack. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def options_stack; end + + # Sets the attribute options_stack + # + # @param value the value to set the attribute options_stack to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def options_stack=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#76 + def parse_token(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#390 + def posixclass(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#397 + def property(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#478 + def quantifier(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#541 + def range(token); end + + # Returns the value of attribute root. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def root; end + + # Sets the attribute root + # + # @param value the value to set the attribute root to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def root=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#379 + def sequence_operation(klass, token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#514 + def set(token); end + + # Returns the value of attribute switching_options. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def switching_options; end + + # Sets the attribute switching_options + # + # @param value the value to set the attribute switching_options to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#56 + def switching_options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#198 + def total_captured_group_count; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#552 + def type(token); end + + class << self + # source://regexp_parser//lib/regexp_parser/parser.rb#21 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +# source://regexp_parser//lib/regexp_parser/parser.rb#128 +Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) + +# base class for all gem-specific errors +# +# source://regexp_parser//lib/regexp_parser/error.rb#3 +class Regexp::Parser::Error < ::StandardError; end + +# source://regexp_parser//lib/regexp_parser/parser.rb#127 +Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/parser.rb#7 +class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end + +# source://regexp_parser//lib/regexp_parser/parser.rb#394 +Regexp::Parser::UP = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#395 +Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#15 +class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError + # @return [UnknownTokenError] a new instance of UnknownTokenError + # + # source://regexp_parser//lib/regexp_parser/parser.rb#16 + def initialize(type, token); end +end + +# source://regexp_parser//lib/regexp_parser/parser.rb#9 +class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError + # @return [UnknownTokenTypeError] a new instance of UnknownTokenTypeError + # + # source://regexp_parser//lib/regexp_parser/parser.rb#10 + def initialize(type, token); end +end + +# source://regexp_parser//lib/regexp_parser/version.rb#3 +Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) + +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#3 +class Regexp::Scanner + # Emits an array with the details of the scanned pattern + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 + def emit(type, token, text); end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2413 + def literal_run; end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2413 + 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#2450 + def append_literal(data, ts, te); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def block=(_arg0); end + + # Returns the value of attribute char_pos. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def char_pos; end + + # Sets the attribute char_pos + # + # @param value the value to set the attribute char_pos to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def char_pos=(_arg0); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def collect_tokens; end + + # Sets the attribute collect_tokens + # + # @param value the value to set the attribute collect_tokens to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def conditional_stack; end + + # Sets the attribute conditional_stack + # + # @param value the value to set the attribute conditional_stack to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def conditional_stack=(_arg0); end + + # Copy from ts to te from data as text + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2444 + def copy(data, ts, te); end + + # Emits the literal run collected by calls to the append_literal method. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2455 + def emit_literal; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2490 + def emit_meta_control_sequence(data, ts, te, token); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2461 + def emit_options(text); end + + # Returns the value of attribute free_spacing. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def free_spacing; end + + # Sets the attribute free_spacing + # + # @param value the value to set the attribute free_spacing to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def free_spacing=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2423 + def free_spacing?(input_object, options); end + + # Returns the value of attribute group_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def group_depth; end + + # Sets the attribute group_depth + # + # @param value the value to set the attribute group_depth to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def group_depth=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def in_group?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2439 + def in_set?; end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def prev_token; end + + # Sets the attribute prev_token + # + # @param value the value to set the attribute prev_token to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def prev_token=(_arg0); end + + # Returns the value of attribute set_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def set_depth; end + + # Sets the attribute set_depth + # + # @param value the value to set the attribute set_depth to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def set_depth=(_arg0); end + + # Returns the value of attribute spacing_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def spacing_stack; end + + # Sets the attribute spacing_stack + # + # @param value the value to set the attribute spacing_stack to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def spacing_stack=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/scanner.rb#2374 + def long_prop_map; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2378 + def parse_prop_map(name); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2382 + def posix_classes; end + + # Scans the given regular expression text, or Regexp object and collects the + # emitted token into an array that gets returned at the end. If a block is + # given, it gets called for each emitted token. + # + # This method may raise errors if a syntax error is encountered. + # -------------------------------------------------------------------------- + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#20 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # lazy-load property maps when first needed + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2370 + def short_prop_map; end + end +end + +# Invalid back reference. Used for name a number refs/calls. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#44 +class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError + # @return [InvalidBackrefError] a new instance of InvalidBackrefError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#45 + def initialize(what, reason); end +end + +# Invalid group. Used for named groups. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#29 +class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError + # @return [InvalidGroupError] a new instance of InvalidGroupError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#30 + def initialize(what, reason); end +end + +# Invalid groupOption. Used for inline options. +# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#37 +class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError + # @return [InvalidGroupOption] a new instance of InvalidGroupOption + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#38 + def initialize(option, text); end +end + +# Invalid sequence format. Used for escape sequences, mainly. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#22 +class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError + # @return [InvalidSequenceError] a new instance of InvalidSequenceError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#23 + def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end +end + +# Unexpected end of pattern +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#3 +class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError + # @return [PrematureEndError] a new instance of PrematureEndError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#4 + def initialize(where = T.unsafe(nil)); end +end + +# General scanner error (catch all) +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#5 +class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end + +# The POSIX class name was not recognized by the scanner. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#58 +class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError + # @return [UnknownPosixClassError] a new instance of UnknownPosixClassError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#59 + def initialize(text, _); end +end + +# The property name was not recognized by the scanner. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#51 +class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError + # @return [UnknownUnicodePropertyError] a new instance of UnknownUnicodePropertyError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#52 + def initialize(name, _); end +end + +# Base for all scanner validation errors +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#4 +class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError + class << self + # Centralizes and unifies the handling of validation related errors. + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#5 + def for(type, problem, reason = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#9 + def types; end + end +end + +# After loading all the tokens the map is full. Extract all tokens and types +# into the All and Types constants. +# +# source://regexp_parser//lib/regexp_parser/syntax.rb#3 +module Regexp::Syntax + private + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 + def comparable(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 + def const_missing(const_name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 + def for(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 + def new(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 + def specified_versions; end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 + def supported?(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 + def version_class(version); end + + class << self + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#61 + def comparable(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#44 + def const_missing(const_name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#51 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#22 + def for(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#26 + def new(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#57 + def specified_versions; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#32 + def supported?(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#36 + def version_class(version); end + end +end + +# A syntax that always returns true, passing all tokens as implemented. This +# is useful during development, testing, and should be useful for some types +# of transformations as well. +# +# source://regexp_parser//lib/regexp_parser/syntax/any.rb#5 +class Regexp::Syntax::Any < ::Regexp::Syntax::Base + class << self + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/any.rb#8 + def implements?(_type, _token); end + end +end + +# A lookup map of supported types and tokens in a given syntax +# +# source://regexp_parser//lib/regexp_parser/syntax/base.rb#9 +class Regexp::Syntax::Base + include ::Regexp::Syntax::Token + + # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` + # + # @return [Base] a new instance of Base + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#99 + def initialize; end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#104 + def method_missing(name, *args); end + + private + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#115 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#46 + def added_features; end + + # @raise [NotImplementedError] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 + def check!(type, token); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 + def check?(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#26 + def excludes(type, tokens); end + + # Returns the value of attribute features. + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 + def features; end + + # Sets the attribute features + # + # @param value the value to set the attribute features to. + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#13 + def features=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#36 + def implementations(type); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#21 + def implements(type, tokens); end + + # @raise [NotImplementedError] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#40 + def implements!(type, token); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#31 + def implements?(type, token); end + + # automatically inherit features through the syntax class hierarchy + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#16 + def inherited(subclass); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#54 + def normalize(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#74 + def normalize_backref(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#65 + def normalize_group(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#50 + def removed_features; end + end +end + +# source://regexp_parser//lib/regexp_parser/syntax/versions.rb#8 +Regexp::Syntax::CURRENT = Regexp::Syntax::V3_1_0 + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#6 +class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError + # @return [InvalidVersionNameError] a new instance of InvalidVersionNameError + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#7 + def initialize(name); end +end + +# source://regexp_parser//lib/regexp_parser/syntax/base.rb#2 +class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError + # @return [NotImplementedError] a new instance of NotImplementedError + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#3 + def initialize(syntax, type, token); end +end + +# source://regexp_parser//lib/regexp_parser/syntax.rb#4 +class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#3 +module Regexp::Syntax::Token; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#42 +Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#15 +module Regexp::Syntax::Token::Alternation; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#16 +Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#17 +Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#3 +module Regexp::Syntax::Token::Anchor; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#9 +Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#4 +Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#5 +Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#7 +Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#6 +Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#10 +Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#3 +module Regexp::Syntax::Token::Assertion; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#7 +Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#4 +Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#5 +Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#8 +Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#31 +Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#3 +module Regexp::Syntax::Token::Backreference; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#15 +Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#7 +Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#6 +Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#5 +Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#4 +Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#9 +Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#16 +Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#11 +Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#13 +Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#3 +module Regexp::Syntax::Token::CharacterSet; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#7 +Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#4 +Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#5 +Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#8 +Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#3 +module Regexp::Syntax::Token::CharacterType; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#10 +Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#4 +Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#8 +Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#5 +Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#6 +Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#11 +Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#3 +module Regexp::Syntax::Token::Conditional; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#9 +Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#6 +Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#4 +Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#7 +Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#11 +Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#3 +module Regexp::Syntax::Token::Escape; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#8 +Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#24 +Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#4 +Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#6 +Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#20 +Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#13 +Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#22 +Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#25 +Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#11 +Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#31 +Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#11 +module Regexp::Syntax::Token::FreeSpace; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#12 +Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#13 +Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#3 +module Regexp::Syntax::Token::Group; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#17 +Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#8 +Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#4 +Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#10 +Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#5 +Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#7 +Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#9 +Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#18 +Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#12 +Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#15 +Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#3 +module Regexp::Syntax::Token::Keep; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#6 +Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#4 +Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#7 +Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#6 +module Regexp::Syntax::Token::Literal; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#7 +Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#8 +Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#4 +Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#3 +module Regexp::Syntax::Token::Meta; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#8 +Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#5 +Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#4 +Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#6 +Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#9 +Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#3 +module Regexp::Syntax::Token::PosixClass; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#9 +Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#7 +Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#11 +Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#4 +Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#10 +Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#731 +Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#3 +module Regexp::Syntax::Token::Quantifier; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#29 +Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#4 +Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#22 +Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#26 +Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#24 +Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#23 +Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#16 +Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#10 +Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#30 +Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#28 +Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) + +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#14 +Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet + +# Type is the same as Backreference so keeping it here, for now. +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#20 +module Regexp::Syntax::Token::SubexpressionCall; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#24 +Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#21 +Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#22 +Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#43 +Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#3 +module Regexp::Syntax::Token::UnicodeProperty; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#64 +Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#40 +Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#44 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#46 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#48 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#50 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#52 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#54 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#56 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#58 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#60 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#62 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#721 +Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 +module Regexp::Syntax::Token::UnicodeProperty::Category; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#36 +Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#33 +Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#14 +Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#17 +Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#20 +Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#23 +Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#30 +Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#27 +Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#6 +Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#9 +Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#133 +Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#66 +Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#120 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#125 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#129 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#694 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#724 +Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#11 +Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#332 +Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#135 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#231 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#237 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#247 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#273 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#282 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#291 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#298 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#308 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#315 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#322 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#723 +Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#692 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#334 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#433 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#561 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#596 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#609 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#623 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#633 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#647 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#659 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#670 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#708 +Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#709 +Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#710 +Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#711 +Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#712 +Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#713 +Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#714 +Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#715 +Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#716 +Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#717 +Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#718 +Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#719 +Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#12 +class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError + # @return [UnknownSyntaxNameError] a new instance of UnknownSyntaxNameError + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#13 + def initialize(name); end +end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.8.6.rb#1 +class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.1.rb#1 +class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.3.rb#1 +class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.0.0.rb#1 +class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.2.0.rb#1 +class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.3.0.rb#1 +class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.0.rb#1 +class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.1.rb#1 +class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.5.0.rb#1 +class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.0.rb#1 +class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.2.rb#1 +class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.3.rb#1 +class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.1.0.rb#1 +class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.2.0.rb#1 +class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#4 +Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#2 +Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#3 +Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://regexp_parser//lib/regexp_parser/token.rb#2 +Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/token.rb#13 +class Regexp::Token < ::Struct + def conditional_level; end + def conditional_level=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#20 + def length; end + + def level; end + def level=(_); end + + # Returns the value of attribute next. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def next; end + + # Sets the attribute next + # + # @param value the value to set the attribute next to. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def next=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/token.rb#16 + def offset; end + + # Returns the value of attribute previous. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def previous; end + + # Sets the attribute previous + # + # @param value the value to set the attribute previous to. + # + # source://regexp_parser//lib/regexp_parser/token.rb#14 + def previous=(_arg0); end + + def set_level; end + def set_level=(_); end + def te; end + def te=(_); end + def text; end + def text=(_); end + def token; end + def token=(_); end + def ts; end + def ts=(_); end + def type; end + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/reline@0.3.8.rbi b/sorbet/rbi/gems/reline@0.3.8.rbi new file mode 100644 index 0000000000..b8c01d40ef --- /dev/null +++ b/sorbet/rbi/gems/reline@0.3.8.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reline` gem. +# Please instead update this file by running `bin/tapioca gem reline`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rest-client@2.1.0.rbi b/sorbet/rbi/gems/rest-client@2.1.0.rbi new file mode 100644 index 0000000000..d5f30ff199 --- /dev/null +++ b/sorbet/rbi/gems/rest-client@2.1.0.rbi @@ -0,0 +1,1898 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rest-client` gem. +# Please instead update this file by running `bin/tapioca gem rest-client`. + +# This module's static methods are the entry point for using the REST client. +# +# # GET +# xml = RestClient.get 'http://example.com/resource' +# jpg = RestClient.get 'http://example.com/resource', :accept => 'image/jpg' +# +# # authentication and SSL +# RestClient.get 'https://user:password@example.com/private/resource' +# +# # POST or PUT with a hash sends parameters as a urlencoded form body +# RestClient.post 'http://example.com/resource', :param1 => 'one' +# +# # nest hash parameters +# RestClient.post 'http://example.com/resource', :nested => { :param1 => 'one' } +# +# # POST and PUT with raw payloads +# RestClient.post 'http://example.com/resource', 'the post body', :content_type => 'text/plain' +# RestClient.post 'http://example.com/resource.xml', xml_doc +# RestClient.put 'http://example.com/resource.pdf', File.read('my.pdf'), :content_type => 'application/pdf' +# +# # DELETE +# RestClient.delete 'http://example.com/resource' +# +# # retreive the response http code and headers +# res = RestClient.get 'http://example.com/some.jpg' +# res.code # => 200 +# res.headers[:content_type] # => 'image/jpg' +# +# # HEAD +# RestClient.head('http://example.com').headers +# +# To use with a proxy, just set RestClient.proxy to the proper http proxy: +# +# RestClient.proxy = "http://proxy.example.com/" +# +# Or inherit the proxy from the environment: +# +# RestClient.proxy = ENV['http_proxy'] +# +# For live tests of RestClient, try using http://rest-test.heroku.com, which echoes back information about the rest call: +# +# >> RestClient.put 'http://rest-test.heroku.com/resource', :foo => 'baz' +# => "PUT http://rest-test.heroku.com/resource with a 7 byte payload, content type application/x-www-form-urlencoded {\"foo\"=>\"baz\"}" +# +# source://rest-client//lib/restclient/version.rb#1 +module RestClient + class << self + # Add a Proc to be called before each request in executed. + # The proc parameters will be the http request and the request params. + # + # @raise [ArgumentError] + # + # source://rest-client//lib/restclient.rb#169 + def add_before_execution_proc(&proc); end + + # source://rest-client//lib/restclient.rb#179 + def before_execution_procs; end + + # Create a log that respond to << like a logger + # param can be 'stdout', 'stderr', a string (then we will log to that file) or a logger (then we return it) + # + # source://rest-client//lib/restclient.rb#122 + def create_log(param); end + + # source://rest-client//lib/restclient.rb#81 + def delete(url, headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient.rb#65 + def get(url, headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient.rb#85 + def head(url, headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient.rb#161 + def log; end + + # Setup the log for RestClient calls. + # Value should be a logger but can can be stdout, stderr, or a filename. + # You can also configure logging by the environment variable RESTCLIENT_LOG. + # + # source://rest-client//lib/restclient.rb#116 + def log=(log); end + + # source://rest-client//lib/restclient.rb#89 + def options(url, headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient.rb#73 + def patch(url, payload, headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient.rb#69 + def post(url, payload, headers = T.unsafe(nil), &block); end + + # A global proxy URL to use for all requests. This can be overridden on a + # per-request basis by passing `:proxy` to RestClient::Request. + # + # source://rest-client//lib/restclient.rb#95 + def proxy; end + + # source://rest-client//lib/restclient.rb#99 + def proxy=(value); end + + # Return whether RestClient.proxy was set explicitly. We use this to + # differentiate between no value being set and a value explicitly set to nil. + # + # @return [Boolean] + # + # source://rest-client//lib/restclient.rb#109 + def proxy_set?; end + + # source://rest-client//lib/restclient.rb#77 + def put(url, payload, headers = T.unsafe(nil), &block); end + + # Reset the procs to be called before each request is executed. + # + # source://rest-client//lib/restclient.rb#175 + def reset_before_execution_procs; end + + # source://rest-client//lib/restclient/version.rb#5 + def version; end + end +end + +# source://rest-client//lib/restclient/abstract_response.rb#6 +module RestClient::AbstractResponse + # HTTP status code + # + # source://rest-client//lib/restclient/abstract_response.rb#30 + def code; end + + # Cookie jar extracted from response headers. + # + # @return [HTTP::CookieJar] + # + # source://rest-client//lib/restclient/abstract_response.rb#92 + def cookie_jar; end + + # Hash of cookies extracted from response headers. + # + # NB: This will return only cookies whose domain matches this request, and + # may not even return all of those cookies if there are duplicate names. + # Use the full cookie_jar for more nuanced access. + # + # @return [Hash] + # @see #cookie_jar + # + # source://rest-client//lib/restclient/abstract_response.rb#78 + def cookies; end + + # source://rest-client//lib/restclient/abstract_response.rb#138 + def description; end + + # Returns the value of attribute duration. + # + # source://rest-client//lib/restclient/abstract_response.rb#8 + def duration; end + + # Returns the value of attribute end_time. + # + # source://rest-client//lib/restclient/abstract_response.rb#8 + def end_time; end + + # Follow a redirection response, but change the HTTP method to GET and drop + # the payload from the original request. + # + # source://rest-client//lib/restclient/abstract_response.rb#150 + def follow_get_redirection(&block); end + + # Follow a redirection response by making a new HTTP request to the + # redirection target. + # + # source://rest-client//lib/restclient/abstract_response.rb#144 + def follow_redirection(&block); end + + # A hash of the headers, beautified with symbols and underscores. + # e.g. "Content-type" will become :content_type. + # + # source://rest-client//lib/restclient/abstract_response.rb#40 + def headers; end + + # source://rest-client//lib/restclient/abstract_response.rb#34 + def history; end + + # @raise [NotImplementedError] + # + # source://rest-client//lib/restclient/abstract_response.rb#10 + def inspect; end + + # Logger from the request, potentially nil. + # + # source://rest-client//lib/restclient/abstract_response.rb#15 + def log; end + + # source://rest-client//lib/restclient/abstract_response.rb#19 + def log_response; end + + # Returns the value of attribute net_http_res. + # + # source://rest-client//lib/restclient/abstract_response.rb#8 + def net_http_res; end + + # The raw headers. + # + # source://rest-client//lib/restclient/abstract_response.rb#45 + def raw_headers; end + + # Returns the value of attribute request. + # + # source://rest-client//lib/restclient/abstract_response.rb#8 + def request; end + + # @param net_http_res [Net::HTTPResponse] + # @param request [RestClient::Request] + # @param start_time [Time] + # + # source://rest-client//lib/restclient/abstract_response.rb#52 + def response_set_vars(net_http_res, request, start_time); end + + # Return the default behavior corresponding to the response code: + # + # For 20x status codes: return the response itself + # + # For 30x status codes: + # 301, 302, 307: redirect GET / HEAD if there is a Location header + # 303: redirect, changing method to GET, if there is a Location header + # + # For all other responses, raise a response exception + # + # source://rest-client//lib/restclient/abstract_response.rb#113 + def return!(&block); end + + # Returns the value of attribute start_time. + # + # source://rest-client//lib/restclient/abstract_response.rb#8 + def start_time; end + + # source://rest-client//lib/restclient/abstract_response.rb#133 + def to_i; end + + private + + # Follow a redirection + # + # @param new_args [Hash] Start with this hash of arguments for the + # redirection request. The hash will be mutated, so be sure to dup any + # existing hash that should not be modified. + # + # source://rest-client//lib/restclient/abstract_response.rb#202 + def _follow_redirection(new_args, &block); end + + # source://rest-client//lib/restclient/abstract_response.rb#236 + def check_max_redirects; end + + # @raise [klass] + # + # source://rest-client//lib/restclient/abstract_response.rb#242 + def exception_with_response; end + + class << self + # Convert headers hash into canonical form. + # + # Header names will be converted to lowercase symbols with underscores + # instead of hyphens. + # + # Headers specified multiple times will be joined by comma and space, + # except for Set-Cookie, which will always be an array. + # + # Per RFC 2616, if a server sends multiple headers with the same key, they + # MUST be able to be joined into a single header by a comma. However, + # Set-Cookie (RFC 6265) cannot because commas are valid within cookie + # definitions. The newer RFC 7230 notes (3.2.2) that Set-Cookie should be + # handled as a special case. + # + # http://tools.ietf.org/html/rfc2616#section-4.2 + # http://tools.ietf.org/html/rfc7230#section-3.2.2 + # http://tools.ietf.org/html/rfc6265 + # + # @param headers [Hash] + # @return [Hash] + # + # source://rest-client//lib/restclient/abstract_response.rb#179 + def beautify_headers(headers); end + end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Accepted < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::AlreadyReported < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::BadGateway < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::BadRequest < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::BandwidthLimitExceeded < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::BlockedByWindowsParentalControls < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Conflict < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Continue < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Created < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# This is the base RestClient exception class. Rescue it if you want to +# catch any exception that your request might raise +# You can get the status code by e.http_code, or see anything about the +# response via e.response. +# For example, the entire result body (which is +# probably an HTML error page) is e.response. +# +# source://rest-client//lib/restclient/exceptions.rb#109 +class RestClient::Exception < ::RuntimeError + # @return [Exception] a new instance of Exception + # + # source://rest-client//lib/restclient/exceptions.rb#114 + def initialize(response = T.unsafe(nil), initial_response_code = T.unsafe(nil)); end + + # source://rest-client//lib/restclient/exceptions.rb#145 + def default_message; end + + # source://rest-client//lib/restclient/exceptions.rb#133 + def http_body; end + + # source://rest-client//lib/restclient/exceptions.rb#120 + def http_code; end + + # source://rest-client//lib/restclient/exceptions.rb#129 + def http_headers; end + + # source://rest-client//lib/restclient/exceptions.rb#141 + def message; end + + # Sets the attribute message + # + # @param value the value to set the attribute message to. + # + # source://rest-client//lib/restclient/exceptions.rb#112 + def message=(_arg0); end + + # Returns the value of attribute original_exception. + # + # source://rest-client//lib/restclient/exceptions.rb#111 + def original_exception; end + + # Sets the attribute original_exception + # + # @param value the value to set the attribute original_exception to. + # + # source://rest-client//lib/restclient/exceptions.rb#111 + def original_exception=(_arg0); end + + # Returns the value of attribute response. + # + # source://rest-client//lib/restclient/exceptions.rb#110 + def response; end + + # Sets the attribute response + # + # @param value the value to set the attribute response to. + # + # source://rest-client//lib/restclient/exceptions.rb#110 + def response=(_arg0); end + + # source://rest-client//lib/restclient/exceptions.rb#137 + def to_s; end +end + +# Compatibility +# +# source://rest-client//lib/restclient/exceptions.rb#151 +class RestClient::ExceptionWithResponse < ::RestClient::Exception; end + +# RestClient exception classes. TODO: move all exceptions into this module. +# +# We will a create an exception for each status code, see +# http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html +# +# source://rest-client//lib/restclient/exceptions.rb#171 +module RestClient::Exceptions; end + +# Map http status codes to the corresponding exception class +# +# source://rest-client//lib/restclient/exceptions.rb#173 +RestClient::Exceptions::EXCEPTIONS_MAP = T.let(T.unsafe(nil), Hash) + +# Timeout when connecting to a server. Typically wraps Net::OpenTimeout (in +# ruby 2.0 or greater). +# +# source://rest-client//lib/restclient/exceptions.rb#212 +class RestClient::Exceptions::OpenTimeout < ::RestClient::Exceptions::Timeout + # source://rest-client//lib/restclient/exceptions.rb#213 + def default_message; end +end + +# Timeout when reading from a server. Typically wraps Net::ReadTimeout (in +# ruby 2.0 or greater). +# +# source://rest-client//lib/restclient/exceptions.rb#220 +class RestClient::Exceptions::ReadTimeout < ::RestClient::Exceptions::Timeout + # source://rest-client//lib/restclient/exceptions.rb#221 + def default_message; end +end + +# Base class for request timeouts. +# +# NB: Previous releases of rest-client would raise RequestTimeout both for +# HTTP 408 responses and for actual connection timeouts. +# +# source://rest-client//lib/restclient/exceptions.rb#202 +class RestClient::Exceptions::Timeout < ::RestClient::RequestTimeout + # @return [Timeout] a new instance of Timeout + # + # source://rest-client//lib/restclient/exceptions.rb#203 + def initialize(message = T.unsafe(nil), original_exception = T.unsafe(nil)); end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::ExpectationFailed < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::FailedDependency < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Forbidden < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Found < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::GatewayTimeout < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Gone < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::HTTPVersionNotSupported < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::IMUsed < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::ImATeapot < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::InsufficientStorage < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::InternalServerError < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::LengthRequired < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Locked < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::LoopDetected < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::MethodNotAllowed < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::MovedPermanently < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::MultiStatus < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::MultipleChoices < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NetworkAuthenticationRequired < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NoContent < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NonAuthoritativeInformation < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NotAcceptable < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NotExtended < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NotFound < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NotImplemented < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::NotModified < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::OK < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# The ParamsArray class is used to represent an ordered list of [key, value] +# pairs. Use this when you need to include a key multiple times or want +# explicit control over parameter ordering. +# +# Most of the request payload & parameter functions normally accept a Hash of +# keys => values, which does not allow for duplicated keys. +# +# @see RestClient::Utils.encode_query_string +# @see RestClient::Utils.flatten_params +# +# source://rest-client//lib/restclient/params_array.rb#13 +class RestClient::ParamsArray + include ::Enumerable + + # @example + # >> ParamsArray.new([[:foo, 123], [:foo, 456], [:bar, 789]]) + # This will be encoded as "foo=123&foo=456&bar=789" + # @example + # >> ParamsArray.new({foo: 123, bar: 456}) + # This is valid, but there's no reason not to just use the Hash directly + # instead of a ParamsArray. + # @param array [Array] An array of parameter key,value pairs. These + # pairs may be 2 element arrays [key, value] or single element hashes + # {key => value}. They may also be single element arrays to represent a + # key with no value. + # @return [ParamsArray] a new instance of ParamsArray + # + # source://rest-client//lib/restclient/params_array.rb#31 + def initialize(array); end + + # source://rest-client//lib/restclient/params_array.rb#35 + def each(*args, &blk); end + + # @return [Boolean] + # + # source://rest-client//lib/restclient/params_array.rb#39 + def empty?; end + + private + + # source://rest-client//lib/restclient/params_array.rb#45 + def process_input(array); end + + # A pair may be: + # - A single element hash, e.g. {foo: 'bar'} + # - A two element array, e.g. ['foo', 'bar'] + # - A one element array, e.g. ['foo'] + # + # source://rest-client//lib/restclient/params_array.rb#54 + def process_pair(pair); end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::PartialContent < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/payload.rb#13 +module RestClient::Payload + extend ::RestClient::Payload + + # @return [Boolean] + # + # source://rest-client//lib/restclient/payload.rb#48 + def _has_file?(obj); end + + # source://rest-client//lib/restclient/payload.rb#16 + def generate(params); end + + # @return [Boolean] + # + # source://rest-client//lib/restclient/payload.rb#41 + def has_file?(params); end +end + +# source://rest-client//lib/restclient/payload.rb#59 +class RestClient::Payload::Base + # @return [Base] a new instance of Base + # + # source://rest-client//lib/restclient/payload.rb#60 + def initialize(params); end + + # source://rest-client//lib/restclient/payload.rb#64 + def build_stream(params); end + + # source://rest-client//lib/restclient/payload.rb#89 + def close; end + + # @return [Boolean] + # + # source://rest-client//lib/restclient/payload.rb#93 + def closed?; end + + # source://rest-client//lib/restclient/payload.rb#79 + def headers; end + + # source://rest-client//lib/restclient/payload.rb#83 + def length; end + + # source://rest-client//lib/restclient/payload.rb#69 + def read(*args); end + + # source://rest-client//lib/restclient/payload.rb#101 + def short_inspect; end + + # source://rest-client//lib/restclient/payload.rb#83 + def size; end + + # source://rest-client//lib/restclient/payload.rb#73 + def to_s; end + + # source://rest-client//lib/restclient/payload.rb#97 + def to_s_inspect; end +end + +# source://rest-client//lib/restclient/payload.rb#141 +class RestClient::Payload::Multipart < ::RestClient::Payload::Base + # source://rest-client//lib/restclient/payload.rb#201 + def boundary; end + + # source://rest-client//lib/restclient/payload.rb#144 + def build_stream(params); end + + # source://rest-client//lib/restclient/payload.rb#229 + def close; end + + # source://rest-client//lib/restclient/payload.rb#181 + def create_file_field(s, k, v); end + + # source://rest-client//lib/restclient/payload.rb#174 + def create_regular_field(s, k, v); end + + # for Multipart do not escape the keys + # + # Ostensibly multipart keys MAY be percent encoded per RFC 7578, but in + # practice no major browser that I'm aware of uses percent encoding. + # + # https://github.com/rest-client/rest-client/pull/403#issuecomment-156976930 + # + # source://rest-client//lib/restclient/payload.rb#221 + def handle_key(key); end + + # source://rest-client//lib/restclient/payload.rb#225 + def headers; end + + # source://rest-client//lib/restclient/payload.rb#196 + def mime_for(path); end +end + +# source://rest-client//lib/restclient/payload.rb#142 +RestClient::Payload::Multipart::EOL = T.let(T.unsafe(nil), String) + +# source://rest-client//lib/restclient/payload.rb#111 +class RestClient::Payload::Streamed < ::RestClient::Payload::Base + # source://rest-client//lib/restclient/payload.rb#112 + def build_stream(params = T.unsafe(nil)); end + + # TODO (breaks compatibility): ought to use mime_for() to autodetect the + # Content-Type for stream objects that have a filename. + # + # source://rest-client//lib/restclient/payload.rb#116 + def length; end + + # source://rest-client//lib/restclient/payload.rb#116 + def size; end +end + +# source://rest-client//lib/restclient/payload.rb#130 +class RestClient::Payload::UrlEncoded < ::RestClient::Payload::Base + # source://rest-client//lib/restclient/payload.rb#131 + def build_stream(params = T.unsafe(nil)); end + + # source://rest-client//lib/restclient/payload.rb#136 + def headers; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::PayloadTooLarge < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::PaymentRequired < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::PermanentRedirect < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/platform.rb#4 +module RestClient::Platform + class << self + # source://rest-client//lib/restclient/platform.rb#32 + def architecture; end + + # source://rest-client//lib/restclient/platform.rb#45 + def default_user_agent; end + + # Return true if we are running on jruby. + # + # @return [Boolean] + # + # source://rest-client//lib/restclient/platform.rb#27 + def jruby?; end + + # Return true if we are running on a darwin-based Ruby platform. This will + # be false for jruby even on OS X. + # + # @return [Boolean] + # + # source://rest-client//lib/restclient/platform.rb#9 + def mac_mri?; end + + # source://rest-client//lib/restclient/platform.rb#36 + def ruby_agent_version; end + + # Return true if we are running on Windows. + # + # @return [Boolean] + # + # source://rest-client//lib/restclient/platform.rb#17 + def windows?; end + end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::PreconditionFailed < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::PreconditionRequired < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Processing < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::ProxyAuthenticationRequired < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::RangeNotSatisfiable < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# The response from RestClient on a raw request looks like a string, but is +# actually one of these. 99% of the time you're making a rest call all you +# care about is the body, but on the occassion you want to fetch the +# headers you can: +# +# RestClient.get('http://example.com').headers[:content_type] +# +# In addition, if you do not use the response as a string, you can access +# a Tempfile object at res.file, which contains the path to the raw +# downloaded request body. +# +# source://rest-client//lib/restclient/raw_response.rb#12 +class RestClient::RawResponse + include ::RestClient::AbstractResponse + + # @param tempfile [Tempfile] The temporary file containing the body + # @param net_http_res [Net::HTTPResponse] + # @param request [RestClient::Request] + # @param start_time [Time] + # @return [RawResponse] a new instance of RawResponse + # + # source://rest-client//lib/restclient/raw_response.rb#26 + def initialize(tempfile, net_http_res, request, start_time = T.unsafe(nil)); end + + # source://rest-client//lib/restclient/raw_response.rb#39 + def body; end + + # Returns the value of attribute end_time. + # + # source://rest-client//lib/restclient/raw_response.rb#16 + def end_time; end + + # Returns the value of attribute file. + # + # source://rest-client//lib/restclient/raw_response.rb#16 + def file; end + + # source://rest-client//lib/restclient/raw_response.rb#18 + def inspect; end + + # Returns the value of attribute request. + # + # source://rest-client//lib/restclient/raw_response.rb#16 + def request; end + + # source://rest-client//lib/restclient/raw_response.rb#44 + def size; end + + # Returns the value of attribute start_time. + # + # source://rest-client//lib/restclient/raw_response.rb#16 + def start_time; end + + # source://rest-client//lib/restclient/raw_response.rb#35 + def to_s; end +end + +# This class is used internally by RestClient to send the request, but you can also +# call it directly if you'd like to use a method not supported by the +# main API. For example: +# +# RestClient::Request.execute(:method => :head, :url => 'http://example.com') +# +# Mandatory parameters: +# * :method +# * :url +# Optional parameters (have a look at ssl and/or uri for some explanations): +# * :headers a hash containing the request headers +# * :cookies may be a Hash{String/Symbol => String} of cookie values, an +# Array, or an HTTP::CookieJar containing cookies. These +# will be added to a cookie jar before the request is sent. +# * :user and :password for basic auth, will be replaced by a user/password available in the :url +# * :block_response call the provided block with the HTTPResponse as parameter +# * :raw_response return a low-level RawResponse instead of a Response +# * :log Set the log for this request only, overriding RestClient.log, if +# any. +# * :stream_log_percent (Only relevant with :raw_response => true) Customize +# the interval at which download progress is logged. Defaults to every +# 10% complete. +# * :max_redirects maximum number of redirections (default to 10) +# * :proxy An HTTP proxy URI to use for this request. Any value here +# (including nil) will override RestClient.proxy. +# * :verify_ssl enable ssl verification, possible values are constants from +# OpenSSL::SSL::VERIFY_*, defaults to OpenSSL::SSL::VERIFY_PEER +# * :read_timeout and :open_timeout are how long to wait for a response and +# to open a connection, in seconds. Pass nil to disable the timeout. +# * :timeout can be used to set both timeouts +# * :ssl_client_cert, :ssl_client_key, :ssl_ca_file, :ssl_ca_path, +# :ssl_cert_store, :ssl_verify_callback, :ssl_verify_callback_warnings +# * :ssl_version specifies the SSL version for the underlying Net::HTTP connection +# * :ssl_ciphers sets SSL ciphers for the connection. See +# OpenSSL::SSL::SSLContext#ciphers= +# * :before_execution_proc a Proc to call before executing the request. This +# proc, like procs from RestClient.before_execution_procs, will be +# called with the HTTP request and request params. +# +# source://rest-client//lib/restclient/request.rb#52 +class RestClient::Request + # @return [Request] a new instance of Request + # + # source://rest-client//lib/restclient/request.rb#73 + def initialize(args); end + + # Returns the value of attribute args. + # + # source://rest-client//lib/restclient/request.rb#54 + def args; end + + # @return [HTTP::CookieJar] + # + # source://rest-client//lib/restclient/request.rb#251 + def cookie_jar; end + + # Render a hash of key => value pairs for cookies in the Request#cookie_jar + # that are valid for the Request#uri. This will not necessarily include all + # cookies if there are duplicate keys. It's safer to use the cookie_jar + # directly if that's a concern. + # + # @return [Hash] + # @see Request#cookie_jar + # + # source://rest-client//lib/restclient/request.rb#240 + def cookies; end + + # Default headers set by RestClient. In addition to these headers, servers + # will receive headers set by Net::HTTP, such as Accept-Encoding and Host. + # + # @return [Hash] + # + # source://rest-client//lib/restclient/request.rb#586 + def default_headers; end + + # source://rest-client//lib/restclient/request.rb#160 + def execute(&block); end + + # Returns the value of attribute headers. + # + # source://rest-client//lib/restclient/request.rb#54 + def headers; end + + # source://rest-client//lib/restclient/request.rb#69 + def inspect; end + + # Default to the global logger if there's not a request-specific one + # + # source://rest-client//lib/restclient/request.rb#536 + def log; end + + # source://rest-client//lib/restclient/request.rb#540 + def log_request; end + + # Render a Cookie HTTP request header from the contents of the @cookie_jar, + # or nil if the jar is empty. + # + # @return [String, nil] + # @see Request#cookie_jar + # + # source://rest-client//lib/restclient/request.rb#262 + def make_cookie_header; end + + # Generate headers for use by a request. Header keys will be stringified + # using `#stringify_headers` to normalize them as capitalized strings. + # + # The final headers consist of: + # - default headers from #default_headers + # - user_headers provided here + # - headers from the payload object (e.g. Content-Type, Content-Lenth) + # - cookie headers from #make_cookie_header + # + # BUG: stringify_headers does not alter the capitalization of headers that + # are passed as strings, it only normalizes those passed as symbols. This + # behavior will probably remain for a while for compatibility, but it means + # that the warnings that attempt to detect accidental header overrides may + # not always work. + # https://github.com/rest-client/rest-client/issues/599 + # + # @param user_headers [Hash] User-provided headers to include + # @return [Hash] A hash of HTTP headers => values + # + # source://rest-client//lib/restclient/request.rb#388 + def make_headers(user_headers); end + + # Returns the value of attribute max_redirects. + # + # source://rest-client//lib/restclient/request.rb#54 + def max_redirects; end + + # Returns the value of attribute method. + # + # source://rest-client//lib/restclient/request.rb#54 + def method; end + + # source://rest-client//lib/restclient/request.rb#468 + def net_http_do_request(http, req, body = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/request.rb#448 + def net_http_object(hostname, port); end + + # source://rest-client//lib/restclient/request.rb#464 + def net_http_request_class(method); end + + # Normalize a URL by adding a protocol if none is present. + # + # If the string has no HTTP-like scheme (i.e. scheme followed by '//'), a + # scheme of 'http' will be added. This mimics the behavior of browsers and + # user agents like cURL. + # + # @param url [String] A URL string. + # @return [String] + # + # source://rest-client//lib/restclient/request.rb#487 + def normalize_url(url); end + + # Returns the value of attribute open_timeout. + # + # source://rest-client//lib/restclient/request.rb#54 + def open_timeout; end + + # Returns the value of attribute password. + # + # source://rest-client//lib/restclient/request.rb#54 + def password; end + + # Returns the value of attribute payload. + # + # source://rest-client//lib/restclient/request.rb#54 + def payload; end + + # Process cookies passed as hash or as HTTP::CookieJar. For backwards + # compatibility, these may be passed as a :cookies option masquerading + # inside the headers hash. To avoid confusion, if :cookies is passed in + # both headers and Request#initialize, raise an error. + # + # :cookies may be a: + # - Hash{String/Symbol => String} + # - Array + # - HTTP::CookieJar + # + # Passing as a hash: + # Keys may be symbols or strings. Values must be strings. + # Infer the domain name from the request URI and allow subdomains (as + # though '.example.com' had been set in a Set-Cookie header). Assume a + # path of '/'. + # + # RestClient::Request.new(url: 'http://example.com', method: :get, + # :cookies => {:foo => 'Value', 'bar' => '123'} + # ) + # + # results in cookies as though set from the server by: + # Set-Cookie: foo=Value; Domain=.example.com; Path=/ + # Set-Cookie: bar=123; Domain=.example.com; Path=/ + # + # which yields a client cookie header of: + # Cookie: foo=Value; bar=123 + # + # Passing as HTTP::CookieJar, which will be passed through directly: + # + # jar = HTTP::CookieJar.new + # jar.add(HTTP::Cookie.new('foo', 'Value', domain: 'example.com', + # path: '/', for_domain: false)) + # + # RestClient::Request.new(..., :cookies => jar) + # + # infer the domain name for cookies passed as strings in a hash. To avoid + # this implicit behavior, pass a full cookie jar or use HTTP::Cookie hash + # values. + # + # @param uri [URI::HTTP] The URI for the request. This will be used to + # @param headers [Hash] The headers hash from which to pull the :cookies + # option. MUTATION NOTE: This key will be deleted from the hash if + # present. + # @param args [Hash] The options passed to Request#initialize. This hash + # will be used as another potential source for the :cookies key. + # These args will not be mutated. + # @return [HTTP::CookieJar] A cookie jar containing the parsed cookies. + # + # source://rest-client//lib/restclient/request.rb#319 + def process_cookie_args!(uri, headers, args); end + + # Extract the query parameters and append them to the url + # + # Look through the headers hash for a :params option (case-insensitive, + # may be string or symbol). If present and the value is a Hash or + # RestClient::ParamsArray, *delete* the key/value pair from the headers + # hash and encode the value into a query string. Append this query string + # to the URL and return the resulting URL. + # + # @param url [String] + # @param headers [Hash] An options/headers hash to process. Mutation + # warning: the params key may be removed if present! + # @return [String] resulting url with query string + # + # source://rest-client//lib/restclient/request.rb#200 + def process_url_params(url, headers); end + + # Returns the value of attribute processed_headers. + # + # source://rest-client//lib/restclient/request.rb#54 + def processed_headers; end + + # Returns the value of attribute proxy. + # + # source://rest-client//lib/restclient/request.rb#54 + def proxy; end + + # The proxy URI for this request. If `:proxy` was provided on this request, + # use it over `RestClient.proxy`. + # + # Return false if a proxy was explicitly set and is falsy. + # + # @return [URI, false, nil] + # + # source://rest-client//lib/restclient/request.rb#430 + def proxy_uri; end + + # Returns the value of attribute raw_response. + # + # source://rest-client//lib/restclient/request.rb#54 + def raw_response; end + + # Returns the value of attribute read_timeout. + # + # source://rest-client//lib/restclient/request.rb#54 + def read_timeout; end + + # source://rest-client//lib/restclient/request.rb#521 + def redacted_uri; end + + # source://rest-client//lib/restclient/request.rb#531 + def redacted_url; end + + # An array of previous redirection responses + # + # source://rest-client//lib/restclient/request.rb#60 + def redirection_history; end + + # An array of previous redirection responses + # + # source://rest-client//lib/restclient/request.rb#60 + def redirection_history=(_arg0); end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_ca_file; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_ca_path; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_cert_store; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_ciphers; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_client_cert; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_client_key; end + + # Returns the value of attribute ssl_opts. + # + # source://rest-client//lib/restclient/request.rb#54 + def ssl_opts; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_verify_callback; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_verify_callback_warnings; end + + # source://rest-client//lib/restclient/request.rb#173 + def ssl_version; end + + # Return a hash of headers whose keys are capitalized strings + # + # BUG: stringify_headers does not fix the capitalization of headers that + # are already Strings. Leaving this behavior as is for now for + # backwards compatibility. + # https://github.com/rest-client/rest-client/issues/599 + # + # source://rest-client//lib/restclient/request.rb#558 + def stringify_headers(headers); end + + # Returns the value of attribute uri. + # + # source://rest-client//lib/restclient/request.rb#54 + def uri; end + + # Returns the value of attribute url. + # + # source://rest-client//lib/restclient/request.rb#54 + def url; end + + # Return true if the request URI will use HTTPS. + # + # @return [Boolean] + # + # source://rest-client//lib/restclient/request.rb#182 + def use_ssl?; end + + # Returns the value of attribute user. + # + # source://rest-client//lib/restclient/request.rb#54 + def user; end + + # SSL-related options + # + # source://rest-client//lib/restclient/request.rb#169 + def verify_ssl; end + + private + + # source://rest-client//lib/restclient/request.rb#788 + def fetch_body_to_tempfile(http_response); end + + # Given a MIME type or file extension, return either a MIME type or, if + # none is found, the input unchanged. + # + # >> maybe_convert_extension('json') + # => 'application/json' + # + # >> maybe_convert_extension('unknown') + # => 'unknown' + # + # >> maybe_convert_extension('application/xml') + # => 'application/xml' + # + # @param ext [String] + # @return [String] + # + # source://rest-client//lib/restclient/request.rb#861 + def maybe_convert_extension(ext); end + + # Parse a method and return a normalized string version. + # + # Raise ArgumentError if the method is falsy, but otherwise do no + # validation. + # + # @param method [String, Symbol] + # @raise [ArgumentError] + # @return [String] + # @see net_http_request_class + # + # source://rest-client//lib/restclient/request.rb#646 + def normalize_method(method); end + + # Parse the `@url` string into a URI object and save it as + # `@uri`. Also save any basic auth user or password as @user and @password. + # If no auth info was passed, check for credentials in a Netrc file. + # + # @param url [String] A URL string. + # @raise URI::InvalidURIError on invalid URIs + # @return [URI] + # + # source://rest-client//lib/restclient/request.rb#605 + def parse_url_with_auth!(url); end + + # source://rest-client//lib/restclient/request.rb#841 + def parser; end + + # source://rest-client//lib/restclient/request.rb#621 + def print_verify_callback_warnings; end + + # @param res The Net::HTTP response object + # @param start_time [Time] Time of request start + # + # source://rest-client//lib/restclient/request.rb#821 + def process_result(res, start_time, tempfile = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/request.rb#782 + def setup_credentials(req); end + + # source://rest-client//lib/restclient/request.rb#651 + def transmit(uri, req, payload, &block); end + + class << self + # Return a certificate store that can be used to validate certificates with + # the system certificate authorities. This will probably not do anything on + # OS X, which monkey patches OpenSSL in terrible ways to insert its own + # validation. On most *nix platforms, this will add the system certifcates + # using OpenSSL::X509::Store#set_default_paths. On Windows, this will use + # RestClient::Windows::RootCerts to look up the CAs trusted by the system. + # + # @return [OpenSSL::X509::Store] + # + # source://rest-client//lib/restclient/request.rb#501 + def default_ssl_cert_store; end + + # source://rest-client//lib/restclient/request.rb#62 + def execute(args, &block); end + end +end + +# source://rest-client//lib/restclient/request.rb#66 +RestClient::Request::SSLOptionList = T.let(T.unsafe(nil), Array) + +# source://rest-client//lib/restclient/exceptions.rb#189 +RestClient::RequestEntityTooLarge = RestClient::PayloadTooLarge + +# The request failed with an error code not managed by the code +# +# source://rest-client//lib/restclient/exceptions.rb#155 +class RestClient::RequestFailed < ::RestClient::ExceptionWithResponse + # source://rest-client//lib/restclient/exceptions.rb#157 + def default_message; end + + # source://rest-client//lib/restclient/exceptions.rb#161 + def to_s; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::RequestHeaderFieldsTooLarge < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::RequestTimeout < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#189 +RestClient::RequestURITooLong = RestClient::URITooLong + +# source://rest-client//lib/restclient/exceptions.rb#189 +RestClient::RequestedRangeNotSatisfiable = RestClient::RangeNotSatisfiable + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::ResetContent < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# A class that can be instantiated for access to a RESTful resource, +# including authentication. +# +# Example: +# +# resource = RestClient::Resource.new('http://some/resource') +# jpg = resource.get(:accept => 'image/jpg') +# +# With HTTP basic authentication: +# +# resource = RestClient::Resource.new('http://protected/resource', :user => 'user', :password => 'password') +# resource.delete +# +# With a timeout (seconds): +# +# RestClient::Resource.new('http://slow', :read_timeout => 10) +# +# With an open timeout (seconds): +# +# RestClient::Resource.new('http://behindfirewall', :open_timeout => 10) +# +# You can also use resources to share common headers. For headers keys, +# symbols are converted to strings. Example: +# +# resource = RestClient::Resource.new('http://some/resource', :headers => { :client_version => 1 }) +# +# This header will be transported as X-Client-Version (notice the X prefix, +# capitalization and hyphens) +# +# Use the [] syntax to allocate subresources: +# +# site = RestClient::Resource.new('http://example.com', :user => 'adam', :password => 'mypasswd') +# site['posts/1/comments'].post 'Good article.', :content_type => 'text/plain' +# +# source://rest-client//lib/restclient/resource.rb#36 +class RestClient::Resource + # @return [Resource] a new instance of Resource + # + # source://rest-client//lib/restclient/resource.rb#39 + def initialize(url, options = T.unsafe(nil), backwards_compatibility = T.unsafe(nil), &block); end + + # Construct a subresource, preserving authentication. + # + # Example: + # + # site = RestClient::Resource.new('http://example.com', 'adam', 'mypasswd') + # site['posts/1/comments'].post 'Good article.', :content_type => 'text/plain' + # + # This is especially useful if you wish to define your site in one place and + # call it in multiple locations: + # + # def orders + # RestClient::Resource.new('http://example.com/orders', 'admin', 'mypasswd') + # end + # + # orders.get # GET http://example.com/orders + # orders['1'].get # GET http://example.com/orders/1 + # orders['1/items'].delete # DELETE http://example.com/orders/1/items + # + # Nest resources as far as you want: + # + # site = RestClient::Resource.new('http://example.com') + # posts = site['posts'] + # first_post = posts['1'] + # comments = first_post['comments'] + # comments.post 'Hello', :content_type => 'text/plain' + # + # source://rest-client//lib/restclient/resource.rb#160 + def [](suburl, &new_block); end + + # Returns the value of attribute block. + # + # source://rest-client//lib/restclient/resource.rb#37 + def block; end + + # source://rest-client//lib/restclient/resource.rb#168 + def concat_urls(url, suburl); end + + # source://rest-client//lib/restclient/resource.rb#97 + def delete(additional_headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/resource.rb#49 + def get(additional_headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/resource.rb#58 + def head(additional_headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/resource.rb#118 + def headers; end + + # source://rest-client//lib/restclient/resource.rb#130 + def log; end + + # source://rest-client//lib/restclient/resource.rb#126 + def open_timeout; end + + # Returns the value of attribute options. + # + # source://rest-client//lib/restclient/resource.rb#37 + def options; end + + # source://rest-client//lib/restclient/resource.rb#114 + def password; end + + # source://rest-client//lib/restclient/resource.rb#87 + def patch(payload, additional_headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/resource.rb#67 + def post(payload, additional_headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/resource.rb#77 + def put(payload, additional_headers = T.unsafe(nil), &block); end + + # source://rest-client//lib/restclient/resource.rb#122 + def read_timeout; end + + # source://rest-client//lib/restclient/resource.rb#106 + def to_s; end + + # Returns the value of attribute url. + # + # source://rest-client//lib/restclient/resource.rb#37 + def url; end + + # source://rest-client//lib/restclient/resource.rb#110 + def user; end +end + +# source://rest-client//lib/restclient/exceptions.rb#189 +RestClient::ResourceNotFound = RestClient::NotFound + +# A Response from RestClient, you can access the response body, the code or the headers. +# +# source://rest-client//lib/restclient/response.rb#5 +class RestClient::Response < ::String + include ::RestClient::AbstractResponse + + # Return the HTTP response body. + # + # Future versions of RestClient will deprecate treating response objects + # directly as strings, so it will be necessary to call `.body`. + # + # @return [String] + # + # source://rest-client//lib/restclient/response.rb#16 + def body; end + + # source://rest-client//lib/restclient/response.rb#37 + def inspect; end + + # Convert the HTTP response body to a pure String object. + # + # @return [String] + # + # source://rest-client//lib/restclient/response.rb#26 + def to_s; end + + # Convert the HTTP response body to a pure String object. + # + # @return [String] + # + # source://rest-client//lib/restclient/response.rb#33 + def to_str; end + + private + + # source://rest-client//lib/restclient/response.rb#81 + def body_truncated(length); end + + class << self + # Initialize a Response object. Because RestClient::Response is + # (unfortunately) a subclass of String for historical reasons, + # Response.create is the preferred initializer. + # + # @param body [String, nil] The response body from the Net::HTTPResponse + # @param net_http_res [Net::HTTPResponse] + # @param request [RestClient::Request] + # @param start_time [Time] + # + # source://rest-client//lib/restclient/response.rb#49 + def create(body, net_http_res, request, start_time = T.unsafe(nil)); end + + # Set the String encoding according to the 'Content-Type: charset' header, + # if possible. + # + # source://rest-client//lib/restclient/response.rb#60 + def fix_encoding(response); end + end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::RetryWith < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#238 +class RestClient::SSLCertificateNotVerified < ::RestClient::Exception + # @return [SSLCertificateNotVerified] a new instance of SSLCertificateNotVerified + # + # source://rest-client//lib/restclient/exceptions.rb#239 + def initialize(message = T.unsafe(nil)); end +end + +# Hash of HTTP status code => message. +# +# 1xx: Informational - Request received, continuing process +# 2xx: Success - The action was successfully received, understood, and +# accepted +# 3xx: Redirection - Further action must be taken in order to complete the +# request +# 4xx: Client Error - The request contains bad syntax or cannot be fulfilled +# 5xx: Server Error - The server failed to fulfill an apparently valid +# request +# +# @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml +# +# source://rest-client//lib/restclient/exceptions.rb#17 +RestClient::STATUSES = T.let(T.unsafe(nil), Hash) + +# source://rest-client//lib/restclient/exceptions.rb#87 +RestClient::STATUSES_COMPATIBILITY = T.let(T.unsafe(nil), Hash) + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::SeeOther < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# The server broke the connection prior to the request completing. Usually +# this means it crashed, or sometimes that your network connection was +# severed before it could complete. +# +# source://rest-client//lib/restclient/exceptions.rb#231 +class RestClient::ServerBrokeConnection < ::RestClient::Exception + # @return [ServerBrokeConnection] a new instance of ServerBrokeConnection + # + # source://rest-client//lib/restclient/exceptions.rb#232 + def initialize(message = T.unsafe(nil)); end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::ServiceUnavailable < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::SwitchProxy < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::SwitchingProtocols < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::TemporaryRedirect < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::TooManyConnectionsFromThisIP < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::TooManyRequests < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::URITooLong < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::Unauthorized < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::UnorderedCollection < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::UnprocessableEntity < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::UnsupportedMediaType < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::UpgradeRequired < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::UseProxy < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# Various utility methods +# +# source://rest-client//lib/restclient/utils.rb#5 +module RestClient::Utils + class << self + # Parse semi-colon separated, potentially quoted header string iteratively. + # + # @deprecated This method is deprecated and only exists to support Ruby + # 2.0, which is not supported by HTTP::Accept. + # @private + # @todo remove this method when dropping support for Ruby 2.0 + # + # source://rest-client//lib/restclient/utils.rb#75 + def _cgi_parseparam(s); end + + # Parse a Content-Type like header. + # + # Return the main content-type and a hash of params. + # + # @param line [String] + # @return [Array(String, Hash)] + # + # source://rest-client//lib/restclient/utils.rb#56 + def cgi_parse_header(line); end + + # Parse a Content-Type like header. + # + # Return the main content-type and a hash of options. + # + # This method was ported directly from Python's cgi.parse_header(). It + # probably doesn't read or perform particularly well in ruby. + # https://github.com/python/cpython/blob/3.4/Lib/cgi.py#L301-L331 + # + # @deprecated This method is deprecated and only exists to support Ruby + # 2.0, which is not supported by HTTP::Accept. + # @param line [String] + # @return [Array(String, Hash)] + # @todo remove this method when dropping support for Ruby 2.0 + # + # source://rest-client//lib/restclient/utils.rb#112 + def deprecated_cgi_parse_header(line); end + + # Serialize a ruby object into HTTP query string parameters. + # + # There is no standard for doing this, so we choose our own slightly + # idiosyncratic format. The output closely matches the format understood by + # Rails, Rack, and PHP. + # + # If you don't want handling of complex objects and only want to handle + # simple flat hashes, you may want to use `URI.encode_www_form` instead, + # which implements HTML5-compliant URL encoded form data. + # + # Notable differences from the ActiveSupport implementation: + # + # - Empty hash and empty array are treated the same as nil instead of being + # omitted entirely from the output. Rather than disappearing, they will + # appear to be nil instead. + # + # It's most common to pass a Hash as the object to serialize, but you can + # also use a ParamsArray if you want to be able to pass the same key with + # multiple values and not use the rack/rails array convention. + # + # @example Simple hashes + # >> encode_query_string({foo: 123, bar: 456}) + # => 'foo=123&bar=456' + # @example Simple arrays + # >> encode_query_string({foo: [1,2,3]}) + # => 'foo[]=1&foo[]=2&foo[]=3' + # @example Nested hashes + # >> encode_query_string({outer: {foo: 123, bar: 456}}) + # => 'outer[foo]=123&outer[bar]=456' + # @example Deeply nesting + # >> encode_query_string({coords: [{x: 1, y: 0}, {x: 2}, {x: 3}]}) + # => 'coords[][x]=1&coords[][y]=0&coords[][x]=2&coords[][x]=3' + # @example Null and empty values + # >> encode_query_string({string: '', empty: nil, list: [], hash: {}}) + # => 'string=&empty&list&hash' + # @example Nested nulls + # >> encode_query_string({foo: {string: '', empty: nil}}) + # => 'foo[string]=&foo[empty]' + # @example Multiple fields with the same name using ParamsArray + # >> encode_query_string(RestClient::ParamsArray.new([[:foo, 1], [:foo, 2], [:foo, 3]])) + # => 'foo=1&foo=2&foo=3' + # @example Nested ParamsArray + # >> encode_query_string({foo: RestClient::ParamsArray.new([[:a, 1], [:a, 2]])}) + # => 'foo[a]=1&foo[a]=2' + # + # >> encode_query_string(RestClient::ParamsArray.new([[:foo, {a: 1}], [:foo, {a: 2}]])) + # => 'foo[a]=1&foo[a]=2' + # @param object [Hash, ParamsArray] The object to serialize + # @return [String] A string appropriate for use as an HTTP query string + # @see {flatten_params} + # @see URI.encode_www_form + # @see See also Object#to_query in ActiveSupport + # @see http://php.net/manual/en/function.http-build-query.php http_build_query in PHP + # @see See also Rack::Utils.build_nested_query in Rack + # @since 2.0.0 + # + # source://rest-client//lib/restclient/utils.rb#206 + def encode_query_string(object); end + + # Encode string for safe transport by URI or form encoding. This uses a CGI + # style escape, which transforms ` ` into `+` and various special + # characters into percent encoded forms. + # + # This calls URI.encode_www_form_component for the implementation. The only + # difference between this and CGI.escape is that it does not escape `*`. + # http://stackoverflow.com/questions/25085992/ + # + # @see URI.encode_www_form_component + # + # source://rest-client//lib/restclient/utils.rb#270 + def escape(string); end + + # Transform deeply nested param containers into a flat array of [key, + # value] pairs. + # + # @example + # >> flatten_params({key1: {key2: 123}}) + # => [["key1[key2]", 123]] + # @example + # >> flatten_params({key1: {key2: 123, arr: [1,2,3]}}) + # => [["key1[key2]", 123], ["key1[arr][]", 1], ["key1[arr][]", 2], ["key1[arr][]", 3]] + # @param object [Hash, ParamsArray] The container to flatten + # @param uri_escape [Boolean] Whether to URI escape keys and values + # @param parent_key [String] Should not be passed (used for recursion) + # + # source://rest-client//lib/restclient/utils.rb#225 + def flatten_params(object, uri_escape = T.unsafe(nil), parent_key = T.unsafe(nil)); end + + # Return encoding from an HTTP header hash. + # + # We use the RFC 7231 specification and do not impose a default encoding on + # text. This differs from the older RFC 2616 behavior, which specifies + # using ISO-8859-1 for text/* content types without a charset. + # + # Strings will use the default encoding when this method returns nil. This + # default is likely to be UTF-8 for Ruby >= 2.0 + # + # @example + # >> get_encoding_from_headers({:content_type => 'text/plain; charset=UTF-8'}) + # => "UTF-8" + # @param headers [Hash] + # @return [String, nil] Return the string encoding or nil if no header is + # found. + # + # source://rest-client//lib/restclient/utils.rb#25 + def get_encoding_from_headers(headers); end + end +end + +# source://rest-client//lib/restclient/version.rb#3 +RestClient::VERSION = T.let(T.unsafe(nil), String) + +# source://rest-client//lib/restclient/version.rb#2 +RestClient::VERSION_INFO = T.let(T.unsafe(nil), Array) + +# source://rest-client//lib/restclient/exceptions.rb#178 +class RestClient::VariantAlsoNegotiates < ::RestClient::RequestFailed + # source://rest-client//lib/restclient/exceptions.rb#179 + def default_message; end +end + +# source://rest-client//lib/restclient/windows.rb#2 +module RestClient::Windows; end diff --git a/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi b/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi new file mode 100644 index 0000000000..9f78a3eab7 --- /dev/null +++ b/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi @@ -0,0 +1,389 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reverse_markdown` gem. +# Please instead update this file by running `bin/tapioca gem reverse_markdown`. + +# source://reverse_markdown//lib/reverse_markdown/version.rb#1 +module ReverseMarkdown + class << self + # source://reverse_markdown//lib/reverse_markdown.rb#60 + def cleaner; end + + # @yield [@config] + # + # source://reverse_markdown//lib/reverse_markdown.rb#54 + def config; end + + # source://reverse_markdown//lib/reverse_markdown.rb#37 + def convert(input, options = T.unsafe(nil)); end + end +end + +# source://reverse_markdown//lib/reverse_markdown/cleaner.rb#2 +class ReverseMarkdown::Cleaner + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#58 + def clean_punctuation_characters(string); end + + # Find non-asterisk content that is enclosed by two or + # more asterisks. Ensure that only one whitespace occurs + # in the border area. + # Same for underscores and brackets. + # + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#32 + def clean_tag_borders(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#62 + def force_encoding(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#20 + def remove_inner_whitespaces(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#16 + def remove_leading_newlines(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#12 + def remove_newlines(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#4 + def tidy(string); end + + private + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#81 + def present_or_default(string, default); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#69 + def preserve_border_whitespaces(string, options = T.unsafe(nil), &block); end +end + +# source://reverse_markdown//lib/reverse_markdown/config.rb#2 +class ReverseMarkdown::Config + # @return [Config] a new instance of Config + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#5 + def initialize; end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#34 + def force_encoding; end + + # Sets the attribute force_encoding + # + # @param value the value to set the attribute force_encoding to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def force_encoding=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#26 + def github_flavored; end + + # Sets the attribute github_flavored + # + # @param value the value to set the attribute github_flavored to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def github_flavored=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#30 + def tag_border; end + + # Sets the attribute tag_border + # + # @param value the value to set the attribute tag_border to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def tag_border=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#22 + def unknown_tags; end + + # Sets the attribute unknown_tags + # + # @param value the value to set the attribute unknown_tags to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def unknown_tags=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#15 + def with(options = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters.rb#2 +module ReverseMarkdown::Converters + class << self + # source://reverse_markdown//lib/reverse_markdown/converters.rb#18 + def default_converter(tag_name); end + + # source://reverse_markdown//lib/reverse_markdown/converters.rb#12 + def lookup(tag_name); end + + # source://reverse_markdown//lib/reverse_markdown/converters.rb#3 + def register(tag_name, converter); end + + # source://reverse_markdown//lib/reverse_markdown/converters.rb#8 + def unregister(tag_name); end + end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/a.rb#3 +class ReverseMarkdown::Converters::A < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/a.rb#4 + def convert(node, state = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/a.rb#20 + def prepend_space?(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/base.rb#3 +class ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#14 + def escape_keychars(string); end + + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#18 + def extract_title(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#10 + def treat(node, state); end + + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#4 + def treat_children(node, state); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/blockquote.rb#3 +class ReverseMarkdown::Converters::Blockquote < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/blockquote.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/br.rb#3 +class ReverseMarkdown::Converters::Br < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/br.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/bypass.rb#3 +class ReverseMarkdown::Converters::Bypass < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/bypass.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/code.rb#3 +class ReverseMarkdown::Converters::Code < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/code.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/del.rb#3 +class ReverseMarkdown::Converters::Del < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/del.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/del.rb#17 + def disabled?; end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/del.rb#13 + def enabled?; end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/details.rb#3 +class ReverseMarkdown::Converters::Details < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/details.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/details.rb#17 + def disabled?; end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/details.rb#13 + def enabled?; end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/div.rb#3 +class ReverseMarkdown::Converters::Div < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/div.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/drop.rb#3 +class ReverseMarkdown::Converters::Drop < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/drop.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/em.rb#3 +class ReverseMarkdown::Converters::Em < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/em.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/figcaption.rb#3 +class ReverseMarkdown::Converters::FigCaption < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/figcaption.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/figure.rb#3 +class ReverseMarkdown::Converters::Figure < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/figure.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/h.rb#3 +class ReverseMarkdown::Converters::H < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/h.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/hr.rb#3 +class ReverseMarkdown::Converters::Hr < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/hr.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/ignore.rb#3 +class ReverseMarkdown::Converters::Ignore < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/ignore.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/img.rb#3 +class ReverseMarkdown::Converters::Img < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/img.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/li.rb#3 +class ReverseMarkdown::Converters::Li < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/li.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # source://reverse_markdown//lib/reverse_markdown/converters/li.rb#24 + def indentation_from(state); end + + # source://reverse_markdown//lib/reverse_markdown/converters/li.rb#15 + def prefix_for(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/ol.rb#3 +class ReverseMarkdown::Converters::Ol < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/ol.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/p.rb#3 +class ReverseMarkdown::Converters::P < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/p.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/pass_through.rb#3 +class ReverseMarkdown::Converters::PassThrough < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/pass_through.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#3 +class ReverseMarkdown::Converters::Pre < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#4 + def convert(node, state = T.unsafe(nil)); end + + private + + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#27 + def language(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#36 + def language_from_confluence_class(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#32 + def language_from_highlight_class(node); end + + # Override #treat as proposed in https://github.com/xijo/reverse_markdown/pull/69 + # + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#16 + def treat(node, state); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/strong.rb#3 +class ReverseMarkdown::Converters::Strong < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/strong.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/table.rb#3 +class ReverseMarkdown::Converters::Table < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/table.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/td.rb#3 +class ReverseMarkdown::Converters::Td < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/td.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/text.rb#3 +class ReverseMarkdown::Converters::Text < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#4 + def convert(node, options = T.unsafe(nil)); end + + private + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#54 + def preserve_keychars_within_backticks(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#38 + def preserve_nbsp(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#42 + def preserve_tags(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#46 + def remove_border_newlines(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#50 + def remove_inner_newlines(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#14 + def treat_empty(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#25 + def treat_text(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#3 +class ReverseMarkdown::Converters::Tr < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#10 + def table_header_row?(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#14 + def underline_for(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/errors.rb#2 +class ReverseMarkdown::Error < ::StandardError; end + +# source://reverse_markdown//lib/reverse_markdown/errors.rb#8 +class ReverseMarkdown::InvalidConfigurationError < ::ReverseMarkdown::Error; end + +# source://reverse_markdown//lib/reverse_markdown/errors.rb#5 +class ReverseMarkdown::UnknownTagError < ::ReverseMarkdown::Error; end + +# source://reverse_markdown//lib/reverse_markdown/version.rb#2 +ReverseMarkdown::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rexml@3.2.6.rbi b/sorbet/rbi/gems/rexml@3.2.6.rbi new file mode 100644 index 0000000000..364c0757ea --- /dev/null +++ b/sorbet/rbi/gems/rexml@3.2.6.rbi @@ -0,0 +1,4887 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rexml` gem. +# Please instead update this file by running `bin/tapioca gem rexml`. + +# This class needs: +# * Documentation +# * Work! Not all types of attlists are intelligently parsed, so we just +# spew back out what we get in. This works, but it would be better if +# we formatted the output ourselves. +# +# AttlistDecls provide *just* enough support to allow namespace +# declarations. If you need some sort of generalized support, or have an +# interesting idea about how to map the hideous, terrible design of DTD +# AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate +# for anything to make DTDs more palateable. +# +# source://rexml//lib/rexml/attlistdecl.rb#18 +class REXML::AttlistDecl < ::REXML::Child + include ::Enumerable + + # Create an AttlistDecl, pulling the information from a Source. Notice + # that this isn't very convenient; to create an AttlistDecl, you basically + # have to format it yourself, and then have the initializer parse it. + # Sorry, but for the foreseeable future, DTD support in REXML is pretty + # weak on convenience. Have I mentioned how much I hate DTDs? + # + # @return [AttlistDecl] a new instance of AttlistDecl + # + # source://rexml//lib/rexml/attlistdecl.rb#29 + def initialize(source); end + + # Access the attlist attribute/value pairs. + # value = attlist_decl[ attribute_name ] + # + # source://rexml//lib/rexml/attlistdecl.rb#38 + def [](key); end + + # Iterate over the key/value pairs: + # attlist_decl.each { |attribute_name, attribute_value| ... } + # + # source://rexml//lib/rexml/attlistdecl.rb#50 + def each(&block); end + + # What is this? Got me. + # + # source://rexml//lib/rexml/attlistdecl.rb#22 + def element_name; end + + # Whether an attlist declaration includes the given attribute definition + # if attlist_decl.include? "xmlns:foobar" + # + # @return [Boolean] + # + # source://rexml//lib/rexml/attlistdecl.rb#44 + def include?(key); end + + # source://rexml//lib/rexml/attlistdecl.rb#59 + def node_type; end + + # Write out exactly what we got in. + # + # source://rexml//lib/rexml/attlistdecl.rb#55 + def write(out, indent = T.unsafe(nil)); end +end + +# Defines an Element Attribute; IE, a attribute=value pair, as in: +# . Attributes can be in their own +# namespaces. General users of REXML will not interact with the +# Attribute class much. +# +# source://rexml//lib/rexml/attribute.rb#10 +class REXML::Attribute + include ::REXML::Node + include ::REXML::XMLTokens + include ::REXML::Namespace + + # Constructor. + # FIXME: The parser doesn't catch illegal characters in attributes + # + # first:: + # Either: an Attribute, which this new attribute will become a + # clone of; or a String, which is the name of this attribute + # second:: + # If +first+ is an Attribute, then this may be an Element, or nil. + # If nil, then the Element parent of this attribute is the parent + # of the +first+ Attribute. If the first argument is a String, + # then this must also be a String, and is the content of the attribute. + # If this is the content, it must be fully normalized (contain no + # illegal characters). + # parent:: + # Ignored unless +first+ is a String; otherwise, may be the Element + # parent of this attribute, or nil. + # + # + # Attribute.new( attribute_to_clone ) + # Attribute.new( attribute_to_clone, parent_element ) + # Attribute.new( "attr", "attr_value" ) + # Attribute.new( "attr", "attr_value", parent_element ) + # + # @return [Attribute] a new instance of Attribute + # + # source://rexml//lib/rexml/attribute.rb#42 + def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end + + # Returns true if other is an Attribute and has the same name and value, + # false otherwise. + # + # source://rexml//lib/rexml/attribute.rb#106 + def ==(other); end + + # Returns a copy of this attribute + # + # source://rexml//lib/rexml/attribute.rb#163 + def clone; end + + # source://rexml//lib/rexml/attribute.rb#132 + def doctype; end + + # The element to which this attribute belongs + # + # source://rexml//lib/rexml/attribute.rb#15 + def element; end + + # Sets the element of which this object is an attribute. Normally, this + # is not directly called. + # + # Returns this attribute + # + # source://rexml//lib/rexml/attribute.rb#171 + def element=(element); end + + # Creates (and returns) a hash from both the name and value + # + # source://rexml//lib/rexml/attribute.rb#111 + def hash; end + + # source://rexml//lib/rexml/attribute.rb#197 + def inspect; end + + # Returns the namespace URL, if defined, or nil otherwise + # + # e = Element.new("el") + # e.add_namespace("ns", "http://url") + # e.add_attribute("ns:a", "b") + # e.add_attribute("nsx:a", "c") + # e.attribute("ns:a").namespace # => "http://url" + # e.attribute("nsx:a").namespace # => nil + # + # This method always returns "" for no namespace attribute. Because + # the default namespace doesn't apply to attribute names. + # + # From https://www.w3.org/TR/xml-names/#uniqAttrs + # + # > the default namespace does not apply to attribute names + # + # e = REXML::Element.new("el") + # e.add_namespace("", "http://example.com/") + # e.namespace # => "http://example.com/" + # e.add_attribute("a", "b") + # e.attribute("a").namespace # => "" + # + # source://rexml//lib/rexml/attribute.rb#95 + def namespace(arg = T.unsafe(nil)); end + + # source://rexml//lib/rexml/attribute.rb#193 + def node_type; end + + # The normalized value of this attribute. That is, the attribute with + # entities intact. + # + # source://rexml//lib/rexml/attribute.rb#157 + def normalized=(new_normalized); end + + # Returns the namespace of the attribute. + # + # e = Element.new( "elns:myelement" ) + # e.add_attribute( "nsa:a", "aval" ) + # e.add_attribute( "b", "bval" ) + # e.attributes.get_attribute( "a" ).prefix # -> "nsa" + # e.attributes.get_attribute( "b" ).prefix # -> "" + # a = Attribute.new( "x", "y" ) + # a.prefix # -> "" + # + # source://rexml//lib/rexml/attribute.rb#70 + def prefix; end + + # Removes this Attribute from the tree, and returns true if successful + # + # This method is usually not called directly. + # + # source://rexml//lib/rexml/attribute.rb#184 + def remove; end + + # Returns the attribute value, with entities replaced + # + # source://rexml//lib/rexml/attribute.rb#140 + def to_s; end + + # Returns this attribute out as XML source, expanding the name + # + # a = Attribute.new( "x", "y" ) + # a.to_string # -> "x='y'" + # b = Attribute.new( "ns:x", "y" ) + # b.to_string # -> "ns:x='y'" + # + # source://rexml//lib/rexml/attribute.rb#121 + def to_string; end + + # Returns the UNNORMALIZED value of this attribute. That is, entities + # have been expanded to their values + # + # source://rexml//lib/rexml/attribute.rb#149 + def value; end + + # Writes this attribute (EG, puts 'key="value"' to the output) + # + # source://rexml//lib/rexml/attribute.rb#189 + def write(output, indent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/attribute.rb#203 + def xpath; end +end + +# A class that defines the set of Attributes of an Element and provides +# operations for accessing elements in that set. +# +# source://rexml//lib/rexml/element.rb#2141 +class REXML::Attributes < ::Hash + # :call-seq: + # new(element) + # + # Creates and returns a new \REXML::Attributes object. + # The element given by argument +element+ is stored, + # but its own attributes are not modified: + # + # ele = REXML::Element.new('foo') + # attrs = REXML::Attributes.new(ele) + # attrs.object_id == ele.attributes.object_id # => false + # + # Other instance methods in class \REXML::Attributes may refer to: + # + # - +element.document+. + # - +element.prefix+. + # - +element.expanded_name+. + # + # @return [Attributes] a new instance of Attributes + # + # source://rexml//lib/rexml/element.rb#2160 + def initialize(element); end + + # :call-seq: + # add(attribute) -> attribute + # + # Adds attribute +attribute+, replacing the previous + # attribute of the same name if it exists; + # returns +attribute+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # =>
+ # attrs = ele.attributes + # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} + # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' + # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' + # attrs.include?('baz') # => true + # + # source://rexml//lib/rexml/element.rb#2537 + def <<(attribute); end + + # :call-seq: + # [name] -> attribute_value or nil + # + # Returns the value for the attribute given by +name+, + # if it exists; otherwise +nil+. + # The value returned is the unnormalized attribute value, + # with entities expanded: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.elements['//ele'] # => + # ele.attributes['att'] # => "<" + # ele.attributes['bar:att'] # => "2" + # ele.attributes['nosuch'] # => nil + # + # Related: get_attribute (returns an \Attribute object). + # + # source://rexml//lib/rexml/element.rb#2185 + def [](name); end + + # :call-seq: + # [name] = value -> value + # + # When +value+ is non-+nil+, + # assigns that to the attribute for the given +name+, + # overwriting the previous value if it exists: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs['foo:att'] = '2' # => "2" + # attrs['baz:att'] = '3' # => "3" + # + # When +value+ is +nil+, deletes the attribute if it exists: + # + # attrs['baz:att'] = nil + # attrs.include?('baz:att') # => false + # + # source://rexml//lib/rexml/element.rb#2369 + def []=(name, value); end + + # :call-seq: + # add(attribute) -> attribute + # + # Adds attribute +attribute+, replacing the previous + # attribute of the same name if it exists; + # returns +attribute+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} + # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' + # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' + # attrs.include?('baz') # => true + # + # source://rexml//lib/rexml/element.rb#2537 + def add(attribute); end + + # :call-seq: + # delete(name) -> element + # delete(attribute) -> element + # + # Removes a specified attribute if it exists; + # returns the attributes' element. + # + # When string argument +name+ is given, + # removes the attribute of that name if it exists: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.delete('foo:att') # => + # attrs.delete('foo:att') # => + # + # When attribute argument +attribute+ is given, + # removes that attribute if it exists: + # + # attr = REXML::Attribute.new('bar:att', '2') + # attrs.delete(attr) # => # => + # attrs.delete(attr) # => # => + # + # source://rexml//lib/rexml/element.rb#2490 + def delete(attribute); end + + # :call-seq: + # delete_all(name) -> array_of_removed_attributes + # + # Removes all attributes matching the given +name+; + # returns an array of the removed attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.delete_all('att') # => [att='<'] + # + # source://rexml//lib/rexml/element.rb#2559 + def delete_all(name); end + + # :call-seq: + # each {|expanded_name, value| ... } + # + # Calls the given block with each expanded-name/value pair: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.each do |expanded_name, value| + # p [expanded_name, value] + # end + # + # Output: + # + # ["foo:att", "1"] + # ["bar:att", "2"] + # ["att", "<"] + # + # source://rexml//lib/rexml/element.rb#2287 + def each; end + + # :call-seq: + # each_attribute {|attr| ... } + # + # Calls the given block with each \REXML::Attribute object: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.each_attribute do |attr| + # p [attr.class, attr] + # end + # + # Output: + # + # [REXML::Attribute, foo:att='1'] + # [REXML::Attribute, bar:att='2'] + # [REXML::Attribute, att='<'] + # + # source://rexml//lib/rexml/element.rb#2254 + def each_attribute; end + + # :call-seq: + # get_attribute(name) -> attribute_object or nil + # + # Returns the \REXML::Attribute object for the given +name+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.get_attribute('foo:att') # => foo:att='1' + # attrs.get_attribute('foo:att').class # => REXML::Attribute + # attrs.get_attribute('bar:att') # => bar:att='2' + # attrs.get_attribute('att') # => att='<' + # attrs.get_attribute('nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#2313 + def get_attribute(name); end + + # :call-seq: + # get_attribute_ns(namespace, name) + # + # Returns the \REXML::Attribute object among the attributes + # that matches the given +namespace+ and +name+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' + # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#2585 + def get_attribute_ns(namespace, name); end + + # :call-seq: + # length + # + # Returns the count of attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.length # => 3 + # + # source://rexml//lib/rexml/element.rb#2225 + def length; end + + # :call-seq: + # namespaces + # + # Returns a hash of name/value pairs for the namespaces: + # + # xml_string = '' + # d = REXML::Document.new(xml_string) + # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} + # + # source://rexml//lib/rexml/element.rb#2446 + def namespaces; end + + # :call-seq: + # prefixes -> array_of_prefix_strings + # + # Returns an array of prefix strings in the attributes. + # The array does not include the default + # namespace declaration, if one exists. + # + # xml_string = '' + # d = REXML::Document.new(xml_string) + # d.root.attributes.prefixes # => ["x", "y"] + # + # source://rexml//lib/rexml/element.rb#2421 + def prefixes; end + + # :call-seq: + # length + # + # Returns the count of attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.length # => 3 + # + # source://rexml//lib/rexml/element.rb#2225 + def size; end + + # :call-seq: + # to_a -> array_of_attribute_objects + # + # Returns an array of \REXML::Attribute objects representing + # the attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] + # attrs.first.class # => REXML::Attribute + # + # source://rexml//lib/rexml/element.rb#2207 + def to_a; end +end + +# source://rexml//lib/rexml/cdata.rb#5 +class REXML::CData < ::REXML::Text + # Constructor. CData is data between + # + # _Examples_ + # CData.new( source ) + # CData.new( "Here is some CDATA" ) + # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) + # + # @return [CData] a new instance of CData + # + # source://rexml//lib/rexml/cdata.rb#16 + def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end + + # Make a copy of this object + # + # _Examples_ + # c = CData.new( "Some text" ) + # d = c.clone + # d.to_s # -> "Some text" + # + # source://rexml//lib/rexml/cdata.rb#26 + def clone; end + + # Returns the content of this CData object + # + # _Examples_ + # c = CData.new( "Some text" ) + # c.to_s # -> "Some text" + # + # source://rexml//lib/rexml/cdata.rb#35 + def to_s; end + + # source://rexml//lib/rexml/cdata.rb#39 + def value; end + + # == DEPRECATED + # See the rexml/formatters package + # + # Generates XML output of this object + # + # output:: + # Where to write the string. Defaults to $stdout + # indent:: + # The amount to indent this node by + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # _Examples_ + # c = CData.new( " Some text " ) + # c.write( $stdout ) #-> + # + # source://rexml//lib/rexml/cdata.rb#60 + def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# A Child object is something contained by a parent, and this class +# contains methods to support that. Most user code will not use this +# class directly. +# +# source://rexml//lib/rexml/child.rb#9 +class REXML::Child + include ::REXML::Node + + # Constructor. Any inheritors of this class should call super to make + # sure this method is called. + # parent:: + # if supplied, the parent of this child will be set to the + # supplied value, and self will be added to the parent + # + # @return [Child] a new instance of Child + # + # source://rexml//lib/rexml/child.rb#18 + def initialize(parent = T.unsafe(nil)); end + + # This doesn't yet handle encodings + # + # source://rexml//lib/rexml/child.rb#91 + def bytes; end + + # Returns:: the document this child belongs to, or nil if this child + # belongs to no document + # + # source://rexml//lib/rexml/child.rb#85 + def document; end + + # source://rexml//lib/rexml/node.rb#11 + def next_sibling; end + + # Sets the next sibling of this child. This can be used to insert a child + # after some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.next_sibling = c + # # => + # + # source://rexml//lib/rexml/child.rb#68 + def next_sibling=(other); end + + # The Parent of this object + # + # source://rexml//lib/rexml/child.rb#11 + def parent; end + + # Sets the parent of this child to the supplied argument. + # + # other:: + # Must be a Parent object. If this object is the same object as the + # existing parent of this child, no action is taken. Otherwise, this + # child is removed from the current parent (if one exists), and is added + # to the new parent. + # Returns:: The parent added + # + # source://rexml//lib/rexml/child.rb#52 + def parent=(other); end + + # source://rexml//lib/rexml/node.rb#17 + def previous_sibling; end + + # Sets the previous sibling of this child. This can be used to insert a + # child before some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.previous_sibling = c + # # => + # + # source://rexml//lib/rexml/child.rb#79 + def previous_sibling=(other); end + + # Removes this child from the parent. + # + # Returns:: self + # + # source://rexml//lib/rexml/child.rb#37 + def remove; end + + # Replaces this object with another object. Basically, calls + # Parent.replace_child + # + # Returns:: self + # + # source://rexml//lib/rexml/child.rb#29 + def replace_with(child); end +end + +# Represents an XML comment; that is, text between \ +# +# source://rexml//lib/rexml/comment.rb#7 +class REXML::Comment < ::REXML::Child + include ::Comparable + + # Constructor. The first argument can be one of three types: + # argument. If Comment, the argument is duplicated. If + # Source, the argument is scanned for a comment. + # should be nil, not supplied, or a Parent to be set as the parent + # of this object + # + # @param first If String, the contents of this comment are set to the + # @param second If the first argument is a Source, this argument + # @return [Comment] a new instance of Comment + # + # source://rexml//lib/rexml/comment.rb#24 + def initialize(first, second = T.unsafe(nil)); end + + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + # + # source://rexml//lib/rexml/comment.rb#63 + def <=>(other); end + + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + # + # source://rexml//lib/rexml/comment.rb#70 + def ==(other); end + + # source://rexml//lib/rexml/comment.rb#33 + def clone; end + + # source://rexml//lib/rexml/comment.rb#75 + def node_type; end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def string; end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def string=(_arg0); end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored by this class. The contents of comments are never modified. + # ie_hack:: + # Needed for conformity to the child API, but not used by this class. + # + # source://rexml//lib/rexml/comment.rb#50 + def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/xpath_parser.rb#11 +module REXML::DClonable; end + +# This is an abstract class. You never use this directly; it serves as a +# parent class for the specific declarations. +# +# source://rexml//lib/rexml/doctype.rb#242 +class REXML::Declaration < ::REXML::Child + # @return [Declaration] a new instance of Declaration + # + # source://rexml//lib/rexml/doctype.rb#243 + def initialize(src); end + + # source://rexml//lib/rexml/doctype.rb#248 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # source://rexml//lib/rexml/doctype.rb#255 + def write(output, indent); end +end + +# Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as +# being used to declare entities used in the document. +# +# source://rexml//lib/rexml/doctype.rb#51 +class REXML::DocType < ::REXML::Parent + include ::REXML::XMLTokens + + # Constructor + # + # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) + # # + # dt = DocType.new( doctype_to_clone ) + # # Incomplete. Shallow clone of doctype + # + # +Note+ that the constructor: + # + # Doctype.new( Source.new( "" ) ) + # + # is _deprecated_. Do not use it. It will probably disappear. + # + # @return [DocType] a new instance of DocType + # + # source://rexml//lib/rexml/doctype.rb#80 + def initialize(first, parent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/doctype.rb#185 + def add(child); end + + # source://rexml//lib/rexml/doctype.rb#125 + def attribute_of(element, attribute); end + + # source://rexml//lib/rexml/doctype.rb#115 + def attributes_of(element); end + + # source://rexml//lib/rexml/doctype.rb#135 + def clone; end + + # source://rexml//lib/rexml/doctype.rb#173 + def context; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def entities; end + + # source://rexml//lib/rexml/doctype.rb#181 + def entity(name); end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def external_id; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def name; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def namespaces; end + + # source://rexml//lib/rexml/doctype.rb#111 + def node_type; end + + # Retrieves a named notation. Only notations declared in the internal + # DTD subset can be retrieved. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#229 + def notation(name); end + + # This method returns a list of notations that have been declared in the + # _internal_ DTD subset. Notations in the external DTD subset are not + # listed. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#221 + def notations; end + + # This method retrieves the public identifier identifying the document's + # DTD. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#195 + def public; end + + # This method retrieves the system identifier identifying the document's DTD + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#207 + def system; end + + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indentation will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # source://rexml//lib/rexml/doctype.rb#149 + def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# Represents an XML document. +# +# A document may have: +# +# - A single child that may be accessed via method #root. +# - An XML declaration. +# - A document type. +# - Processing instructions. +# +# == In a Hurry? +# +# If you're somewhat familiar with XML +# and have a particular task in mind, +# you may want to see the +# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], +# and in particular, the +# {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. +# +# source://rexml//lib/rexml/document.rb#39 +class REXML::Document < ::REXML::Element + # :call-seq: + # new(string = nil, context = {}) -> new_document + # new(io_stream = nil, context = {}) -> new_document + # new(document = nil, context = {}) -> new_document + # + # Returns a new \REXML::Document object. + # + # When no arguments are given, + # returns an empty document: + # + # d = REXML::Document.new + # d.to_s # => "" + # + # When argument +string+ is given, it must be a string + # containing a valid XML document: + # + # xml_string = 'FooBar' + # d = REXML::Document.new(xml_string) + # d.to_s # => "FooBar" + # + # When argument +io_stream+ is given, it must be an \IO object + # that is opened for reading, and when read must return a valid XML document: + # + # File.write('t.xml', xml_string) + # d = File.open('t.xml', 'r') do |io| + # REXML::Document.new(io) + # end + # d.to_s # => "FooBar" + # + # When argument +document+ is given, it must be an existing + # document object, whose context and attributes (but not children) + # are cloned into the new document: + # + # d = REXML::Document.new(xml_string) + # d.children # => [ ... ] + # d.context = {raw: :all, compress_whitespace: :all} + # d.add_attributes({'bar' => 0, 'baz' => 1}) + # d1 = REXML::Document.new(d) + # d1.children # => [] + # d1.context # => {:raw=>:all, :compress_whitespace=>:all} + # d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'} + # + # When argument +context+ is given, it must be a hash + # containing context entries for the document; + # see {Element Context}[../doc/rexml/context_rdoc.html]: + # + # context = {raw: :all, compress_whitespace: :all} + # d = REXML::Document.new(xml_string, context) + # d.context # => {:raw=>:all, :compress_whitespace=>:all} + # + # @return [Document] a new instance of Document + # + # source://rexml//lib/rexml/document.rb#92 + def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end + + # :call-seq: + # add(xml_decl) -> self + # add(doc_type) -> self + # add(object) -> self + # + # Adds an object to the document; returns +self+. + # + # When argument +xml_decl+ is given, + # it must be an REXML::XMLDecl object, + # which becomes the XML declaration for the document, + # replacing the previous XML declaration if any: + # + # d = REXML::Document.new + # d.xml_decl.to_s # => "" + # d.add(REXML::XMLDecl.new('2.0')) + # d.xml_decl.to_s # => "" + # + # When argument +doc_type+ is given, + # it must be an REXML::DocType object, + # which becomes the document type for the document, + # replacing the previous document type, if any: + # + # d = REXML::Document.new + # d.doctype.to_s # => "" + # d.add(REXML::DocType.new('foo')) + # d.doctype.to_s # => "" + # + # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) + # is given it is added as the last child: + # + # d = REXML::Document.new + # d.add(REXML::Element.new('foo')) + # d.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#170 + def <<(child); end + + # :call-seq: + # add(xml_decl) -> self + # add(doc_type) -> self + # add(object) -> self + # + # Adds an object to the document; returns +self+. + # + # When argument +xml_decl+ is given, + # it must be an REXML::XMLDecl object, + # which becomes the XML declaration for the document, + # replacing the previous XML declaration if any: + # + # d = REXML::Document.new + # d.xml_decl.to_s # => "" + # d.add(REXML::XMLDecl.new('2.0')) + # d.xml_decl.to_s # => "" + # + # When argument +doc_type+ is given, + # it must be an REXML::DocType object, + # which becomes the document type for the document, + # replacing the previous document type, if any: + # + # d = REXML::Document.new + # d.doctype.to_s # => "" + # d.add(REXML::DocType.new('foo')) + # d.doctype.to_s # => "" + # + # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) + # is given it is added as the last child: + # + # d = REXML::Document.new + # d.add(REXML::Element.new('foo')) + # d.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#170 + def add(child); end + + # :call-seq: + # add_element(name_or_element = nil, attributes = nil) -> new_element + # + # Adds an element to the document by calling REXML::Element.add_element: + # + # REXML::Element.add_element(name_or_element, attributes) + # + # source://rexml//lib/rexml/document.rb#209 + def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end + + # :call-seq: + # clone -> new_document + # + # Returns the new document resulting from executing + # Document.new(self). See Document.new. + # + # source://rexml//lib/rexml/document.rb#120 + def clone; end + + # :call-seq: + # doctype -> doc_type or nil + # + # Returns the DocType object for the document, if it exists, otherwise +nil+: + # + # d = REXML::Document.new('') + # d.doctype.class # => REXML::DocType + # d = REXML::Document.new('') + # d.doctype.class # => nil + # + # source://rexml//lib/rexml/document.rb#241 + def doctype; end + + # source://rexml//lib/rexml/document.rb#442 + def document; end + + # :call-seq: + # encoding -> encoding_string + # + # Returns the XMLDecl encoding of the document, + # + # d = REXML::Document.new('') + # d.encoding # => "UTF-16" + # d = REXML::Document.new('') + # d.encoding # => "UTF-8" + # + # source://rexml//lib/rexml/document.rb#290 + def encoding; end + + # Returns the value of attribute entity_expansion_count. + # + # source://rexml//lib/rexml/document.rb#433 + def entity_expansion_count; end + + # :call-seq: + # expanded_name -> empty_string + # + # Returns an empty string. + # + # source://rexml//lib/rexml/document.rb#129 + def expanded_name; end + + # :call-seq: + # expanded_name -> empty_string + # + # Returns an empty string. + # d = doc_type + # d ? d.name : "UNDEFINED" + # + # source://rexml//lib/rexml/document.rb#129 + def name; end + + # :call-seq: + # node_type -> :document + # + # Returns the symbol +:document+. + # + # source://rexml//lib/rexml/document.rb#110 + def node_type; end + + # source://rexml//lib/rexml/document.rb#435 + def record_entity_expansion; end + + # :call-seq: + # root -> root_element or nil + # + # Returns the root element of the document, if it exists, otherwise +nil+: + # + # d = REXML::Document.new('') + # d.root # => + # d = REXML::Document.new('') + # d.root # => nil + # + # source://rexml//lib/rexml/document.rb#225 + def root; end + + # :call-seq: + # stand_alone? + # + # Returns the XMLDecl standalone value of the document as a string, + # if it has been set, otherwise the default standalone value: + # + # d = REXML::Document.new('') + # d.stand_alone? # => "yes" + # d = REXML::Document.new('') + # d.stand_alone? # => nil + # + # @return [Boolean] + # + # source://rexml//lib/rexml/document.rb#305 + def stand_alone?; end + + # :call-seq: + # version -> version_string + # + # Returns the XMLDecl version of this document as a string, + # if it has been set, otherwise the default version: + # + # d = REXML::Document.new('') + # d.version # => "2.0" + # d = REXML::Document.new('') + # d.version # => "1.0" + # + # source://rexml//lib/rexml/document.rb#275 + def version; end + + # :call-seq: + # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil) + # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil}) + # + # Write the XML tree out, optionally with indent. This writes out the + # entire XML document, including XML declarations, doctype declarations, + # and processing instructions (if any are given). + # + # A controversial point is whether Document should always write the XML + # declaration () whether or not one is given by the + # user (or source document). REXML does not write one if one was not + # specified, because it adds unnecessary bandwidth to applications such + # as XML-RPC. + # + # Accept Nth argument style and options Hash style as argument. + # The recommended style is options Hash style for one or more + # arguments case. + # + # _Examples_ + # Document.new("").write + # + # output = "" + # Document.new("").write(output) + # + # output = "" + # Document.new("").write(:output => output, :indent => 2) + # + # See also the classes in the rexml/formatters package for the proper way + # to change the default formatting of XML output. + # + # _Examples_ + # + # output = "" + # tr = Transitive.new + # tr.write(Document.new(""), output) + # + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be twice this number of spaces, and children will be + # indented an additional amount. For a value of 3, every item will be + # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the absolute *value* of the document -- that is, it leaves the value + # and number of Text nodes in the document unchanged. + # ie_hack:: + # This hack inserts a space before the /> on empty tags to address + # a limitation of Internet Explorer. Defaults to false + # Encoding name as String. Change output encoding to specified encoding + # instead of encoding in XML declaration. + # Defaults to nil. It means encoding in XML declaration is used. + # + # source://rexml//lib/rexml/document.rb#365 + def write(*arguments); end + + # :call-seq: + # xml_decl -> xml_decl + # + # Returns the XMLDecl object for the document, if it exists, + # otherwise the default XMLDecl object: + # + # d = REXML::Document.new('') + # d.xml_decl.class # => REXML::XMLDecl + # d.xml_decl.to_s # => "" + # d = REXML::Document.new('') + # d.xml_decl.class # => REXML::XMLDecl + # d.xml_decl.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#258 + def xml_decl; end + + private + + # source://rexml//lib/rexml/document.rb#447 + def build(source); end + + class << self + # Get the entity expansion limit. By default the limit is set to 10000. + # + # Deprecated. Use REXML::Security.entity_expansion_limit= instead. + # + # source://rexml//lib/rexml/document.rb#415 + def entity_expansion_limit; end + + # Set the entity expansion limit. By default the limit is set to 10000. + # + # Deprecated. Use REXML::Security.entity_expansion_limit= instead. + # + # source://rexml//lib/rexml/document.rb#408 + def entity_expansion_limit=(val); end + + # Get the entity expansion limit. By default the limit is set to 10240. + # + # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. + # + # source://rexml//lib/rexml/document.rb#429 + def entity_expansion_text_limit; end + + # Set the entity expansion limit. By default the limit is set to 10240. + # + # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. + # + # source://rexml//lib/rexml/document.rb#422 + def entity_expansion_text_limit=(val); end + + # source://rexml//lib/rexml/document.rb#401 + def parse_stream(source, listener); end + end +end + +# An \REXML::Element object represents an XML element. +# +# An element: +# +# - Has a name (string). +# - May have a parent (another element). +# - Has zero or more children +# (other elements, text, CDATA, processing instructions, and comments). +# - Has zero or more siblings +# (other elements, text, CDATA, processing instructions, and comments). +# - Has zero or more named attributes. +# +# == In a Hurry? +# +# If you're somewhat familiar with XML +# and have a particular task in mind, +# you may want to see the +# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], +# and in particular, the +# {tasks page for elements}[../doc/rexml/tasks/tocs/element_toc_rdoc.html]. +# +# === Name +# +# An element has a name, which is initially set when the element is created: +# +# e = REXML::Element.new('foo') +# e.name # => "foo" +# +# The name may be changed: +# +# e.name = 'bar' +# e.name # => "bar" +# +# +# === \Parent +# +# An element may have a parent. +# +# Its parent may be assigned explicitly when the element is created: +# +# e0 = REXML::Element.new('foo') +# e1 = REXML::Element.new('bar', e0) +# e1.parent # => ... +# +# Note: the representation of an element always shows the element's name. +# If the element has children, the representation indicates that +# by including an ellipsis (...). +# +# The parent may be assigned explicitly at any time: +# +# e2 = REXML::Element.new('baz') +# e1.parent = e2 +# e1.parent # => +# +# When an element is added as a child, its parent is set automatically: +# +# e1.add_element(e0) +# e0.parent # => ... +# +# For an element that has no parent, method +parent+ returns +nil+. +# +# === Children +# +# An element has zero or more children. +# The children are an ordered collection +# of all objects whose parent is the element itself. +# +# The children may include any combination of elements, text, comments, +# processing instructions, and CDATA. +# (This example keeps things clean by controlling whitespace +# via a +context+ setting.) +# +# xml_string = <<-EOT +# +# +# text 0 +# +# +# +# +# text 1 +# +# +# +# +# EOT +# context = {ignore_whitespace_nodes: :all, compress_whitespace: :all} +# d = REXML::Document.new(xml_string, context) +# root = d.root +# root.children.size # => 10 +# root.each {|child| p "#{child.class}: #{child}" } +# +# Output: +# +# "REXML::Element: " +# "REXML::Text: \n text 0\n " +# "REXML::Comment: comment 0" +# "REXML::Instruction: " +# "REXML::CData: cdata 0" +# "REXML::Element: " +# "REXML::Text: \n text 1\n " +# "REXML::Comment: comment 1" +# "REXML::Instruction: " +# "REXML::CData: cdata 1" +# +# A child may be added using inherited methods +# Parent#insert_before or Parent#insert_after: +# +# xml_string = '' +# d = REXML::Document.new(xml_string) +# root = d.root +# c = d.root[1] # => +# root.insert_before(c, REXML::Element.new('b')) +# root.to_a # => [, , , ] +# +# A child may be replaced using Parent#replace_child: +# +# root.replace_child(c, REXML::Element.new('x')) +# root.to_a # => [, , , ] +# +# A child may be removed using Parent#delete: +# +# x = root[2] # => +# root.delete(x) +# root.to_a # => [, , ] +# +# === Siblings +# +# An element has zero or more siblings, +# which are the other children of the element's parent. +# +# In the example above, element +ele_1+ is between a CDATA sibling +# and a text sibling: +# +# ele_1 = root[5] # => +# ele_1.previous_sibling # => "cdata 0" +# ele_1.next_sibling # => "\n text 1\n " +# +# === \Attributes +# +# An element has zero or more named attributes. +# +# A new element has no attributes: +# +# e = REXML::Element.new('foo') +# e.attributes # => {} +# +# Attributes may be added: +# +# e.add_attribute('bar', 'baz') +# e.add_attribute('bat', 'bam') +# e.attributes.size # => 2 +# e['bar'] # => "baz" +# e['bat'] # => "bam" +# +# An existing attribute may be modified: +# +# e.add_attribute('bar', 'bad') +# e.attributes.size # => 2 +# e['bar'] # => "bad" +# +# An existing attribute may be deleted: +# +# e.delete_attribute('bar') +# e.attributes.size # => 1 +# e['bar'] # => nil +# +# == What's Here +# +# To begin with, what's elsewhere? +# +# \Class \REXML::Element inherits from its ancestor classes: +# +# - REXML::Child +# - REXML::Parent +# +# \REXML::Element itself and its ancestors also include modules: +# +# - {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html] +# - REXML::Namespace +# - REXML::Node +# - REXML::XMLTokens +# +# === Methods for Creating an \Element +# +# ::new:: Returns a new empty element. +# #clone:: Returns a clone of another element. +# +# === Methods for Attributes +# +# {[attribute_name]}[#method-i-5B-5D]:: Returns an attribute value. +# #add_attribute:: Adds a new attribute. +# #add_attributes:: Adds multiple new attributes. +# #attribute:: Returns the attribute value for a given name and optional namespace. +# #delete_attribute:: Removes an attribute. +# +# === Methods for Children +# +# {[index]}[#method-i-5B-5D]:: Returns the child at the given offset. +# #add_element:: Adds an element as the last child. +# #delete_element:: Deletes a child element. +# #each_element:: Calls the given block with each child element. +# #each_element_with_attribute:: Calls the given block with each child element +# that meets given criteria, +# which can include the attribute name. +# #each_element_with_text:: Calls the given block with each child element +# that meets given criteria, +# which can include text. +# #get_elements:: Returns an array of element children that match a given xpath. +# +# === Methods for \Text Children +# +# #add_text:: Adds a text node to the element. +# #get_text:: Returns a text node that meets specified criteria. +# #text:: Returns the text string from the first node that meets specified criteria. +# #texts:: Returns an array of the text children of the element. +# #text=:: Adds, removes, or replaces the first text child of the element +# +# === Methods for Other Children +# +# #cdatas:: Returns an array of the cdata children of the element. +# #comments:: Returns an array of the comment children of the element. +# #instructions:: Returns an array of the instruction children of the element. +# +# === Methods for Namespaces +# +# #add_namespace:: Adds a namespace to the element. +# #delete_namespace:: Removes a namespace from the element. +# #namespace:: Returns the string namespace URI for the element. +# #namespaces:: Returns a hash of all defined namespaces in the element. +# #prefixes:: Returns an array of the string prefixes (names) +# of all defined namespaces in the element +# +# === Methods for Querying +# +# #document:: Returns the document, if any, that the element belongs to. +# #root:: Returns the most distant element (not document) ancestor of the element. +# #root_node:: Returns the most distant ancestor of the element. +# #xpath:: Returns the string xpath to the element +# relative to the most distant parent +# #has_attributes?:: Returns whether the element has attributes. +# #has_elements?:: Returns whether the element has elements. +# #has_text?:: Returns whether the element has text. +# #next_element:: Returns the next sibling that is an element. +# #previous_element:: Returns the previous sibling that is an element. +# #raw:: Returns whether raw mode is set for the element. +# #whitespace:: Returns whether whitespace is respected for the element. +# #ignore_whitespace_nodes:: Returns whether whitespace nodes +# are to be ignored for the element. +# #node_type:: Returns symbol :element. +# +# === One More Method +# +# #inspect:: Returns a string representation of the element. +# +# === Accessors +# +# #elements:: Returns the REXML::Elements object for the element. +# #attributes:: Returns the REXML::Attributes object for the element. +# #context:: Returns or sets the context hash for the element. +# +# source://rexml//lib/rexml/element.rb#279 +class REXML::Element < ::REXML::Parent + include ::REXML::XMLTokens + include ::REXML::Namespace + + # :call-seq: + # Element.new(name = 'UNDEFINED', parent = nil, context = nil) -> new_element + # Element.new(element, parent = nil, context = nil) -> new_element + # + # Returns a new \REXML::Element object. + # + # When no arguments are given, + # returns an element with name 'UNDEFINED': + # + # e = REXML::Element.new # => + # e.class # => REXML::Element + # e.name # => "UNDEFINED" + # + # When only argument +name+ is given, + # returns an element of the given name: + # + # REXML::Element.new('foo') # => + # + # When only argument +element+ is given, it must be an \REXML::Element object; + # returns a shallow copy of the given element: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new(e0) # => + # + # When argument +parent+ is also given, it must be an REXML::Parent object: + # + # e = REXML::Element.new('foo', REXML::Parent.new) + # e.parent # => #]> + # + # When argument +context+ is also given, it must be a hash + # representing the context for the element; + # see {Element Context}[../doc/rexml/context_rdoc.html]: + # + # e = REXML::Element.new('foo', nil, {raw: :all}) + # e.context # => {:raw=>:all} + # + # @return [Element] a new instance of Element + # + # source://rexml//lib/rexml/element.rb#327 + def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end + + # :call-seq: + # [index] -> object + # [attr_name] -> attr_value + # [attr_sym] -> attr_value + # + # With integer argument +index+ given, + # returns the child at offset +index+, or +nil+ if none: + # + # d = REXML::Document.new '>textmore' + # root = d.root + # (0..root.size).each do |index| + # node = root[index] + # p "#{index}: #{node} (#{node.class})" + # end + # + # Output: + # + # "0: (REXML::Element)" + # "1: text (REXML::Text)" + # "2: (REXML::Element)" + # "3: more (REXML::Text)" + # "4: (REXML::Element)" + # "5: (NilClass)" + # + # With string argument +attr_name+ given, + # returns the string value for the given attribute name if it exists, + # otherwise +nil+: + # + # d = REXML::Document.new('') + # root = d.root + # root['attr'] # => "value" + # root['nosuch'] # => nil + # + # With symbol argument +attr_sym+ given, + # returns [attr_sym.to_s]: + # + # root[:attr] # => "value" + # root[:nosuch] # => nil + # + # source://rexml//lib/rexml/element.rb#1245 + def [](name_or_index); end + + # :call-seq: + # add_attribute(name, value) -> value + # add_attribute(attribute) -> attribute + # + # Adds an attribute to this element, overwriting any existing attribute + # by the same name. + # + # With string argument +name+ and object +value+ are given, + # adds the attribute created with that name and value: + # + # e = REXML::Element.new + # e.add_attribute('attr', 'value') # => "value" + # e['attr'] # => "value" + # e.add_attribute('attr', 'VALUE') # => "VALUE" + # e['attr'] # => "VALUE" + # + # With only attribute object +attribute+ given, + # adds the given attribute: + # + # a = REXML::Attribute.new('attr', 'value') + # e.add_attribute(a) # => attr='value' + # e['attr'] # => "value" + # a = REXML::Attribute.new('attr', 'VALUE') + # e.add_attribute(a) # => attr='VALUE' + # e['attr'] # => "VALUE" + # + # source://rexml//lib/rexml/element.rb#1349 + def add_attribute(key, value = T.unsafe(nil)); end + + # :call-seq: + # add_attributes(hash) -> hash + # add_attributes(array) + # + # Adds zero or more attributes to the element; + # returns the argument. + # + # If hash argument +hash+ is given, + # each key must be a string; + # adds each attribute created with the key/value pair: + # + # e = REXML::Element.new + # h = {'foo' => 'bar', 'baz' => 'bat'} + # e.add_attributes(h) + # + # If argument +array+ is given, + # each array member must be a 2-element array [name, value]; + # each name must be a string: + # + # e = REXML::Element.new + # a = [['foo' => 'bar'], ['baz' => 'bat']] + # e.add_attributes(a) + # + # source://rexml//lib/rexml/element.rb#1380 + def add_attributes(hash); end + + # :call-seq: + # add_element(name, attributes = nil) -> new_element + # add_element(element, attributes = nil) -> element + # + # Adds a child element, optionally setting attributes + # on the added element; returns the added element. + # + # With string argument +name+, creates a new element with that name + # and adds the new element as a child: + # + # e0 = REXML::Element.new('foo') + # e0.add_element('bar') + # e0[0] # => + # + # + # With argument +name+ and hash argument +attributes+, + # sets attributes on the new element: + # + # e0.add_element('baz', {'bat' => '0', 'bam' => '1'}) + # e0[1] # => + # + # With element argument +element+, adds that element as a child: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar') + # e0.add_element(e1) + # e0[0] # => + # + # With argument +element+ and hash argument +attributes+, + # sets attributes on the added element: + # + # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) + # e0[1] # => + # + # source://rexml//lib/rexml/element.rb#731 + def add_element(element, attrs = T.unsafe(nil)); end + + # :call-seq: + # add_namespace(prefix, uri = nil) -> self + # + # Adds a namespace to the element; returns +self+. + # + # With the single argument +prefix+, + # adds a namespace using the given +prefix+ and the namespace URI: + # + # e = REXML::Element.new('foo') + # e.add_namespace('bar') + # e.namespaces # => {"xmlns"=>"bar"} + # + # With both arguments +prefix+ and +uri+ given, + # adds a namespace using both arguments: + # + # e.add_namespace('baz', 'bat') + # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} + # + # source://rexml//lib/rexml/element.rb#654 + def add_namespace(prefix, uri = T.unsafe(nil)); end + + # :call-seq: + # add_text(string) -> nil + # add_text(text_node) -> self + # + # Adds text to the element. + # + # When string argument +string+ is given, returns +nil+. + # + # If the element has no child text node, + # creates a \REXML::Text object using the string, + # honoring the current settings for whitespace and raw, + # then adds that node to the element: + # + # d = REXML::Document.new('') + # a = d.root + # a.add_text('foo') + # a.to_a # => [, "foo"] + # + # If the element has child text nodes, + # appends the string to the _last_ text node: + # + # d = REXML::Document.new('foobar') + # a = d.root + # a.add_text('baz') + # a.to_a # => ["foo", , "barbaz"] + # a.add_text('baz') + # a.to_a # => ["foo", , "barbazbaz"] + # + # When text node argument +text_node+ is given, + # appends the node as the last text node in the element; + # returns +self+: + # + # d = REXML::Document.new('foobar') + # a = d.root + # a.add_text(REXML::Text.new('baz')) + # a.to_a # => ["foo", , "bar", "baz"] + # a.add_text(REXML::Text.new('baz')) + # a.to_a # => ["foo", , "bar", "baz", "baz"] + # + # source://rexml//lib/rexml/element.rb#1146 + def add_text(text); end + + # :call-seq: + # attribute(name, namespace = nil) + # + # Returns the string value for the given attribute name. + # + # With only argument +name+ given, + # returns the value of the named attribute if it exists, otherwise +nil+: + # + # xml_string = <<-EOT + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # root = d.root + # a = root[1] # => + # a.attribute('attr') # => attr='value' + # a.attribute('nope') # => nil + # + # With arguments +name+ and +namespace+ given, + # returns the value of the named attribute if it exists, otherwise +nil+: + # + # xml_string = "" + # document = REXML::Document.new(xml_string) + # document.root.attribute("x") # => x='x' + # document.root.attribute("x", "a") # => a:x='a:x' + # + # source://rexml//lib/rexml/element.rb#1286 + def attribute(name, namespace = T.unsafe(nil)); end + + # Mechanisms for accessing attributes and child elements of this + # element. + # + # source://rexml//lib/rexml/element.rb#286 + def attributes; end + + # :call-seq: + # cdatas -> array_of_cdata_children + # + # Returns a frozen array of the REXML::CData children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # cds = d.root.cdatas # => ["foo", "bar"] + # cds.frozen? # => true + # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] + # + # source://rexml//lib/rexml/element.rb#1424 + def cdatas; end + + # :call-seq: + # clone -> new_element + # + # Returns a shallow copy of the element, containing the name and attributes, + # but not the parent or children: + # + # e = REXML::Element.new('foo') + # e.add_attributes({'bar' => 0, 'baz' => 1}) + # e.clone # => + # + # source://rexml//lib/rexml/element.rb#391 + def clone; end + + # :call-seq: + # comments -> array_of_comment_children + # + # Returns a frozen array of the REXML::Comment children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # cs = d.root.comments + # cs.frozen? # => true + # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] + # cs.map {|c| c.to_s } # => ["foo", "bar"] + # + # source://rexml//lib/rexml/element.rb#1445 + def comments; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # source://rexml//lib/rexml/element.rb#289 + def context; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # source://rexml//lib/rexml/element.rb#289 + def context=(_arg0); end + + # :call-seq: + # delete_attribute(name) -> removed_attribute or nil + # + # Removes a named attribute if it exists; + # returns the removed attribute if found, otherwise +nil+: + # + # e = REXML::Element.new('foo') + # e.add_attribute('bar', 'baz') + # e.delete_attribute('bar') # => + # e.delete_attribute('bar') # => nil + # + # source://rexml//lib/rexml/element.rb#1399 + def delete_attribute(key); end + + # :call-seq: + # delete_element(index) -> removed_element or nil + # delete_element(element) -> removed_element or nil + # delete_element(xpath) -> removed_element or nil + # + # Deletes a child element. + # + # When 1-based integer argument +index+ is given, + # removes and returns the child element at that offset if it exists; + # indexing does not include text nodes; + # returns +nil+ if the element does not exist: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.delete_element(1) # => + # a.delete_element(1) # => + # a.delete_element(1) # => nil + # + # When element argument +element+ is given, + # removes and returns that child element if it exists, + # otherwise returns +nil+: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # c = a[2] # => + # a.delete_element(c) # => + # a.delete_element(c) # => nil + # + # When xpath argument +xpath+ is given, + # removes and returns the element at xpath if it exists, + # otherwise returns +nil+: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.delete_element('//c') # => + # a.delete_element('//c') # => nil + # + # source://rexml//lib/rexml/element.rb#777 + def delete_element(element); end + + # :call-seq: + # delete_namespace(namespace = 'xmlns') -> self + # + # Removes a namespace from the element. + # + # With no argument, removes the default namespace: + # + # d = REXML::Document.new "" + # d.to_s # => "" + # d.root.delete_namespace # => + # d.to_s # => "" + # + # With argument +namespace+, removes the specified namespace: + # + # d.root.delete_namespace('foo') + # d.to_s # => "" + # + # Does nothing if no such namespace is found: + # + # d.root.delete_namespace('nosuch') + # d.to_s # => "" + # + # source://rexml//lib/rexml/element.rb#686 + def delete_namespace(namespace = T.unsafe(nil)); end + + # :call-seq: + # document -> document or nil + # + # If the element is part of a document, returns that document: + # + # d = REXML::Document.new('') + # top_element = d.first + # child = top_element.first + # top_element.document == d # => true + # child.document == d # => true + # + # If the element is not part of a document, returns +nil+: + # + # REXML::Element.new.document # => nil + # + # For a document, returns +self+: + # + # d.document == d # => true + # + # Related: #root, #root_node. + # + # source://rexml//lib/rexml/element.rb#478 + def document; end + + # :call-seq: + # each_element {|e| ... } + # + # Calls the given block with each child element: + # + # d = REXML::Document.new 'bbd' + # a = d.root + # a.each_element {|e| p e } + # + # Output: + # + # ... + # ... + # ... + # + # + # source://rexml//lib/rexml/element.rb#929 + def each_element(xpath = T.unsafe(nil), &block); end + + # :call-seq: + # each_element_with_attribute(attr_name, value = nil, max = 0, xpath = nil) {|e| ... } + # + # Calls the given block with each child element that meets given criteria. + # + # When only string argument +attr_name+ is given, + # calls the block with each child element that has that attribute: + # + # d = REXML::Document.new '' + # a = d.root + # a.each_element_with_attribute('id') {|e| p e } + # + # Output: + # + # + # + # + # + # With argument +attr_name+ and string argument +value+ given, + # calls the block with each child element that has that attribute + # with that value: + # + # a.each_element_with_attribute('id', '1') {|e| p e } + # + # Output: + # + # + # + # + # With arguments +attr_name+, +value+, and integer argument +max+ given, + # calls the block with at most +max+ child elements: + # + # a.each_element_with_attribute('id', '1', 1) {|e| p e } + # + # Output: + # + # + # + # With all arguments given, including +xpath+, + # calls the block with only those child elements + # that meet the first three criteria, + # and also match the given +xpath+: + # + # a.each_element_with_attribute('id', '1', 2, '//d') {|e| p e } + # + # Output: + # + # + # + # source://rexml//lib/rexml/element.rb#846 + def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end + + # :call-seq: + # each_element_with_text(text = nil, max = 0, xpath = nil) {|e| ... } + # + # Calls the given block with each child element that meets given criteria. + # + # With no arguments, calls the block with each child element that has text: + # + # d = REXML::Document.new 'bbd' + # a = d.root + # a.each_element_with_text {|e| p e } + # + # Output: + # + # ... + # ... + # ... + # + # With the single string argument +text+, + # calls the block with each element that has exactly that text: + # + # a.each_element_with_text('b') {|e| p e } + # + # Output: + # + # ... + # ... + # + # With argument +text+ and integer argument +max+, + # calls the block with at most +max+ elements: + # + # a.each_element_with_text('b', 1) {|e| p e } + # + # Output: + # + # ... + # + # With all arguments given, including +xpath+, + # calls the block with only those child elements + # that meet the first two criteria, + # and also match the given +xpath+: + # + # a.each_element_with_text('b', 2, '//c') {|e| p e } + # + # Output: + # + # ... + # + # source://rexml//lib/rexml/element.rb#903 + def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end + + # Mechanisms for accessing attributes and child elements of this + # element. + # + # source://rexml//lib/rexml/element.rb#286 + def elements; end + + # :call-seq: + # get_elements(xpath) + # + # Returns an array of the elements that match the given +xpath+: + # + # xml_string = <<-EOT + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # d.root.get_elements('//a') # => [ ... , ] + # + # source://rexml//lib/rexml/element.rb#948 + def get_elements(xpath); end + + # :call-seq: + # get_text(xpath = nil) -> text_node or nil + # + # Returns the first text node child in a specified element, if it exists, + # +nil+ otherwise. + # + # With no argument, returns the first text node from +self+: + # + # d = REXML::Document.new "

some text this is bold! more text

" + # d.root.get_text.class # => REXML::Text + # d.root.get_text # => "some text " + # + # With argument +xpath+, returns the first text node from the element + # that matches +xpath+: + # + # d.root.get_text(1) # => "this is bold!" + # + # source://rexml//lib/rexml/element.rb#1052 + def get_text(path = T.unsafe(nil)); end + + # :call-seq: + # has_attributes? -> true or false + # + # Returns +true+ if the element has attributes, +false+ otherwise: + # + # d = REXML::Document.new('
') + # a, b = *d.root + # a.has_attributes? # => true + # b.has_attributes? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1319 + def has_attributes?; end + + # :call-seq: + # has_elements? + # + # Returns +true+ if the element has one or more element children, + # +false+ otherwise: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.has_elements? # => true + # b = a[0] # => + # b.has_elements? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#793 + def has_elements?; end + + # :call-seq: + # has_text? -> true or false + # + # Returns +true+ if the element has one or more text noded, + # +false+ otherwise: + # + # d = REXML::Document.new 'text' + # a = d.root + # a.has_text? # => true + # b = a[0] + # b.has_text? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1001 + def has_text?; end + + # :call-seq: + # ignore_whitespace_nodes + # + # Returns +true+ if whitespace nodes are ignored for the element. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # source://rexml//lib/rexml/element.rb#516 + def ignore_whitespace_nodes; end + + # :call-seq: + # inspect -> string + # + # Returns a string representation of the element. + # + # For an element with no attributes and no children, shows the element name: + # + # REXML::Element.new.inspect # => "" + # + # Shows attributes, if any: + # + # e = REXML::Element.new('foo') + # e.add_attributes({'bar' => 0, 'baz' => 1}) + # e.inspect # => "" + # + # Shows an ellipsis (...), if there are child elements: + # + # e.add_element(REXML::Element.new('bar')) + # e.add_element(REXML::Element.new('baz')) + # e.inspect # => " ... " + # + # source://rexml//lib/rexml/element.rb#366 + def inspect; end + + # :call-seq: + # instructions -> array_of_instruction_children + # + # Returns a frozen array of the REXML::Instruction children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # is = d.root.instructions + # is.frozen? # => true + # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] + # is.map {|i| i.to_s } # => ["", ""] + # + # source://rexml//lib/rexml/element.rb#1466 + def instructions; end + + # :call-seq: + # namespace(prefix = nil) -> string_uri or nil + # + # Returns the string namespace URI for the element, + # possibly deriving from one of its ancestors. + # + # xml_string = <<-EOT + # + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # b = d.elements['//b'] + # b.namespace # => "1" + # b.namespace('y') # => "2" + # b.namespace('nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#621 + def namespace(prefix = T.unsafe(nil)); end + + # :call-seq: + # namespaces -> array_of_namespace_names + # + # Returns a hash of all defined namespaces + # in the element and its ancestors: + # + # xml_string = <<-EOT + # + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # d.elements['//a'].namespaces # => {"x"=>"1", "y"=>"2"} + # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} + # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} + # + # source://rexml//lib/rexml/element.rb#594 + def namespaces; end + + # :call-seq: + # next_element + # + # Returns the next sibling that is an element if it exists, + # +niL+ otherwise: + # + # d = REXML::Document.new 'text' + # d.root.elements['b'].next_element #-> + # d.root.elements['c'].next_element #-> nil + # + # source://rexml//lib/rexml/element.rb#962 + def next_element; end + + # :call-seq: + # node_type -> :element + # + # Returns symbol :element: + # + # d = REXML::Document.new('') + # a = d.root # => + # a.node_type # => :element + # + # source://rexml//lib/rexml/element.rb#1167 + def node_type; end + + # :call-seq: + # prefixes -> array_of_namespace_prefixes + # + # Returns an array of the string prefixes (names) of all defined namespaces + # in the element and its ancestors: + # + # xml_string = <<-EOT + # + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string, {compress_whitespace: :all}) + # d.elements['//a'].prefixes # => ["x", "y"] + # d.elements['//b'].prefixes # => ["x", "y"] + # d.elements['//c'].prefixes # => ["x", "y", "z"] + # + # source://rexml//lib/rexml/element.rb#568 + def prefixes; end + + # :call-seq: + # previous_element + # + # Returns the previous sibling that is an element if it exists, + # +niL+ otherwise: + # + # d = REXML::Document.new 'text' + # d.root.elements['c'].previous_element #-> + # d.root.elements['b'].previous_element #-> nil + # + # source://rexml//lib/rexml/element.rb#978 + def previous_element; end + + # :call-seq: + # raw + # + # Returns +true+ if raw mode is set for the element. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # The evaluation is tested against +expanded_name+, and so is namespace + # sensitive. + # + # source://rexml//lib/rexml/element.rb#536 + def raw; end + + # :call-seq: + # root -> element + # + # Returns the most distant _element_ (not document) ancestor of the element: + # + # d = REXML::Document.new('') + # top_element = d.first + # child = top_element.first + # top_element.root == top_element # => true + # child.root == top_element # => true + # + # For a document, returns the topmost element: + # + # d.root == top_element # => true + # + # Related: #root_node, #document. + # + # source://rexml//lib/rexml/element.rb#451 + def root; end + + # :call-seq: + # root_node -> document or element + # + # Returns the most distant ancestor of +self+. + # + # When the element is part of a document, + # returns the root node of the document. + # Note that the root node is different from the document element; + # in this example +a+ is document element and the root node is its parent: + # + # d = REXML::Document.new('') + # top_element = d.first # => ... + # child = top_element.first # => ... + # d.root_node == d # => true + # top_element.root_node == d # => true + # child.root_node == d # => true + # + # When the element is not part of a document, but does have ancestor elements, + # returns the most distant ancestor element: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar') + # e1.parent = e0 + # e2 = REXML::Element.new('baz') + # e2.parent = e1 + # e2.root_node == e0 # => true + # + # When the element has no ancestor elements, + # returns +self+: + # + # e = REXML::Element.new('foo') + # e.root_node == e # => true + # + # Related: #root, #document. + # + # source://rexml//lib/rexml/element.rb#430 + def root_node; end + + # :call-seq: + # text(xpath = nil) -> text_string or nil + # + # Returns the text string from the first text node child + # in a specified element, if it exists, +nil+ otherwise. + # + # With no argument, returns the text from the first text node in +self+: + # + # d = REXML::Document.new "

some text this is bold! more text

" + # d.root.text.class # => String + # d.root.text # => "some text " + # + # With argument +xpath+, returns text from the first text node + # in the element that matches +xpath+: + # + # d.root.text(1) # => "this is bold!" + # + # Note that an element may have multiple text nodes, + # possibly separated by other non-text children, as above. + # Even so, the returned value is the string text from the first such node. + # + # Note also that the text note is retrieved by method get_text, + # and so is always normalized text. + # + # source://rexml//lib/rexml/element.rb#1029 + def text(path = T.unsafe(nil)); end + + # :call-seq: + # text = string -> string + # text = nil -> nil + # + # Adds, replaces, or removes the first text node child in the element. + # + # With string argument +string+, + # creates a new \REXML::Text node containing that string, + # honoring the current settings for whitespace and row, + # then places the node as the first text child in the element; + # returns +string+. + # + # If the element has no text child, the text node is added: + # + # d = REXML::Document.new '
' + # d.root.text = 'foo' #-> 'foo' + # + # If the element has a text child, it is replaced: + # + # d.root.text = 'bar' #-> 'bar' + # + # With argument +nil+, removes the first text child: + # + # d.root.text = nil #-> '' + # + # source://rexml//lib/rexml/element.rb#1088 + def text=(text); end + + # :call-seq: + # texts -> array_of_text_children + # + # Returns a frozen array of the REXML::Text children of the element: + # + # xml_string = 'textmore' + # d = REXML::Document.new(xml_string) + # ts = d.root.texts + # ts.frozen? # => true + # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] + # ts.map {|t| t.to_s } # => ["text", "more"] + # + # source://rexml//lib/rexml/element.rb#1482 + def texts; end + + # :call-seq: + # whitespace + # + # Returns +true+ if whitespace is respected for this element, + # +false+ otherwise. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # The evaluation is tested against the element's +expanded_name+, + # and so is namespace-sensitive. + # + # source://rexml//lib/rexml/element.rb#493 + def whitespace; end + + # == DEPRECATED + # See REXML::Formatters + # + # Writes out this element, and recursively, all children. + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the parse tree of the document + # ie_hack:: + # This hack inserts a space before the /> on empty tags to address + # a limitation of Internet Explorer. Defaults to false + # + # out = '' + # doc.write( out ) #-> doc is written to the string 'out' + # doc.write( $stdout ) #-> doc written to the console + # + # source://rexml//lib/rexml/element.rb#1508 + def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # :call-seq: + # xpath -> string_xpath + # + # Returns the string xpath to the element + # relative to the most distant parent: + # + # d = REXML::Document.new('') + # a = d.root # => ... + # b = a[0] # => ... + # c = b[0] # => + # d.xpath # => "" + # a.xpath # => "/a" + # b.xpath # => "/a/b" + # c.xpath # => "/a/b/c" + # + # If there is no parent, returns the expanded name of the element: + # + # e = REXML::Element.new('foo') + # e.xpath # => "foo" + # + # source://rexml//lib/rexml/element.rb#1191 + def xpath; end + + private + + # source://rexml//lib/rexml/element.rb#1525 + def __to_xpath_helper(node); end + + # A private helper method + # + # source://rexml//lib/rexml/element.rb#1540 + def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/doctype.rb#261 +class REXML::ElementDecl < ::REXML::Declaration + # @return [ElementDecl] a new instance of ElementDecl + # + # source://rexml//lib/rexml/doctype.rb#262 + def initialize(src); end +end + +# A class which provides filtering of children for Elements, and +# XPath search support. You are expected to only encounter this class as +# the element.elements object. Therefore, you are +# _not_ expected to instantiate this yourself. +# +# xml_string = <<-EOT +# +# +# +# Everyday Italian +# Giada De Laurentiis +# 2005 +# 30.00 +# +# +# Harry Potter +# J K. Rowling +# 2005 +# 29.99 +# +# +# XQuery Kick Start +# James McGovern +# Per Bothner +# Kurt Cagle +# James Linn +# Vaidyanathan Nagarajan +# 2003 +# 49.99 +# +# +# Learning XML +# Erik T. Ray +# 2003 +# 39.95 +# +# +# EOT +# d = REXML::Document.new(xml_string) +# elements = d.root.elements +# elements # => # ... > +# +# source://rexml//lib/rexml/element.rb#1595 +class REXML::Elements + include ::Enumerable + + # :call-seq: + # new(parent) -> new_elements_object + # + # Returns a new \Elements object with the given +parent+. + # Does _not_ assign parent.elements = self: + # + # d = REXML::Document.new(xml_string) + # eles = REXML::Elements.new(d.root) + # eles # => # ... > + # eles == d.root.elements # => false + # + # @return [Elements] a new instance of Elements + # + # source://rexml//lib/rexml/element.rb#1608 + def initialize(parent); end + + # :call-seq: + # add -> new_element + # add(name) -> new_element + # add(element) -> element + # + # Adds an element; returns the element added. + # + # With no argument, creates and adds a new element. + # The new element has: + # + # - No name. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => ... + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add # => + # elements.size # => 5 + # new_element.name # => nil + # new_element.parent # => ... + # new_element.context # => {:raw=>:all} + # + # With string argument +name+, creates and adds a new element. + # The new element has: + # + # - Name +name+. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => ... + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add('foo') # => + # elements.size # => 5 + # new_element.name # => "foo" + # new_element.parent # => ... + # new_element.context # => {:raw=>:all} + # + # With argument +element+, + # creates and adds a clone of the given +element+. + # The new element has name, parent, and context from the given +element+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar', e0, {raw: :all}) + # element = elements.add(e1) # => + # elements.size # => 5 + # element.name # => "bar" + # element.parent # => ... + # element.context # => {:raw=>:all} + # + # source://rexml//lib/rexml/element.rb#1925 + def <<(element = T.unsafe(nil)); end + + # :call-seq: + # elements[index] -> element or nil + # elements[xpath] -> element or nil + # elements[n, name] -> element or nil + # + # Returns the first \Element object selected by the arguments, + # if any found, or +nil+ if none found. + # + # Notes: + # - The +index+ is 1-based, not 0-based, so that: + # - The first element has index 1 + # - The _nth_ element has index +n+. + # - The selection ignores non-\Element nodes. + # + # When the single argument +index+ is given, + # returns the element given by the index, if any; otherwise, +nil+: + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements + # eles # => # ... > + # eles[1] # => ... + # eles.size # => 4 + # eles[4] # => ... + # eles[5] # => nil + # + # The node at this index is not an \Element, and so is not returned: + # + # eles = d.root.first.first # => ... </> + # eles.to_a # => ["Everyday Italian"] + # eles[1] # => nil + # + # When the single argument +xpath+ is given, + # returns the first element found via that +xpath+, if any; otherwise, +nil+: + # + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles['/bookstore'] # => <bookstore> ... </> + # eles['//book'] # => <book category='cooking'> ... </> + # eles['//book [@category="children"]'] # => <book category='children'> ... </> + # eles['/nosuch'] # => nil + # eles['//nosuch'] # => nil + # eles['//book [@category="nosuch"]'] # => nil + # eles['.'] # => <bookstore> ... </> + # eles['..'].class # => REXML::Document + # + # With arguments +n+ and +name+ given, + # returns the _nth_ found element that has the given +name+, + # or +nil+ if there is no such _nth_ element: + # + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles[1, 'book'] # => <book category='cooking'> ... </> + # eles[4, 'book'] # => <book category='web' cover='paperback'> ... </> + # eles[5, 'book'] # => nil + # + # source://rexml//lib/rexml/element.rb#1680 + def [](index, name = T.unsafe(nil)); end + + # :call-seq: + # elements[] = index, replacement_element -> replacement_element or nil + # + # Replaces or adds an element. + # + # When <tt>eles[index]</tt> exists, replaces it with +replacement_element+ + # and returns +replacement_element+: + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles[1] # => <book category='cooking'> ... </> + # eles[1] = REXML::Element.new('foo') + # eles[1] # => <foo/> + # + # Does nothing (or raises an exception) + # if +replacement_element+ is not an \Element: + # eles[2] # => <book category='web' cover='paperback'> ... </> + # eles[2] = REXML::Text.new('bar') + # eles[2] # => <book category='web' cover='paperback'> ... </> + # + # When <tt>eles[index]</tt> does not exist, + # adds +replacement_element+ to the element and returns + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles.size # => 4 + # eles[50] = REXML::Element.new('foo') # => <foo/> + # eles.size # => 5 + # eles[5] # => <foo/> + # + # Does nothing (or raises an exception) + # if +replacement_element+ is not an \Element: + # + # eles[50] = REXML::Text.new('bar') # => "bar" + # eles.size # => 5 + # + # source://rexml//lib/rexml/element.rb#1735 + def []=(index, element); end + + # :call-seq: + # add -> new_element + # add(name) -> new_element + # add(element) -> element + # + # Adds an element; returns the element added. + # + # With no argument, creates and adds a new element. + # The new element has: + # + # - No name. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => <bookstore> ... </> + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add # => </> + # elements.size # => 5 + # new_element.name # => nil + # new_element.parent # => <bookstore> ... </> + # new_element.context # => {:raw=>:all} + # + # With string argument +name+, creates and adds a new element. + # The new element has: + # + # - Name +name+. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => <bookstore> ... </> + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add('foo') # => <foo/> + # elements.size # => 5 + # new_element.name # => "foo" + # new_element.parent # => <bookstore> ... </> + # new_element.context # => {:raw=>:all} + # + # With argument +element+, + # creates and adds a clone of the given +element+. + # The new element has name, parent, and context from the given +element+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar', e0, {raw: :all}) + # element = elements.add(e1) # => <bar/> + # elements.size # => 5 + # element.name # => "bar" + # element.parent # => <bookstore> ... </> + # element.context # => {:raw=>:all} + # + # source://rexml//lib/rexml/element.rb#1925 + def add(element = T.unsafe(nil)); end + + # :call-seq: + # collect(xpath = nil) {|element| ... } -> array + # + # Iterates over the elements; returns the array of block return values. + # + # With no argument, iterates over all elements: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.collect {|element| element.size } # => [9, 9, 17, 9] + # + # With argument +xpath+, iterates over elements that match + # the given +xpath+: + # + # xpath = '//book [@category="web"]' + # elements.collect(xpath) {|element| element.size } # => [17, 9] + # + # source://rexml//lib/rexml/element.rb#1988 + def collect(xpath = T.unsafe(nil)); end + + # :call-seq: + # delete(index) -> removed_element or nil + # delete(element) -> removed_element or nil + # delete(xpath) -> removed_element or nil + # + # Removes an element; returns the removed element, or +nil+ if none removed. + # + # With integer argument +index+ given, + # removes the child element at that offset: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # elements[2] # => <book category='children'> ... </> + # elements.delete(2) # => <book category='children'> ... </> + # elements.size # => 3 + # elements[2] # => <book category='web'> ... </> + # elements.delete(50) # => nil + # + # With element argument +element+ given, + # removes that child element: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # ele_1, ele_2, ele_3, ele_4 = *elements + # elements.size # => 4 + # elements[2] # => <book category='children'> ... </> + # elements.delete(ele_2) # => <book category='children'> ... </> + # elements.size # => 3 + # elements[2] # => <book category='web'> ... </> + # elements.delete(ele_2) # => nil + # + # With string argument +xpath+ given, + # removes the first element found via that xpath: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.delete('//book') # => <book category='cooking'> ... </> + # elements.delete('//book [@category="children"]') # => <book category='children'> ... </> + # elements.delete('//nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#1825 + def delete(element); end + + # :call-seq: + # delete_all(xpath) + # + # Removes all elements found via the given +xpath+; + # returns the array of removed elements, if any, else +nil+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # deleted_elements = elements.delete_all('//book [@category="web"]') + # deleted_elements.size # => 2 + # elements.size # => 2 + # deleted_elements = elements.delete_all('//book') + # deleted_elements.size # => 2 + # elements.size # => 0 + # elements.delete_all('//book') # => [] + # + # source://rexml//lib/rexml/element.rb#1851 + def delete_all(xpath); end + + # :call-seq: + # each(xpath = nil) {|element| ... } -> self + # + # Iterates over the elements. + # + # With no argument, calls the block with each element: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.each {|element| p element } + # + # Output: + # + # <book category='cooking'> ... </> + # <book category='children'> ... </> + # <book category='web'> ... </> + # <book category='web' cover='paperback'> ... </> + # + # With argument +xpath+, calls the block with each element + # that matches the given +xpath+: + # + # elements.each('//book [@category="web"]') {|element| p element } + # + # Output: + # + # <book category='web'> ... </> + # <book category='web' cover='paperback'> ... </> + # + # source://rexml//lib/rexml/element.rb#1967 + def each(xpath = T.unsafe(nil)); end + + # :call-seq: + # empty? -> true or false + # + # Returns +true+ if there are no children, +false+ otherwise. + # + # d = REXML::Document.new('') + # d.elements.empty? # => true + # d = REXML::Document.new(xml_string) + # d.elements.empty? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1755 + def empty?; end + + # :call-seq: + # index(element) + # + # Returns the 1-based index of the given +element+, if found; + # otherwise, returns -1: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # ele_1, ele_2, ele_3, ele_4 = *elements + # elements.index(ele_4) # => 4 + # elements.delete(ele_3) + # elements.index(ele_4) # => 3 + # elements.index(ele_3) # => -1 + # + # source://rexml//lib/rexml/element.rb#1773 + def index(element); end + + # :call-seq: + # inject(xpath = nil, initial = nil) -> object + # + # Calls the block with elements; returns the last block return value. + # + # With no argument, iterates over the elements, calling the block + # <tt>elements.size - 1</tt> times. + # + # - The first call passes the first and second elements. + # - The second call passes the first block return value and the third element. + # - The third call passes the second block return value and the fourth element. + # - And so on. + # + # In this example, the block returns the passed element, + # which is then the object argument to the next call: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.inject do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [1, 2] + # [2, 3] + # [3, 4] + # + # With the single argument +xpath+, calls the block only with + # elements matching that xpath: + # + # elements.inject('//book [@category="web"]') do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [3, 4] + # + # With argument +xpath+ given as +nil+ + # and argument +initial+ also given, + # calls the block once for each element. + # + # - The first call passes the +initial+ and the first element. + # - The second call passes the first block return value and the second element. + # - The third call passes the second block return value and the third element. + # - And so on. + # + # In this example, the first object index is <tt>-1</tt> + # + # elements.inject(nil, 'Initial') do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [-1, 1] + # [1, 2] + # [2, 3] + # [3, 4] + # + # In this form the passed object can be used as an accumulator: + # + # elements.inject(nil, 0) do |total, element| + # total += element.size + # end # => 44 + # + # With both arguments +xpath+ and +initial+ are given, + # calls the block only with elements matching that xpath: + # + # elements.inject('//book [@category="web"]', 0) do |total, element| + # total += element.size + # end # => 26 + # + # source://rexml//lib/rexml/element.rb#2073 + def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end + + # :call-seq: + # parent + # + # Returns the parent element cited in creating the \Elements object. + # This element is also the default starting point for searching + # in the \Elements object. + # + # d = REXML::Document.new(xml_string) + # elements = REXML::Elements.new(d.root) + # elements.parent == d.root # => true + # + # source://rexml//lib/rexml/element.rb#1623 + def parent; end + + # :call-seq: + # size -> integer + # + # Returns the count of \Element children: + # + # d = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>' + # d.root.elements.size # => 3 # Three elements. + # d.root.size # => 6 # Three elements plus three text nodes.. + # + # source://rexml//lib/rexml/element.rb#2097 + def size; end + + # :call-seq: + # to_a(xpath = nil) -> array_of_elements + # + # Returns an array of element children (not including non-element children). + # + # With no argument, returns an array of all element children: + # + # d = REXML::Document.new '<a>sean<b/>elliott<c/></a>' + # elements = d.root.elements + # elements.to_a # => [<b/>, <c/>] # Omits non-element children. + # children = d.root.children + # children # => ["sean", <b/>, "elliott", <c/>] # Includes non-element children. + # + # With argument +xpath+, returns an array of element children + # that match the xpath: + # + # elements.to_a('//c') # => [<c/>] + # + # source://rexml//lib/rexml/element.rb#2121 + def to_a(xpath = T.unsafe(nil)); end + + private + + # Private helper class. Removes quotes from quoted strings + # + # source://rexml//lib/rexml/element.rb#2129 + def literalize(name); end +end + +# source://rexml//lib/rexml/encoding.rb#4 +module REXML::Encoding + # source://rexml//lib/rexml/encoding.rb#29 + def decode(string); end + + # source://rexml//lib/rexml/encoding.rb#25 + def encode(string); end + + # ID ---> Encoding name + # + # source://rexml//lib/rexml/encoding.rb#6 + def encoding; end + + # source://rexml//lib/rexml/encoding.rb#7 + def encoding=(encoding); end + + private + + # source://rexml//lib/rexml/encoding.rb#34 + def find_encoding(name); end +end + +# source://rexml//lib/rexml/entity.rb#7 +class REXML::Entity < ::REXML::Child + include ::REXML::XMLTokens + + # Create a new entity. Simple entities can be constructed by passing a + # name, value to the constructor; this creates a generic, plain entity + # reference. For anything more complicated, you have to pass a Source to + # the constructor with the entity definition, or use the accessor methods. + # +WARNING+: There is no validation of entity state except when the entity + # is read from a stream. If you start poking around with the accessors, + # you can easily create a non-conformant Entity. + # + # e = Entity.new( 'amp', '&' ) + # + # @return [Entity] a new instance of Entity + # + # source://rexml//lib/rexml/entity.rb#33 + def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end + + # Returns the value of attribute external. + # + # source://rexml//lib/rexml/entity.rb#22 + def external; end + + # Returns the value of attribute name. + # + # source://rexml//lib/rexml/entity.rb#22 + def name; end + + # Returns the value of attribute ndata. + # + # source://rexml//lib/rexml/entity.rb#22 + def ndata; end + + # Returns the value of this entity unprocessed -- raw. This is the + # normalized value; that is, with all %ent; and &ent; entities intact + # + # source://rexml//lib/rexml/entity.rb#85 + def normalized; end + + # source://rexml//lib/rexml/entity.rb#138 + def parent=(other); end + + # Returns the value of attribute pubid. + # + # source://rexml//lib/rexml/entity.rb#22 + def pubid; end + + # Returns the value of attribute ref. + # + # source://rexml//lib/rexml/entity.rb#22 + def ref; end + + # Returns this entity as a string. See write(). + # + # source://rexml//lib/rexml/entity.rb#119 + def to_s; end + + # Evaluates to the unnormalized value of this entity; that is, replacing + # all entities -- both %ent; and &ent; entities. This differs from + # +value()+ in that +value+ only replaces %ent; entities. + # + # source://rexml//lib/rexml/entity.rb#73 + def unnormalized; end + + # Returns the value of this entity. At the moment, only internal entities + # are processed. If the value contains internal references (IE, + # %blah;), those are replaced with their values. IE, if the doctype + # contains: + # <!ENTITY % foo "bar"> + # <!ENTITY yada "nanoo %foo; nanoo> + # then: + # doctype.entity('yada').value #-> "nanoo bar nanoo" + # + # source://rexml//lib/rexml/entity.rb#134 + def value; end + + # Write out a fully formed, correct entity definition (assuming the Entity + # object itself is valid.) + # + # out:: + # An object implementing <TT><<</TT> to which the entity will be + # output + # indent:: + # *DEPRECATED* and ignored + # + # source://rexml//lib/rexml/entity.rb#97 + def write(out, indent = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/entity.rb#144 + def resolve_value; end + + class << self + # Evaluates whether the given string matches an entity definition, + # returning true if so, and false otherwise. + # + # @return [Boolean] + # + # source://rexml//lib/rexml/entity.rb#66 + def matches?(string); end + end +end + +# source://rexml//lib/rexml/doctype.rb#267 +class REXML::ExternalEntity < ::REXML::Child + # @return [ExternalEntity] a new instance of ExternalEntity + # + # source://rexml//lib/rexml/doctype.rb#268 + def initialize(src); end + + # source://rexml//lib/rexml/doctype.rb#272 + def to_s; end + + # source://rexml//lib/rexml/doctype.rb#275 + def write(output, indent); end +end + +# source://rexml//lib/rexml/formatters/default.rb#5 +class REXML::Formatters::Default + # Prints out the XML document with no formatting -- except if ie_hack is + # set. + # + # ie_hack:: + # If set to true, then inserts whitespace before the close of an empty + # tag, so that IE's bad XML parser doesn't choke. + # + # @return [Default] a new instance of Default + # + # source://rexml//lib/rexml/formatters/default.rb#12 + def initialize(ie_hack = T.unsafe(nil)); end + + # Writes the node to some output. + # + # node:: + # The node to write + # output:: + # A class implementing <TT><<</TT>. Pass in an Output object to + # change the output encoding. + # + # source://rexml//lib/rexml/formatters/default.rb#23 + def write(node, output); end + + protected + + # source://rexml//lib/rexml/formatters/default.rb#98 + def write_cdata(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#92 + def write_comment(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#61 + def write_document(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#65 + def write_element(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#104 + def write_instruction(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#88 + def write_text(node, output); end +end + +# Pretty-prints an XML document. This destroys whitespace in text nodes +# and will insert carriage returns and indentations. +# +# TODO: Add an option to print attributes on new lines +# +# source://rexml//lib/rexml/formatters/pretty.rb#10 +class REXML::Formatters::Pretty < ::REXML::Formatters::Default + # Create a new pretty printer. + # + # output:: + # An object implementing '<<(String)', to which the output will be written. + # indentation:: + # An integer greater than 0. The indentation of each level will be + # this number of spaces. If this is < 1, the behavior of this object + # is undefined. Defaults to 2. + # ie_hack:: + # If true, the printer will insert whitespace before closing empty + # tags, thereby allowing Internet Explorer's XML parser to + # function. Defaults to false. + # + # @return [Pretty] a new instance of Pretty + # + # source://rexml//lib/rexml/formatters/pretty.rb#30 + def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # If compact is set to true, then the formatter will attempt to use as + # little space as possible + # + # source://rexml//lib/rexml/formatters/pretty.rb#14 + def compact; end + + # If compact is set to true, then the formatter will attempt to use as + # little space as possible + # + # source://rexml//lib/rexml/formatters/pretty.rb#14 + def compact=(_arg0); end + + # The width of a page. Used for formatting text + # + # source://rexml//lib/rexml/formatters/pretty.rb#16 + def width; end + + # The width of a page. Used for formatting text + # + # source://rexml//lib/rexml/formatters/pretty.rb#16 + def width=(_arg0); end + + protected + + # source://rexml//lib/rexml/formatters/pretty.rb#102 + def write_cdata(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#97 + def write_comment(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#107 + def write_document(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#39 + def write_element(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#88 + def write_text(node, output); end + + private + + # source://rexml//lib/rexml/formatters/pretty.rb#124 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # source://rexml//lib/rexml/formatters/pretty.rb#129 + def wrap(string, width); end +end + +# A Source that wraps an IO. See the Source class for method +# documentation +# +# source://rexml//lib/rexml/source.rb#160 +class REXML::IOSource < ::REXML::Source + # block_size has been deprecated + # + # @return [IOSource] a new instance of IOSource + # + # source://rexml//lib/rexml/source.rb#163 + def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#215 + def consume(pattern); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#244 + def current_line; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/source.rb#235 + def empty?; end + + # source://rexml//lib/rexml/source.rb#219 + def match(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#239 + def position; end + + # source://rexml//lib/rexml/source.rb#207 + def read; end + + # source://rexml//lib/rexml/source.rb#184 + def scan(pattern, cons = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/source.rb#286 + def encoding_updated; end + + # source://rexml//lib/rexml/source.rb#266 + def readline; end +end + +# Represents an XML Instruction; IE, <? ... ?> +# TODO: Add parent arg (3rd arg) to constructor +# +# source://rexml//lib/rexml/instruction.rb#9 +class REXML::Instruction < ::REXML::Child + # Constructs a new Instruction + # the target of this instruction is set to this. If an Instruction, + # then the Instruction is shallowly cloned (target and content are + # copied). + # be a Parent if the target argument is a Source. Otherwise, this + # String is set as the content of this instruction. + # + # @param target can be one of a number of things. If String, then + # @param content Must be either a String, or a Parent. Can only + # @return [Instruction] a new instance of Instruction + # + # source://rexml//lib/rexml/instruction.rb#25 + def initialize(target, content = T.unsafe(nil)); end + + # of the other matches the target and content of this object. + # + # @return true if other is an Instruction, and the content and target + # + # source://rexml//lib/rexml/instruction.rb#65 + def ==(other); end + + # source://rexml//lib/rexml/instruction.rb#44 + def clone; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def content; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def content=(_arg0); end + + # source://rexml//lib/rexml/instruction.rb#75 + def inspect; end + + # source://rexml//lib/rexml/instruction.rb#71 + def node_type; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def target; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def target=(_arg0); end + + # == DEPRECATED + # See the rexml/formatters package + # + # source://rexml//lib/rexml/instruction.rb#51 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/light/node.rb#5 +module REXML::Light; end + +# Represents a tagged XML element. Elements are characterized by +# having children, attributes, and names, and can themselves be +# children. +# +# source://rexml//lib/rexml/light/node.rb#9 +class REXML::Light::Node + # Create a new element. + # + # @return [Node] a new instance of Node + # + # source://rexml//lib/rexml/light/node.rb#13 + def initialize(node = T.unsafe(nil)); end + + # Append a child to this element, optionally under a provided namespace. + # The namespace argument is ignored if the element argument is an Element + # object. Otherwise, the element argument is a string, the namespace (if + # provided) is the namespace the element is created in. + # + # source://rexml//lib/rexml/light/node.rb#114 + def <<(element); end + + # source://rexml//lib/rexml/light/node.rb#90 + def =~(path); end + + # source://rexml//lib/rexml/light/node.rb#78 + def [](reference, ns = T.unsafe(nil)); end + + # Doesn't handle namespaces yet + # + # source://rexml//lib/rexml/light/node.rb#95 + def []=(reference, ns, value = T.unsafe(nil)); end + + # source://rexml//lib/rexml/light/node.rb#143 + def children; end + + # source://rexml//lib/rexml/light/node.rb#36 + def each; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/light/node.rb#139 + def has_name?(name, namespace = T.unsafe(nil)); end + + # source://rexml//lib/rexml/light/node.rb#54 + def local_name; end + + # source://rexml//lib/rexml/light/node.rb#59 + def local_name=(name_str); end + + # source://rexml//lib/rexml/light/node.rb#40 + def name; end + + # source://rexml//lib/rexml/light/node.rb#44 + def name=(name_str, ns = T.unsafe(nil)); end + + # source://rexml//lib/rexml/light/node.rb#67 + def namespace(prefix = T.unsafe(nil)); end + + # source://rexml//lib/rexml/light/node.rb#71 + def namespace=(namespace); end + + # source://rexml//lib/rexml/light/node.rb#125 + def node_type; end + + # source://rexml//lib/rexml/light/node.rb#147 + def parent; end + + # source://rexml//lib/rexml/light/node.rb#50 + def parent=(node); end + + # source://rexml//lib/rexml/light/node.rb#63 + def prefix(namespace = T.unsafe(nil)); end + + # source://rexml//lib/rexml/light/node.rb#134 + def root; end + + # source://rexml//lib/rexml/light/node.rb#28 + def size; end + + # source://rexml//lib/rexml/light/node.rb#129 + def text=(foo); end + + # source://rexml//lib/rexml/light/node.rb#151 + def to_s; end + + private + + # source://rexml//lib/rexml/light/node.rb#164 + def namespace_of(node, prefix = T.unsafe(nil)); end + + # source://rexml//lib/rexml/light/node.rb#157 + def namesplit; end + + # source://rexml//lib/rexml/light/node.rb#176 + def prefix_of(node, namespace = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/light/node.rb#10 +REXML::Light::Node::NAMESPLIT = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/light/node.rb#11 +REXML::Light::Node::PARENTS = T.let(T.unsafe(nil), Array) + +# Adds named attributes to an object. +# +# source://rexml//lib/rexml/namespace.rb#7 +module REXML::Namespace + include ::REXML::XMLTokens + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def expanded_name; end + + # Fully expand the name, even if the prefix wasn't specified in the + # source file. + # + # source://rexml//lib/rexml/namespace.rb#57 + def fully_expanded_name; end + + # Compares names optionally WITH namespaces + # + # @return [Boolean] + # + # source://rexml//lib/rexml/namespace.rb#43 + def has_name?(other, ns = T.unsafe(nil)); end + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def name; end + + # Sets the name and the expanded name + # + # source://rexml//lib/rexml/namespace.rb#17 + def name=(name); end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix; end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix=(_arg0); end +end + +# source://rexml//lib/rexml/namespace.rb#13 +REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/doctype.rb#280 +class REXML::NotationDecl < ::REXML::Child + # @return [NotationDecl] a new instance of NotationDecl + # + # source://rexml//lib/rexml/doctype.rb#282 + def initialize(name, middle, pub, sys); end + + # This method retrieves the name of the notation. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#307 + def name; end + + # Returns the value of attribute public. + # + # source://rexml//lib/rexml/doctype.rb#281 + def public; end + + # Sets the attribute public + # + # @param value the value to set the attribute public to. + # + # source://rexml//lib/rexml/doctype.rb#281 + def public=(_arg0); end + + # Returns the value of attribute system. + # + # source://rexml//lib/rexml/doctype.rb#281 + def system; end + + # Sets the attribute system + # + # @param value the value to set the attribute system to. + # + # source://rexml//lib/rexml/doctype.rb#281 + def system=(_arg0); end + + # source://rexml//lib/rexml/doctype.rb#290 + def to_s; end + + # source://rexml//lib/rexml/doctype.rb#300 + def write(output, indent = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/output.rb#5 +class REXML::Output + include ::REXML::Encoding + + # @return [Output] a new instance of Output + # + # source://rexml//lib/rexml/output.rb#10 + def initialize(real_IO, encd = T.unsafe(nil)); end + + # source://rexml//lib/rexml/output.rb#22 + def <<(content); end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/output.rb#8 + def encoding; end + + # source://rexml//lib/rexml/output.rb#26 + def to_s; end +end + +# A parent has children, and has methods for accessing them. The Parent +# class is never encountered except as the superclass for some other +# object. +# +# source://rexml//lib/rexml/parent.rb#8 +class REXML::Parent < ::REXML::Child + include ::Enumerable + + # Constructor + # + # @param parent if supplied, will be set as the parent of this object + # @return [Parent] a new instance of Parent + # + # source://rexml//lib/rexml/parent.rb#13 + def initialize(parent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parent.rb#18 + def <<(object); end + + # Fetches a child at a given index + # + # @param index the Integer index of the child to fetch + # + # source://rexml//lib/rexml/parent.rb#57 + def [](index); end + + # Set an index entry. See Array.[]= + # + # @param index the index of the element to set + # @param opt either the object to set, or an Integer length + # @param child if opt is an Integer, this is the child to set + # @return the parent (self) + # + # source://rexml//lib/rexml/parent.rb#70 + def []=(*args); end + + # source://rexml//lib/rexml/parent.rb#18 + def add(object); end + + # source://rexml//lib/rexml/parent.rb#115 + def children; end + + # Deeply clones this object. This creates a complete duplicate of this + # Parent, including all descendants. + # + # source://rexml//lib/rexml/parent.rb#148 + def deep_clone; end + + # source://rexml//lib/rexml/parent.rb#32 + def delete(object); end + + # source://rexml//lib/rexml/parent.rb#47 + def delete_at(index); end + + # source://rexml//lib/rexml/parent.rb#43 + def delete_if(&block); end + + # source://rexml//lib/rexml/parent.rb#39 + def each(&block); end + + # source://rexml//lib/rexml/parent.rb#39 + def each_child(&block); end + + # source://rexml//lib/rexml/parent.rb#51 + def each_index(&block); end + + # Fetches the index of a given child + # of this parent. + # + # @param child the child to get the index of + # @return the index of the child, or nil if the object is not a child + # + # source://rexml//lib/rexml/parent.rb#123 + def index(child); end + + # Inserts an child after another child + # child2 will be inserted after child1 in the child list of the parent. + # If an xpath, child2 will be inserted after the first child to match + # the xpath. + # + # @param child1 this is either an xpath or an Element. If an Element, + # @param child2 the child to insert + # @return the parent (self) + # + # source://rexml//lib/rexml/parent.rb#102 + def insert_after(child1, child2); end + + # Inserts an child before another child + # child2 will be inserted before child1 in the child list of the parent. + # If an xpath, child2 will be inserted before the first child to match + # the xpath. + # + # @param child1 this is either an xpath or an Element. If an Element, + # @param child2 the child to insert + # @return the parent (self) + # + # source://rexml//lib/rexml/parent.rb#82 + def insert_before(child1, child2); end + + # @return the number of children of this parent + # + # source://rexml//lib/rexml/parent.rb#130 + def length; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/parent.rb#162 + def parent?; end + + # source://rexml//lib/rexml/parent.rb#18 + def push(object); end + + # Replaces one child with another, making sure the nodelist is correct + # Child) + # + # @param to_replace the child to replace (must be a Child) + # @param replacement the child to insert into the nodelist (must be a + # + # source://rexml//lib/rexml/parent.rb#140 + def replace_child(to_replace, replacement); end + + # @return the number of children of this parent + # + # source://rexml//lib/rexml/parent.rb#130 + def size; end + + # source://rexml//lib/rexml/parent.rb#115 + def to_a; end + + # source://rexml//lib/rexml/parent.rb#27 + def unshift(object); end +end + +# source://rexml//lib/rexml/parseexception.rb#3 +class REXML::ParseException < ::RuntimeError + # @return [ParseException] a new instance of ParseException + # + # source://rexml//lib/rexml/parseexception.rb#6 + def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parseexception.rb#48 + def context; end + + # Returns the value of attribute continued_exception. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def continued_exception; end + + # Sets the attribute continued_exception + # + # @param value the value to set the attribute continued_exception to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def continued_exception=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#43 + def line; end + + # Returns the value of attribute parser. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def parser; end + + # Sets the attribute parser + # + # @param value the value to set the attribute parser to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def parser=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#38 + def position; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def source=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#13 + def to_s; end +end + +# = Using the Pull Parser +# <em>This API is experimental, and subject to change.</em> +# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" ) +# while parser.has_next? +# res = parser.next +# puts res[1]['att'] if res.start_tag? and res[0] == 'b' +# end +# See the PullEvent class for information on the content of the results. +# The data is identical to the arguments passed for the various events to +# the StreamListener API. +# +# Notice that: +# parser = PullParser.new( "<a>BAD DOCUMENT" ) +# while parser.has_next? +# res = parser.next +# raise res[1] if res.error? +# end +# +# Nat Price gave me some good ideas for the API. +# +# source://rexml//lib/rexml/parsers/baseparser.rb#29 +class REXML::Parsers::BaseParser + # @return [BaseParser] a new instance of BaseParser + # + # source://rexml//lib/rexml/parsers/baseparser.rb#115 + def initialize(source); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#120 + def add_listener(listener); end + + # Returns true if there are no more events + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#146 + def empty?; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#438 + def entity(reference, entities); end + + # Returns true if there are more events. Synonymous with !empty? + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#151 + def has_next?; end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#449 + def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Peek at the +depth+ event in the stack. The first element on the stack + # is at depth 0. If +depth+ is -1, will parse to the end of the input + # stream and return the last event, which is always :end_document. + # Be aware that this causes the stream to be parsed up to the +depth+ + # event, so you can effectively pre-parse the entire document (pull the + # entire thing into memory) using this method. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#167 + def peek(depth = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#136 + def position; end + + # Returns the next event. This is a +PullEvent+ object. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#182 + def pull; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#124 + def source; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#126 + def stream=(source); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#465 + def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end + + # Push an event back on the head of the stream. This method + # has (theoretically) infinite depth. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#157 + def unshift(token); end + + private + + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#495 + def need_source_encoding_update?(xml_declaration_encoding); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#589 + def parse_attributes(prefixes, curr_ns); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#514 + def parse_id(base_error_message, accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#542 + def parse_id_invalid_details(accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#501 + def parse_name(base_error_message); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#580 + def process_instruction; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#190 + def pull_event; end +end + +# source://rexml//lib/rexml/parsers/baseparser.rb#102 +REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#103 +REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#104 +REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#38 +REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#37 +REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/streamparser.rb#6 +class REXML::Parsers::StreamParser + # @return [StreamParser] a new instance of StreamParser + # + # source://rexml//lib/rexml/parsers/streamparser.rb#7 + def initialize(source, listener); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#13 + def add_listener(listener); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#17 + def parse; end +end + +# source://rexml//lib/rexml/parsers/treeparser.rb#7 +class REXML::Parsers::TreeParser + # @return [TreeParser] a new instance of TreeParser + # + # source://rexml//lib/rexml/parsers/treeparser.rb#8 + def initialize(source, build_context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/treeparser.rb#13 + def add_listener(listener); end + + # source://rexml//lib/rexml/parsers/treeparser.rb#17 + def parse; end +end + +# You don't want to use this class. Really. Use XPath, which is a wrapper +# for this class. Believe me. You don't want to poke around in here. +# There is strange, dark magic at work in this code. Beware. Go back! Go +# back while you still can! +# +# source://rexml//lib/rexml/parsers/xpathparser.rb#12 +class REXML::Parsers::XPathParser + include ::REXML::XMLTokens + + # source://rexml//lib/rexml/parsers/xpathparser.rb#42 + def abbreviate(path_or_parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#132 + def expand(path_or_parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#16 + def namespaces=(namespaces); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#21 + def parse(path); end + + # For backward compatibility + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def preciate_to_string(parsed, &block); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#36 + def predicate(path); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def predicate_to_path(parsed, &block); end + + private + + # | AdditiveExpr ('+' | '-') MultiplicativeExpr + # | MultiplicativeExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#505 + def AdditiveExpr(path, parsed); end + + # | AndExpr S 'and' S EqualityExpr + # | EqualityExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#438 + def AndExpr(path, parsed); end + + # | EqualityExpr ('=' | '!=') RelationalExpr + # | RelationalExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#457 + def EqualityExpr(path, parsed); end + + # | FilterExpr Predicate + # | PrimaryExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#608 + def FilterExpr(path, parsed); end + + # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#663 + def FunctionCall(rest, parsed); end + + # LocationPath + # | RelativeLocationPath + # | '/' RelativeLocationPath? + # | '//' RelativeLocationPath + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#243 + def LocationPath(path, parsed); end + + # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr + # | UnaryExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#528 + def MultiplicativeExpr(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#343 + def NodeTest(path, parsed); end + + # | OrExpr S 'or' S AndExpr + # | AndExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#419 + def OrExpr(path, parsed); end + + # | LocationPath + # | FilterExpr ('/' | '//') RelativeLocationPath + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#590 + def PathExpr(path, parsed); end + + # Filters the supplied nodeset on the predicate(s) + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#395 + def Predicate(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#626 + def PrimaryExpr(path, parsed); end + + # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr + # | AdditiveExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#480 + def RelationalExpr(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#267 + def RelativeLocationPath(path, parsed); end + + # | '-' UnaryExpr + # | UnionExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#553 + def UnaryExpr(path, parsed); end + + # | UnionExpr '|' PathExpr + # | PathExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#571 + def UnionExpr(path, parsed); end + + # get_group( '[foo]bar' ) -> ['bar', '[foo]'] + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#676 + def get_group(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#694 + def parse_args(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#224 + def quote_literal(literal); end +end + +# source://rexml//lib/rexml/parsers/xpathparser.rb#339 +REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# Returns a 1-1 map of the nodeset +# The contents of the resulting array are either: +# true/false, if a positive match +# String, if a name match +# NodeTest +# | ('*' | NCNAME ':' '*' | QNAME) NameTest +# | '*' ':' NCNAME NameTest since XPath 2.0 +# | NODE_TYPE '(' ')' NodeType +# | PI '(' LITERAL ')' PI +# | '[' expr ']' Predicate +# +# source://rexml//lib/rexml/parsers/xpathparser.rb#338 +REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/doctype.rb#10 +class REXML::ReferenceWriter + # @return [ReferenceWriter] a new instance of ReferenceWriter + # + # source://rexml//lib/rexml/doctype.rb#11 + def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/doctype.rb#25 + def write(output); end +end + +# A Source can be searched for patterns, and wraps buffers and other +# objects and provides consumption of text +# +# source://rexml//lib/rexml/source.rb#31 +class REXML::Source + include ::REXML::Encoding + + # Constructor + # value, overriding all encoding detection + # + # @param arg must be a String, and should be a valid XML document + # @param encoding if non-null, sets the encoding of the source to this + # @return [Source] a new instance of Source + # + # source://rexml//lib/rexml/source.rb#43 + def initialize(arg, encoding = T.unsafe(nil)); end + + # The current buffer (what we're going to read next) + # + # source://rexml//lib/rexml/source.rb#34 + def buffer; end + + # source://rexml//lib/rexml/source.rb#87 + def consume(pattern); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#117 + def current_line; end + + # @return [Boolean] true if the Source is exhausted + # + # source://rexml//lib/rexml/source.rb#108 + def empty?; end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/source.rb#37 + def encoding; end + + # Inherited from Encoding + # Overridden to support optimized en/decoding + # + # source://rexml//lib/rexml/source.rb#56 + def encoding=(enc); end + + # The line number of the last consumed text + # + # source://rexml//lib/rexml/source.rb#36 + def line; end + + # source://rexml//lib/rexml/source.rb#101 + def match(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#91 + def match_to(char, pattern); end + + # source://rexml//lib/rexml/source.rb#95 + def match_to_consume(char, pattern); end + + # source://rexml//lib/rexml/source.rb#112 + def position; end + + # source://rexml//lib/rexml/source.rb#84 + def read; end + + # Scans the source for a given pattern. Note, that this is not your + # usual scan() method. For one thing, the pattern argument has some + # requirements; for another, the source can be consumed. You can easily + # confuse this method. Originally, the patterns were easier + # to construct and this method more robust, because this method + # generated search regexps on the fly; however, this was + # computationally expensive and slowed down the entire REXML package + # considerably, since this is by far the most commonly called method. + # /^\s*(#{your pattern, with no groups})(.*)/. The first group + # will be returned; the second group is used if the consume flag is + # set. + # everything after it in the Source. + # pattern is not found. + # + # @param pattern must be a Regexp, and must be in the form of + # @param consume if true, the pattern returned will be consumed, leaving + # @return the pattern, if found, or nil if the Source is empty or the + # + # source://rexml//lib/rexml/source.rb#77 + def scan(pattern, cons = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/source.rb#125 + def detect_encoding; end + + # source://rexml//lib/rexml/source.rb#146 + def encoding_updated; end +end + +# Represents text nodes in an XML document +# +# source://rexml//lib/rexml/text.rb#11 +class REXML::Text < ::REXML::Child + include ::Comparable + + # Constructor + # +arg+ if a String, the content is set to the String. If a Text, + # the object is shallowly cloned. + # + # +respect_whitespace+ (boolean, false) if true, whitespace is + # respected + # + # +parent+ (nil) if this is a Parent object, the parent + # will be set to this. + # + # +raw+ (nil) This argument can be given three values. + # If true, then the value of used to construct this object is expected to + # contain no unescaped XML markup, and REXML will not change the text. If + # this value is false, the string may contain any characters, and REXML will + # escape any and all defined entities whose values are contained in the + # text. If this value is nil (the default), then the raw value of the + # parent will be used as the raw value for this node. If there is no raw + # value for the parent, and no value is supplied, the default is false. + # Use this field if you have entities defined for some text, and you don't + # want REXML to escape that text in output. + # Text.new( "<&", false, nil, false ) #-> "<&" + # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" + # Text.new( "<&", false, nil, true ) #-> Parse exception + # Text.new( "<&", false, nil, true ) #-> "<&" + # # Assume that the entity "s" is defined to be "sean" + # # and that the entity "r" is defined to be "russell" + # Text.new( "sean russell" ) #-> "&s; &r;" + # Text.new( "sean russell", false, nil, true ) #-> "sean russell" + # + # +entity_filter+ (nil) This can be an array of entities to match in the + # supplied text. This argument is only useful if +raw+ is set to false. + # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" + # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" + # In the last example, the +entity_filter+ argument is ignored. + # + # +illegal+ INTERNAL USE ONLY + # + # @return [Text] a new instance of Text + # + # source://rexml//lib/rexml/text.rb#94 + def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end + + # Appends text to this text node. The text is appended in the +raw+ mode + # of this text node. + # + # +returns+ the text itself to enable method chain like + # 'text << "XXX" << "YYY"'. + # + # source://rexml//lib/rexml/text.rb#194 + def <<(to_append); end + + # +other+ a String or a Text + # +returns+ the result of (to_s <=> arg.to_s) + # + # source://rexml//lib/rexml/text.rb#203 + def <=>(other); end + + # source://rexml//lib/rexml/text.rb#184 + def clone; end + + # source://rexml//lib/rexml/text.rb#207 + def doctype; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/text.rb#179 + def empty?; end + + # source://rexml//lib/rexml/text.rb#278 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # source://rexml//lib/rexml/text.rb#233 + def inspect; end + + # source://rexml//lib/rexml/text.rb#175 + def node_type; end + + # source://rexml//lib/rexml/text.rb#125 + def parent=(parent); end + + # If +raw+ is true, then REXML leaves the value alone + # + # source://rexml//lib/rexml/text.rb#21 + def raw; end + + # If +raw+ is true, then REXML leaves the value alone + # + # source://rexml//lib/rexml/text.rb#21 + def raw=(_arg0); end + + # Returns the string value of this text node. This string is always + # escaped, meaning that it is a valid XML text node string, and all + # entities that can be escaped, have been inserted. This method respects + # the entity filter set in the constructor. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.to_s #-> "< & &s; russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.to_s #-> "< & &s; russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.to_s #-> "sean russell" + # + # source://rexml//lib/rexml/text.rb#228 + def to_s; end + + # Returns the string value of this text. This is the text without + # entities, as it might be used programmatically, or printed to the + # console. This ignores the 'raw' attribute setting, and any + # entity_filter. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.value #-> "< & sean russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.value #-> "< & sean russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.value #-> "sean russell" + # + # source://rexml//lib/rexml/text.rb#250 + def value; end + + # Sets the contents of this text node. This expects the text to be + # unnormalized. It returns self. + # + # e = Element.new( "a" ) + # e.add_text( "foo" ) # <a>foo</a> + # e[0].value = "bar" # <a>bar</a> + # e[0].value = "<a>" # <a><a></a> + # + # source://rexml//lib/rexml/text.rb#261 + def value=(val); end + + # source://rexml//lib/rexml/text.rb#267 + def wrap(string, width, addnewline = T.unsafe(nil)); end + + # == DEPRECATED + # See REXML::Formatters + # + # source://rexml//lib/rexml/text.rb#293 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # Writes out text, substituting special characters beforehand. + # +out+ A String, IO, or any other object supporting <<( String ) + # +input+ the text to substitute and the write out + # + # z=utf8.unpack("U*") + # ascOut="" + # z.each{|r| + # if r < 0x100 + # ascOut.concat(r.chr) + # else + # ascOut.concat(sprintf("&#x%x;", r)) + # end + # } + # puts ascOut + # + # source://rexml//lib/rexml/text.rb#325 + def write_with_substitution(out, input); end + + # FIXME + # This probably won't work properly + # + # source://rexml//lib/rexml/text.rb#305 + def xpath; end + + private + + # source://rexml//lib/rexml/text.rb#338 + def clear_cache; end + + class << self + # check for illegal characters + # + # source://rexml//lib/rexml/text.rb#131 + def check(string, pattern, doctype); end + + # source://rexml//lib/rexml/text.rb#407 + def expand(ref, doctype, filter); end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/text.rb#370 + def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Reads text, substituting entities + # + # source://rexml//lib/rexml/text.rb#344 + def read_with_substitution(input, illegal = T.unsafe(nil)); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/text.rb#394 + def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end + end +end + +# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 +class REXML::UndefinedNamespaceException < ::REXML::ParseException + # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException + # + # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 + def initialize(prefix, source, parser); end +end + +# source://rexml//lib/rexml/validation/validationexception.rb#4 +class REXML::Validation::ValidationException < ::RuntimeError + # @return [ValidationException] a new instance of ValidationException + # + # source://rexml//lib/rexml/validation/validationexception.rb#5 + def initialize(msg); end +end + +# NEEDS DOCUMENTATION +# +# source://rexml//lib/rexml/xmldecl.rb#8 +class REXML::XMLDecl < ::REXML::Child + include ::REXML::Encoding + + # @return [XMLDecl] a new instance of XMLDecl + # + # source://rexml//lib/rexml/xmldecl.rb#20 + def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xmldecl.rb#56 + def ==(other); end + + # source://rexml//lib/rexml/xmldecl.rb#39 + def clone; end + + # source://rexml//lib/rexml/xmldecl.rb#102 + def dowrite; end + + # source://rexml//lib/rexml/xmldecl.rb#76 + def encoding=(enc); end + + # source://rexml//lib/rexml/xmldecl.rb#106 + def inspect; end + + # source://rexml//lib/rexml/xmldecl.rb#69 + def node_type; end + + # source://rexml//lib/rexml/xmldecl.rb#98 + def nowrite; end + + # source://rexml//lib/rexml/encoding.rb#7 + def old_enc=(encoding); end + + # Returns the value of attribute standalone. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def stand_alone?; end + + # Returns the value of attribute standalone. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def standalone; end + + # Sets the attribute standalone + # + # @param value the value to set the attribute standalone to. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def standalone=(_arg0); end + + # Returns the value of attribute version. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def version; end + + # Sets the attribute version + # + # @param value the value to set the attribute version to. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def version=(_arg0); end + + # indent:: + # Ignored. There must be no whitespace before an XML declaration + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # source://rexml//lib/rexml/xmldecl.rb#49 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # Returns the value of attribute writeencoding. + # + # source://rexml//lib/rexml/xmldecl.rb#18 + def writeencoding; end + + # Returns the value of attribute writethis. + # + # source://rexml//lib/rexml/xmldecl.rb#18 + def writethis; end + + # source://rexml//lib/rexml/xmldecl.rb#63 + def xmldecl(version, encoding, standalone); end + + private + + # source://rexml//lib/rexml/xmldecl.rb#111 + def content(enc); end + + class << self + # Only use this if you do not want the XML declaration to be written; + # this object is ignored by the XML writer. Otherwise, instantiate your + # own XMLDecl and add it to the document. + # + # Note that XML 1.1 documents *must* include an XML declaration + # + # source://rexml//lib/rexml/xmldecl.rb#92 + def default; end + end +end + +# @private +# +# source://rexml//lib/rexml/xpath_parser.rb#959 +class REXML::XPathNode + # @return [XPathNode] a new instance of XPathNode + # + # source://rexml//lib/rexml/xpath_parser.rb#961 + def initialize(node, context = T.unsafe(nil)); end + + # Returns the value of attribute context. + # + # source://rexml//lib/rexml/xpath_parser.rb#960 + def context; end + + # source://rexml//lib/rexml/xpath_parser.rb#970 + def position; end + + # Returns the value of attribute raw_node. + # + # source://rexml//lib/rexml/xpath_parser.rb#960 + def raw_node; end +end + +# You don't want to use this class. Really. Use XPath, which is a wrapper +# for this class. Believe me. You don't want to poke around in here. +# There is strange, dark magic at work in this code. Beware. Go back! Go +# back while you still can! +# +# source://rexml//lib/rexml/xpath_parser.rb#54 +class REXML::XPathParser + include ::REXML::XMLTokens + + # @return [XPathParser] a new instance of XPathParser + # + # source://rexml//lib/rexml/xpath_parser.rb#60 + def initialize(strict: T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#94 + def []=(variable_name, value); end + + # Performs a depth-first (document order) XPath search, and returns the + # first match. This is the fastest, lightest way to return a single result. + # + # FIXME: This method is incomplete! + # + # source://rexml//lib/rexml/xpath_parser.rb#103 + def first(path_stack, node); end + + # source://rexml//lib/rexml/xpath_parser.rb#84 + def get_first(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#139 + def match(path_stack, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#69 + def namespaces=(namespaces = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#79 + def parse(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#89 + def predicate(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#74 + def variables=(vars = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/xpath_parser.rb#775 + def child(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#916 + def compare(a, operator, b); end + + # source://rexml//lib/rexml/xpath_parser.rb#678 + def descendant(nodeset, include_self); end + + # source://rexml//lib/rexml/xpath_parser.rb#689 + def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end + + # source://rexml//lib/rexml/xpath_parser.rb#938 + def each_unnode(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#637 + def enter(tag, *args); end + + # source://rexml//lib/rexml/xpath_parser.rb#815 + def equality_relational_compare(set1, op, set2); end + + # source://rexml//lib/rexml/xpath_parser.rb#591 + def evaluate_predicate(expression, nodesets); end + + # Expr takes a stack of path elements and a set of nodes (either a Parent + # or an Array and returns an Array of matching nodes + # + # source://rexml//lib/rexml/xpath_parser.rb#175 + def expr(path_stack, nodeset, context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#582 + def filter_nodeset(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#745 + def following(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#756 + def following_node_of(node); end + + # Returns a String namespace for a node, given a prefix + # The rules are: + # + # 1. Use the supplied namespace mapping first. + # 2. If no mapping was supplied, use the context node to look up the namespace + # + # source://rexml//lib/rexml/xpath_parser.rb#163 + def get_namespace(node, prefix); end + + # source://rexml//lib/rexml/xpath_parser.rb#642 + def leave(tag, *args); end + + # source://rexml//lib/rexml/xpath_parser.rb#763 + def next_sibling_node(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#477 + def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#802 + def norm(b); end + + # source://rexml//lib/rexml/xpath_parser.rb#890 + def normalize_compare_values(a, operator, b); end + + # Builds a nodeset of all of the preceding nodes of the supplied node, + # in reverse document order + # preceding:: includes every element in the document that precedes this node, + # except for ancestors + # + # source://rexml//lib/rexml/xpath_parser.rb#708 + def preceding(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#730 + def preceding_node_of(node); end + + # Reorders an array of nodes so that they are in document order + # It tries to do this efficiently. + # + # FIXME: I need to get rid of this, but the issue is that most of the XPath + # interpreter functions as a filter, which means that we lose context going + # in and out of function calls. If I knew what the index of the nodes was, + # I wouldn't have to do this. Maybe add a document IDX for each node? + # Problems with mutable documents. Or, rewrite everything. + # + # source://rexml//lib/rexml/xpath_parser.rb#655 + def sort(array_of_nodes, order); end + + # source://rexml//lib/rexml/xpath_parser.rb#441 + def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rexml//lib/rexml/xpath_parser.rb#154 + def strict?; end + + # source://rexml//lib/rexml/xpath_parser.rb#630 + def trace(*args); end + + # source://rexml//lib/rexml/xpath_parser.rb#950 + def unnode(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#877 + def value_type(value); end +end + +# source://rexml//lib/rexml/xpath_parser.rb#58 +REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rspec-core@3.12.2.rbi b/sorbet/rbi/gems/rspec-core@3.12.2.rbi new file mode 100644 index 0000000000..46660036f3 --- /dev/null +++ b/sorbet/rbi/gems/rspec-core@3.12.2.rbi @@ -0,0 +1,10791 @@ +# 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`. + +# 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 RSpec.configure + # @see Core::Configuration + # + # 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/dsl.rb#42 + 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/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + 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#110 + 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#110 + 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/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + 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#775 +class RSpec::Core::AnonymousExampleGroup < ::RSpec::Core::ExampleGroup + class << self + # source://rspec-core//lib/rspec/core/example_group.rb#776 + 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 + 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 + def all_example_ids=(_); end + + # Returns the value of attribute failed_example_ids + # + # @return [Object] the current value of failed_example_ids + 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 + def failed_example_ids=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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 Standard settings +# RSpec.configure do |c| +# c.drb = true +# c.drb_port = 1234 +# c.default_path = 'behavior' +# end +# @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 +# @see RSpec.configure +# @see Hooks +# +# 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#509 + 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#975 + 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#638 + 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#2004 + 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#1188 + 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 name [String] example name alias + # @param args [Array<Symbol>, Hash] metadata for the generated example + # + # source://rspec-core//lib/rspec/core/configuration.rb#1156 + 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#1219 + 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#1219 + 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#2034 + 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 #prepend_before + # @see #after + # @see #append_after + # + # source://rspec-core//lib/rspec/core/configuration.rb#1949 + def append_before(scope = T.unsafe(nil), *meta, &block); end + + # @private + # @raise [SystemStackError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#1914 + 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#2052 + 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<Regexp>] + # + # source://rspec-core//lib/rspec/core/configuration.rb#676 + def backtrace_exclusion_patterns; end + + # Set regular expressions used to exclude lines in backtrace. + # + # @param patterns [Array<Regexp>] set backtrace_formatter exclusion_patterns + # + # source://rspec-core//lib/rspec/core/configuration.rb#682 + def backtrace_exclusion_patterns=(patterns); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#503 + 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<Regexp>] + # + # source://rspec-core//lib/rspec/core/configuration.rb#695 + def backtrace_inclusion_patterns; end + + # Set regular expressions used to include lines in backtrace. + # + # @attr patterns [Array<Regexp>] set backtrace_formatter inclusion_patterns + # + # source://rspec-core//lib/rspec/core/configuration.rb#701 + 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 #prepend_before + # @see #after + # @see #append_after + # + # source://rspec-core//lib/rspec/core/configuration.rb#1949 + 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#480 + def bisect_runner; end + + # source://rspec-core//lib/rspec/core/configuration.rb#481 + def bisect_runner=(value); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2098 + 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_mode + # @see color_enabled? + # + # source://rspec-core//lib/rspec/core/configuration.rb#901 + 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#939 + 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#922 + 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#914 + def color_mode; end + + # Set the color mode. + # + # source://rspec-core//lib/rspec/core/configuration.rb#932 + 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#1556 + def configure_example(example, example_hooks); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1596 + 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#1544 + def configure_group(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1590 + 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#982 + 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#993 + 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<Symbol>, 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#1873 + 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#1854 + 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#1846 + def disable_monkey_patching!; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1854 + 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#1348 + 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#1341 + 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#837 + def expect_with(*frameworks); end + + # Delegates to expect_with(framework). + # + # source://rspec-core//lib/rspec/core/configuration.rb#810 + def expectation_framework=(framework); end + + # Returns the configured expectation framework adapter module(s) + # + # source://rspec-core//lib/rspec/core/configuration.rb#798 + 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#1784 + 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#1494 + 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#1062 + 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#1075 + def files_to_run; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#497 + 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#1292 + 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#1283 + 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<String>] Names of the gems to filter + # + # source://rspec-core//lib/rspec/core/configuration.rb#721 + def filter_gems_from_backtrace(*gem_names); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def filter_manager; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + 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#1254 + 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#1328 + 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#1254 + 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#1270 + 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#571 + 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#1635 + def format_docstrings(&block); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1640 + 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#975 + def formatter=(formatter, output = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1008 + 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#1003 + def formatters; end + + # Toggle full backtrace. + # + # @attr true_or_false [Boolean] toggle full backtrace display + # + # source://rspec-core//lib/rspec/core/configuration.rb#887 + 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#881 + def full_backtrace?; end + + # @return [Array] full description filter + # + # source://rspec-core//lib/rspec/core/configuration.rb#956 + 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#951 + 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#2082 + def hooks; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1581 + 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) + # 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 #include_context + # @see #extend + # @see #prepend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1404 + 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#1451 + 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#1292 + 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#1283 + def inclusion_filter=(filter); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1080 + def last_run_statuses; end + + # Returns dirs that have been prepended to the load path by the `-I` + # command line option. + # + # @return [Array<String>] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def libs; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#942 + def libs=(libs); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1604 + def load_spec_files; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#503 + def loaded_spec_files; end + + # Maximum count of failed source lines to display in the failure reports. + # (default `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. + # (default `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#648 + def mock_framework; end + + # Delegates to mock_framework=(framework). + # + # source://rspec-core//lib/rspec/core/configuration.rb#660 + 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#765 + def mock_with(framework); end + + # Invokes block before defining an example group + # + # source://rspec-core//lib/rspec/core/configuration.rb#2087 + 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#2093 + 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#66 + 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:<seed>'`, + # the seed will also be set. + # + # @see #register_ordering + # + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def order=(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#503 + def ordering_manager; end + + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + 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 + + # 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 #include + # @see #extend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1533 + 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#2004 + 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 #before + # @see #after + # @see #append_after + # + # source://rspec-core//lib/rspec/core/configuration.rb#1979 + 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#1052 + 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<String>] + # + # 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<String>] + # + # 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#1806 + def raise_errors_for_deprecations!; end + + # Turns warnings into errors. This can be useful when + # you want RSpec to run in a 'strict' no warning situation. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.raise_on_warning = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1754 + 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 => <name>` 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<RSpec::Core::Example>, Array<RSpec::Core::ExampleGroup>] The examples or groups to order + # @yieldreturn [Array<RSpec::Core::Example>, Array<RSpec::Core::ExampleGroup>] The re-ordered examples or groups + # + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def register_ordering(*args, &block); end + + # @return [RSpec::Core::Reporter] the currently configured reporter + # + # source://rspec-core//lib/rspec/core/configuration.rb#1035 + def reporter; end + + # Indicates files configured to be required. + # + # @return [Array<String>] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def requires; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1573 + def requires=(paths); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#580 + def reset; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#593 + def reset_filters; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#586 + 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#1647 + 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#1647 + def seed=(*args, &block); end + + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + 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#1117 + 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#501 + def static_config_filter_manager; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#501 + 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#1734 + def warnings=(value); end + + # @return [Boolean] Whether or not ruby warnings are enabled. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1739 + 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#1896 + def when_first_matching_example_defined(*filters); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2064 + def with_suite_hooks; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def world; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def world=(_arg0); end + + private + + # :nocov: + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2220 + def absolute_pattern?(pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2321 + def add_hook_to_existing_matching_groups(meta, scope, &block); end + + # @raise [MustBeConfiguredBeforeExampleGroupsError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2260 + def assert_no_example_groups_defined(config_option); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2310 + def clear_values_derived_from_example_status_persistence_file_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2242 + def command; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2286 + def conditionally_disable_expectations_monkey_patching; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2277 + def conditionally_disable_mocks_monkey_patching; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2315 + def configure_group_with(group, module_list, application_method); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2250 + def define_built_in_hooks; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2373 + def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2225 + def extract_location(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2202 + def file_glob_from(path, pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2191 + def gather_directories(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2170 + def get_files_to_run(paths); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2197 + def get_matching_files(path, pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2137 + def handle_suite_hook(scope, meta); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2116 + def load_file_handling_errors(method, file); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2343 + def metadata_applies_to_group?(meta, group); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2335 + def on_existing_matching_groups(meta); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2273 + def output_to_tty?(output = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2269 + def output_wrapper; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2182 + def paths_to_check(paths); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2187 + def pattern_might_load_specs_from_vendored_dirs?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2296 + def rspec_expectations_loaded?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2292 + def rspec_mocks_loaded?; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2152 + def run_suite_hooks(hook_description, hooks); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2358 + def safe_extend(mod, host); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/configuration.rb#2354 + def safe_include(mod, host); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2348 + def safe_prepend(mod, host); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2300 + def update_pattern_attr(name, value); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2246 + 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#1645 + def delegate_to_ordering_manager(*methods); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1625 +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#1018 +class RSpec::Core::Configuration::DeprecationReporterBuffer + # @return [DeprecationReporterBuffer] a new instance of DeprecationReporterBuffer + # + # source://rspec-core//lib/rspec/core/configuration.rb#1019 + def initialize; end + + # source://rspec-core//lib/rspec/core/configuration.rb#1023 + def deprecation(*args); end + + # source://rspec-core//lib/rspec/core/configuration.rb#1027 + def play_onto(reporter); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1794 +module RSpec::Core::Configuration::ExposeCurrentExample; end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1105 +RSpec::Core::Configuration::FAILED_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#728 +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#1108 +RSpec::Core::Configuration::PASSED_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1111 +RSpec::Core::Configuration::PENDING_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1744 +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 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 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#1102 +RSpec::Core::Configuration::UNKNOWN_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1114 +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<String>] 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<String>] 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#169 + def args_from_options_file(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#138 + def command_line_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#142 + def custom_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#183 + def custom_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#129 + def env_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#121 + 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#154 + def global_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#195 + def global_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#206 + def home_options_file_path; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#117 + def load_formatters_into(config); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#146 + def local_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#191 + def local_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#175 + def options_file_as_erb_string(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#158 + 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#163 + def parse_args_ignoring_files_or_dirs_to_run(args, source); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#109 + def process_options_into(config); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#150 + def project_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#187 + def project_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#222 + def resolve_xdg_config_home; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#199 + def xdg_options_file_if_exists; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#215 + 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 + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#14 + 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 + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#30 + def formats(probables); end + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#40 + def red_font(mytext); end + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#35 + 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 example_group_class [Class] the subclass of ExampleGroup in which + # this Example is declared + # @param description [String] the String passed to the `it` method (or + # alias) + # @param user_metadata [Hash] additional args passed to `it` to be used as + # metadata + # @param example_block [Proc] the block of code that represents the + # example + # @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#220 + 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/metadata.rb#442 + def exception; end + + # @return [Exception, nil] The failure, if there was one. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def exception=(_arg0); end + + # @return [Time] When the example finished. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def finished_at; end + + # @return [Time] When the example finished. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + 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/metadata.rb#442 + 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/metadata.rb#442 + 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/metadata.rb#442 + 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/metadata.rb#442 + 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/metadata.rb#442 + 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/metadata.rb#442 + 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/metadata.rb#442 + def run_time; end + + # @return [Float] How long the example took in seconds. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def run_time=(_arg0); end + + # @return [Time] When the example started. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def started_at; end + + # @return [Time] When the example started. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def started_at=(_arg0); end + + # @return [Symbol] `:passed`, `:failed` or `:pending`. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def status; end + + # @return [Symbol] `:passed`, `:failed` or `:pending`. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + 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#350 + 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#707 + 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#713 + def inspect; end + + private + + # source://rspec-core//lib/rspec/core/example_group.rb#758 + 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#367 + def add_example(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#529 + def before_context_ivars; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#466 + def children; end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + 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#542 + def currently_executing_a_context_hook?; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#667 + def declaration_locations; end + + # @private + # @see DSL#describe + # + # source://rspec-core//lib/rspec/core/example_group.rb#246 + 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#317 + 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#460 + def descendant_filtered_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#503 + def descendants; end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def describe(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#78 + 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#700 + def each_instance_variable_for_example(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#518 + 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#146 + def example(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def example_group(*args, &example_group_block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#450 + def examples; end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def fcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + 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#146 + def fexample(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#78 + def file_path; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#455 + def filtered_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#379 + 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#146 + 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#146 + def focus(*all_args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#655 + 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#146 + 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#675 + 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#343 + 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#353 + 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#146 + def it(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#318 + def it_behaves_like(name, *args, &customization_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#318 + def it_should_behave_like(name, *args, &customization_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#78 + 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#485 + def next_runnable_index_for(file); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#625 + def ordering_strategy; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#508 + 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#146 + def pending(*all_args, &block); end + + # Removes an example from the example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#373 + def remove_example(example); end + + # Clear memoized values when adding/removing examples + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#359 + def reset_memoized; end + + # Runs all the examples in this group. + # + # source://rspec-core//lib/rspec/core/example_group.rb#599 + def run(reporter = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#585 + def run_after_context_hooks(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#547 + def run_before_context_hooks(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#641 + def run_examples(reporter); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#410 + def set_it_up(description, args, registration_collection, &example_group_block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#685 + 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#146 + 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#146 + def specify(*all_args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#534 + def store_before_context_ivars(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#395 + def subclass(parent, description, args, registration_collection, &example_group_block); end + + # :nocov: + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#562 + 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#513 + def top_level?; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#680 + 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#476 + def traverse_tree_until(&block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#727 + 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 + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def xcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + 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#146 + 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#146 + 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#146 + def xspecify(*all_args, &block); end + + private + + # source://rspec-core//lib/rspec/core/example_group.rb#742 + def method_missing(name, *args); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#696 +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#740 +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#118 + 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#6 + 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<Symbol>] 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::Reporter +# @see RSpec::Core::Formatters::Protocol +# +# 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 text [String] the text to wrap + # @param code_or_symbol [Symbol, Fixnum] the desired control code + # @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 text [String] the text to wrap + # @param code_or_symbol [Symbol, Fixnum] the desired control code + # @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#10 + 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 + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @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 + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + 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 + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#73 + 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#79 + def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 + 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#207 + 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 + + # for 1.8.7 + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#265 + def encoded_description(description); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#115 + def encoded_string(string); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#111 + def encoding_of(string); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#275 + def exception_backtrace; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#145 + def exception_class_name(exception = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#185 + def exception_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#178 + 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#196 + def extra_failure_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#151 + def failure_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#165 + def failure_slash_error_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#99 + def final_exception(exception, previous = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#241 + def find_failed_line; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#256 + def formatted_message_and_backtrace(colorizer); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#129 + 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#217 + 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#284 +class RSpec::Core::Formatters::ExceptionPresenter::Factory + # @return [Factory] a new instance of Factory + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#291 + def initialize(example); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#285 + def build; end + + private + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#342 + def multiple_exception_summarizer(exception, prior_detail_formatter, color); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#338 + def multiple_exceptions_error?(exception); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#301 + def options; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#305 + def pending_options; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#363 + def sub_failure_list_formatter(exception, message_color); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#322 + def with_multiple_error_options_as_needed(exception, options); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#396 +class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater + # @return [CommonBacktraceTruncater] a new instance of CommonBacktraceTruncater + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#397 + def initialize(parent); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#401 + 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#389 +module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter + class << self + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#390 + def format_backtrace(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#421 +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::Util + + # @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#55 + def close(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#59 + def dump_profile(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#78 + def dump_profile_slowest_example_groups(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#66 + 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#50 + def seed(notification); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#35 + def stop(notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#87 + 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 `: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 after + # @overload after + # @overload after + # @overload after + # @see #before + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # 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(: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 + # @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 + # @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 ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # source://rspec-core//lib/rspec/core/hooks.rb#200 + 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 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. + # @note `:example`/`:each` is the only supported scope. + # @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(: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 + # @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 + # @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 ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # 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 `: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 after + # @overload after + # @overload after + # @overload after + # @see #before + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # source://rspec-core//lib/rspec/core/hooks.rb#277 + 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 + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute options + # + # @return [Object] the current value of options + def options; end + + # Sets the attribute options + # + # @param value [Object] the value to set the attribute options to. + # @return [Object] the newly set value + def options=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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 + 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 + def hidden_options=(_); end + + # Returns the value of attribute parser + # + # @return [Object] the current value of parser + def parser; end + + # Sets the attribute parser + # + # @param value [Object] the value to set the attribute parser to. + # @return [Object] the newly set value + def parser=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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 #subject + # @see #should + # @see #should_not + # + # 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 #subject + # @see #is_expected + # + # 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 #subject + # @see #is_expected + # + # 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 #should + # @see #should_not + # @see #is_expected + # + # 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 name [String, Symbol] used to define an accessor with an + # intention revealing name + # @param block defines the value to be returned by `subject` in examples + # @see MemoizedHelpers#should + # @see MemoizedHelpers#should_not + # @see MemoizedHelpers#is_expected + # + # 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 Example#metadata +# @see ExampleGroup.metadata +# @see FilterManager +# @see Configuration#filter_run_including +# @see Configuration#filter_run_excluding +# +# 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#436 +class RSpec::Core::MultipleExceptionError < ::StandardError + include ::RSpec::Core::MultipleExceptionError::InterfaceTag + + # @param exceptions [Array<Exception>] The initial list of exceptions. + # @return [MultipleExceptionError] a new instance of MultipleExceptionError + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#492 + 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#489 + def aggregation_block_label; end + + # @return [Hash] Metadata used by RSpec for formatting purposes. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#485 + def aggregation_metadata; end + + # @return [Array<Exception>] The list of failures and other exceptions, combined. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#482 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#517 + def exception_count_description; end + + # @return [Array<Exception>] The list of failures. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#476 + 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#507 + def message; end + + # @return [Array<Exception>] The list of other errors. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#479 + 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#512 + 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#437 +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#441 + 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#467 + 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#514 +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#515 + 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 message [String] A custom message about the deprecation +# @attr deprecated [String] A custom message about the deprecation (alias of +# message) +# @attr replacement [String] An optional replacement for the deprecation +# @attr call_site [String] An optional call site from which the deprecation +# was issued +# +# source://rspec-core//lib/rspec/core/notifications.rb#491 +class RSpec::Core::Notifications::DeprecationNotification < ::Struct + # An optional call site from which the deprecation + # was issued + # + # @return [String] the current value of call_site + 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 + def call_site=(_); end + + # A custom message about the deprecation (alias of + # message) + # + # @return [String] the current value of deprecated + 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 + def deprecated=(_); end + + # A custom message about the deprecation + # + # @return [String] the current value of message + 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 + def message=(_); end + + # An optional replacement for the deprecation + # + # @return [String] the current value of replacement + 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 + def replacement=(_); end + + class << self + def [](*_arg0); end + + # Convenience way to initialize the notification + # + # @api + # + # source://rspec-core//lib/rspec/core/notifications.rb#497 + def from_hash(data); end + + def inspect; end + def keyword_init?; end + def members; end + + private + + 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 + 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 + def example=(_); end + + class << self + def [](*_arg0); end + + # @private + # + # source://rspec-core//lib/rspec/core/notifications.rb#41 + def for(example); end + + def inspect; end + def keyword_init?; end + def members; end + + private + + 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<RSpec::Core::Example>] list of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#75 + def examples; end + + # @return [Array<RSpec::Core::Example>] list of failed examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#80 + def failed_examples; end + + # @return [Array<RSpec::Core::Notifications::FailedExampleNotification>] 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<RSpec::Core::Notifications::ExampleNotification>] returns examples as notifications + # + # source://rspec-core//lib/rspec/core/notifications.rb#91 + def notifications; end + + # @return [Array<RSpec::Core::Example>] list of pending examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#85 + def pending_examples; end + + # returns pending examples as notifications + # + # @return [Array<RSpec::Core::Notifications::SkippedExampleNotification, + # RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification>] + # + # source://rspec-core//lib/rspec/core/notifications.rb#104 + def pending_notifications; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#134 + 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#154 +class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification + # @return [FailedExampleNotification] a new instance of FailedExampleNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#211 + 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<String>] the examples colorized backtrace lines + # + # source://rspec-core//lib/rspec/core/notifications.rb#193 + 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<String>] The example failure message colorized + # + # source://rspec-core//lib/rspec/core/notifications.rb#178 + def colorized_message_lines(colorizer = T.unsafe(nil)); end + + # @return [String] The example description + # + # source://rspec-core//lib/rspec/core/notifications.rb#163 + def description; end + + # @return [Exception] The example failure + # + # source://rspec-core//lib/rspec/core/notifications.rb#158 + def exception; end + + # Returns the failures formatted backtrace. + # + # @return [Array<String>] the examples backtrace lines + # + # source://rspec-core//lib/rspec/core/notifications.rb#185 + 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#199 + def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end + + # @return [Array<string>] 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#205 + def fully_formatted_lines(failure_number, colorizer = T.unsafe(nil)); end + + # Returns the message generated for this failure line by line. + # + # @return [Array<String>] The example failure message + # + # source://rspec-core//lib/rspec/core/notifications.rb#170 + def message_lines; end + + class << self + 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#256 +class RSpec::Core::Notifications::GroupNotification < ::Struct + # the current group + # + # @return [RSpec::Core::ExampleGroup] the current value of group + 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 + def group=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#262 +class RSpec::Core::Notifications::MessageNotification < ::Struct + # the message + # + # @return [String] the current value of message + def message; end + + # the message + # + # @param value [String] the value to set the attribute message to. + # @return [String] the newly set value + def message=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#504 +class RSpec::Core::Notifications::NullNotification; end + +# @deprecated Use {FailedExampleNotification} instead. +# +# source://rspec-core//lib/rspec/core/notifications.rb#221 +class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end + +# @deprecated Use {FailedExampleNotification} instead. +# +# source://rspec-core//lib/rspec/core/notifications.rb#218 +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 examples [Array<RSpec::Core::Example>] the examples run +# @attr number_of_examples [Fixnum] the number of examples to profile +# @attr example_groups [Array<RSpec::Core::Profiler>] example groups run +# +# source://rspec-core//lib/rspec/core/notifications.rb#427 +class RSpec::Core::Notifications::ProfileNotification + # @return [ProfileNotification] a new instance of ProfileNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#428 + 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#434 + def duration; end + + # the examples run + # + # @return [Array<RSpec::Core::Example>] the current value of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#434 + 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#434 + def number_of_examples; end + + # @return [String] the percentage of total time taken + # + # source://rspec-core//lib/rspec/core/notifications.rb#453 + def percentage; end + + # @return [Float] the time taken (in seconds) to run the slowest examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#445 + def slow_duration; end + + # @return [Array<RSpec::Core::Example>] the slowest examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#437 + def slowest_examples; end + + # @return [Array<RSpec::Core::Example>] the slowest example groups + # + # source://rspec-core//lib/rspec/core/notifications.rb#462 + def slowest_groups; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#468 + 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#269 +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#280 + def fully_formatted; end + + # the seed used to randomize ordering + # + # @return [Fixnum] the current value of seed + 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 + def seed=(_); end + + # @api + # @return [Boolean] has the seed been used? + # + # source://rspec-core//lib/rspec/core/notifications.rb#273 + 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 + def used=(_); end + + private + + # whether the seed has been used or not + # + # @return [Boolean] the current value of used + def used; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#228 +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#233 + def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end + + class << self + 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 + def count; end + + # the number counted + # + # @param value [Fixnum] the value to set the attribute count to. + # @return [Fixnum] the newly set value + def count=(_); end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @return [Float] the current value of load_time + 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 + def load_time=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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 examples [Array<RSpec::Core::Example>] the examples run +# @attr failed_examples [Array<RSpec::Core::Example>] the failed examples +# @attr pending_examples [Array<RSpec::Core::Example>] the pending examples +# @attr load_time [Float] the number of seconds taken to boot RSpec +# and load the spec files +# @attr errors_outside_of_examples_count [Integer] the number of errors that +# have occurred processing +# the spec suite +# +# source://rspec-core//lib/rspec/core/notifications.rb#298 +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#362 + 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#345 + 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 + 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 + 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 + 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 + def errors_outside_of_examples_count=(_); end + + # @api + # @return [Fixnum] the number of examples run + # + # source://rspec-core//lib/rspec/core/notifications.rb#304 + def example_count; end + + # the examples run + # + # @return [Array<RSpec::Core::Example>] the current value of examples + def examples; end + + # the examples run + # + # @param value [Array<RSpec::Core::Example>] the value to set the attribute examples to. + # @return [Array<RSpec::Core::Example>] the newly set value + def examples=(_); end + + # the failed examples + # + # @return [Array<RSpec::Core::Example>] the current value of failed_examples + def failed_examples; end + + # the failed examples + # + # @param value [Array<RSpec::Core::Example>] the value to set the attribute failed_examples to. + # @return [Array<RSpec::Core::Example>] the newly set value + def failed_examples=(_); end + + # @api + # @return [Fixnum] the number of failed examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#310 + 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#372 + 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#378 + 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#384 + 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 + 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 + def load_time=(_); end + + # @api + # @return [Fixnum] the number of pending examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#316 + def pending_count; end + + # the pending examples + # + # @return [Array<RSpec::Core::Example>] the current value of pending_examples + def pending_examples; end + + # the pending examples + # + # @param value [Array<RSpec::Core::Example>] the value to set the attribute pending_examples to. + # @return [Array<RSpec::Core::Example>] the newly set value + 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#322 + def totals_line; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#406 + def duplicate_rerun_locations; end + + # source://rspec-core//lib/rspec/core/notifications.rb#400 + def rerun_argument_for(example); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#259 +class RSpec::Core::NullReporter + class << self + private + + # source://rspec-core//lib/rspec/core/reporter.rb#260 + 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#116 +class RSpec::Core::Ordering::ConfigurationManager + # @return [ConfigurationManager] a new instance of ConfigurationManager + # + # source://rspec-core//lib/rspec/core/ordering.rb#119 + def initialize; end + + # source://rspec-core//lib/rspec/core/ordering.rb#151 + def force(hash); end + + # source://rspec-core//lib/rspec/core/ordering.rb#136 + def order=(type); end + + # Returns the value of attribute ordering_registry. + # + # source://rspec-core//lib/rspec/core/ordering.rb#117 + def ordering_registry; end + + # source://rspec-core//lib/rspec/core/ordering.rb#162 + def register_ordering(name, strategy = T.unsafe(nil)); end + + # Returns the value of attribute seed. + # + # source://rspec-core//lib/rspec/core/ordering.rb#117 + def seed; end + + # source://rspec-core//lib/rspec/core/ordering.rb#130 + def seed=(seed); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#126 + 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 + +# 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#83 +class RSpec::Core::Ordering::Registry + # @return [Registry] a new instance of Registry + # + # source://rspec-core//lib/rspec/core/ordering.rb#84 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/ordering.rb#98 + def fetch(name, &fallback); end + + # source://rspec-core//lib/rspec/core/ordering.rb#102 + def register(sym, strategy); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#106 + 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 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 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 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 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 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 gets(*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 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 nonblock(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nonblock=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nonblock?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nread(*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 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 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 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 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 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 tty?(*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 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#310 + def add_tag_filter(options, filter_type, tag_name, value = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#318 + 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#314 + 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)); 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#214 + def abort_with(msg, exit_status); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#193 + 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#221 + 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#206 + 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#200 + def stop; end + + private + + # source://rspec-core//lib/rspec/core/reporter.rb#242 + def close; end + + # source://rspec-core//lib/rspec/core/reporter.rb#233 + def ensure_listeners_ready; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#246 + def mute_profile_output?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#252 + 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#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 + 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#190 + 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<RSpec::Core::ExampleGroup>] 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#199 + 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 + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#34 + def playback_onto(group); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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.it_behaves_like + # @see ExampleGroup.include_examples + # @see ExampleGroup.include_context + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + 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.it_behaves_like + # @see ExampleGroup.include_examples + # @see ExampleGroup.include_context + # + # 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.it_behaves_like + # @see ExampleGroup.include_examples + # @see ExampleGroup.include_context + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + 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#782 +class RSpec::Core::SharedExampleGroupInclusionStackFrame + # @private + # @return [SharedExampleGroupInclusionStackFrame] a new instance of SharedExampleGroupInclusionStackFrame + # + # source://rspec-core//lib/rspec/core/example_group.rb#789 + 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#805 + def description; end + + # @return [String] The {#inclusion_location}, formatted for display by a formatter. + # + # source://rspec-core//lib/rspec/core/example_group.rb#795 + def formatted_inclusion_location; end + + # @return [String] the location where the shared example was included + # + # source://rspec-core//lib/rspec/core/example_group.rb#786 + def inclusion_location; end + + # @return [String] the name of the shared example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#784 + def shared_group_name; end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#811 + def current_backtrace; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#829 + def shared_example_group_inclusions; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#816 + 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#10 +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#20 + 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 + 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; end + end +end + +# Namespace for the example group subclasses generated by top-level +# `describe`. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#839 +module RSpec::ExampleGroups + extend ::RSpec::Support::RecursiveConstMethods + + class << self + # source://rspec-core//lib/rspec/core/example_group.rb#842 + def assign_const(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#862 + def base_name_for(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#850 + def constant_scope_for(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#895 + def disambiguate(name, const_scope); end + + # source://rspec-core//lib/rspec/core/example_group.rb#856 + 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.12.3.rbi b/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi new file mode 100644 index 0000000000..85dc1881b8 --- /dev/null +++ b/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi @@ -0,0 +1,8100 @@ +# 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 + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +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?(<object wrapped by expect>)`. 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#223 + 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 message [String] + # @param expected [Object] + # @param actual [Object] + # + # 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#142 + 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#60 + 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#56 + 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#64 + 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#70 +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#198 +class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < ::Struct + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + 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 + def beginning_line_number=(_); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#203 + def body_content_locations; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#199 + def method_call_location; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#216 + def block_body_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#221 + def block_wrapper_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#232 + def candidate_block_wrapper_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#241 + def candidate_method_ident_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#209 + def method_ident_node; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#247 + def method_ident_node?(node); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#75 +class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < ::Struct + # @return [BlockTokenExtractor] a new instance of BlockTokenExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 + def initialize(*_arg0); end + + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + 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 + def beginning_line_number=(_); end + + # Returns the value of attribute body_tokens. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#76 + def body_tokens; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + # Returns the value of attribute state. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#76 + def state; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#124 + def after_beginning_of_args_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#128 + def after_beginning_of_body_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#107 + def after_method_call_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#111 + def after_opener_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#191 + def block_locator; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#185 + def correct_block?(body_tokens); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#141 + def finalize_pending_tokens!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#95 + def finish!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#147 + def finish_or_find_next_block_if_incorrect!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#168 + def handle_closer_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#158 + def handle_opener_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#103 + def initial_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#99 + def invoke_state_handler(token); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#164 + def opener_token?(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#177 + def opener_token_stack; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#85 + def parse!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#137 + def pending_tokens; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#181 + def pipe_token?(token); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#68 +class RSpec::Expectations::BlockSnippetExtractor::Error < ::StandardError; end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#69 +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 + + # 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<Module>] the list of classes or modules + # to add `should` and `should_not` to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#112 + def add_should_and_should_not_to(*modules); end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array<String>)`. 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#129 + def backtrace_formatter; end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array<String>)`. 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#128 + 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#216 + 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#140 + 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#145 + 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 + + # Indicates what RSpec will do about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#206 + def on_potential_false_positives; end + + # Configures what RSpec will do about matcher use which will + # potentially cause false positives in tests. + # + # @param behavior [Symbol] can be set to :warn, :raise or :nothing + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#182 + def on_potential_false_positives=(behavior); end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#150 + def reset_syntaxes_to_default; end + + # Returns the value of attribute strict_predicate_matchers. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#197 + def strict_predicate_matchers; 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. + # + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#192 + def strict_predicate_matchers=(flag); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#199 + 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<Symbol>] 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>, 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#168 + 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#211 + 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#158 +module RSpec::Expectations::Configuration::NullBacktraceFormatter + class << self + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#159 + 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#33 + 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#19 + def modern_matcher_from(matcher); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#24 + 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#76 + 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#90 + def initialize(block_label, metadata); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#22 + 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#59 + def call(failure, options); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#49 + 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#53 + 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#85 + def assign_backtrace(failure); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#96 + def notify_aggregated_failures; end +end + +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#20 +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#15 + def inspect; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#10 +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#180 +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#113 +class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator + # @return [LegacyMatcherAdapter] a new instance of LegacyMatcherAdapter + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#114 + def initialize(matcher); end + + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#124 + 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#157 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#158 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#162 + 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#169 + 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#133 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#134 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#138 + def failure_message_when_negated; end + + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#142 + 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#153 + def initialize(failure_aggregator); end + + # @return [String] The user-assigned label for the aggregation block. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#128 + def aggregation_block_label; end + + # @return [Hash] The metadata hash passed to `aggregate_failures`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#133 + def aggregation_metadata; end + + # @return [Array<Exception>] The list of expectation failures and other exceptions, combined. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#125 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#144 + def exception_count_description; end + + # @return [Array<RSpec::Expectations::ExpectationNotMetError>] The list of expectation failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#115 + def failures; end + + # @return [String] The fully formatted exception message. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#110 + def message; end + + # @return [Array<Exception>] The list of other exceptions. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#120 + 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#138 + def summary; end + + private + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#185 + def backtrace_line(line); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#158 + def block_description; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#167 + def enumerated(exceptions, index_offset); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#197 + def enumerated_errors; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#193 + def enumerated_failures; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#175 + def exclusion_patterns; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#181 + def format_backtrace(backtrace); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#212 + def indentation; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#203 + def indented(failure_message, index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#224 + def index_label(index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#216 + def longest_index_label_width; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#163 + def pluralize(noun, count); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#220 + def width_of_label(index); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#74 +class RSpec::Expectations::NegativeExpectationHandler + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#88 + def does_not_match?(matcher, actual, &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#75 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#104 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#100 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#96 + def verb; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#46 +class RSpec::Expectations::PositiveExpectationHandler + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#47 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#68 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#64 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#60 + 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 <tt>be_in_zone</tt> 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 <tt>create</tt> method (in this case, <tt>zone</tt>). The +# failure message methods (<tt>failure_message</tt> and +# <tt>failure_message_when_negated</tt>) are passed the actual value (the +# receiver of <tt>expect(..)</tt> or <tt>expect(..).not_to</tt>). +# +# ### 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 <tt>require</tt>d +# 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 <tt>receiver</tt> and <tt>message</tt>, 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 receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + def a_collection_starting_with(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_falsey_value(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + def a_kind_of(*args, **_arg1, &block); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + def an_instance_of(*args, **_arg1, &block); end + + # Passes if <tt>actual == expected</tt>. + # + # 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/dsl.rb#38 + 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/dsl.rb#38 + def an_object_eql_to(*args, **_arg1, &block); end + + # Passes if <tt>actual.equal?(expected)</tt> (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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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#355 + 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/dsl.rb#38 + 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#366 + 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#378 + 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 <tt>receiver</tt> and <tt>message</tt>, 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 receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # 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 <tt>receiver</tt> and <tt>message</tt>, 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 receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + def ending_with(*args, **_arg1, &block); end + + # Passes if <tt>actual == expected</tt>. + # + # 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 <tt>actual == expected</tt>. + # + # 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/dsl.rb#38 + 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/dsl.rb#38 + def eql_to(*args, **_arg1, &block); end + + # Passes if <tt>actual.equal?(expected)</tt> (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 <tt>actual.equal?(expected)</tt> (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/dsl.rb#38 + 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/dsl.rb#38 + 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#to + # @see Expectations::ExpectationTarget#not_to + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#72 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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#773 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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/dsl.rb#38 + 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#65 +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) + +# 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#8 +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::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 + + # :nocov: + # + # @api private + def present_ivars; 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 + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#129 + def assert_ivars(*expected_ivars); 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#166 +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#172 + 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#181 + def failure_message_when_negated; end + + class << self + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#186 + def has_default_failure_messages?(matcher); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#146 +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#156 + 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#156 + def improve_hash_formatting(inspect_string); 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#9 +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 <operator> 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#32 +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#55 +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_<predicate>`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#138 +class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#149 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#141 + def predicate; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#157 + def predicate_accessible?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#145 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#161 + def present_tense_predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#139 +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#9 +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#9 +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 + + # 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#7 +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::ExpectedsForMultipleDiffs] + # + # 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#93 + def compound_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#125 + def diffable_matcher_list_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#87 + 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#99 + def matcher_1_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#103 + def matcher_2_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#119 + def matcher_is_diffable?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#107 + def matcher_supports_block_expectations?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#113 + 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#244 +class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#245 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#262 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#257 + 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#156 +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#157 + def initialize(actual, matcher_1, matcher_2); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#170 + 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#184 + 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#224 + def order_block_matchers; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#233 + 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#271 +class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#272 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#283 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#278 + 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#132 +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#133 + def initialize(actual, *_arg1); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#137 + 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#10 +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#135 + 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#129 + 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#123 + def missing_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#139 + def pairings_maximizer; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#104 + def safe_sort(array); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#118 + 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#186 +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#223 + 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#221 + def actual_to_expected_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def expected_to_actual_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#237 + def find_best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def solution; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#299 + def apply_pairing_to(indeterminates, original_matches, other_list_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#283 + def best_solution_for_pairing(expected_index, actual_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#263 + def categorize_indexes(indexes_to_categorize, other_indexes); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#278 + 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#257 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#258 + def worse_than?(_other); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#188 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < ::Struct + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#210 + def +(derived_candidate_solution); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#194 + def candidate?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#199 + def ideal?; end + + # Returns the value of attribute indeterminate_actual_indexes + # + # @return [Object] the current value of indeterminate_actual_indexes + 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 + def indeterminate_actual_indexes=(_); end + + # Returns the value of attribute indeterminate_expected_indexes + # + # @return [Object] the current value of indeterminate_expected_indexes + 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 + def indeterminate_expected_indexes=(_); end + + # Returns the value of attribute unmatched_actual_indexes + # + # @return [Object] the current value of unmatched_actual_indexes + 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 + def unmatched_actual_indexes=(_); end + + # Returns the value of attribute unmatched_expected_indexes + # + # @return [Object] the current value of unmatched_expected_indexes + 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 + def unmatched_expected_indexes=(_); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#206 + def unmatched_item_count; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def worse_than?(other); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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#120 + def count_constraint_to_number(n); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#139 + def count_expectation_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#143 + def count_failure_reason(action); end + + # @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#69 + def expected_count_matches?(actual_count); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#77 + def has_expected_count?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#157 + def human_readable_count(count); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#148 + def human_readable_expectation_type; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#100 + def raise_impossible_count_expectation(count); end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#109 + def raise_unsupported_count_expectation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#81 + def set_expected_count(relativity, n); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#132 + 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#99 + def expectation_of(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#94 + def failure_message_expecting(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#115 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#90 + def method_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#49 + def predicate_accessible?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#74 + def predicate_matches?(value = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#70 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#66 + def predicate_result; end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#61 + def private_predicate?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#82 + def root; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#109 + 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#9 +class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#22 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#28 + 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#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#34 + 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#9 +class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#22 + 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#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#28 + 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#9 +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#45 +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_<predicate>`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#126 +class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#129 + def predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#127 +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#8 +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 + # @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#43 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#61 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#32 + def does_not_match?(actual); end + + # @api private + # @return [Array, Hash] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#67 + 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#49 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#55 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#21 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#167 + def actual_collection_includes?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#153 + def actual_hash_has_key?(expected_key); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#141 + def actual_hash_includes?(expected_key, expected_value); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#77 + def check_actual?(actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#83 + def check_expected_count?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#149 + def comparing_hash_keys?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#137 + def comparing_hash_to_a_subset?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#207 + def convert_to_hash?(obj); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#181 + def count_enumerable(expected_item); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#186 + def count_inclusions; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#198 + def diff_would_wrongly_highlight_matched_item?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#120 + def excluded_from_actual; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#95 + def format_failure_message(preposition); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#115 + def perform_match(&block); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#106 + 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 + + # 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#45 + def can_safely_call_match?(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#38 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#52 + 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#18 + 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#113 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#79 + def does_not_match?(given_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#95 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#101 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#107 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#48 + 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#85 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#90 + def supports_value_expectations?; end + + # Specifies the expected error message. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#39 + def with_message(expected_message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#119 + def actual_error_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#133 + def block_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#129 + def error_and_message_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#141 + def eval_block; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#125 + def expectation_matched?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#222 + def expected_error; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#253 + def expecting_specific_exception?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#237 + def format_backtrace(backtrace); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#242 + def given_error; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#172 + def handle_warning(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#257 + def raise_message_already_set; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#137 + def ready_to_eval_block?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#151 + def verify_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#184 + def warn_about_bare_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#176 + def warn_about_bare_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#210 + def warn_about_negative_false_positive!(expression); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#197 + def warn_about_nil_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#180 + def warn_about_nil_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#156 + def warn_for_negative_false_positives!; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#262 + 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. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#16 +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#72 +class RSpec::Matchers::BuiltIn::ReliableMatchData + # @api private + # @return [ReliableMatchData] a new instance of ReliableMatchData + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#73 + 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#96 + def captures; end + + # Returns match data names for named captures + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#88 + def names; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#102 + 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#48 + 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#36 + 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#60 + 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#71 + 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 + + # @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#182 +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#150 +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#22 + 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#38 + 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 expected [Object] what is expected + # @param actual [Object] the actual value + # @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#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 + 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 + def item; end + + # Sets the attribute item + # + # @param value [Object] the value to set the attribute item to. + # @return [Object] the newly set value + 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 + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + 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 negated_name [Symbol] the name for the negated matcher + # @param base_name [Symbol] the name of the original matcher that will be negated + # @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#73 + 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#482 + 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#494 + 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#499 + 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#522 + 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#532 + 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#507 + 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 + +# Handles list of expected values when there is a need to render +# multiple diffs. Also can handle one value. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#6 +class RSpec::Matchers::ExpectedsForMultipleDiffs + # @api private + # @return [ExpectedsForMultipleDiffs] a new instance of ExpectedsForMultipleDiffs + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.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 message [String] original failure message + # @param differ [Proc] + # @param actual [Any] value + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#47 + def message_with_diff(message, differ, actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#68 + def diffs(differ, actual); end + + class << self + # Wraps provided matcher list in instance of + # ExpectedForMultipleDiffs. + # + # @api private + # @param matchers [Array<Any>] list of matchers to wrap + # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#36 + def for_many_matchers(matchers); end + + # Wraps provided expected value in instance of + # ExpectedForMultipleDiffs. If provided value is already an + # ExpectedForMultipleDiffs then it just returns it. + # + # @api private + # @param expected [Any] value to be wrapped + # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#26 + def from(expected); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#58 + def diff_label_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.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/expecteds_for_multiple_diffs.rb#10 +RSpec::Matchers::ExpectedsForMultipleDiffs::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) + +# Maximum readable matcher description length +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#14 +RSpec::Matchers::ExpectedsForMultipleDiffs::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# 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#5 +class RSpec::Matchers::MatcherDelegator + include ::RSpec::Matchers::Composable + + # @return [MatcherDelegator] a new instance of MatcherDelegator + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#9 + def initialize(base_matcher); end + + # Returns the value of attribute base_matcher. + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#7 + def base_matcher; end + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#13 + def method_missing(*args, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#29 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#18 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/rspec-its@1.3.0.rbi b/sorbet/rbi/gems/rspec-its@1.3.0.rbi new file mode 100644 index 0000000000..374ff08743 --- /dev/null +++ b/sorbet/rbi/gems/rspec-its@1.3.0.rbi @@ -0,0 +1,197 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-its` gem. +# Please instead update this file by running `bin/tapioca gem rspec-its`. + +# source://rspec-its//lib/rspec/its/version.rb#1 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +module RSpec::Core::SharedContext + include ::RSpec::Its +end + +# source://rspec-its//lib/rspec/its/version.rb#2 +module RSpec::Its + # Creates a nested example group named by the submitted `attribute`, + # and then generates an example using the submitted block. + # + # The attribute can be a `Symbol` or a `String`. Given a `String` + # with dots, the result is as though you concatenated that `String` + # onto the subject in an expression. + # + # When the subject is a `Hash`, you can refer to the Hash keys by + # specifying a `Symbol` or `String` in an array. + # + # With an implicit subject, `is_expected` can be used as an alternative + # to `should` (e.g. for one-liner use). An `are_expected` alias is also + # supplied. + # + # With an implicit subject, `will` can be used as an alternative + # to `expect { subject.attribute }.to matcher` (e.g. for one-liner use). + # + # With an implicit subject, `will_not` can be used as an alternative + # to `expect { subject.attribute }.to_not matcher` (e.g. for one-liner use). + # + # You can pass more than one argument on the `its` block to add + # some metadata to the generated example + # + # Note that this method does not modify `subject` in any way, so if you + # refer to `subject` in `let` or `before` blocks, you're still + # referring to the outer subject. + # + # @example + # + # # This ... + # describe Array do + # its(:size) { should eq(0) } + # end + # + # # ... generates the same runtime structure as this: + # describe Array do + # describe "size" do + # it "should eq(0)" do + # subject.size.should eq(0) + # end + # end + # end + # @example + # + # describe Person do + # subject do + # Person.new.tap do |person| + # person.phone_numbers << "555-1212" + # end + # end + # + # its("phone_numbers.first") { should eq("555-1212") } + # end + # @example + # + # describe "a configuration Hash" do + # subject do + # { :max_users => 3, + # 'admin' => :all_permissions. + # 'john_doe' => {:permissions => [:read, :write]}} + # end + # + # its([:max_users]) { should eq(3) } + # its(['admin']) { should eq(:all_permissions) } + # its(['john_doe', :permissions]) { should eq([:read, :write]) } + # + # # You can still access its regular methods this way: + # its(:keys) { should include(:max_users) } + # its(:count) { should eq(2) } + # end + # @example + # + # describe Array do + # its(:size) { is_expected.to eq(0) } + # end + # @example + # + # describe Array do + # its(:foo) { will raise_error(NoMethodError) } + # end + # @example + # + # describe Array do + # its(:size) { will_not raise_error } + # end + # @example + # + # # This ... + # describe Array do + # its(:size, :focus) { should eq(0) } + # end + # + # # ... generates the same runtime structure as this: + # describe Array do + # describe "size" do + # it "should eq(0)", :focus do + # subject.size.should eq(0) + # end + # end + # end + # @example + # + # describe Person do + # subject { Person.new } + # before { subject.age = 25 } + # its(:age) { should eq(25) } + # end + # + # source://rspec-its//lib/rspec/its.rb#121 + def its(attribute, *options, &block); end +end + +# source://rspec-its//lib/rspec/its/version.rb#3 +RSpec::Its::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi b/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi new file mode 100644 index 0000000000..ac8fc5fdb7 --- /dev/null +++ b/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi @@ -0,0 +1,5310 @@ +# 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 + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +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 subject the subject to which the message will be added + # @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 + # @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 subject the subject on which the message will be expected + # @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 + # @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#737 +class RSpec::Mocks::AndInvokeImplementation + # @return [AndInvokeImplementation] a new instance of AndInvokeImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#738 + def initialize(procs_to_invoke); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#742 + def call(*args, &block); end +end + +# Handles the implementation of an `and_return` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#721 +class RSpec::Mocks::AndReturnImplementation + # @return [AndReturnImplementation] a new instance of AndReturnImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#722 + def initialize(values_to_return); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#726 + def call(*_args_to_ignore, &_block); end +end + +# Represents an `and_call_original` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#779 +class RSpec::Mocks::AndWrapOriginalImplementation + # @return [AndWrapOriginalImplementation] a new instance of AndWrapOriginalImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#780 + def initialize(method, block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#807 + def call(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#787 + def initial_action=(_value); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#803 + def inner_action; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#791 + def inner_action=(_value); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#799 + def present?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#795 + def terminal_action=(_value); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#814 + def cannot_modify_further_error; end +end + +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#785 +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#694 +class RSpec::Mocks::AndYieldImplementation + # @return [AndYieldImplementation] a new instance of AndYieldImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#695 + def initialize(args_to_yield, eval_context, error_generator); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#701 + 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#280 + 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?(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#233 + def backup_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#267 + def mark_invoked!(method_name); end + + # @yield [args.first, args] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#176 + def normalize_chain(*args); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#247 + def observe!(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#243 + def public_protected_or_private_method_defined?(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#181 + def received_expected_message!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#227 + def remove_dummy_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#187 + def restore_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#195 + def restore_original_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#168 + 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#6 +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 ArgumentMatchers + # @see #args_match? + # + # 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#111 + 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#101 + 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 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#80 + 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#91 + 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#91 + 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#101 + 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#111 + 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#118 + def anythingize_lonely_keys(*args); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#149 +class RSpec::Mocks::ArgumentMatchers::AnyArgMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#150 + def ===(_other); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#154 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::AnyArgMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#142 +class RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 +class RSpec::Mocks::ArgumentMatchers::ArrayIncludingMatcher + # @return [ArrayIncludingMatcher] a new instance of ArrayIncludingMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#233 + def initialize(expected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#237 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#248 + def description; end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#254 + def formatted_expected_values; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 +class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # @return [BaseHashMatcher] a new instance of BaseHashMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#179 + def initialize(expected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#183 + def ===(predicate, actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#191 + def description(name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#197 + def formatted_expected_hash; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#167 +class RSpec::Mocks::ArgumentMatchers::BooleanMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#168 + def ===(value); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#172 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::BooleanMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::BooleanMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#262 +class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher + # @return [DuckTypeMatcher] a new instance of DuckTypeMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#263 + def initialize(*methods_to_respond_to); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#267 + def ===(value); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#271 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 +class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#222 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#226 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#210 +class RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#211 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#215 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#277 +class RSpec::Mocks::ArgumentMatchers::InstanceOf + # @return [InstanceOf] a new instance of InstanceOf + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#278 + def initialize(klass); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#282 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#286 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 +class RSpec::Mocks::ArgumentMatchers::KindOf + # @return [KindOf] a new instance of KindOf + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#293 + def initialize(klass); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#297 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#301 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 +class RSpec::Mocks::ArgumentMatchers::NoArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#161 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +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 `<klass name>::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#133 +class RSpec::Mocks::ArgumentMatchers::SingletonMatcher + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#136 + def inherited(subklass); end + + private + + 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#119 +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 wether 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 wether 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#128 + 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#62 + 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 value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @param options [Hash] Stubbing options. + # @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#132 +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/syntax.rb#128 + 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/syntax.rb#136 + 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/syntax.rb#132 + 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/syntax.rb#114 + 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/syntax.rb#124 + 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/syntax.rb#118 + def receive_messages(message_return_value_hash); 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 value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @param options [Hash] Stubbing options. + # @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/syntax.rb#142 + def expect(target); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#62 +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#756 +class RSpec::Mocks::Implementation + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#759 + def call(*args, **_arg1, &block); end + + # Returns the value of attribute initial_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + 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#757 + def initial_action=(_arg0); end + + # Returns the value of attribute inner_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + 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#757 + def inner_action=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#766 + def present?; end + + # Returns the value of attribute terminal_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + 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#757 + def terminal_action=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#772 + 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#116 + 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#71 +class RSpec::Mocks::InstanceVerifyingDouble + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#75 + 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#30 + 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#24 + 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#53 + 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#48 + 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#29 + 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#21 + 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 # => rasies 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); 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); 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#396 + 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#282 + 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#409 +module RSpec::Mocks::MessageExpectation::ImplementationDetails + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#420 + 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#588 + def actual_received_count_matters?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#575 + def additional_expected_calls; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#532 + def advise(*args); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#454 + 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#413 + def argument_list_matcher=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#487 + def called_max_times?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#564 + def description_for(verb); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#507 + def ensure_expected_ordering_received!; end + + # Returns the value of attribute error_generator. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + def error_generator; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#558 + def expectation_count_type; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#450 + def expected_args; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#503 + def expected_messages_received?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#540 + def generate_error; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#512 + def ignoring_args?; end + + # Returns the value of attribute implementation. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + def implementation; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#592 + def increase_actual_received_count!; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#473 + def invoke(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#478 + def invoke_without_incrementing_received_count(parent_stub, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#463 + def matches?(message, *args, **_arg2); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#516 + def matches_at_least_count?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#520 + def matches_at_most_count?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#524 + def matches_exact_count?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#494 + def matches_name_but_not_args(message, *args); end + + # Returns the value of attribute message. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#411 + def message; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#483 + def negative?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#584 + def negative_expectation_for?(message); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#580 + def ordered?; end + + # Returns the value of attribute orig_object. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#412 + def orig_object; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#571 + def raise_out_of_order_error; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#554 + def raise_unexpected_message_args_error(args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#468 + def safe_invoke(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#528 + def similar_messages; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#417 + def type; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#536 + def unadvise(args); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#498 + def verify_messages_received; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#459 + 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#410 + 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#413 + 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#413 + 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#410 + def implementation=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#600 + def exception_source_id; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#632 + def has_been_invoked?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#655 + def initial_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#659 + def inner_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#604 + 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#636 + def raise_already_invoked_error_if_necessary(calling_customization); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#642 + def set_expected_received_count(relativity, n); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#665 + def terminal_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#669 + def warn_about_stub_override; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#676 + 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#24 + 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#67 + 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#121 + 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#110 +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#87 +module RSpec::Mocks::ObjectVerifyingDoubleMethods + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#91 + def as_stubbed_const(options = T.unsafe(nil)); end + + private + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#98 + def __build_mock_proxy(order_group); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/order_group.rb#4 +class RSpec::Mocks::OrderGroup + # @return [OrderGroup] a new instance of OrderGroup + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#5 + def initialize; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#48 + def clear; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#26 + def consume; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#54 + def empty?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#37 + def handle_order_constraint(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#16 + def invoked(message); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#21 + def ready_for?(expectation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#12 + def register(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#43 + def verify_invocation_order(expectation); end + + private + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#76 + def expectation_for(message); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#64 + def expectations_invoked_in_order?; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#72 + def expected_invocations; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#68 + def invoked_expectations; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#60 + 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#459 +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#383 +module RSpec::Mocks::PartialClassDoubleProxyMethods + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#384 + 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#409 + def original_method_handle_for(message); end + + protected + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#437 + def method_double_from_ancestor_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#432 + def original_unbound_method_handle_from_ancestor_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#447 + def superclass_proxy; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#320 +class RSpec::Mocks::PartialDoubleProxy < ::RSpec::Mocks::Proxy + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#334 + def add_simple_expectation(method_name, response, location); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#340 + def add_simple_stub(method_name, response); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#357 + def message_received(message, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#321 + def original_method_handle_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#352 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#346 + def visibility_for(method_name); end + + private + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#367 + def any_instance_class_recorder_observing_method?(klass, method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#4 +class RSpec::Mocks::Proxy + # @private + # @return [Proxy] a new instance of Proxy + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#23 + def initialize(object, order_group, options = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#68 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#82 + def add_simple_expectation(method_name, response, location); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#143 + def add_simple_stub(method_name, response); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#137 + 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#55 + def as_null_object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#87 + def build_expectation(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#120 + def check_for_unexpected_arguments(expectation); end + + # @private + # @raise [ArgumentError] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#37 + def ensure_can_be_proxied!(object); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#18 + def ensure_implemented(*_args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#184 + def has_negative_expectation?(message); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#198 + def message_received(message, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#177 + def messages_arg_list; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#263 + def method_double_if_exists_for_message(message); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#48 + def null_object?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#45 + def object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#61 + def original_method_handle_for(_message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#257 + def prepended_modules_of_singleton_class; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#236 + def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#231 + def raise_unexpected_message_error(method_name, args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#170 + def received_message?(method_name, *args, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#189 + def record_message_received(message, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#148 + def remove_stub(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#153 + def remove_stub_if_present(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#97 + def replay_received_message_on(expectation, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#163 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#158 + def verify; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#241 + def visibility_for(_method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#280 + def find_almost_matching_expectation(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#304 + def find_almost_matching_stub(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#287 + def find_best_matching_expectation_for(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#273 + def find_matching_expectation(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#299 + def find_matching_method_stub(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#269 + def method_double_for(message); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#247 + def prepended_modules_of(klass); end + end +end + +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#65 +RSpec::Mocks::Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#6 +class RSpec::Mocks::Proxy::SpecificMessage < ::Struct + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#7 + def ==(expectation); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute message + # + # @return [Object] the current value of message + def message; end + + # Sets the attribute message + # + # @param value [Object] the value to set the attribute message to. + # @return [Object] the newly set value + def message=(_); end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + def object=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#464 +class RSpec::Mocks::ProxyForNil < ::RSpec::Mocks::PartialDoubleProxy + # @return [ProxyForNil] a new instance of ProxyForNil + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#465 + def initialize(order_group); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#473 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#478 + 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#470 + 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#470 + def disallow_expectations=(_arg0); end + + # Returns the value of attribute warn_about_expectations. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#471 + 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#471 + def warn_about_expectations=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#515 + def raise_error(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#485 + def set_expectation_behavior; end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#510 + def warn(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#499 + 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#111 + 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#56 + def __build_mock_proxy_unless_expired(order_group); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#61 + 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#67 + 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#115 + def __build_mock_proxy(order_group); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#111 + def __mock_proxy; end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#119 + def __raise_expired_error; end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#105 + def assign_stubs(stubs); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#124 + def initialize_copy(other); end + + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#74 + def method_missing(message, *args, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#137 +module RSpec::Mocks::TestDoubleFormatter + class << self + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#138 + def format(dbl, unwrap = T.unsafe(nil)); end + + private + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#164 + def name_desc(dbl); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#147 + def type_desc(dbl); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#159 + def verified_module_desc(dbl); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#311 +class RSpec::Mocks::TestDoubleProxy < ::RSpec::Mocks::Proxy + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#312 + 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#53 + def initialize(doubled_module, *args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#39 + 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#48 + 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#17 +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.12.1.rbi b/sorbet/rbi/gems/rspec-support@3.12.1.rbi new file mode 100644 index 0000000000..8dff8e2fda --- /dev/null +++ b/sorbet/rbi/gems/rspec-support@3.12.1.rbi @@ -0,0 +1,1644 @@ +# 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#1 +module RSpec + extend ::RSpec::Support::Warnings + + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +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#8 +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#47 + 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#18 +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#28 +RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-support//lib/rspec/support/caller_filter.rb#20 +RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-support//lib/rspec/support/caller_filter.rb#9 +RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) + +# source://rspec-support//lib/rspec/support.rb#2 +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#84 + 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#14 + 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#22 + def deregister_matcher_definition(&block); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#111 + def failure_notifier; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#103 + def failure_notifier=(callable); end + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#27 + def is_a_matcher?(object); end + + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#4 + def matcher_definitions; end + + # source://rspec-support//lib/rspec/support.rb#52 + def method_handle_for(object, method_name); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#116 + 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#14 + def register_matcher_definition(&block); end + + # source://rspec-support//lib/rspec/support.rb#23 + def require_rspec_core(f); end + + # source://rspec-support//lib/rspec/support.rb#23 + def require_rspec_expectations(f); end + + # source://rspec-support//lib/rspec/support.rb#23 + def require_rspec_matchers(f); end + + # source://rspec-support//lib/rspec/support.rb#23 + 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#34 + def rspec_description_for_object(object); end + + # source://rspec-support//lib/rspec/support.rb#93 + def thread_local_data; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#138 + def warning_notifier; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#131 + def warning_notifier=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#121 + def with_failure_notifier(callable); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support.rb#143 +module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue + class << self + # source://rspec-support//lib/rspec/support.rb#148 + 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#146 +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#266 +class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268 + def classify_parameters; end +end + +# @private +# +# source://rspec-support//lib/rspec/support/comparable_version.rb#4 +class RSpec::Support::ComparableVersion + include ::Comparable + + # @return [ComparableVersion] a new instance of ComparableVersion + # + # source://rspec-support//lib/rspec/support/comparable_version.rb#9 + def initialize(string); end + + # source://rspec-support//lib/rspec/support/comparable_version.rb#13 + def <=>(other); end + + # source://rspec-support//lib/rspec/support/comparable_version.rb#35 + def segments; end + + # Returns the value of attribute string. + # + # source://rspec-support//lib/rspec/support/comparable_version.rb#7 + def string; end +end + +# @private +# +# source://rspec-support//lib/rspec/support.rb#108 +RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# @private +# +# source://rspec-support//lib/rspec/support.rb#135 +RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# source://rspec-support//lib/rspec/support/differ.rb#10 +class RSpec::Support::Differ + # @return [Differ] a new instance of Differ + # + # source://rspec-support//lib/rspec/support/differ.rb#67 + def initialize(opts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#63 + def color?; end + + # source://rspec-support//lib/rspec/support/differ.rb#11 + def diff(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#57 + def diff_as_object(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#28 + def diff_as_string(actual, expected); end + + private + + # source://rspec-support//lib/rspec/support/differ.rb#128 + def add_old_hunk_to_hunk(hunk, oldhunk); end + + # source://rspec-support//lib/rspec/support/differ.rb#124 + def add_to_output(output, string); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#78 + def all_strings?(*args); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#82 + def any_multiline_strings?(*args); end + + # source://rspec-support//lib/rspec/support/differ.rb#153 + def blue(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#115 + def build_hunks(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#90 + def coerce_to_string(string_or_array); end + + # source://rspec-support//lib/rspec/support/differ.rb#141 + def color(text, color_code); end + + # source://rspec-support//lib/rspec/support/differ.rb#161 + def color_diff(diff); end + + # source://rspec-support//lib/rspec/support/differ.rb#95 + def diffably_stringify(array); end + + # source://rspec-support//lib/rspec/support/differ.rb#119 + def finalize_output(output, final_line); end + + # source://rspec-support//lib/rspec/support/differ.rb#137 + def format_type; end + + # source://rspec-support//lib/rspec/support/differ.rb#149 + def green(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#202 + def handle_encoding_errors(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#192 + def hash_to_string(hash); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#106 + def multiline?(string); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#86 + def no_numbers?(*args); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#74 + def no_procs?(*args); end + + # source://rspec-support//lib/rspec/support/differ.rb#157 + def normal(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#178 + def object_to_string(object); end + + # source://rspec-support//lib/rspec/support/differ.rb#145 + def red(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#132 + 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#9 +class RSpec::Support::DirectoryMaker + class << self + # Implements nested directory construction + # + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#13 + def mkdir_p(path); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#55 + def directory_exists?(dirname); end + + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#50 + def generate_path(stack, part); end + + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#47 + def generate_stack(path); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#4 +class RSpec::Support::EncodedString + # @return [EncodedString] a new instance of EncodedString + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#14 + def initialize(string, encoding = T.unsafe(nil)); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#26 + def <<(string); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def ==(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def empty?(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def encoding(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def eql?(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def lines(*args, &block); end + + # Returns the value of attribute source_encoding. + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#19 + def source_encoding; end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#39 + def split(regex_or_string); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + def to_s; end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + def to_str; end + + private + + # source://rspec-support//lib/rspec/support/encoded_string.rb#137 + 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: '<undef>') + # # => '<undef>' + # 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: '<byte>') + # # => '<byte>' + # 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#91 + 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#122 + def remove_invalid_bytes(string); end + + class << self + # source://rspec-support//lib/rspec/support/encoded_string.rb#141 + 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#12 +RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) + +# source://rspec-support//lib/rspec/support/encoded_string.rb#7 +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#6 +RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) + +# Provides a means to fuzzy-match between two arbitrary objects. +# Understands array/hash nesting. Uses `===` or `==` to +# perform the matching. +# +# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#6 +module RSpec::Support::FuzzyMatcher + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#8 + def values_match?(expected, actual); end + + private + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#27 + def arrays_match?(expected_list, actual_list); end + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#36 + def hashes_match?(expected_hash, actual_hash); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support/hunk_generator.rb#7 +class RSpec::Support::HunkGenerator + # @return [HunkGenerator] a new instance of HunkGenerator + # + # source://rspec-support//lib/rspec/support/hunk_generator.rb#8 + def initialize(actual, expected); end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#13 + def hunks; end + + private + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#30 + def actual_lines; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#34 + def build_hunk(piece); end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#42 + def context_lines; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#22 + def diffs; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#26 + def expected_lines; end +end + +# @api private +# +# source://rspec-support//lib/rspec/support.rb#38 +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#391 +class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier + private + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#394 + 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#411 +class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher + # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#412 + def initialize(signature); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 + def has_kw_args_in?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 + def invalid_kw_args_from(_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416 + def missing_kw_args_from(_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424 + def non_kw_args_arity_description; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428 + 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#11 +class RSpec::Support::MethodSignature + # @return [MethodSignature] a new instance of MethodSignature + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + def initialize(method); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#96 + def arbitrary_kw_args?; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#36 + def classify_arity(arity = T.unsafe(nil)); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#104 + 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#90 + def could_contain_kw_args?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#49 + def description; end + + # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments + # the rest will be grouped in another Hash and passed as positional argument. + # + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#82 + def has_kw_args_in?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#75 + def invalid_kw_args_from(given_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def max_non_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def min_non_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#71 + def missing_kw_args_from(given_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#21 + def non_kw_args_arity_description; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def optional_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def required_kw_args; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#100 + def unlimited_args?; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#29 + 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#160 +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#217 +class RSpec::Support::MethodSignatureExpectation + # @api private + # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#218 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#245 + def empty?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_arbitrary_keywords; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_arbitrary_keywords=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_unlimited_arguments; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_unlimited_arguments=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + def keywords; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#252 + def keywords=(values); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + def max_count; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 + def max_count=(number); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + def min_count; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#238 + def min_count=(number); end +end + +# Abstract base class for signature verifiers. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#278 +class RSpec::Support::MethodSignatureVerifier + # @api private + # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 + def initialize(signature, args = T.unsafe(nil)); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#324 + def error_message; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def max_non_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def min_non_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def non_kw_args; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#316 + def valid?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#288 + def with_expectation(expectation); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#355 + def arbitrary_kw_args?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#351 + def invalid_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#347 + def missing_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#363 + def split_args(*args); end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#359 + def unlimited_args?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#343 + 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#68 + 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 Mutexs. +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#66 +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#9 +module RSpec::Support::OS + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + def windows?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + def windows_file_path?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + def windows?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + 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#8 +class RSpec::Support::ObjectFormatter + # @api private + # @return [ObjectFormatter] a new instance of ObjectFormatter + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#27 + def initialize(max_formatted_output_length = T.unsafe(nil)); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#32 + def format(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + def max_formatted_output_length; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + def max_formatted_output_length=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#68 + def prepare_array(array); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#92 + 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#56 + def prepare_for_inspection(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#74 + def prepare_hash(input_hash); end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#111 + def recursive_structure?(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#84 + def sort_hash_keys(input_hash); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#104 + 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#266 + 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#15 + def default_instance; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#19 + def format(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#23 + def prepare_for_inspection(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#125 +class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct + # Returns the value of attribute formatter + # + # @return [Object] the current value of formatter + def formatter; end + + # Sets the attribute formatter + # + # @param value [Object] the value to set the attribute formatter to. + # @return [Object] the newly set value + def formatter=(_); end + + # @api private + # @raise [NotImplementedError] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#130 + def inspect; end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + def object=(_); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#134 + def pretty_print(pp); end + + class << self + def [](*_arg0); end + + # @api private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#126 + def can_inspect?(_object); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#175 +class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#180 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#176 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#157 +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#166 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#160 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#158 +RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#222 +class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#227 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#223 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#185 +class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#190 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#186 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#9 +RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#245 +RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#115 +class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#116 + def inspect; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#120 + def pretty_print(pp); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + def text=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#232 +class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#240 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#233 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#139 +class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # for 1.8.7 + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#147 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#142 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#140 +RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#195 +class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#205 + def inspect; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#209 + def klass; end + + # http://stackoverflow.com/a/2818916 + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#214 + def native_object_id; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#198 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#196 +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#5 +module RSpec::Support::RecursiveConstMethods + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#43 + def const_defined_on?(mod, const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#51 + def constants_defined_on(mod); end + + # @raise [NameError] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#47 + def get_const_defined_on(mod, const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#71 + def normalize_const_name(const_name); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#62 + def recursive_const_defined?(const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#56 + 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#14 +class RSpec::Support::ReentrantMutex + # @return [ReentrantMutex] a new instance of ReentrantMutex + # + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#15 + def initialize; end + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#21 + def synchronize; end + + private + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#33 + def enter; end + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#38 + def exit; end +end + +# Provides query methods for different rubies +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#24 +module RSpec::Support::Ruby + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + def jruby?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + def jruby_9000?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + def jruby_version; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + def mri?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + def non_mri?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + def rbx?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + def truffleruby?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + def jruby?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + def jruby_9000?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + def jruby_version; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + def mri?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + def non_mri?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + def rbx?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + 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#60 +module RSpec::Support::RubyFeatures + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + def caller_locations_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + 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#74 + def fork_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + def kw_args_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + def module_prepends_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + def module_refinement_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + def optional_and_splat_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + def required_kw_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + def ripper_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + def supports_exception_cause?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + def supports_rebinding_module_methods?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + def supports_taint?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + def caller_locations_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + def distincts_kw_args_from_positional_hash?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + def fork_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + def kw_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + def module_prepends_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + def module_refinement_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + def optional_and_splat_args_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + def required_kw_args_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + def ripper_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + def supports_exception_cause?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + def supports_rebinding_module_methods?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + def supports_taint?; end + end +end + +# Figures out wether a given method can accept various arguments. +# Surprisingly non-trivial. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#385 +RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier + +# source://rspec-support//lib/rspec/support/version.rb#3 +module RSpec::Support::Version; end + +# source://rspec-support//lib/rspec/support/version.rb#4 +RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) + +# source://rspec-support//lib/rspec/support/warnings.rb#6 +module RSpec::Support::Warnings + # source://rspec-support//lib/rspec/support/warnings.rb#7 + 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#15 + def warn_deprecation(message, options = T.unsafe(nil)); end + + # Used internally to print longer warnings + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#29 + def warn_with(message, options = T.unsafe(nil)); end + + # Used internally to print warnings + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#22 + def warning(text, options = T.unsafe(nil)); end +end + +# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#5 +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#15 + def class_exec(klass, *args, **_arg2, &block); end + + class << self + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + def class_exec(klass, *args, **_arg2, &block); end + end +end diff --git a/sorbet/rbi/gems/rspec@3.12.0.rbi b/sorbet/rbi/gems/rspec@3.12.0.rbi new file mode 100644 index 0000000000..50c2701b42 --- /dev/null +++ b/sorbet/rbi/gems/rspec@3.12.0.rbi @@ -0,0 +1,82 @@ +# 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 + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +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.29.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi new file mode 100644 index 0000000000..b3dd5c7d36 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi @@ -0,0 +1,7036 @@ +# 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#11 +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#11 +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#12 +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<Node>] 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#60 + def bracketed?; end + + # @deprecated Use `values.each` (a.k.a. `children.each`) + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#21 + 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#47 + 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#32 + def square_brackets?; end + + # Returns an array of all value nodes in the `array` literal. + # + # @return [Array<Node>] an array of value nodes + # + # source://ast/2.4.2/lib/ast/node.rb#56 + def values; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#9 +RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + +# A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#11 +class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#19 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#12 + def name; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, ... +# +# 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<Node>] 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<Node>] + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#42 + 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<Node>] + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#30 + def arguments; end + + # Checks whether this block takes any arguments. + # + # @return [Boolean] whether this `block` node takes any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#67 + def arguments?; end + + # The body of this block. + # + # @return [Node, nil] the body of the `block` node or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#53 + def body; end + + # Checks whether the `block` literal is delimited by curly braces. + # + # @return [Boolean] whether the `block` literal is enclosed in braces + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#74 + def braces?; end + + # The closing delimiter for this `block` literal. + # + # @return [String] the closing delimiter for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#102 + def closing_delimiter; end + + # The delimiters for this `block` literal. + # + # @return [Array<String>] the delimiters for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#88 + def delimiters; end + + # Checks whether the `block` literal is delimited by `do`-`end` keywords. + # + # @return [Boolean] whether the `block` literal is enclosed in `do`-`end` + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#81 + def keywords?; end + + # Checks whether this `block` literal belongs to a lambda. + # + # @return [Boolean] whether the `block` literal belongs to a lambda + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#125 + def lambda?; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 + 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#118 + def multiline?; end + + # The opening delimiter for this `block` literal. + # + # @return [String] the opening delimiter for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#95 + def opening_delimiter; end + + # The `send` node associated with this block. + # + # @return [SendNode] the `send` node associated with the `block` node + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#20 + def send_node; end + + # Checks whether this is a single line block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a single line + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#110 + def single_line?; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `block` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#132 + def void_context?; end + + private + + # Numbered arguments of this `numblock`. + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#139 + def numbered_arguments; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#14 +RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) + +# A node extension for `break` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `break` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/break_node.rb#8 +class RuboCop::AST::BreakNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Builder` is an AST builder that is utilized to let `Parser` +# generate ASTs with {RuboCop::AST::Node}. +# +# @example +# buffer = Parser::Source::Buffer.new('(string)') +# buffer.source = 'puts :foo' +# +# builder = RuboCop::AST::Builder.new +# require 'parser/ruby25' +# parser = Parser::Ruby25.new(builder) +# root_node = parser.parse(buffer) +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#16 +class RuboCop::AST::Builder < ::Parser::Builders::Default + # Generates {Node} from the given information. + # + # @return [Node] the generated node + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#98 + def n(type, children, source_map); end + + # TODO: Figure out what to do about literal encoding handling... + # More details here https://github.com/whitequark/parser/issues/283 + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#104 + def string_value(token); end + + private + + # source://rubocop-ast//lib/rubocop/ast/builder.rb#110 + def node_klass(type); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#21 +RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash) + +# A node extension for `case_match` nodes. This will be used in place of +# a plain node when the builder constructs the AST, making its methods +# available to all `case_match` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#8 +class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # and the `else` (if any). Note that these bodies could be nil. + # + # @return [Array<Node, nil>] 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<InPatternNode>] 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<Node, nil>] 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<WhenNode>] 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#11 +class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#26 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#19 + def name; end + + # The namespace of the constant being assigned. + # + # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#12 + def namespace; end +end + +# A node extension for `class` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `class` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#11 +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 ::Forwardable + + # source://forwardable/1.3.2/forwardable.rb#229 + def &(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def *(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def +(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def -(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def <<(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def [](*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def []=(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def all?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def any?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def append(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def assoc(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def at(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def bsearch(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def bsearch_index(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def chain(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def chunk(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def chunk_while(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def clear(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def collect(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def collect!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def collect_concat(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def combination(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def compact(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def compact!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def concat(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def count(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def cycle(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def deconstruct(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def delete(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def delete_at(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def delete_if(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def detect(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def difference(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def dig(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def drop(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def drop_while(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_cons(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_entry(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_index(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_slice(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_with_index(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_with_object(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def empty?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def entries(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def fetch(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def fill(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def filter(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def filter!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def filter_map(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def find(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def find_all(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def find_index(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def first(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def flat_map(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def flatten(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def flatten!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def grep(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def grep_v(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def group_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def include?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def index(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def inject(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def insert(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def intersect?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def intersection(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def join(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def keep_if(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def last(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def lazy(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def length(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def map(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def map!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def max(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def max_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def member?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def min(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def min_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def minmax(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def minmax_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def none?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def one?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def pack(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def partition(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def permutation(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def place(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def pop(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def prepend(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def product(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def push(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def rassoc(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reduce(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reject(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reject!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def repeated_combination(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def repeated_permutation(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def replace(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reverse(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reverse!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def reverse_each(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def rindex(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def rotate(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def rotate!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def sample(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def select(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def select!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def shelljoin(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def shift(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def shuffle(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def shuffle!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def size(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def slice(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def slice!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def slice_after(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def slice_before(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def slice_when(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def sort(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def sort!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def sort_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def sort_by!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def sum(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def take(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def take_while(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def tally(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def to_ary(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def to_csv(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def to_h(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def to_set(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def transpose(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def union(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def uniq(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def uniq!(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def unshift(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def values_at(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def zip(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def |(*args, **_arg1, &block); end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 +RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# Common functionality for nodes that have conditions: +# `if`, `while`, `until`, `case`. +# This currently doesn't include `when` nodes, because they have multiple +# conditions, and need to be checked for that. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#9 +module RuboCop::AST::ConditionalNode + # Returns the body associated with the condition. This works together with + # each node's custom destructuring method to select the correct part of + # the node. + # + # @note For `if` nodes, this is the truthy branch. + # @return [Node, nil] the body of the node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#40 + def body; end + + # Returns the condition of the node. This works together with each node's + # custom destructuring method to select the correct part of the node. + # + # @return [Node, nil] the condition of the node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#29 + def condition; end + + # Checks whether the condition of the node is written on more than + # one line. + # + # @return [Boolean] whether the condition is on more than one line + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#21 + def multiline_condition?; end + + # Checks whether the condition of the node is written on a single line. + # + # @return [Boolean] whether the condition is on a single line + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#13 + def single_line_condition?; end +end + +# A node extension for `const` nodes. +# +# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#7 +class RuboCop::AST::ConstNode < ::RuboCop::AST::Node + # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#26 + def absolute?; end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + def class_name?; end + + # Yield nodes for the namespace + # + # For `::Foo::Bar::BAZ` => yields: + # s(:cbase), then + # s(:const, :Foo), then + # s(:const, s(:const, :Foo), :Bar) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#43 + def each_path(&block); end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + def module_name?; end + + # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#8 + def namespace; end + + # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#33 + def relative?; end + + # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar + # + # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#13 + def short_name; end +end + +# A node extension for `csend` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `csend` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#8 +class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#9 + def send_type?; end +end + +# A node extension for `def` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `def` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#8 +class RuboCop::AST::DefNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + + # Checks whether this method definition node forwards its arguments + # as per the feature added in Ruby 2.7. + # + # @note This is written in a way that may support lead arguments + # which are rumored to be added in a later version of Ruby. + # @return [Boolean] whether the `def` node uses argument forwarding + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#26 + def argument_forwarding?; end + + # An array containing the arguments of the method definition. + # + # @return [Array<Node>] the arguments of the method definition + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#40 + def arguments; end + + # The body of the method definition. + # + # @note this can be either a `begin` node, if the method body contains + # multiple expressions, or any other node, if it contains a single + # expression. + # @return [Node] the body of the method definition + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#51 + def body; end + + # @return [Boolean] if the definition is without an `end` or not. + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#63 + def endless?; end + + # The name of the defined method as a symbol. + # + # @return [Symbol] the name of the defined method + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#33 + def method_name; end + + # The receiver of the method definition, if any. + # + # @return [Node, nil] the receiver of the method definition, or `nil`. + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#58 + def receiver; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `def` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#15 + def void_context?; end +end + +# A node extension for `defined?` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `send` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#8 +class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://ast/2.4.2/lib/ast/node.rb#56 + def arguments; end + + # source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#12 + def node_parts; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#7 +module RuboCop::AST::Descendence + # Returns an array of child nodes. + # This is a shorthand for `node.each_child_node.to_a`. + # + # @return [Array<Node>] 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<Node>] 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#11 +class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node + # Returns the body of the `ensure` clause. + # + # @return [Node, nil] The body of the `ensure`. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12 + def body; end +end + +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 +module RuboCop::AST::Ext; end + +# Extensions to Parser::AST::Range +# +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#7 +module RuboCop::AST::Ext::Range + # If `exclude_end` is `true`, then the range will be exclusive. + # + # Assume that `node` corresponds to the following array literal: + # + # [ + # :foo, + # :bar + # ] + # + # node.loc.begin.line_span # => 1..1 + # node.source_range.line_span(exclude_end: true) # => 1...4 + # + # @return [Range] the range of line numbers for the node + # + # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#20 + def line_span(exclude_end: T.unsafe(nil)); end +end + +# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6- +# +# source://rubocop-ast//lib/rubocop/ast/ext/range_min_max.rb#7 +module RuboCop::AST::Ext::RangeMinMax; 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#11 +class RuboCop::AST::ForNode < ::RuboCop::AST::Node + # Returns the body of the `for` loop. + # + # @return [Node, nil] The body of the `for` loop. + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#48 + def body; end + + # Returns the collection the `for` loop is iterating over. + # + # @return [Node] The collection the `for` loop is iterating over + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#41 + def collection; end + + # Checks whether the `for` node has a `do` keyword. + # + # @return [Boolean] whether the `for` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#19 + def do?; end + + # Returns the keyword of the `for` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#12 + def keyword; end + + # Returns the iteration variable of the `for` loop. + # + # @return [Node] The iteration variable of the `for` loop + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#34 + def variable; end + + # Checks whether this node body is a void context. + # Always `true` for `for`. + # + # @return [true] whether the `for` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#27 + def void_context?; end +end + +# A node extension for `forward-args` nodes. This will be used in place +# of a plain node when the builder constructs the AST, making its methods +# available to all `forward-args` nodes within RuboCop. +# +# Not used with modern emitters: +# +# $ ruby-parse -e "def foo(...); end" +# (def :foo +# (args +# (forward-arg)) nil) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (def :foo +# (forward-args) nil) +# +# Note the extra 's' with legacy form. +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#23 +class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Node wraps itself in an array to be compatible with other + # enumerable argument types. + # + # source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#28 + def to_a; end +end + +# Common functionality for nodes that can be used as hash elements: +# `pair`, `kwsplat` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#7 +module RuboCop::AST::HashElementNode + # Returns the delta between this element's delimiter and the argument's. + # + # @note Pairs with different delimiter styles return a delta of 0 + # @return [Integer] the delta between the two delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#61 + def delimiter_delta(other); end + + # Returns the key of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # @return [Node] the key of the hash element + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#13 + def key; end + + # Returns the delta between this pair's key and the argument pair's. + # + # @note Keys on the same line always return a delta of 0 + # @note Keyword splats always return a delta of 0 for right alignment + # @param alignment [Symbol] whether to check the left or right side + # @return [Integer] the delta between the two keys + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#43 + def key_delta(other, alignment = T.unsafe(nil)); end + + # Checks whether this `hash` element is on the same line as `other`. + # + # @note A multiline element is considered to be on the same line if it + # shares any of its lines with `other` + # @return [Boolean] whether this element is on the same line as `other` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#32 + def same_line?(other); end + + # Returns the value of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # @return [Node] the value of the hash element + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#22 + def value; end + + # Returns the delta between this element's value and the argument's. + # + # @note Keyword splats always return a delta of 0 + # @return [Integer] the delta between the two values + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#52 + def value_delta(other); end +end + +# A helper class for comparing the positions of different parts of a +# `pair` node. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#67 +class RuboCop::AST::HashElementNode::HashElementDelta + # @raise [ArgumentError] + # @return [HashElementDelta] a new instance of HashElementDelta + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#68 + def initialize(first, second); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#89 + def delimiter_delta; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#75 + def key_delta(alignment = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#82 + def value_delta; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#106 + def delta(first, second, alignment = T.unsafe(nil)); end + + # Returns the value of attribute first. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + def first; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#117 + def keyword_splat?; end + + # Returns the value of attribute second. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + def second; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#100 + def valid_argument_types?; end +end + +# A node extension for `hash` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `hash` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#14 +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<Node>] 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<PairNode>] 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<Node>] 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<Node>] an array of branch nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#147 + def branches; end + + # @deprecated Use `branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#164 + def each_branch(&block); end + + # Checks whether the `if` node has an `else` clause. + # + # @note This returns `true` for nodes containing an `elsif` clause. + # This is legacy behavior, and many cops rely on it. + # @return [Boolean] whether the node has an `else` clause + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#42 + def else?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is falsey. + # + # @note This is normalized for `unless` nodes. + # @return [Node] the falsey branch node of the `if` node + # @return [nil] when there is no else branch + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#126 + def else_branch; end + + # Checks whether the `if` is an `elsif`. Parser handles these by nesting + # `if` nodes in the `else` branch. + # + # @return [Boolean] whether the node is an `elsif` + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#32 + def elsif?; end + + # Checks whether the `if` node has at least one `elsif` branch. Returns + # true if this `if` node itself is an `elsif`. + # + # @return [Boolean] whether the `if` node has at least one `elsif` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#104 + def elsif_conditional?; end + + # Checks whether this node is an `if` statement. (This is not true of + # ternary operators and `unless` statements.) + # + # @return [Boolean] whether the node is an `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#16 + def if?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is truthy. + # + # @note This is normalized for `unless` nodes. + # @return [Node] the truthy branch node of the `if` node + # @return [nil] if the truthy branch is empty + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#115 + def if_branch; end + + # Returns the inverse keyword of the `if` node as a string. Returns `if` + # for `unless` nodes and vice versa. Returns an empty string for ternary + # operators. + # + # @return [String] the inverse keyword of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#66 + def inverse_keyword; end + + # Returns the keyword of the `if` statement as a string. Returns an empty + # string for ternary operators. + # + # @return [String] the keyword of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#57 + def keyword; end + + # Checks whether the `if` node is in a modifier form, i.e. a condition + # trailing behind an expression. Only `if` and `unless` nodes without + # other branches can be modifiers. + # + # @return [Boolean] whether the `if` node is a modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#80 + def modifier_form?; end + + # Chacks whether the `if` node has nested `if` nodes in any of its + # branches. + # + # @note This performs a shallow search. + # @return [Boolean] whether the `if` node contains nested conditionals + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#90 + def nested_conditional?; end + + # Custom destructuring method. This is used to normalize the branches + # for `if` and `unless` nodes, to aid comparisons and conversions. + # + # @return [Array<Node>] the different parts of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#134 + def node_parts; end + + # Checks whether the `if` node is a ternary operator. + # + # @return [Boolean] whether the `if` node is a ternary operator + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#49 + def ternary?; end + + # Checks whether this node is an `unless` statement. (This is not true + # of ternary operators and `if` statements.) + # + # @return [Boolean] whether the node is an `unless` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#24 + def unless?; end +end + +# A node extension for `in` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `in` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#11 +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<Node>] 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<Node>] the arguments of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#45 + def first_argument_index; end +end + +# A node extension for `int` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `int` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/int_node.rb#8 +class RuboCop::AST::IntNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its methods available to +# all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#8 +class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#26 + def colon?; end + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#18 + def hash_rocket?; end + + # This provides `forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node. + # + # @return [true] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#48 + def kwsplat_type?; end + + # Custom destructuring method. This is used to normalize the branches + # for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements. + # + # @return [Array<KeywordSplatNode>] the different parts of the `kwsplat` + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#41 + def node_parts; end + + # Returns the operator for the `kwsplat` as a string. + # + # @return [String] the double splat operator + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#33 + def operator; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#11 +RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) + +# Used for modern support only: +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "->(foo) { bar }" +# (block +# (lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (block +# (send nil :lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#23 +class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#43 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#38 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#28 + def lambda?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#33 + def lambda_literal?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#53 + def method_name; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#48 + def receiver; end + + private + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#60 + def first_argument_index; end +end + +# Common functionality for nodes that are a kind of method dispatch: +# `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, +# and (modern only): `index`, `indexasgn`, `lambda` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#8 +module RuboCop::AST::MethodDispatchNode + include ::RuboCop::AST::MethodIdentifierPredicates + extend ::RuboCop::AST::NodePattern::Macros + + # Checks whether the dispatched method is an access modifier. + # + # @return [Boolean] whether the dispatched method is an access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#64 + def access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#273 + def adjacent_def_modifier?(param0 = T.unsafe(nil)); end + + # Checks whether this node is an arithmetic operation + # + # @return [Boolean] whether the dispatched method is an arithmetic + # operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#175 + def arithmetic_operation?; end + + # Checks whether the dispatched method is a setter method. + # + # @return [Boolean] whether the dispatched method is a setter + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + def assignment?; end + + # Checks whether the dispatched method is a bare access modifier that + # affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#73 + def bare_access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#278 + def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # Checks whether this is a binary operation. + # + # @example + # + # foo + bar + # @return [Boolean] whether this method is a binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#248 + def binary_operation?; end + + # Whether this method dispatch has an explicit block. + # + # @return [Boolean] whether the dispatched method has a block + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#167 + def block_literal?; end + + # The `block` or `numblock` node associated with this method dispatch, if any. + # + # @return [BlockNode, nil] the `block` or `numblock` node associated with this method + # call or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#46 + def block_node; end + + # Checks whether the name of the dispatched method matches the argument + # and has an implicit receiver. + # + # @param name [Symbol, String] the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#100 + def command?(name); end + + # Checks whether the *explicit* receiver of this method dispatch is a + # `const` node. + # + # @return [Boolean] whether the receiver of this method dispatch + # is a `const` node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#152 + def const_receiver?; end + + # Checks if this node is part of a chain of `def` or `defs` modifiers. + # + # or `nil` if it isn't a def modifier + # + # @example + # + # private def foo; end + # @return [Node | nil] returns the `def|defs` node this is a modifier for, + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#199 + def def_modifier(node = T.unsafe(nil)); end + + # Checks if this node is part of a chain of `def` or `defs` modifiers. + # + # See also `def_modifier` that returns the node or `nil` + # + # @example + # + # private def foo; end + # @return [Boolean] whether the `def|defs` node is a modifier or not. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#187 + def def_modifier?(node = T.unsafe(nil)); end + + # Checks whether the dispatched method uses a dot to connect the + # receiver and the method name. + # + # This is useful for comparison operators, which can be called either + # with or without a dot, i.e. `foo == bar` or `foo.== bar`. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#119 + def dot?; end + + # Checks whether the dispatched method uses a double colon to connect the + # receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#127 + def double_colon?; end + + # Checks whether the method dispatch is the implicit form of `#call`, + # e.g. `foo.(bar)`. + # + # @return [Boolean] whether the method is the implicit form of `#call` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#160 + def implicit_call?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#257 + def in_macro_scope?(param0 = T.unsafe(nil)); end + + # Checks whether this is a lambda. Some versions of parser parses + # non-literal lambdas as a method send. + # + # @return [Boolean] whether this method is a lambda + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#213 + def lambda?; end + + # Checks whether this is a lambda literal (stabby lambda.) + # + # @example + # + # -> (foo) { bar } + # @return [Boolean] whether this method is a lambda literal + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#224 + def lambda_literal?; end + + # Checks whether the dispatched method is a macro method. A macro method + # is defined as a method that sits in a class, module, or block body and + # has an implicit receiver. + # + # @note This does not include DSLs that use nested blocks, like RSpec + # @return [Boolean] whether the dispatched method is a macro method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#57 + def macro?; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#27 + def method_name; end + + # Checks whether the dispatched method is a non-bare access modifier that + # affects only the method it receives. + # + # @return [Boolean] whether the dispatched method is a non-bare + # access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#82 + def non_bare_access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#283 + def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # The receiving node of the method dispatch. + # + # @return [Node, nil] the receiver of the dispatched method or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#20 + def receiver; end + + # Checks whether the dispatched method uses a safe navigation operator to + # connect the receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#135 + def safe_navigation?; end + + # The source range for the method name or keyword that dispatches this call. + # + # @return [Parser::Source::Range] the source range for the method name or keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#34 + def selector; end + + # Checks whether the *explicit* receiver of this method dispatch is + # `self`. + # + # @return [Boolean] whether the receiver of this method dispatch is `self` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#143 + def self_receiver?; end + + # Checks whether the dispatched method is a setter method. + # + # @return [Boolean] whether the dispatched method is a setter + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + def setter_method?; end + + # Checks whether the dispatched method is a bare `private` or `protected` + # access modifier that affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # `private` or `protected` access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#91 + def special_modifier?; end + + # Checks whether this is a unary operation. + # + # @example + # + # -foo + # @return [Boolean] whether this method is a unary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#235 + def unary_operation?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#12 +RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#14 +RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) + +# Common predicates for nodes that reference method identifiers: +# `send`, `csend`, `def`, `defs`, `super`, `zsuper` +# +# @note this mixin expects `#method_name` and `#receiver` to be implemented +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#9 +module RuboCop::AST::MethodIdentifierPredicates + # Checks whether the method is an assignment method. + # + # @return [Boolean] whether the method is an assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#142 + def assignment_method?; end + + # Checks whether the method is a bang method. + # + # @return [Boolean] whether the method is a bang method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#171 + def bang_method?; end + + # Checks whether the method is a camel case method, + # e.g. `Integer()`. + # + # @return [Boolean] whether the method is a camel case method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#179 + def camel_case_method?; end + + # Checks whether the method is a comparison method. + # + # @return [Boolean] whether the method is a comparison + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#135 + def comparison_method?; end + + # Checks whether the *explicit* receiver of node is a `const` node. + # + # @return [Boolean] whether the receiver of this node is a `const` node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#193 + def const_receiver?; end + + # Checks whether the method is an Enumerable method. + # + # @return [Boolean] whether the method is an Enumerable method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#157 + def enumerable_method?; end + + # Checks whether the method is an enumerator method. + # + # @return [Boolean] whether the method is an enumerator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#149 + def enumerator_method?; end + + # Checks whether the method name matches the argument. + # + # @param name [Symbol, String] the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#79 + def method?(name); end + + # Checks whether this is a negation method, i.e. `!` or keyword `not`. + # + # @return [Boolean] whether this method is a negation method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#200 + def negation_method?; end + + # Checks whether the method is a nonmutating Array method. + # + # @return [Boolean] whether the method is a nonmutating Array method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#114 + def nonmutating_array_method?; end + + # Checks whether the method is a nonmutating binary operator method. + # + # @return [Boolean] whether the method is a nonmutating binary operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#93 + def nonmutating_binary_operator_method?; end + + # Checks whether the method is a nonmutating Hash method. + # + # @return [Boolean] whether the method is a nonmutating Hash method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#121 + def nonmutating_hash_method?; end + + # Checks whether the method is a nonmutating operator method. + # + # @return [Boolean] whether the method is a nonmutating operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#107 + def nonmutating_operator_method?; end + + # Checks whether the method is a nonmutating String method. + # + # @return [Boolean] whether the method is a nonmutating String method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#128 + def nonmutating_string_method?; end + + # Checks whether the method is a nonmutating unary operator method. + # + # @return [Boolean] whether the method is a nonmutating unary operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#100 + def nonmutating_unary_operator_method?; end + + # Checks whether the method is an operator method. + # + # @return [Boolean] whether the method is an operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#86 + def operator_method?; end + + # Checks whether the method is a predicate method. + # + # @return [Boolean] whether the method is a predicate method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#164 + def predicate_method?; end + + # Checks whether this is a prefix bang method, e.g. `!foo`. + # + # @return [Boolean] whether this method is a prefix bang + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#214 + def prefix_bang?; end + + # Checks whether this is a prefix not method, e.g. `not foo`. + # + # @return [Boolean] whether this method is a prefix not + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#207 + def prefix_not?; end + + # Checks whether the *explicit* receiver of this node is `self`. + # + # @return [Boolean] whether the receiver of this node is `self` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#186 + def self_receiver?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#16 +RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#10 +RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#32 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#24 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#48 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#28 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#59 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#26 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# http://phrogz.net/programmingruby/language.html#table_18.4 +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#20 +RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# Common functionality for nodes that can be used as modifiers: +# `if`, `while`, `until` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#7 +module RuboCop::AST::ModifierNode + # Checks whether the node is in a modifier form, i.e. a condition + # trailing behind an expression. + # + # @return [Boolean] whether the node is a modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#12 + def modifier_form?; end +end + +# A node extension for `module` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `module` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#11 +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#92 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def __ENCODING___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def __FILE___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def __LINE___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def alias_type?; end + + # Returns an array of ancestor nodes. + # This is a shorthand for `node.each_ancestor.to_a`. + # + # @return [Array<Node>] an array of ancestor nodes + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#247 + def ancestors; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def and_asgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def and_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def arg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def arg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def args_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#464 + def argument?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#468 + def argument_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def array_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def array_pattern_with_tail_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def array_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#416 + def assignment?; end + + # Some cops treat the shovel operator as a kind of assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#355 + def assignment_or_similar?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def back_ref_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#420 + def basic_conditional?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#363 + def basic_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def begin_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def block_pass_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def block_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def blockarg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def blockarg_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#472 + def boolean_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def break_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#456 + def call_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def case_match_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def case_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def casgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def cbase_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#460 + def chained?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#512 + def class_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#530 + def class_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def class_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#144 + def complete!; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#149 + def complete?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def complex_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#424 + def conditional?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#293 + def const_name; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def const_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def const_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def csend_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def cvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def cvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def def_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + def defined_module; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#319 + def defined_module_name; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def defined_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def defs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def dstr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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#235 + def each_ancestor(*types, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def eflipflop_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def empty_else_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#349 + def empty_source?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def ensure_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#408 + def equals_asgn?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def erange_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def false_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#371 + def falsey_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def find_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#261 + def first_line; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def float_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def for_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def forward_arg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def forward_args_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def forwarded_args_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def forwarded_kwrestarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def forwarded_restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#509 + def global_const?(param0 = T.unsafe(nil), param1); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#484 + def guard_clause?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def gvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def gvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def hash_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def hash_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def ident_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def if_guard_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def if_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def iflipflop_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#379 + def immutable_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def in_match_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def in_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def index_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def indexasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def int_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def irange_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def ivar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def ivasgn_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#437 + def keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwbegin_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwnilarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwoptarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwrestarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def kwsplat_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#503 + def lambda?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + def lambda_or_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def lambda_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#265 + 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#187 + def left_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Array<Node>] the left (aka previous) siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#197 + def left_siblings; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#269 + def line_count; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#359 + def literal?; end + + # NOTE: `loop { }` is a normal method call and thus not a loop keyword. + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#433 + def loop_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def lvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def lvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def masgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_alt_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_as_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_current_line_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#491 + def match_guard_clause?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_nil_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_pattern_p_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_rest_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_var_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_with_lvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def match_with_trailing_comma_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def mlhs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#537 + def module_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def module_type?; end + + # Predicates + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#341 + def multiline?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#375 + def mutable_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#671 + def new_class_or_module_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def next_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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<Node>] the different parts of the ndde + # + # source://ast/2.4.2/lib/ast/node.rb#56 + def node_parts; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#275 + def nonempty_line_count; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def not_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def nth_ref_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def numargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def numblock_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#476 + def numeric_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def objc_kwarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def objc_restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def objc_varargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def op_asgn_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#448 + def operator_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def optarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def or_asgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def or_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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#126 + def parent; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#135 + def parent?; end + + # Searching the AST + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#325 + def parent_module_name; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#452 + def parenthesized_call?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def pin_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#428 + def post_condition_loop?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def postexe_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def preexe_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#496 + def proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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#582 + def pure?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#480 + def range_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def rational_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + def receiver(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + def recursive_basic_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + def recursive_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def redo_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#404 + def reference?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def regexp_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def regopt_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def resbody_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def rescue_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def restarg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def retry_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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#178 + def right_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Array<Node>] the right (aka next) siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#206 + def right_siblings; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + def root?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def sclass_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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#119 + def send_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def shadowarg_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#412 + 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#171 + def sibling_index; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#345 + 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#253 + def source; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#279 + def source_length; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#257 + def source_range; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#444 + def special_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def splat_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#291 + def str_content(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def str_type?; end + + # @deprecated Use `:class_constructor?` + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#525 + def struct_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def super_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def sym_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def true_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#367 + def truthy_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def undef_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def unless_guard_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def until_post_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + 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#160 + 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#551 + def value_used?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + def variable?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def when_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def while_post_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def while_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def xstr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def yield_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + def zsuper_type?; end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node.rb#130 + def parent=(node); end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#610 + def begin_value_used?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#621 + def case_if_value_used?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#305 + def defined_module0(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#615 + def for_value_used?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#657 + def parent_module_name_for_block(ancestor); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#645 + def parent_module_name_for_sclass(sclass_node); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#632 + def parent_module_name_part(node); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#600 + def visit_ancestors(types); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#627 + def while_until_value_used?; end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#80 +RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#55 +RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#58 +RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#42 +RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) + +# <=> isn't included here, because it doesn't return a boolean. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#28 +RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#39 +RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#60 +RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#87 +RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#88 +RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#50 +RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#35 +RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#47 +RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#70 +RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#37 +RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#83 +RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#84 +RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#64 +RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#44 +RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#76 +RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#62 +RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#68 +RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#53 +RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#78 +RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#31 +RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#66 +RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) + +# This class performs a pattern-matching operation on an AST node. +# +# Detailed syntax: /docs/modules/ROOT/pages/node_pattern.adoc +# +# Initialize a new `NodePattern` with `NodePattern.new(pattern_string)`, then +# pass an AST node to `NodePattern#match`. Alternatively, use one of the class +# macros in `NodePattern::Macros` to define your own pattern-matching method. +# +# If the match fails, `nil` will be returned. If the match succeeds, the +# return value depends on whether a block was provided to `#match`, and +# whether the pattern contained any "captures" (values which are extracted +# from a matching AST.) +# +# - With block: #match yields the captures (if any) and passes the return +# value of the block through. +# - With no block, but one capture: the capture is returned. +# - With no block, but multiple captures: captures are returned as an array. +# - With no block and no captures: #match returns `true`. +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 +class RuboCop::AST::NodePattern + include ::RuboCop::AST::NodePattern::MethodDefiner + extend ::Forwardable + + # @return [NodePattern] a new instance of NodePattern + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#77 + def initialize(str, compiler: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 + def ==(other); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#107 + def as_json(_options = T.unsafe(nil)); end + + # Returns the value of attribute ast. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + def ast; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def captures(*args, **_arg1, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 + def encode_with(coder); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#90 + def eql?(other); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#119 + def freeze; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#115 + def init_with(coder); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#103 + def marshal_dump; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#99 + def marshal_load(pattern); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#85 + def match(*args, **rest, &block); end + + # Returns the value of attribute match_code. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + def match_code; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def named_parameters(*args, **_arg1, &block); end + + # Returns the value of attribute pattern. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 + def pattern; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def positional_parameters(*args, **_arg1, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 + def to_s; end + + class << self + # Yields its argument and any descendants, depth-first. + # + # @yield [element] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#59 + def descend(element, &block); end + end +end + +# Responsible to build the AST nodes for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#10 +class RuboCop::AST::NodePattern::Builder + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#17 + def emit_atom(type, value); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#29 + def emit_call(type, selector, args = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#11 + def emit_capture(capture_token, node); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#25 + def emit_list(type, _begin, children, _end); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#41 + def emit_subsequence(node_list); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#21 + def emit_unary_op(type, _operator = T.unsafe(nil), *children); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#34 + def emit_union(begin_t, pattern_lists, end_t); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#53 + def n(type, *args); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#49 + def optimizable_as_set?(children); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#57 + def union_children(pattern_lists); end +end + +# A NodePattern comment, simplified version of ::Parser::Source::Comment +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#7 +class RuboCop::AST::NodePattern::Comment + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#14 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @param other [Object] + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#31 + def ==(other); end + + # @return [String] a human-readable representation of this comment + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#39 + def inspect; end + + # Returns the value of attribute location. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + def loc; end + + # Returns the value of attribute location. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + def location; end + + # @return [String] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#20 + def text; end +end + +# The top-level compiler holding the global state +# Defers work to its subcompilers +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 +class RuboCop::AST::NodePattern::Compiler + extend ::Forwardable + + # @return [Compiler] a new instance of Compiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 + def initialize; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def bind(*args, **_arg1, &block); end + + # Returns the value of attribute binding. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def binding; end + + # Returns the value of attribute captures. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def captures; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#42 + def compile_as_atom(node); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#46 + def compile_as_node_pattern(node, **options); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#50 + def compile_sequence(sequence, var:); end + + # Enumerates `enum` while keeping track of state across + # union branches (captures and unification). + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#38 + def each_union(enum, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#74 + def freeze; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#31 + def named_parameter(name); end + + # Returns the value of attribute named_parameters. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def named_parameters; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#70 + def next_capture; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#54 + def parser; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#26 + def positional_parameter(number); end + + # Returns the value of attribute positional_parameters. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#13 + def positional_parameters; end + + # Utilities + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#60 + def with_temp_variables(*names, &block); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#81 + def enforce_same_captures(enum); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#96 + def new_capture; end +end + +# Generates code that evaluates to a value (Ruby object) +# This value responds to `===`. +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#12 +class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#28 + def visit_const; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#32 + def visit_named_parameter; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_number; end + + # Assumes other types are node patterns. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#46 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#36 + def visit_positional_parameter; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_regexp; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#40 + def visit_set; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_string; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_symbol; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#15 + def visit_unify; end +end + +# Holds the list of bound variable names +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#8 +class RuboCop::AST::NodePattern::Compiler::Binding + # @return [Binding] a new instance of Binding + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#9 + def initialize; end + + # Yields the first time a given name is bound + # + # @return [String] bound variable name + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 + def bind(name); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#30 + 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#12 +class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler + # @return [Debug] a new instance of Debug + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 + def initialize; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def comments(*args, **_arg1, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 + def named_parameters; end + + # Returns the value of attribute node_ids. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#33 + def node_ids; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 + def parser; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def tokens(*args, **_arg1, &block); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#36 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer + # @api private + # @return [Colorizer] a new instance of Colorizer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 + def initialize(pattern, compiler: T.unsafe(nil)); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + def compiler; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + def node_pattern; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 + def pattern; end + + # @api private + # @return [Node] the Ruby AST + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#103 + def test(ruby, trace: T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#111 + def ruby_ast(ruby); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#116 + def ruby_parser; end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#37 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#92 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug + +# Result of a NodePattern run against a particular AST +# Consider constructor is private +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#46 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct + # @api private + # @return [Hash] a map for {character_position => color} + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#56 + def color_map(color_scheme = T.unsafe(nil)); end + + # @api private + # @return [String] a Rainbow colorized version of ruby + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def colorize(color_scheme = T.unsafe(nil)); end + + # Returns the value of attribute colorizer + # + # @return [Object] the current value of colorizer + def colorizer; end + + # Sets the attribute colorizer + # + # @param value [Object] the value to set the attribute colorizer to. + # @return [Object] the newly set value + def colorizer=(_); end + + # @api private + # @return [Hash] a map for {node => matched?}, depth-first + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#66 + def match_map; end + + # @api private + # @return [Boolean] a value of `Trace#matched?` or `:not_visitable` + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#74 + def matched?(node); end + + # Returns the value of attribute returned + # + # @return [Object] the current value of returned + def returned; end + + # Sets the attribute returned + # + # @param value [Object] the value to set the attribute returned to. + # @return [Object] the newly set value + def returned=(_); end + + # Returns the value of attribute ruby_ast + # + # @return [Object] the current value of ruby_ast + def ruby_ast; end + + # Sets the attribute ruby_ast + # + # @param value [Object] the value to set the attribute ruby_ast to. + # @return [Object] the newly set value + def ruby_ast=(_); end + + # Returns the value of attribute trace + # + # @return [Object] the current value of trace + def trace; end + + # Sets the attribute trace + # + # @param value [Object] the value to set the attribute trace to. + # @return [Object] the newly set value + def trace=(_); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#87 + def ast; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#81 + def color_map_for(node, color); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#139 +module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#140 + def do_compile; end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#150 + def node_id; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#146 + def tracer(kind); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#156 +class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#161 +class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# Compiled node pattern requires a named parameter `trace`, +# which should be an instance of this class +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#13 +class RuboCop::AST::NodePattern::Compiler::Debug::Trace + # @return [Trace] a new instance of Trace + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#14 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#18 + def enter(node_id); end + + # return nil (not visited), false (not matched) or true (matched) + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#28 + def matched?(node_id); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#23 + def success(node_id); end +end + +# Compiles code that evalues to true or false +# for a given value `var` (typically a RuboCop::AST::Node) +# or it's `node.type` if `seq_head` is true +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#13 +class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # @return [NodePatternSubcompiler] a new instance of NodePatternSubcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#16 + def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end + + # Returns the value of attribute access. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + def access; end + + # Returns the value of attribute seq_head. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + def seq_head; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#119 + def access_element; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#123 + def access_node; end + + # @param [Array<Node>, nil] + # @return [String, nil] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#113 + def compile_args(arg_list, first: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#129 + def compile_guard_clause; end + + # Compiling helpers + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#107 + def compile_value_match(value); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#133 + def multiple_access(kind); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#30 + def visit_ascend; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#58 + def visit_capture; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#37 + def visit_descend; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#84 + def visit_function_call; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#73 + def visit_intersection; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#25 + def visit_negation; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#88 + def visit_node_type; end + + # Assumes other types are atoms. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#100 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#80 + def visit_predicate; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#92 + def visit_sequence; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#49 + def visit_unify; end + + # Lists + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#64 + def visit_union; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#45 + def visit_wildcard; end +end + +# Compiles terms within a sequence to code that evalues to true or false. +# Compilation of the nodes that can match only a single term is deferred to +# `NodePatternSubcompiler`; only nodes that can match multiple terms are +# compiled here. +# Assumes the given `var` is a `::RuboCop::AST::Node` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 +class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # Calls `compile_sequence`; the actual `compile` method + # will be used for the different terms of the sequence. + # The only case of re-entrant call to `compile` is `visit_capture` + # + # @return [SequenceSubcompiler] a new instance of SequenceSubcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#25 + def initialize(compiler, sequence:, var:); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#31 + def compile_sequence; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + def in_sync; end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#226 + def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + def cur_index; end + + # yield `sync_code` iff not already in sync + # + # @yield [code] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#242 + def sync; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + def compile(node); end + + # Compilation helpers + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#165 + def compile_and_advance(term); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#128 + def compile_any_order_branches(matched_var); end + + # @return [Array<String>] 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<Range>] 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 + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#19 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) + +# Base class for subcompilers +# Implements visitor pattern +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#12 +class RuboCop::AST::NodePattern::Compiler::Subcompiler + # @return [Subcompiler] a new instance of Subcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#15 + def initialize(compiler); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + def compile(node); end + + # Returns the value of attribute compiler. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#13 + def compiler; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#34 + def do_compile; end + + # Returns the value of attribute node. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#32 + def node; end + + class << self + # @private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#47 + def inherited(base); end + + # @private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#42 + def method_added(method); end + + # Returns the value of attribute registry. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#40 + def registry; end + end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#53 +class RuboCop::AST::NodePattern::Invalid < ::StandardError; end + +# Lexer class for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#18 +class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex + # @return [Lexer] a new instance of Lexer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#31 + def initialize(source); end + + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def comments; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def source_buffer; end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def tokens; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#60 + def do_parse; end + + # @return [token] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#40 + def emit(type); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#48 + def emit_comment; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#52 + def emit_regexp; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#64 + def token(type, value); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#19 +RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#21 +RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The generated lexer RuboCop::AST::NodePattern::LexerRex +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#23 +class RuboCop::AST::NodePattern::LexerRex + # Yields on the current action. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#69 + def action; end + + # The file name / path + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + def filename; end + + # The file name / path + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + def filename=(_arg0); end + + # The current location in the parse. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104 + def location; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def match; end + + # The match groups for the current scan. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#60 + def matches; end + + # Lex the next token. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113 + def next_token; end + + # Parse the given string. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84 + def parse(str); end + + # Read in and parse the file at +path+. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94 + def parse_file(path); end + + # The current scanner class. Must be overridden in subclasses. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77 + def scanner_class; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def ss; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def ss=(_arg0); end + + # The current lexical state. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + def state; end + + # The current lexical state. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + def state=(_arg0); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#31 +RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#27 +RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#29 +RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# :startdoc: +# :stopdoc: +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#36 +class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#30 +RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#33 +RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#32 +RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#28 +RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#37 +class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end + +# Helpers for defining methods based on a pattern string +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#28 +module RuboCop::AST::NodePattern::Macros + # Define a method which applies a pattern to an AST node + # + # The new method will return nil if the node does not match. + # If the node matches, and a block is provided, the new method will + # yield to the block (passing any captures as block arguments). + # If the node matches, and no block is provided, the new method will + # return the captures, or `true` if there were none. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#36 + def def_node_matcher(method_name, pattern_str, **keyword_defaults); end + + # Define a method which recurses over the descendants of an AST node, + # checking whether any of them match the provided pattern + # + # If the method name ends with '?', the new method will return `true` + # as soon as it finds a descendant which matches. Otherwise, it will + # yield all descendants which match. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#46 + def def_node_search(method_name, pattern_str, **keyword_defaults); end +end + +# Functionality to turn `match_code` into methods/lambda +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#7 +module RuboCop::AST::NodePattern::MethodDefiner + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#37 + def as_lambda; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#27 + def compile_as_lambda; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#8 + def def_node_matcher(base, method_name, **defaults); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#21 + def def_node_search(base, method_name, **defaults); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#139 + def compile_init; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#50 + def def_helper(base, method_name, **defaults); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#114 + def emit_keyword_list(forwarding: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#132 + def emit_lambda_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#125 + def emit_method_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#63 + def emit_node_search(method_name); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#74 + def emit_node_search_body(method_name, prelude:, on_match:); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#110 + def emit_param_list; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#119 + def emit_params(*first, forwarding: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#100 + def emit_retval; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#89 + def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end + + # This method minimizes the closure for our method + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#44 + def wrapping_block(method_name, **defaults); end +end + +# Base class for AST Nodes of a `NodePattern` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 +class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node + include ::RuboCop::AST::Descendence + extend ::Forwardable + + # 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#29 + def arity; end + + # @return [Range] arity as a Range + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#69 + def arity_range; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#23 + def capture?; end + + # @return [Node] most nodes have only one child + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#48 + def child; end + + # @return [Array<Node>] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#43 + def children_nodes; end + + # @return [Array<Node>, nil] replace node with result, or `nil` if no change requested. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#34 + 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#64 + def matches_within_set?; end + + # @return [Integer] nb of captures of that node and its descendants + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#53 + def nb_captures; end + + # To be overridden by subclasses + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#19 + def rest?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#78 + 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#58 + def variadic?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#74 + def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end +end + +# Node class for `<int str ...>` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#180 +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#198 + def arity; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#190 + def ends_with_rest?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#194 + def rest_node; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#186 + def term_nodes; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#183 +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#98 +class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node + # source://forwardable/1.3.2/forwardable.rb#229 + def arity(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#101 + def capture?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#109 + def in_sequence_head; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#105 + def nb_captures; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def rest?(*args, **_arg1, &block); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 +module RuboCop::AST::NodePattern::Node::ForbidInSeqHead + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#87 + def in_sequence_head; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#140 +RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#82 +RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) + +# Registry +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#250 +RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#12 +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#131 +class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#136 + def arg_list; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#132 + def method_name; end +end + +# Node class for `int+` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#143 +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#156 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#146 + def operator; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#150 +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#162 +class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#170 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#174 + def in_sequence_head; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#166 + def rest?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#163 +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#118 +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#121 + 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#206 +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#209 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#214 + def in_sequence_head; end +end + +# Node class for `{ ... }` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 +class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#225 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#232 + def in_sequence_head; end +end + +# Parser for NodePattern +# Note: class reopened in `parser.racc` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#13 +class RuboCop::AST::NodePattern::Parser < ::Racc::Parser + extend ::Forwardable + + # @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://forwardable/1.3.2/forwardable.rb#229 + def emit_atom(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def emit_call(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def emit_capture(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def emit_list(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def emit_unary_op(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def emit_union(*args, **_arg1, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 + def inspect; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def next_token(*args, **_arg1, &block); 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#9 +class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + def comments; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#100 + def do_parse; end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + def tokens; end +end + +# Overrides Builder to emit nodes with locations +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#39 +class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#40 + def emit_atom(type, token); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#61 + def emit_call(type, selector_t, args = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#55 + def emit_list(type, begin_t, children, end_t); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#49 + def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#81 + def join_exprs(left_expr, right_expr); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#75 + def loc(token_or_range); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#71 + def n(type, children, source_map); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#85 + def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end +end + +# Overrides Lexer to token locations and comments +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#10 +class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#13 + def initialize(str_or_buffer); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#27 + def emit_comment; end + + # @return [::Parser::Source::Range] last match's position + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#33 + def pos; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#11 + def source_buffer; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#23 + def token(type, value); end +end + +# Utility to assign a set of values to a constant +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#7 +module RuboCop::AST::NodePattern::Sets + class << self + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#31 + def [](set); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#15 + def name(set); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#22 + def uniq(name); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#14 +RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#8 +RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_DEFINE_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ENV = 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_STRINGIO = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_IO_FILE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_MATCH_MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH___MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_PRESENT_ANY_BLANK_EMPTY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SORT_SORT_MIN_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_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_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__EQL_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___9 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___EQL_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___EQL_INCLUDE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55 +RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) + +# Common functionality for primitive numeric nodes: `int`, `float`, ... +# +# 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#9 +class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node + # @return [AsgnNode] the assignment node + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#10 + def assignment_node; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#31 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#17 + def name; end + + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#24 + def operator; end +end + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#11 +class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#12 + def operator; end +end + +# A node extension for `or` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `or` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#8 +class RuboCop::AST::OrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `or` as a string. + # Returns `or` for `||` and vice versa. + # + # @return [String] the alternate of the `or` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#16 + def alternate_operator; end + + # Returns the inverse keyword of the `or` node as a string. + # Returns `and` for `or` and `&&` for `||`. + # + # @return [String] the inverse of the `or` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#24 + def inverse_operator; end +end + +# A node extension for `pair` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `pair` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#8 +class RuboCop::AST::PairNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # Checks whether the `pair` uses a colon delimiter. + # + # @return [Boolean] whether this `pair` uses a colon delimiter + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#30 + def colon?; end + + # Returns the delimiter of the `pair` as a string. Returns `=>` for a + # colon delimited `pair` and `:` for a hash rocket delimited `pair`. + # + # @param with_spacing [Boolean] whether to include spacing + # @return [String] the delimiter of the `pair` + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#39 + def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses a hash rocket delimiter. + # + # @return [Boolean] whether this `pair` uses a hash rocket delimiter + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#23 + def hash_rocket?; end + + # Returns the inverse delimiter of the `pair` as a string. + # + # @param with_spacing [Boolean] whether to include spacing + # @return [String] the inverse delimiter of the `pair` + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#51 + def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses hash value omission. + # + # @return [Boolean] whether this `pair` uses hash value omission + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#69 + def value_omission?; end + + # Checks whether the value starts on its own line. + # + # @return [Boolean] whether the value in the `pair` starts its own line + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#62 + def value_on_new_line?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#15 +RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#11 +RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#17 +RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#13 +RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) + +# Requires implementing `arguments`. +# +# Common functionality for nodes that are parameterized: +# `send`, `super`, `zsuper`, `def`, `defs` +# and (modern only): `index`, `indexasgn`, `lambda` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#10 +module RuboCop::AST::ParameterizedNode + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#40 + def arguments?; end + + # Whether the last argument of the node is a block pass, + # i.e. `&block`. + # + # @return [Boolean] whether the last argument of the node is a block pass + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#58 + def block_argument?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#24 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#33 + def last_argument; end + + # Checks whether this node's arguments are wrapped in parentheses. + # + # @return [Boolean] whether this node's arguments are + # wrapped in parentheses + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#15 + def parenthesized?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + def rest_argument?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + def splat_argument?; end +end + +# A specialized `ParameterizedNode`. +# Requires implementing `first_argument_index` +# Implements `arguments` as `children[first_argument_index..-1]` +# and optimizes other calls +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#83 +module RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array<Node>] arguments, if any + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#89 + def arguments; end + + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#119 + def arguments?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#103 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#112 + def last_argument; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#86 +RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# A specialized `ParameterizedNode` for node that have a single child +# containing either `nil`, an argument, or a `begin` node with all the +# arguments +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#66 +module RuboCop::AST::ParameterizedNode::WrappedArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] The arguments of the node. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#69 + def arguments; end +end + +# Common functionality for nodes that are predicates: +# `or`, `and` ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#7 +module RuboCop::AST::PredicateOperatorNode + # Checks whether this is a logical operator. + # + # @return [Boolean] whether this is a logical operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#27 + def logical_operator?; end + + # Returns the operator as a string. + # + # @return [String] the operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#20 + def operator; end + + # Checks whether this is a semantic operator. + # + # @return [Boolean] whether this is a semantic operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#34 + def semantic_operator?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#8 +RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#12 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#10 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#14 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) + +# A node extension for `procarg0` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all `arg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#11 +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#11 +class RuboCop::AST::ProcessedSource + # @return [ProcessedSource] a new instance of ProcessedSource + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#26 + def initialize(source, ruby_version, path = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#63 + def [](*args); end + + # Returns the value of attribute ast. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def ast; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def ast_with_comments; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#102 + def blank?; end + + # Returns the value of attribute buffer. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def buffer; end + + # Raw source checksum for tracking infinite loops. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#74 + def checksum; end + + # @return [Comment, nil] the comment at that line, if any. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 + 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#129 + def commented?(source_range); end + + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + 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#137 + 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#129 + def contains_comment?(source_range); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#151 + def current_line(token); end + + # Returns the value of attribute diagnostics. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def diagnostics; end + + # @deprecated Use `comments.each` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#79 + def each_comment(&block); end + + # Enumerates on the comments contained with the given `line_range` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 + def each_comment_in_lines(line_range); end + + # @deprecated Use `tokens.each` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#89 + def each_token(&block); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 + 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#84 + def find_comment(&block); end + + # @deprecated Use `tokens.find` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#94 + def find_token(&block); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#172 + def first_token_of(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#155 + def following_line(token); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 + def last_token_of(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#159 + 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#112 + 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#49 + def lines; end + + # Returns the value of attribute parser_error. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def parser_error; end + + # Returns the value of attribute path. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def path; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147 + def preceding_line(token); end + + # Returns the value of attribute raw_source. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def raw_source; end + + # Returns the value of attribute ruby_version. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + 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#183 + def sorted_tokens; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#141 + def start_with?(string); end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + def tokens; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#166 + def tokens_within(range_or_node); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#67 + def valid_syntax?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#190 + def comment_index; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#278 + def create_parser(ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#294 + def first_token_index(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#299 + def last_token_index(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#196 + def parse(source, ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#230 + def parser_class(ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#304 + def source_range(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#213 + def tokenize(parser); end + + class << self + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 + def from_file(path, ruby_version); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15 +RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 +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 `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#11 +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<Node>] 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#11 +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<Node, nil>] 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<ResbodyNode>] 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#11 +class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node + # The body of this `sclass` node. + # + # @return [Node, nil] the body of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#19 + def body; end + + # The identifier for this `sclass` node. (Always `self`.) + # + # @return [Node] the identifier of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#12 + def identifier; end +end + +# A node extension for `send` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#8 +class RuboCop::AST::SendNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#13 + def attribute_accessor?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#18 + def send_type?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#24 + def first_argument_index; end +end + +# This module provides a shorthand method to create a {Node} like +# `Parser::AST::Sexp`. +# +# @see https://www.rubydoc.info/gems/ast/AST/Sexp +# +# source://rubocop-ast//lib/rubocop/ast/sexp.rb#9 +module RuboCop::AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # + # source://rubocop-ast//lib/rubocop/ast/sexp.rb#11 + def s(type, *children); end +end + +# A node extension for `str`, `dstr`, and `xstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `str` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#8 +class RuboCop::AST::StrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#11 + def character_literal?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#15 + def heredoc?; end +end + +# A node extension for `super`- and `zsuper` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `super`- and `zsuper` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#8 +class RuboCop::AST::SuperNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://ast/2.4.2/lib/ast/node.rb#56 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `super` node + # + # source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#16 + def node_parts; end +end + +# A node extension for `sym` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sym` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/symbol_node.rb#8 +class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode +end + +# A basic wrapper around Parser's tokens. +# +# source://rubocop-ast//lib/rubocop/ast/token.rb#6 +class RuboCop::AST::Token + # @return [Token] a new instance of Token + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#17 + def initialize(pos, type, text); end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#32 + def begin_pos; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#28 + def column; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#101 + def comma?; end + + # Type Predicates + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#57 + def comment?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#105 + def dot?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#117 + def end?; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#36 + def end_pos; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#121 + def equal_sign?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#65 + def left_array_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#81 + def left_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#73 + def left_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#85 + def left_curly_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#93 + def left_parens?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#69 + def left_ref_bracket?; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#24 + def line; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#125 + def new_line?; end + + # Returns the value of attribute pos. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + def pos; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#109 + def regexp_dots?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#113 + def rescue_modifier?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#77 + def right_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#89 + def right_curly_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#97 + def right_parens?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#61 + def semicolon?; end + + # Checks if there is whitespace after token + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#45 + def space_after?; end + + # Checks if there is whitespace before token + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#50 + def space_before?; end + + # Returns the value of attribute text. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + def text; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#40 + def to_s; end + + # Returns the value of attribute type. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + def type; end + + class << self + # source://rubocop-ast//lib/rubocop/ast/token.rb#11 + def from_parser_token(parser_token); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/token.rb#7 +RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) + +# Provides methods for traversing an AST. +# Does not transform an AST; for that, use Parser::AST::Processor. +# Override methods to perform custom processing. Remember to call `super` +# if you want to recursively process descendant nodes. +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#9 +module RuboCop::AST::Traversal + extend ::RuboCop::AST::Traversal::CallbackCompiler + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#173 + def on_(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on___ENCODING__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on___FILE__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on___LINE__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_alias(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_and(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_and_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_arg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_arg_expr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_array(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_array_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_array_pattern_with_tail(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_back_ref(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_begin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#151 + def on_block(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + def on_block_pass(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_blockarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_break(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_case(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_case_match(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#146 + def on_casgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_cbase(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#147 + def on_class(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_complex(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#145 + def on_const(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_const_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 + def on_csend(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_cvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_cvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#148 + def on_def(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_defined?(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#153 + def on_defs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_dstr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_dsym(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_eflipflop(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_empty_else(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_ensure(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_erange(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_false(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_find_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_float(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_for(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forward_arg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forward_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forwarded_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forwarded_kwrestarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_forwarded_restarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_gvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_gvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_hash(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_hash_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#150 + def on_if(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_if_guard(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_iflipflop(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_in_match(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_in_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_index(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_indexasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_int(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_irange(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_ivar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_ivasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_kwarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_kwargs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_kwbegin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_kwnilarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 + def on_kwoptarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#124 + def on_kwrestarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + def on_kwsplat(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_lambda(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_lvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#131 + def on_lvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_masgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_match_alt(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_match_as(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_match_current_line(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_match_nil_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_match_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_match_pattern_p(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + def on_match_rest(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_match_var(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_match_with_lvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_match_with_trailing_comma(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_mlhs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_module(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_mrasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_next(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_nil(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_not(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_nth_ref(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#152 + def on_numblock(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#149 + def on_op_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#132 + def on_optarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_or(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_or_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_pair(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_pin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + def on_postexe(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#129 + def on_preexe(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_procarg0(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_rasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_rational(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_redo(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_regexp(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#135 + def on_regopt(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_resbody(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_rescue(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#124 + def on_restarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_retry(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_return(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_sclass(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_self(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#155 + def on_send(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_shadowarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#125 + def on_splat(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_str(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_super(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#127 + def on_sym(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_true(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_undef(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#128 + def on_unless_guard(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_until(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_until_post(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#139 + def on_when(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#133 + def on_while(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_while_post(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_xstr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#136 + def on_yield(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#123 + def on_zsuper(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#17 + def walk(node); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#25 +module RuboCop::AST::Traversal::CallbackCompiler + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#61 + def arity_check(range); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#52 + def body(signature, prelude); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#35 + def def_callback(type, *signature, arity: T.unsafe(nil), arity_check: T.unsafe(nil), body: T.unsafe(nil)); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#26 +RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#29 +RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) + +# Only for debugging. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#12 +class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end + +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#100 +RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#15 +RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) + +# A node extension for `until` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `until` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#8 +class RuboCop::AST::UntilNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#30 + def do?; end + + # Returns the inverse keyword of the `until` node as a string. + # Returns `while` for `until` nodes and vice versa. + # + # @return [String] the inverse keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#23 + def inverse_keyword; end + + # Returns the keyword of the `until` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#15 + def keyword; end +end + +# source://rubocop-ast//lib/rubocop/ast/version.rb#5 +module RuboCop::AST::Version; end + +# source://rubocop-ast//lib/rubocop/ast/version.rb#6 +RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) + +# A node extension for `when` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `when` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#11 +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<Node>] an array of condition nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#12 + def conditions; end + + # @deprecated Use `conditions.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#17 + def each_condition(&block); end + + # Checks whether the `when` node has a `then` keyword. + # + # @return [Boolean] whether the `when` node has a `then` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#35 + def then?; end +end + +# A node extension for `while` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `while` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#8 +class RuboCop::AST::WhileNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#30 + def do?; end + + # Returns the inverse keyword of the `while` node as a string. + # Returns `until` for `while` nodes and vice versa. + # + # @return [String] the inverse keyword of the `while` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#23 + def inverse_keyword; end + + # Returns the keyword of the `while` statement as a string. + # + # @return [String] the keyword of the `while` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#15 + def keyword; end +end + +# A node extension for `yield` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `yield` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#8 +class RuboCop::AST::YieldNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://ast/2.4.2/lib/ast/node.rb#56 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `send` node + # + # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 + def node_parts; end +end diff --git a/sorbet/rbi/gems/rubocop-performance@1.19.0.rbi b/sorbet/rbi/gems/rubocop-performance@1.19.0.rbi new file mode 100644 index 0000000000..cd94d6a778 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-performance@1.19.0.rbi @@ -0,0 +1,3157 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-performance` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-performance`. + +# source://rubocop-performance//lib/rubocop/performance.rb#3 +module RuboCop; end + +# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#4 +module RuboCop::Cop; end + +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#5 +module RuboCop::Cop::Performance; end + +# Identifies usages of `ancestors.include?` and change them to use `<=` instead. +# +# @example +# # bad +# A.ancestors.include?(B) +# +# # good +# A <= B +# +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#19 +class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#26 + def ancestors_include_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#30 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#43 + def range(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#23 +RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#24 +RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where slicing arrays with semi-infinite ranges +# can be replaced by `Array#take` and `Array#drop`. +# This cop was created due to a mistake in microbenchmark and hence is disabled by default. +# Refer https://github.com/rubocop/rubocop-performance/pull/175#issuecomment-731892717 +# +# @example +# # bad +# array[..2] +# array[...2] +# array[2..] +# array[2...] +# array.slice(..2) +# +# # good +# array.take(3) +# array.take(2) +# array.drop(2) +# array.drop(2) +# array.take(3) +# +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#29 +class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#45 + def endless_range?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#41 + def endless_range_slice?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#66 + def correction(receiver, range_node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#36 +RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#39 +RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 +RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) + +# Identifies places where numeric argument to BigDecimal should be +# converted to string. Initializing from String is faster +# than from Numeric for BigDecimal. +# +# @example +# # bad +# BigDecimal(1, 2) +# 4.to_d(6) +# BigDecimal(1.2, 3, exception: true) +# 4.5.to_d(6, exception: true) +# +# # good +# BigDecimal('1', 2) +# BigDecimal('4', 6) +# BigDecimal('1.2', 3, exception: true) +# BigDecimal('4.5', 6, exception: true) +# +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#23 +class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 + def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#33 + def to_d?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#26 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#27 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.7, `UnboundMethod#bind_call` has been added. +# +# This cop identifies places where `bind(obj).call(args, ...)` +# can be replaced by `bind_call(obj, args, ...)`. +# +# The `bind_call(obj, args, ...)` method is faster than +# `bind(obj).call(args, ...)`. +# +# @example +# # bad +# umethod.bind(obj).call(foo, bar) +# umethod.bind(obj).(foo, bar) +# +# # good +# umethod.bind_call(obj, foo, bar) +# +# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#22 +class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#32 + def bind_with_call_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#40 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#71 + def build_call_args(call_args_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#64 + def correction_range(receiver, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#58 + def message(bind_arg, call_args); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#29 +RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#30 +RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies unnecessary use of a `block_given?` where explicit check +# of block argument would suffice. +# +# @example +# # bad +# def method(&block) +# do_something if block_given? +# end +# +# # good +# def method(&block) +# do_something if block +# end +# +# # good - block is reassigned +# def method(&block) +# block ||= -> { do_something } +# warn "Using default ..." unless block_given? +# # ... +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#27 +class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#35 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 + def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#31 +RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 +RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `caller[n]` can be replaced by `caller(n..n).first`. +# +# @example +# # bad +# caller[1] +# caller.first +# caller_locations[1] +# caller_locations.first +# +# # good +# caller(2..2).first +# caller(1..1).first +# caller_locations(2..2).first +# caller_locations(1..1).first +# +# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#20 +class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#33 + def caller_with_scope_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#40 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#26 + def slow_caller?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#61 + def int_value(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#23 +RuboCop::Cop::Performance::Caller::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#24 +RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Reordering `when` conditions with a splat to the end +# of the `when` branches can improve performance. +# +# Ruby has to allocate memory for the splat expansion every time +# that the `case` `when` statement is run. Since Ruby does not support +# fall through inside of `case` `when`, like some other languages do, +# the order of the `when` branches should not matter. By placing any +# splat expansions at the end of the list of `when` branches we will +# reduce the number of times that memory has to be allocated for +# the expansion. The exception to this is if multiple of your `when` +# conditions can be true for any given condition. A likely scenario for +# this defining a higher level when condition to override a condition +# that is inside of the splat expansion. +# +# @example +# # bad +# case foo +# when *condition +# bar +# when baz +# foobar +# end +# +# case foo +# when *[1, 2, 3, 4] +# bar +# when 5 +# baz +# end +# +# # good +# case foo +# when baz +# foobar +# when *condition +# bar +# end +# +# case foo +# when 1, 2, 3, 4 +# bar +# when 5 +# baz +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#58 +class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#66 + def on_case(case_node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#83 + def autocorrect(corrector, when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#140 + def indent_for(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#100 + def inline_fix_branch(corrector, when_node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#164 + def needs_reorder?(when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#136 + def new_branch_without_then(node, new_condition); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#132 + def new_condition_with_then(node, new_condition); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#158 + def non_splat?(condition); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#91 + def range(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#107 + def reorder_condition(corrector, when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#116 + def reordering_correction(when_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#95 + def replacement(conditions); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#144 + def splat_offenses(when_conditions); end + + # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#126 + def when_branch_range(when_node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#64 +RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#63 +RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where a case-insensitive string comparison +# can better be implemented using `casecmp`. +# +# @example +# # bad +# str.downcase == 'abc' +# str.upcase.eql? 'ABC' +# 'abc' == str.downcase +# 'ABC'.eql? str.upcase +# str.downcase == str.downcase +# +# # good +# str.casecmp('ABC').zero? +# 'abc'.casecmp(str).zero? +# +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#24 +class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#45 + def downcase_downcase(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#31 + def downcase_eq(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#38 + def eq_downcase(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#52 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#84 + def autocorrect(corrector, node, replacement); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#88 + def build_good_method(method, arg, variable); end + + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#67 + def take_method_apart(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#29 +RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#27 +RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#28 +RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `array.compact.flatten.map { |x| x.downcase }`. +# Each of these methods (`compact`, `flatten`, `map`) will generate a new intermediate array +# that is promptly thrown away. Instead it is faster to mutate when we know it's safe. +# +# @example +# # bad +# array = ["a", "b", "c"] +# array.compact.flatten.map { |x| x.downcase } +# +# # good +# array = ["a", "b", "c"] +# array.compact! +# array.flatten! +# array.map! { |x| x.downcase } +# array +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 +class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#54 + def chain_array_allocation?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#62 + def on_send(node); end +end + +# These methods ALWAYS return a new array +# after they're called it's safe to mutate the resulting array +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#37 +RuboCop::Cop::Performance::ChainArrayAllocation::ALWAYS_RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) + +# These methods have a mutation alternative. For example :collect +# can be called as :collect! +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#45 +RuboCop::Cop::Performance::ChainArrayAllocation::HAS_MUTATION_ALTERNATIVE = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#50 +RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#48 +RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) + +# These methods return a new array only when called without a block. +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#33 +RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = T.let(T.unsafe(nil), Set) + +# These methods return a new array but only sometimes. They must be +# called with an argument. For example: +# +# [1,2].first # => 1 +# [1,2].first(1) # => [1] +# +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#30 +RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), Set) + +# Identifies places where Array and Hash literals are used within loops. +# It is better to extract them into a local variable or constant +# to avoid unnecessary allocations on each iteration. +# +# You can set the minimum number of elements to consider +# an offense with `MinSize`. +# +# @example +# # bad +# users.select do |user| +# %i[superadmin admin].include?(user.role) +# end +# +# # good +# admin_roles = %i[superadmin admin] +# users.select do |user| +# admin_roles.include?(user.role) +# end +# +# # good +# ADMIN_ROLES = %i[superadmin admin] +# ... +# users.select do |user| +# ADMIN_ROLES.include?(user.role) +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#34 +class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#74 + def enumerable_loop?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#68 + def kernel_loop?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#80 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#90 + def check_literal?(node, method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#128 + def enumerable_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#110 + def keyword_loop?(type); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#120 + def literal_class(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#106 + def loop?(ancestor, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#132 + def min_size; end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#114 + def node_within_enumerable_loop?(node, ancestor); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#97 + def nonmutable_method_of_array_or_hash?(node, method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#102 + def parent_is_loop?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#56 +RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#41 +RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#66 +RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#39 +RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#35 +RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#42 +RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#58 +RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#38 +RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort { |a, b| a.foo <=> b.foo }` +# can be replaced by `sort_by(&:foo)`. +# This cop also checks `sort!`, `min`, `max` and `minmax` methods. +# +# @example +# # bad +# array.sort { |a, b| a.foo <=> b.foo } +# array.sort! { |a, b| a.foo <=> b.foo } +# array.max { |a, b| a.foo <=> b.foo } +# array.min { |a, b| a.foo <=> b.foo } +# array.minmax { |a, b| a.foo <=> b.foo } +# array.sort { |a, b| a[:foo] <=> b[:foo] } +# +# # good +# array.sort_by(&:foo) +# array.sort_by!(&:foo) +# array.sort_by { |v| v.foo } +# array.sort_by do |var| +# var.foo +# end +# array.max_by(&:foo) +# array.min_by(&:foo) +# array.minmax_by(&:foo) +# array.sort_by { |a| a[:foo] } +# +# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#30 +class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#41 + def compare?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#55 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#48 + def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#114 + def compare_range(send, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#91 + def message(send, method, var_a, var_b, args); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#76 + def slow_compare?(method, args_a, args_b); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#34 +RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#38 +RuboCop::Cop::Performance::CompareWithBlock::REPLACEMENT = T.let(T.unsafe(nil), Hash) + +# Identifies places where `Concurrent.monotonic_time` +# can be replaced by `Process.clock_gettime(Process::CLOCK_MONOTONIC)`. +# +# @example +# +# # bad +# Concurrent.monotonic_time +# +# # good +# Process.clock_gettime(Process::CLOCK_MONOTONIC) +# +# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#17 +class RuboCop::Cop::Performance::ConcurrentMonotonicTime < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#23 + def concurrent_monotonic_time?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#28 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#20 +RuboCop::Cop::Performance::ConcurrentMonotonicTime::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#21 +RuboCop::Cop::Performance::ConcurrentMonotonicTime::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Finds regular expressions with dynamic components that are all constants. +# +# Ruby allocates a new Regexp object every time it executes a code containing such +# a regular expression. It is more efficient to extract it into a constant, +# memoize it, or add an `/o` option to perform `#{}` interpolation only once and +# reuse that Regexp object. +# +# @example +# +# # bad +# def tokens(pattern) +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/) } +# end +# +# # good +# ALL_SEPARATORS = /\A#{SEPARATORS}\Z/ +# def tokens(pattern) +# pattern.scan(TOKEN).reject { |token| token.match?(ALL_SEPARATORS) } +# end +# +# # good +# def tokens(pattern) +# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/o) } +# end +# +# # good +# def separators +# @separators ||= /\A#{SEPARATORS}\Z/ +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#36 +class RuboCop::Cop::Performance::ConstantRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#45 + def on_regexp(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#59 + def regexp_escape?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#64 + def include_interpolated_const?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#55 + def within_allowed_assignment?(node); end + + class << self + # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#41 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#39 +RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `count` on an `Enumerable` that +# follow calls to `select`, `find_all`, `filter` or `reject`. Querying logic can instead be +# passed to the `count` call. +# +# @example +# # bad +# [1, 2, 3].select { |e| e > 2 }.size +# [1, 2, 3].reject { |e| e > 2 }.size +# [1, 2, 3].select { |e| e > 2 }.length +# [1, 2, 3].reject { |e| e > 2 }.length +# [1, 2, 3].select { |e| e > 2 }.count { |e| e.odd? } +# [1, 2, 3].reject { |e| e > 2 }.count { |e| e.even? } +# array.select(&:value).count +# +# # good +# [1, 2, 3].count { |e| e > 2 } +# [1, 2, 3].count { |e| e < 2 } +# [1, 2, 3].count { |e| e > 2 && e.odd? } +# [1, 2, 3].count { |e| e < 2 && e.even? } +# Model.select('field AS field_one').count +# Model.select(:value).count +# +# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#49 +class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#56 + def count_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#63 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#79 + def autocorrect(corrector, node, selector_node, selector); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#89 + def eligible_node?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#132 + def negate_block_pass_as_inline_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#111 + def negate_block_pass_reject(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#118 + def negate_block_reject(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#128 + def negate_expression(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#103 + def negate_reject(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#93 + def source_starting_at(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#53 +RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#54 +RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.5, `String#delete_prefix` has been added. +# +# This cop identifies places where `gsub(/\Aprefix/, '')` and `sub(/\Aprefix/, '')` +# can be replaced by `delete_prefix('prefix')`. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `^prefix` is unsafe as it will behave incompatible with `delete_prefix` +# for receiver is multiline string. +# +# The `delete_prefix('prefix')` method is faster than `gsub(/\Aprefix/, '')`. +# +# @example +# +# # bad +# str.gsub(/\Aprefix/, '') +# str.gsub!(/\Aprefix/, '') +# +# str.sub(/\Aprefix/, '') +# str.sub!(/\Aprefix/, '') +# +# # good +# str.delete_prefix('prefix') +# str.delete_prefix!('prefix') +# @example SafeMultiline: true (default) +# +# # good +# str.gsub(/^prefix/, '') +# str.gsub!(/^prefix/, '') +# str.sub(/^prefix/, '') +# str.sub!(/^prefix/, '') +# @example SafeMultiline: false +# +# # bad +# str.gsub(/^prefix/, '') +# str.gsub!(/^prefix/, '') +# str.sub(/^prefix/, '') +# str.sub!(/^prefix/, '') +# +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#49 +class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#66 + def delete_prefix_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#71 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#56 +RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#59 +RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#57 +RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.5, `String#delete_suffix` has been added. +# +# This cop identifies places where `gsub(/suffix\z/, '')` and `sub(/suffix\z/, '')` +# can be replaced by `delete_suffix('suffix')`. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `suffix$` is unsafe as it will behave incompatible with `delete_suffix?` +# for receiver is multiline string. +# +# The `delete_suffix('suffix')` method is faster than `gsub(/suffix\z/, '')`. +# +# @example +# +# # bad +# str.gsub(/suffix\z/, '') +# str.gsub!(/suffix\z/, '') +# +# str.sub(/suffix\z/, '') +# str.sub!(/suffix\z/, '') +# +# # good +# str.delete_suffix('suffix') +# str.delete_suffix!('suffix') +# @example SafeMultiline: true (default) +# +# # good +# str.gsub(/suffix$/, '') +# str.gsub!(/suffix$/, '') +# str.sub(/suffix$/, '') +# str.sub!(/suffix$/, '') +# @example SafeMultiline: false +# +# # bad +# str.gsub(/suffix$/, '') +# str.gsub!(/suffix$/, '') +# str.sub(/suffix$/, '') +# str.sub!(/suffix$/, '') +# +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#49 +class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#66 + def delete_suffix_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#71 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#56 +RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#59 +RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#57 +RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `first`, `last`, `[0]` or `[-1]` +# chained to `select`, `find_all` or `filter` and change them to use +# `detect` instead. +# +# @example +# # bad +# [].select { |item| true }.first +# [].select { |item| true }.last +# [].find_all { |item| true }.first +# [].find_all { |item| true }.last +# [].filter { |item| true }.first +# [].filter { |item| true }.last +# [].filter { |item| true }[0] +# [].filter { |item| true }[-1] +# +# # good +# [].detect { |item| true } +# [].reverse.detect { |item| true } +# +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#30 +class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#41 + def detect_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#70 + def accept_first_call?(receiver, body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#102 + def autocorrect(corrector, node, replacement); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#128 + def lazy?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#113 + def message_for_method(method, index); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#124 + def preferred_method; end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#79 + def register_offense(node, receiver, second_method, index); end + + # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#94 + def replacement(method, index); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#33 +RuboCop::Cop::Performance::Detect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#37 +RuboCop::Cop::Performance::Detect::INDEX_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#38 +RuboCop::Cop::Performance::Detect::INDEX_REVERSE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#35 +RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#39 +RuboCop::Cop::Performance::Detect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#36 +RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) + +# Checks for double `#start_with?` or `#end_with?` calls +# separated by `||`. In some cases such calls can be replaced +# with an single `#start_with?`/`#end_with?` call. +# +# `IncludeActiveSupportAliases` configuration option is used to check for +# `starts_with?` and `ends_with?`. These methods are defined by Active Support. +# +# @example +# # bad +# str.start_with?("a") || str.start_with?(Some::CONST) +# str.start_with?("a", "b") || str.start_with?("c") +# str.end_with?(var1) || str.end_with?(var2) +# +# # good +# str.start_with?("a", Some::CONST) +# str.start_with?("a", "b", "c") +# str.end_with?(var1, var2) +# @example IncludeActiveSupportAliases: false (default) +# # good +# str.starts_with?("a", "b") || str.starts_with?("c") +# str.ends_with?(var1) || str.ends_with?(var2) +# +# str.starts_with?("a", "b", "c") +# str.ends_with?(var1, var2) +# @example IncludeActiveSupportAliases: true +# # bad +# str.starts_with?("a", "b") || str.starts_with?("c") +# str.ends_with?(var1) || str.ends_with?(var2) +# +# # good +# str.starts_with?("a", "b", "c") +# str.ends_with?(var1, var2) +# +# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#41 +class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#96 + def check_with_active_support_aliases(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#46 + def on_or(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#90 + def two_start_end_with_calls(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#60 + def autocorrect(corrector, first_call_args, second_call_args, combined_args); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#86 + def check_for_active_support_aliases?; end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#82 + def combine_args(first_call_args, second_call_args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#76 + def message(node, receiver, method, combined_args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#68 + def process_source(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#44 +RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) + +# Identifies unnecessary use of a regex where `String#end_with?` would suffice. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `end$` is unsafe as it will behave incompatible with `end_with?` +# for receiver is multiline string. +# +# @example +# # bad +# 'abc'.match?(/bc\Z/) +# /bc\Z/.match?('abc') +# 'abc' =~ /bc\Z/ +# /bc\Z/ =~ 'abc' +# 'abc'.match(/bc\Z/) +# /bc\Z/.match('abc') +# +# # good +# 'abc'.end_with?('bc') +# @example SafeMultiline: true (default) +# +# # good +# 'abc'.match?(/bc$/) +# /bc$/.match?('abc') +# 'abc' =~ /bc$/ +# /bc$/ =~ 'abc' +# 'abc'.match(/bc$/) +# /bc$/.match('abc') +# @example SafeMultiline: false +# +# # bad +# 'abc'.match?(/bc$/) +# /bc$/.match?('abc') +# 'abc' =~ /bc$/ +# /bc$/ =~ 'abc' +# 'abc'.match(/bc$/) +# /bc$/.match('abc') +# +# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#49 +class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + def on_match_with_lvasgn(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#56 + def redundant_regex?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#53 +RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#54 +RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Do not compute the size of statically sized objects. +# +# @example +# # String methods +# # bad +# 'foo'.size +# %q[bar].count +# %(qux).length +# +# # Symbol methods +# # bad +# :fred.size +# :'baz'.length +# +# # Array methods +# # bad +# [1, 2, thud].count +# %W(1, 2, bar).size +# +# # Hash methods +# # bad +# { a: corge, b: grault }.length +# +# # good +# foo.size +# bar.count +# qux.length +# +# # good +# :"#{fred}".size +# CONST = :baz.length +# +# # good +# [1, 2, *thud].count +# garply = [1, 2, 3] +# garply.size +# +# # good +# { a: corge, **grault }.length +# waldo = { a: corge, b: grault } +# waldo.size +# +# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#48 +class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#52 + def counter(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#72 + def allowed_argument?(arg); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#76 + def allowed_parent?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#68 + def allowed_variable?(var); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#86 + def contains_double_splat?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#80 + def contains_splat?(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#92 + def non_string_argument?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#49 +RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#50 +RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `map { ... }.flatten` and +# change them to use `flat_map { ... }` instead. +# +# @example +# # bad +# [1, 2, 3, 4].map { |e| [e, e] }.flatten(1) +# [1, 2, 3, 4].collect { |e| [e, e] }.flatten(1) +# +# # good +# [1, 2, 3, 4].flat_map { |e| [e, e] } +# [1, 2, 3, 4].map { |e| [e, e] }.flatten +# [1, 2, 3, 4].collect { |e| [e, e] }.flatten +# +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#18 +class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#28 + def flat_map_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#72 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#52 + def offense_for_levels(node, map_node, first_method, flatten); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#58 + def offense_for_method(node, map_node, first_method, flatten); end + + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#62 + def register_offense(node, map_node, first_method, flatten, message); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#24 +RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#22 +RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#23 +RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for inefficient searching of keys and values within +# hashes. +# +# `Hash#keys.include?` is less efficient than `Hash#key?` because +# the former allocates a new array and then performs an O(n) search +# through that array, while `Hash#key?` does not allocate any array and +# performs a faster O(1) search for the key. +# +# `Hash#values.include?` is less efficient than `Hash#value?`. While they +# both perform an O(n) search through all of the values, calling `values` +# allocates a new array while using `value?` does not. +# +# @example +# # bad +# { a: 1, b: 2 }.keys.include?(:a) +# { a: 1, b: 2 }.keys.include?(:z) +# h = { a: 1, b: 2 }; h.keys.include?(100) +# +# # good +# { a: 1, b: 2 }.key?(:a) +# { a: 1, b: 2 }.has_key?(:z) +# h = { a: 1, b: 2 }; h.key?(100) +# +# # bad +# { a: 1, b: 2 }.values.include?(2) +# { a: 1, b: 2 }.values.include?('garbage') +# h = { a: 1, b: 2 }; h.values.include?(nil) +# +# # good +# { a: 1, b: 2 }.value?(2) +# { a: 1, b: 2 }.has_value?('garbage') +# h = { a: 1, b: 2 }; h.value?(nil) +# +# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#42 +class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#47 + def inefficient_include?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#91 + def correct_argument(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#99 + def correct_dot(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#95 + def correct_hash_expression(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#75 + def correct_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#82 + def current_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#67 + def message(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#71 + def replacement(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#86 + def use_long_method; end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#45 +RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where inefficient `readlines` method +# can be replaced by `each_line` to avoid fully loading file content into memory. +# +# @example +# +# # bad +# File.readlines('testfile').each { |l| puts l } +# IO.readlines('testfile', chomp: true).each { |l| puts l } +# +# conn.readlines(10).map { |l| l.size } +# file.readlines.find { |l| l.start_with?('#') } +# file.readlines.each { |l| puts l } +# +# # good +# File.open('testfile', 'r').each_line { |l| puts l } +# IO.open('testfile').each_line(chomp: true) { |l| puts l } +# +# conn.each_line(10).map { |l| l.size } +# file.each_line.find { |l| l.start_with?('#') } +# file.each_line { |l| puts l } +# +# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#27 +class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#42 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#34 + def readlines_on_class?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#38 + def readlines_on_instance?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#58 + def autocorrect(corrector, enumerable_call, readlines_call, receiver); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#90 + def build_bad_method(enumerable_call); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#106 + def build_call_args(call_args_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#82 + def build_good_method(enumerable_call); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#94 + def correction_range(enumerable_call, readlines_call); end + + # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#76 + def offense_range(enumerable_call, readlines_call); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#31 +RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#32 +RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.7, `Enumerable#filter_map` has been added. +# +# This cop identifies places where `map { ... }.compact` can be replaced by `filter_map`. +# +# [source,ruby] +# ---- +# [true, false, nil].compact #=> [true, false] +# [true, false, nil].filter_map(&:itself) #=> [true] +# ---- +# +# @example +# # bad +# ary.map(&:foo).compact +# ary.collect(&:foo).compact +# +# # good +# ary.filter_map(&:foo) +# ary.map(&:foo).compact! +# ary.compact.map(&:foo) +# +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#30 +class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#40 + def map_compact(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#94 + def compact_method_with_final_newline_range(compact_method_range); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#90 + def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#86 + def map_method_and_compact_method_on_same_line?(map_node, compact_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#68 + def remove_compact_method(corrector, map_node, compact_node, chained_method); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#82 + def use_dot?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#35 +RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 +RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if the map method is used in a chain. +# +# Autocorrection is not supported because an appropriate block variable name cannot be determined automatically. +# +# [source,ruby] +# ---- +# class X +# def initialize +# @@num = 0 +# end +# +# def foo +# @@num += 1 +# self +# end +# +# def bar +# @@num * 2 +# end +# end +# +# [X.new, X.new].map(&:foo).map(&:bar) # => [4, 4] +# [X.new, X.new].map { |x| x.foo.bar } # => [2, 4] +# ---- +# +# @example +# +# # bad +# array.map(&:foo).map(&:bar) +# +# # good +# array.map { |item| item.foo.bar } +# +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#43 +class RuboCop::Cop::Performance::MapMethodChain < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#49 + def block_pass_with_symbol_arg?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#53 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#71 + def find_begin_of_chained_map_method(node, map_args); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#46 +RuboCop::Cop::Performance::MapMethodChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#47 +RuboCop::Cop::Performance::MapMethodChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where methods are converted to blocks, with the +# use of `&method`, and passed as arguments to method calls. +# It is faster to replace those with explicit blocks, calling those methods inside. +# +# @example +# # bad +# array.map(&method(:do_something)) +# [1, 2, 3].each(&out.method(:puts)) +# +# # good +# array.map { |x| do_something(x) } +# [1, 2, 3].each { |x| out.puts(x) } +# +# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#19 +class RuboCop::Cop::Performance::MethodObjectAsBlock < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#22 + def method_object_as_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#26 + def on_block_pass(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#20 +RuboCop::Cop::Performance::MethodObjectAsBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for `OpenStruct.new` calls. +# Instantiation of an `OpenStruct` invalidates +# Ruby global method cache as it causes dynamic method +# definition during program runtime. +# This could have an effect on performance, +# especially in case of single-threaded +# applications with multiple `OpenStruct` instantiations. +# +# @example +# # bad +# class MyClass +# def my_method +# OpenStruct.new(my_key1: 'my_value1', my_key2: 'my_value2') +# end +# end +# +# # good +# class MyClass +# MyStruct = Struct.new(:my_key1, :my_key2) +# def my_method +# MyStruct.new('my_value1', 'my_value2') +# end +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#34 +class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base + # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#42 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#38 + def open_struct(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#35 +RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#36 +RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies uses of `Range#include?` and `Range#member?`, which iterates over each +# item in a `Range` to see if a specified item is there. In contrast, +# `Range#cover?` simply compares the target item with the beginning and +# end points of the `Range`. In a great majority of cases, this is what +# is wanted. +# +# @example +# # bad +# ('a'..'z').include?('b') # => true +# ('a'..'z').member?('b') # => true +# +# # good +# ('a'..'z').cover?('b') # => true +# +# # Example of a case where `Range#cover?` may not provide +# # the desired result: +# +# ('a'..'z').cover?('yellow') # => true +# +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#28 +class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#43 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#39 + def range_include(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#31 +RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 +RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies the use of a `&block` parameter and `block.call` +# where `yield` would do just as well. +# +# @example +# # bad +# def method(&block) +# block.call +# end +# def another(&func) +# func.call 1, 2, 3 +# end +# +# # good +# def method +# yield +# end +# def another +# yield 1, 2, 3 +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#25 +class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#43 + def blockarg_assigned?(param0, param1); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#39 + def blockarg_calls(param0, param1); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#34 + def blockarg_def(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 + def on_def(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#97 + def args_include_block_pass?(blockcall); end + + # offenses are registered on the `block.call` nodes + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#63 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#81 + def calls_to_report(argname, body); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#91 + def shadowed_block_argument?(body, block_argument_of_method_signature); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#31 +RuboCop::Cop::Performance::RedundantBlockCall::CLOSE_PAREN = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#28 +RuboCop::Cop::Performance::RedundantBlockCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#30 +RuboCop::Cop::Performance::RedundantBlockCall::OPEN_PAREN = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#32 +RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#29 +RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String) + +# Checks for uses `Enumerable#all?`, `Enumerable#any?`, `Enumerable#one?`, +# and `Enumerable#none?` are compared with `===` or similar methods in block. +# +# By default, `Object#===` behaves the same as `Object#==`, but this +# behavior is appropriately overridden in subclass. For example, +# `Range#===` returns `true` when argument is within the range. +# +# This cop has `AllowRegexpMatch` option and it is true by default because +# `regexp.match?('string')` often used in block changes to the opposite result: +# +# [source,ruby] +# ---- +# [/pattern/].all? { |regexp| regexp.match?('pattern') } # => true +# [/pattern/].all? { |regexp| regexp =~ 'pattern' } # => true +# [/pattern/].all?('pattern') # => false +# ---- +# +# @example +# # bad +# items.all? { |item| pattern === item } +# items.all? { |item| item == other } +# items.all? { |item| item.is_a?(Klass) } +# items.all? { |item| item.kind_of?(Klass) } +# +# # good +# items.all?(pattern) +# items.all?(Klass) +# @example AllowRegexpMatch: true (default) +# +# # good +# items.all? { |item| item =~ pattern } +# items.all? { |item| item.match?(pattern) } +# @example AllowRegexpMatch: false +# +# # bad +# items.all? { |item| item =~ pattern } +# items.all? { |item| item.match?(pattern) } +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#49 +class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#62 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#131 + def allow_regexp_match?; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#104 + def new_argument(block_argument, block_body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#127 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#82 + def one_block_argument?(block_arguments); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#94 + def same_block_argument_and_is_a_argument?(block_body, block_argument); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#118 + def use_block_argument_in_method_argument_of_operand?(block_argument, operand); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#86 + def use_equality_comparison_block?(block_body); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#58 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#60 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::IS_A_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#55 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#59 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::REGEXP_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#57 +RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T.let(T.unsafe(nil), Array) + +# Identifies the use of `Regexp#match` or `String#match`, which +# returns `#<MatchData>`/`nil`. The return value of `=~` is an integral +# index/`nil` and is more performant. +# +# @example +# # bad +# do_something if str.match(/regex/) +# while regex.match('str') +# do_something +# end +# +# # good +# method(str =~ /regex/) +# return value unless regex =~ 'str' +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#20 +class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#28 + def match_call?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#37 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#33 + def only_truthiness_matters?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#49 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#55 + def autocorrectable?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#23 +RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#24 +RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `Hash#merge!` can be replaced by `Hash#[]=`. +# You can set the maximum number of key-value pairs to consider +# an offense with `MaxKeyValuePairs`. +# +# @example +# # bad +# hash.merge!(a: 1) +# hash.merge!({'key' => 'value'}) +# +# # good +# hash[:a] = 1 +# hash['key'] = 'value' +# @example MaxKeyValuePairs: 2 (default) +# # bad +# hash.merge!(a: 1, b: 2) +# +# # good +# hash[:a] = 1 +# hash[:b] = 2 +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#30 +class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#48 + def modifier_flow_control?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#52 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#44 + def redundant_merge_candidate(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#106 + def correct_multiple_elements(corrector, node, parent, new_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#118 + def correct_single_element(corrector, node, new_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#79 + def each_redundant_merge(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#98 + def kwsplat_used?(pairs); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#144 + def leading_spaces(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#148 + def max_key_value_pairs; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#71 + def message(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#87 + def non_redundant_merge?(node, receiver, pairs); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#94 + def non_redundant_pairs?(receiver, pairs); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#102 + def non_redundant_value_used?(receiver, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#132 + def rewrite_with_modifier(node, parent, new_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#122 + def to_assignments(receiver, pairs); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#34 +RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), String) + +# A utility class for checking the use of values within an +# `each_with_object` call. +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#154 +class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector + extend ::RuboCop::AST::NodePattern::Macros + + # @return [EachWithObjectInspector] a new instance of EachWithObjectInspector + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#157 + def initialize(node, receiver); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#188 + def each_with_object_node(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#162 + def value_used?; end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 + def eligible_receiver?; end + + # Returns the value of attribute node. + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 + def node; end + + # Returns the value of attribute receiver. + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 + def receiver; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 + def second_argument; end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#183 + def unwind(receiver); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#35 +RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#36 +RuboCop::Cop::Performance::RedundantMerge::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#38 +RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String) + +# Identifies places where `sort { |a, b| a <=> b }` can be replaced with `sort`. +# +# @example +# # bad +# array.sort { |a, b| a <=> b } +# +# # good +# array.sort +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#15 +class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SortBlock + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#21 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#29 + def on_numblock(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#40 + def register_offense(send, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#19 +RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `split` argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'a,b,c'.split(/,/) +# +# # good +# 'a,b,c'.split(',') +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#15 +class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#23 + def split_call_with_regexp?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#42 + def determinist_regexp?(regexp_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#46 + def replacement(regexp_node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#20 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#18 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#19 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#21 +RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for redundant `String#chars`. +# +# @example +# # bad +# str.chars[0..2] +# str.chars.slice(0..2) +# str.chars.last +# +# # good +# str[0..2].chars +# +# # bad +# str.chars.first +# str.chars.first(2) +# +# # good +# str[0] +# str[0...2].chars +# str[-1] +# +# # bad +# str.chars.take(2) +# str.chars.length +# str.chars.size +# str.chars.empty? +# +# # good +# str[0...2].chars +# str.length +# str.size +# str.empty? +# +# # For example, if the receiver is an empty string, it will be incompatible. +# # If a negative value is specified for the receiver, `nil` is returned. +# str.chars.last(2) # Incompatible with `str[-2..-1].chars`. +# str.chars.drop(2) # Incompatible with `str[2..-1].chars`. +# +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#43 +class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#54 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#50 + def redundant_chars_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#112 + def build_bad_method(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#125 + def build_call_args(call_args_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#85 + def build_good_method(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#100 + def build_good_method_for_brackets_or_first_method(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#79 + def build_message(method, args); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#75 + def correction_range(receiver, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#71 + def offense_range(receiver, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#47 +RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#48 +RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.4, `String#match?`, `Regexp#match?`, and `Symbol#match?` +# have been added. The methods are faster than `match`. +# Because the methods avoid creating a `MatchData` object or saving +# backref. +# So, when `MatchData` is not used, use `match?` instead of `match`. +# +# @example +# # bad +# def foo +# if x =~ /re/ +# do_something +# end +# end +# +# # bad +# def foo +# if x !~ /re/ +# do_something +# end +# end +# +# # bad +# def foo +# if x.match(/re/) +# do_something +# end +# end +# +# # bad +# def foo +# if /re/ === x +# do_something +# end +# end +# +# # good +# def foo +# if x.match?(/re/) +# do_something +# end +# end +# +# # good +# def foo +# if !x.match?(/re/) +# do_something +# end +# end +# +# # good +# def foo +# if x =~ /re/ +# do_something(Regexp.last_match) +# end +# end +# +# # good +# def foo +# if x.match(/re/) +# do_something($~) +# end +# end +# +# # good +# def foo +# if /re/ === x +# do_something($~) +# end +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#75 +class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#125 + def last_matches(param0); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#86 + def match_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#122 + def match_node?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#97 + def match_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#101 + def match_threequals?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#93 + def match_with_int_arg_method?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#105 + def match_with_lvasgn?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#142 + def on_case(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#138 + def on_if(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#123 + def search_match_nodes(param0); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#165 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#154 + def check_condition(cond); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#250 + def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#275 + def correction_range(recv, arg); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#221 + def find_last_match(body, range, scope_root); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#181 + def last_match_used?(match_node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#246 + def match_gvar?(sym); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#177 + def message(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#217 + def modifier_form?(match_node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#203 + def next_match_pos(body, match_node_pos, scope_root); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#190 + def range_to_search_for_last_matches(match_node, body, scope_root); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#259 + def replace_with_match_predicate_method(corrector, recv, arg, op_range); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#228 + def scope_body(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#240 + def scope_root(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#270 + def swap_receiver_and_arg(corrector, recv, arg); end + + class << self + # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#134 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#112 +RuboCop::Cop::Performance::RegexpMatch::MATCH_NODE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#84 +RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String) + +# Constants are included in this list because it is unlikely that +# someone will store `nil` as a constant and then use it for comparison +# +# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#83 +RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array) + +# Identifies usages of `reverse.each` and change them to use `reverse_each` instead. +# +# If the return value is used, it will not be detected because the result will be different. +# +# [source,ruby] +# ---- +# [1, 2, 3].reverse.each {} #=> [3, 2, 1] +# [1, 2, 3].reverse_each {} #=> [1, 2, 3] +# ---- +# +# @example +# # bad +# items.reverse.each +# +# # good +# items.reverse_each +# +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#22 +class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#29 + def reverse_each?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#54 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#48 + def use_return_value?(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#26 +RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#27 +RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `reverse.first(n)` and `reverse.first` +# can be replaced by `last(n).reverse` and `last`. +# +# @example +# +# # bad +# array.reverse.first(5) +# array.reverse.first +# +# # good +# array.last(5).reverse +# array.last +# +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#19 +class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#26 + def reverse_first_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#64 + def build_bad_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#56 + def build_good_method(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#50 + def build_message(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#46 + def correction_range(receiver, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#23 +RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#24 +RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.7, `Enumerable#filter_map` has been added. +# +# This cop identifies places where `select.map` can be replaced by `filter_map`. +# +# @example +# # bad +# ary.select(&:foo).map(&:bar) +# ary.filter(&:foo).map(&:bar) +# +# # good +# ary.filter_map { |o| o.bar if o.foo } +# +# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#18 +class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 + def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#45 + def map_method_candidate(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#55 + def offense_range(node, map_method); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#24 +RuboCop::Cop::Performance::SelectMap::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#25 +RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `count` on an `Array` and `Hash` and change them to `size`. +# +# TODO: Add advanced detection of variables that could +# have been assigned to an array or a hash. +# +# @example +# # bad +# [1, 2, 3].count +# (1..3).to_a.count +# Array[*1..3].count +# Array(1..3).count +# +# # bad +# {a: 1, b: 2, c: 3}.count +# [[:foo, :bar], [1, 2]].to_h.count +# Hash[*('a'..'z')].count +# Hash(key: :value).count +# +# # good +# [1, 2, 3].size +# (1..3).to_a.size +# Array[*1..3].size +# Array(1..3).size +# +# # good +# {a: 1, b: 2, c: 3}.size +# [[:foo, :bar], [1, 2]].to_h.size +# Hash[*('a'..'z')].size +# Hash(key: :value).size +# +# # good +# [1, 2, 3].count { |e| e > 2 } +# +# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#37 +class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#43 + def array?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#61 + def count?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#52 + def hash?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#40 +RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#41 +RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort { |a, b| b <=> a }` +# can be replaced by a faster `sort.reverse`. +# +# @example +# # bad +# array.sort { |a, b| b <=> a } +# +# # good +# array.sort.reverse +# +# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#16 +class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SortBlock + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#22 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#30 + def on_numblock(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#42 + def register_offense(send, node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#20 +RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `gsub(/a+/, 'a')` and `gsub!(/a+/, 'a')` +# can be replaced by `squeeze('a')` and `squeeze!('a')`. +# +# The `squeeze('a')` method is faster than `gsub(/a+/, 'a')`. +# +# @example +# +# # bad +# str.gsub(/a+/, 'a') +# str.gsub!(/a+/, 'a') +# +# # good +# str.squeeze('a') +# str.squeeze!('a') +# +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#21 +class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#39 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#29 + def squeeze_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#61 + def repeating_literal?(regex_str); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#24 +RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#27 +RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#25 +RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies unnecessary use of a regex where `String#start_with?` would suffice. +# +# This cop has `SafeMultiline` configuration option that `true` by default because +# `^start` is unsafe as it will behave incompatible with `start_with?` +# for receiver is multiline string. +# +# @example +# # bad +# 'abc'.match?(/\Aab/) +# /\Aab/.match?('abc') +# 'abc' =~ /\Aab/ +# /\Aab/ =~ 'abc' +# 'abc'.match(/\Aab/) +# /\Aab/.match('abc') +# +# # good +# 'abc'.start_with?('ab') +# @example SafeMultiline: true (default) +# +# # good +# 'abc'.match?(/^ab/) +# /^ab/.match?('abc') +# 'abc' =~ /^ab/ +# /^ab/ =~ 'abc' +# 'abc'.match(/^ab/) +# /^ab/.match('abc') +# @example SafeMultiline: false +# +# # bad +# 'abc'.match?(/^ab/) +# /^ab/.match?('abc') +# 'abc' =~ /^ab/ +# /^ab/ =~ 'abc' +# 'abc'.match(/^ab/) +# /^ab/.match('abc') +# +# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#49 +class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RegexpMetacharacter + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + def on_match_with_lvasgn(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#56 + def redundant_regex?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#53 +RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#54 +RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where string identifier argument can be replaced +# by symbol identifier argument. +# It prevents the redundancy of the internal string-to-symbol conversion. +# +# This cop targets methods that take identifier (e.g. method name) argument +# and the following examples are parts of it. +# +# @example +# +# # bad +# send('do_something') +# attr_accessor 'do_something' +# instance_variable_get('@ivar') +# +# # good +# send(:do_something) +# attr_accessor :do_something +# instance_variable_get(:@ivar) +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#25 +class RuboCop::Cop::Performance::StringIdentifierArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#48 + def on_send(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#30 +RuboCop::Cop::Performance::StringIdentifierArgument::COMMAND_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#28 +RuboCop::Cop::Performance::StringIdentifierArgument::MSG = T.let(T.unsafe(nil), String) + +# NOTE: `attr` method is not included in this list as it can cause false positives in Nokogiri API. +# And `attr` may not be used because `Style/Attr` registers an offense. +# https://github.com/rubocop/rubocop-performance/issues/278 +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#38 +RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies unnecessary use of a regex where `String#include?` would suffice. +# +# @example +# # bad +# str.match?(/ab/) +# /ab/.match?(str) +# str =~ /ab/ +# /ab/ =~ str +# str.match(/ab/) +# /ab/.match(str) +# +# # good +# str.include?('ab') +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#22 +class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 + def on_match_with_lvasgn(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#28 + def redundant_regex?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#57 + def literal?(regex_str); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#25 +RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#26 +RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `gsub` can be replaced by `tr` or `delete`. +# +# @example +# # bad +# 'abc'.gsub('b', 'd') +# 'abc'.gsub('a', '') +# 'abc'.gsub(/a/, 'd') +# 'abc'.gsub!('a', 'd') +# +# # good +# 'abc'.gsub(/.*/, 'a') +# 'abc'.gsub(/a+/, 'd') +# 'abc'.tr('b', 'd') +# 'a b c'.delete(' ') +# +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#20 +class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#31 + def string_replacement?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#84 + def accept_first_param?(first_param); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#79 + def accept_second_param?(second_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#60 + def autocorrect(corrector, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#100 + def first_source(first_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#143 + def message(node, first_source, second_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#149 + def method_suffix(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#49 + def offense(node, first_param, second_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#129 + def range(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#153 + def remove_second_param(corrector, node, first_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#70 + def replace_method(corrector, node, first_source, second_source, first_param); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#133 + def replacement_method(node, first_source, second_source); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#118 + def source_from_regex_constructor(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#111 + def source_from_regex_literal(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#29 +RuboCop::Cop::Performance::StringReplacement::BANG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#27 +RuboCop::Cop::Performance::StringReplacement::DELETE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#26 +RuboCop::Cop::Performance::StringReplacement::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#24 +RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#25 +RuboCop::Cop::Performance::StringReplacement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#28 +RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) + +# Identifies places where custom code finding the sum of elements +# in some Enumerable object can be replaced by `Enumerable#sum` method. +# +# @example OnlySumOrWithInitialValue: false (default) +# # bad +# [1, 2, 3].inject(:+) # Autocorrections for cases without initial value are unsafe +# [1, 2, 3].inject(&:+) # and will only be performed when using the `-A` option. +# [1, 2, 3].reduce { |acc, elem| acc + elem } # They can be prohibited completely using `SafeAutoCorrect: true`. +# [1, 2, 3].reduce(10, :+) +# [1, 2, 3].map { |elem| elem ** 2 }.sum +# [1, 2, 3].collect(&:count).sum(10) +# +# # good +# [1, 2, 3].sum +# [1, 2, 3].sum(10) +# [1, 2, 3].sum { |elem| elem ** 2 } +# [1, 2, 3].sum(10, &:count) +# @example OnlySumOrWithInitialValue: true +# # bad +# [1, 2, 3].reduce(10, :+) +# [1, 2, 3].map { |elem| elem ** 2 }.sum +# [1, 2, 3].collect(&:count).sum(10) +# +# # good +# [1, 2, 3].sum(10) +# [1, 2, 3].sum { |elem| elem ** 2 } +# [1, 2, 3].sum(10, &:count) +# +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#70 +class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 + def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 + def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#114 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#82 + def sum_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#86 + def sum_map_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#95 + def sum_with_block_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#159 + def array_literal?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#164 + def autocorrect(corrector, init, range); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#172 + def autocorrect_sum_map(corrector, sum, map, init); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#248 + def build_block_bad_method(method, init, var_acc, var_elem, body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#215 + def build_block_message(send, init, var_acc, var_elem, body); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#221 + def build_good_method(init, block_pass = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#234 + def build_method_bad_method(init, method, operation); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#197 + def build_method_message(node, method, init, operation); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#208 + def build_sum_map_message(method, init); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#154 + def empty_array_literal?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#129 + def handle_sum_candidate(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#142 + def handle_sum_map_candidate(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#259 + def method_call_with_args_range(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#193 + def sum_block_range(send, node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#189 + def sum_map_range(map, sum); end + + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#185 + def sum_method_range(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#77 +RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#78 +RuboCop::Cop::Performance::Sum::MSG_IF_NO_INIT_VALUE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#80 +RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for .times.map calls. +# In most cases such calls can be replaced +# with an explicit array creation. +# +# @example +# # bad +# 9.times.map do |i| +# i.to_s +# end +# +# # good +# Array.new(9) do |i| +# i.to_s +# end +# +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#32 +class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#43 + def on_block(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#43 + def on_numblock(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#69 + def times_map_call(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#50 + def check(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#60 + def message(map_or_collect, count); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#35 +RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#36 +RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#37 +RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 2.3 or later, use unary plus operator to unfreeze a string +# literal instead of `String#dup` and `String.new`. +# Unary plus operator is faster than `String#dup`. +# +# @example +# # bad +# ''.dup +# "something".dup +# String.new +# String.new('') +# String.new('something') +# +# # good +# +'something' +# +'' +# +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#27 +class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 + def dup_string?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#44 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#37 + def string_new?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#57 + def string_value(node); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#30 +RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#31 +RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI::Parser.new` can be replaced by `URI::DEFAULT_PARSER`. +# +# @example +# # bad +# URI::Parser.new +# +# # good +# URI::DEFAULT_PARSER +# +# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#15 +class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#27 + def on_send(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#21 + def uri_parser_new?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#18 +RuboCop::Cop::Performance::UriDefaultParser::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#19 +RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for handling regexp metacharacters. +# +# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#6 +module RuboCop::Cop::RegexpMetacharacter + private + + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#63 + def drop_end_metacharacter(regexp_string); end + + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#55 + def drop_start_metacharacter(regexp_string); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#15 + def literal_at_end?(regexp); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#41 + def literal_at_end_with_backslash_z?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#48 + def literal_at_end_with_dollar?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#9 + def literal_at_start?(regexp); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#21 + def literal_at_start_with_backslash_a?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#31 + def literal_at_start_with_caret?(regex_str); end + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#71 + def safe_multiline?; end +end + +# Common functionality for cops checking `Enumerable#sort` blocks. +# +# source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#6 +module RuboCop::Cop::SortBlock + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#24 + def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#10 + def sort_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#17 + def sort_with_numblock?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#30 + def sort_range(send, node); end +end + +# RuboCop Performance project namespace +# +# source://rubocop-performance//lib/rubocop/performance.rb#5 +module RuboCop::Performance; end + +# source://rubocop-performance//lib/rubocop/performance.rb#8 +RuboCop::Performance::CONFIG = T.let(T.unsafe(nil), Hash) + +# source://rubocop-performance//lib/rubocop/performance.rb#7 +RuboCop::Performance::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) + +# Because RuboCop doesn't yet support plugins, we have to monkey patch in a +# bit of our configuration. +# +# source://rubocop-performance//lib/rubocop/performance/inject.rb#7 +module RuboCop::Performance::Inject + class << self + # source://rubocop-performance//lib/rubocop/performance/inject.rb#8 + def defaults!; end + end +end + +# source://rubocop-performance//lib/rubocop/performance.rb#6 +RuboCop::Performance::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + +# This module holds the RuboCop Performance version information. +# +# source://rubocop-performance//lib/rubocop/performance/version.rb#6 +module RuboCop::Performance::Version + class << self + # source://rubocop-performance//lib/rubocop/performance/version.rb#9 + def document_version; end + end +end + +# source://rubocop-performance//lib/rubocop/performance/version.rb#7 +RuboCop::Performance::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop@1.56.3.rbi b/sorbet/rbi/gems/rubocop@1.56.3.rbi new file mode 100644 index 0000000000..13e14d07c5 --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.56.3.rbi @@ -0,0 +1,56598 @@ +# 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<String>] 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#152 + def act_on_options; end + + # source://rubocop//lib/rubocop/cli.rb#189 + def apply_default_formatter; end + + # source://rubocop//lib/rubocop/cli.rb#121 + def execute_runners; end + + # @raise [Finished] + # + # source://rubocop//lib/rubocop/cli.rb#178 + def handle_exiting_options; end + + # source://rubocop//lib/rubocop/cli.rb#140 + def parallel_by_default!; end + + # source://rubocop//lib/rubocop/cli.rb#76 + def profile_if_needed; end + + # source://rubocop//lib/rubocop/cli.rb#109 + def require_gem(name); end + + # source://rubocop//lib/rubocop/cli.rb#117 + def run_command(name); end + + # source://rubocop//lib/rubocop/cli.rb#169 + def set_options_to_config_loader; end + + # source://rubocop//lib/rubocop/cli.rb#129 + def suggest_extensions; end + + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/cli.rb#133 + def validate_options_vs_config; end +end + +# Home of subcommands in the CLI. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command.rb#7 +module RuboCop::CLI::Command + class << self + # Find the command with a given name and run it in an environment. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/command.rb#10 + def run(env, name); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command.rb#16 + def class_for(name); end + end +end + +# Generate a configuration file acting as a TODO list. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#8 +class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#21 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#97 + def add_formatter; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#105 + def add_inheritance_from_auto_generated_file(config_file); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#101 + def execute_runner; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#126 + def existing_configuration(config_file); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#59 + def line_length_cop(config); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#47 + def line_length_enabled?(config); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#55 + def max_line_length(config); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#30 + def maybe_run_line_length_cop; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#148 + def options_config_in_root?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#63 + def options_has_only_flag?; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#139 + def relative_path_to_todo_from_options_config; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#90 + def reset_config_and_auto_gen_file; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#81 + 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#70 + def run_line_length_cop; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#51 + def same_max_line_length?(config1, config2); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#42 + def skip_line_length_cop(reason); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#132 + 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#14 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#17 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 +RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) + +# A subcommand in the CLI. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/base.rb#8 +class RuboCop::CLI::Command::Base + # @api private + # @return [Base] a new instance of Base + # + # source://rubocop//lib/rubocop/cli/command/base.rb#26 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#9 + def env; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#21 + def by_command_name(name); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#14 + def command_name; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#14 + def command_name=(_arg0); end + + # @api private + # @private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#16 + def inherited(subclass); end + end +end + +# Run all the selected cops and report the result. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#8 +class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base + include ::RuboCop::Formatter::TextUtil + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#16 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#85 + def bug_tracker_uri; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#69 + def display_error_summary(errors); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#56 + def display_summary(runner); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#61 + def display_warning_summary(warnings); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#22 + def execute_runner(paths); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#91 + def maybe_print_corrected_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#42 + def with_redirect; end +end + +# Combination of short and long formatter names. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#12 +RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Generate a .rubocop.yml file in the current directory. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#8 +class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#13 + def run; end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#9 +RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) + +# Start Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 +class RuboCop::CLI::Command::Lsp < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 + def run; end +end + +# Shows the given cops, or all cops by default, and their configurations +# for the current directory. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#9 +class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base + # @api private + # @return [ShowCops] a new instance of ShowCops + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#67 + def config_lines(cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#63 + def cops_of_department(cops, department); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#25 + def print_available_cops; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#48 + def print_cop_details(cops); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#36 + def print_cops_of_department(registry, department, show_all); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#57 + def selected_cops_of_department(cops, department); end +end + +# Prints out url to documentation of provided cops +# or documentation base url by default. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#9 +class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base + # @api private + # @return [ShowDocsUrl] a new instance of ShowDocsUrl + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#12 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#18 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#38 + def cops_array; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#24 + def print_documentation_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#42 + def registry_hash; end +end + +# Suggest RuboCop extensions to install based on Gemfile dependencies. +# Only primary dependencies are evaluated, so if a dependency depends on a +# gem with an extension, it is not suggested. However, if an extension is +# a transitive dependency, it will not be suggested. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#12 +class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#17 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#73 + def all_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#69 + def current_formatter; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#111 + def dependent_gems; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#87 + def extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#103 + def installed_and_not_loaded_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#91 + def installed_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#115 + def installed_gems; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#99 + def loaded_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#107 + def lockfile; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#95 + def not_installed_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#41 + def print_install_suggestions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#51 + def print_load_suggestions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#60 + def print_opt_out_instruction; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#119 + def puts(*args); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#30 + def skip?; end +end + +# Combination of short and long formatter names. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#13 +RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Display version. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/version.rb#8 +class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/version.rb#11 + def run; end +end + +# source://rubocop//lib/rubocop/cli.rb#13 +RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Execution environment for a CLI command. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/environment.rb#7 +class RuboCop::CLI::Environment + # @api private + # @return [Environment] a new instance of Environment + # + # source://rubocop//lib/rubocop/cli/environment.rb#10 + def initialize(options, config_store, paths); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def config_store; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def options; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def paths; end + + # Run a command in this environment. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#17 + def run(name); end +end + +# source://rubocop//lib/rubocop/cli.rb#20 +class RuboCop::CLI::Finished < ::StandardError; end + +# source://rubocop//lib/rubocop/cli.rb#11 +RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#12 +RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#10 +RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#9 +RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) + +# This class represents the cache config of the caching RuboCop runs. +# +# @api private +# +# source://rubocop//lib/rubocop/cache_config.rb#6 +class RuboCop::CacheConfig + class << self + # @api private + # + # source://rubocop//lib/rubocop/cache_config.rb#7 + def root_dir; end + end +end + +# Converts RuboCop objects to and from the serialization format JSON. +# +# @api private +# +# source://rubocop//lib/rubocop/cached_data.rb#8 +class RuboCop::CachedData + # @api private + # @return [CachedData] a new instance of CachedData + # + # source://rubocop//lib/rubocop/cached_data.rb#9 + def initialize(filename); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#13 + def from_json(text); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#17 + def to_json(offenses); end + + private + + # Restore an offense object loaded from a JSON file. + # + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#47 + def deserialize_offenses(offenses); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#40 + def message(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#23 + def serialize_offense(offense); end +end + +# and provides a way to check if each cop is enabled at arbitrary line. +# +# source://rubocop//lib/rubocop/comment_config.rb#6 +class RuboCop::CommentConfig + extend ::Forwardable + + # @return [CommentConfig] a new instance of CommentConfig + # + # source://rubocop//lib/rubocop/comment_config.rb#34 + def initialize(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#63 + def comment_only_line?(line_number); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def config(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/comment_config.rb#51 + def cop_disabled_line_ranges; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#39 + def cop_enabled_at_line?(cop, line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#47 + def cop_opted_in?(cop); end + + # source://rubocop//lib/rubocop/comment_config.rb#55 + def extra_enabled_comments; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def registry(*args, **_arg1, &block); end + + private + + # source://rubocop//lib/rubocop/comment_config.rb#96 + def analyze; end + + # source://rubocop//lib/rubocop/comment_config.rb#124 + def analyze_cop(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#144 + def analyze_disabled(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#155 + def analyze_rest(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#135 + def analyze_single_line(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#164 + def cop_line_ranges(analysis); end + + # source://rubocop//lib/rubocop/comment_config.rb#170 + def each_directive; end + + # source://rubocop//lib/rubocop/comment_config.rb#69 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop//lib/rubocop/comment_config.rb#190 + def handle_enable_all(directive, names, extras); end + + # Collect cops that have been disabled or enabled by name in a directive comment + # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. + # + # source://rubocop//lib/rubocop/comment_config.rb#204 + def handle_switch(directive, names, extras); end + + # source://rubocop//lib/rubocop/comment_config.rb#115 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop//lib/rubocop/comment_config.rb#183 + def non_comment_token_line_numbers; end + + # source://rubocop//lib/rubocop/comment_config.rb#83 + def opt_in_cops; end + + # source://rubocop//lib/rubocop/comment_config.rb#179 + def qualified_cop_name(cop_name); end +end + +# source://rubocop//lib/rubocop/comment_config.rb#9 +RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) + +# This class provides an API compatible with RuboCop::DirectiveComment +# to be used for cops that are disabled in the config file +# +# source://rubocop//lib/rubocop/comment_config.rb#13 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment + include ::RuboCop::Ext::Comment + + # @return [ConfigDisabledCopDirectiveComment] a new instance of ConfigDisabledCopDirectiveComment + # + # source://rubocop//lib/rubocop/comment_config.rb#21 + def initialize(cop_name); end + + # Returns the value of attribute line_number. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def line_number; end + + # Returns the value of attribute loc. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def loc; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def text; end +end + +# source://rubocop//lib/rubocop/comment_config.rb#19 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/comment_config.rb#18 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct + # Returns the value of attribute expression + # + # @return [Object] the current value of expression + def expression; end + + # Sets the attribute expression + # + # @param value [Object] the value to set the attribute expression to. + # @return [Object] the newly set value + def expression=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/comment_config.rb#28 +class RuboCop::CommentConfig::CopAnalysis < ::Struct + # Returns the value of attribute line_ranges + # + # @return [Object] the current value of line_ranges + def line_ranges; end + + # Sets the attribute line_ranges + # + # @param value [Object] the value to set the attribute line_ranges to. + # @return [Object] the newly set value + def line_ranges=(_); end + + # Returns the value of attribute start_line_number + # + # @return [Object] the current value of start_line_number + def start_line_number; end + + # Sets the attribute start_line_number + # + # @param value [Object] the value to set the attribute start_line_number to. + # @return [Object] the newly set value + def start_line_number=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# source://rubocop//lib/rubocop/config.rb#14 +class RuboCop::Config + include ::RuboCop::PathUtil + include ::RuboCop::FileFinder + extend ::Forwardable + + # @return [Config] a new instance of Config + # + # source://rubocop//lib/rubocop/config.rb#32 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def [](*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def []=(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#172 + def active_support_extensions_enabled?; end + + # source://rubocop//lib/rubocop/config.rb#98 + def add_excludes_from_higher_level(highest_config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#195 + 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#239 + def base_dir_for_path_parameters; end + + # source://rubocop//lib/rubocop/config.rb#264 + def bundler_lock_file_path; end + + # source://rubocop//lib/rubocop/config.rb#53 + def check; end + + # @api private + # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys + # + # source://rubocop//lib/rubocop/config.rb#144 + def clusivity_config_for_badge?(badge); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def delete(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config.rb#110 + def deprecation_check; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def dig(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#164 + def disabled_new_cops?; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def each_key(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#168 + def enabled_new_cops?; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def fetch(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#217 + def file_to_exclude?(file); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#176 + def file_to_include?(file); end + + # source://rubocop//lib/rubocop/config.rb#160 + 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#130 + 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#124 + 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#155 + def for_department(department_name); end + + # source://rubocop//lib/rubocop/config.rb#287 + def inspect; end + + # True if this is a config file that is shipped with RuboCop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#78 + def internal?; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def key?(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def keys(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config.rb#49 + def loaded_features; end + + # Returns the value of attribute loaded_path. + # + # source://rubocop//lib/rubocop/config.rb#22 + def loaded_path; end + + # source://rubocop//lib/rubocop/config.rb#83 + def make_excludes_absolute; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def map(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def merge(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config.rb#230 + def path_relative_to_config(path); end + + # source://rubocop//lib/rubocop/config.rb#226 + def patterns_to_exclude; end + + # source://rubocop//lib/rubocop/config.rb#222 + def patterns_to_include; end + + # source://rubocop//lib/rubocop/config.rb#275 + 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#209 + def possibly_include_hidden?; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def replace(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config.rb#73 + def signature; end + + # source://rubocop//lib/rubocop/config.rb#260 + def smart_loaded_path; end + + # source://rubocop//lib/rubocop/config.rb#249 + def target_rails_version; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def target_ruby_version(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def to_h(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def to_hash(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config.rb#69 + def to_s; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def transform_values(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def validate(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config.rb#60 + def validate_after_resolution; end + + private + + # source://rubocop//lib/rubocop/config.rb#322 + def department_of(qualified_cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#310 + def enable_cop?(qualified_cop_name, cop_options); end + + # source://rubocop//lib/rubocop/config.rb#297 + def read_rails_version_from_bundler_lock_file; end + + # source://rubocop//lib/rubocop/config.rb#293 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop//lib/rubocop/config.rb#24 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +# source://rubocop//lib/rubocop/config.rb#19 +class RuboCop::Config::CopConfig < ::Struct + # Returns the value of attribute metadata + # + # @return [Object] the current value of metadata + def metadata; end + + # Sets the attribute metadata + # + # @param value [Object] the value to set the attribute metadata to. + # @return [Object] the newly set value + def metadata=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/config.rb#21 +RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) + +# This class has methods related to finding configuration path. +# +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#8 +class RuboCop::ConfigFinder + extend ::RuboCop::FileFinder + + class << self + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#19 + def find_config_path(target_dir); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#26 + def project_root; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#17 + def project_root=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#59 + 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_user_dotfile; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#52 + 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#199 + def add_loaded_features(loaded_features); end + + # source://rubocop//lib/rubocop/config_loader.rb#81 + def add_missing_namespaces(path, hash); end + + # source://rubocop//lib/rubocop/config_loader.rb#42 + 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#105 + def configuration_file_for(target_dir); end + + # source://rubocop//lib/rubocop/config_loader.rb#109 + def configuration_from_file(config_file, check: T.unsafe(nil)); end + + # Returns the value of attribute debug. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + def debug; end + + # Sets the attribute debug + # + # @param value the value to set the attribute debug to. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + def debug=(_arg0); end + + # Returns the value of attribute debug. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + 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#36 + def default_configuration=(_arg0); end + + # Returns the value of attribute disable_pending_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + 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#34 + def disable_pending_cops=(_arg0); end + + # Returns the value of attribute enable_pending_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + 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#34 + def enable_pending_cops=(_arg0); end + + # Returns the value of attribute ignore_parent_exclusion. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + 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#34 + def ignore_parent_exclusion=(_arg0); end + + # Returns the value of attribute ignore_parent_exclusion. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + def ignore_parent_exclusion?; end + + # Returns the value of attribute ignore_unrecognized_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#34 + 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#34 + def ignore_unrecognized_cops=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader.rb#156 + def inject_defaults!(project_root); end + + # source://rubocop//lib/rubocop/config_loader.rb#48 + def load_file(file, check: T.unsafe(nil)); end + + # @raise [TypeError] + # + # source://rubocop//lib/rubocop/config_loader.rb#68 + def load_yaml_configuration(absolute_path); end + + # Returns the value of attribute loaded_features. + # + # source://rubocop//lib/rubocop/config_loader.rb#37 + def loaded_features; end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # source://rubocop//lib/rubocop/config_loader.rb#96 + def merge(base_hash, derived_hash); end + + # Merges the given configuration with the default one. + # + # source://rubocop//lib/rubocop/config_loader.rb#192 + def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config_loader.rb#129 + def pending_cops_only_qualified(pending_cops); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader.rb#133 + def possible_new_cops?(config); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. + # + # source://rubocop//lib/rubocop/config_loader.rb#167 + def project_root; end + + # source://rubocop//lib/rubocop/config_loader.rb#176 + def warn_on_pending_cops(pending_cops); end + + # source://rubocop//lib/rubocop/config_loader.rb#184 + def warn_pending_cop(cop); end + + private + + # source://rubocop//lib/rubocop/config_loader.rb#213 + def check_duplication(yaml_code, absolute_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#205 + 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#233 + def read_file(absolute_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#209 + def resolver; end + + # source://rubocop//lib/rubocop/config_loader.rb#239 + def yaml_safe_load(yaml_code, filename); end + + # source://rubocop//lib/rubocop/config_loader.rb#249 + def yaml_safe_load!(yaml_code, filename); 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#9 +class RuboCop::ConfigLoaderResolver + # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the + # base configuration are relative to the directory where the base configuration file is. For the + # derived configuration, we need to make those paths relative to where the derived configuration + # file is. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#45 + def fix_include_paths(base_config_path, hash, path, key, value); end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#99 + def merge(base_hash, derived_hash, **opts); end + + # Merges the given configuration with the default one. If + # AllCops:DisabledByDefault is true, it changes the Enabled params so that + # only cops from user configuration are enabled. If + # AllCops:EnabledByDefault is true, it changes the Enabled params so that + # only cops explicitly disabled in user configuration are disabled. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#75 + def merge_with_default(config, config_file, unset_nil:); end + + # An `Enabled: true` setting in user configuration for a cop overrides an + # `Enabled: false` setting for its department. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#119 + def override_department_setting_for_cops(base_hash, derived_hash); end + + # If a cop was previously explicitly enabled, but then superseded by the + # department being disabled, disable it. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#136 + def override_enabled_for_disabled_departments(base_hash, derived_hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#19 + def resolve_inheritance(path, hash, file, debug); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#55 + def resolve_inheritance_from_gems(hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#10 + def resolve_requires(path, hash); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 + def base_configs(path, inherit_from, file); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#176 + def determine_inherit_mode(hash, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#152 + def disabled?(hash, department); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#156 + def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 + def gem_config_path(gem_name, relative_config_path); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 + def handle_disabled_by_default(config, new_default_configuration); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#220 + def inherited_file(path, inherit_from, file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#204 + def merge_hashes?(base_hash, derived_hash, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#241 + def remote_file?(uri); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 + def should_merge?(mode, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#200 + def should_override?(mode, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#182 + def should_union?(derived_hash, base_hash, root_mode, key); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 + def transform(config, &block); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#165 + def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end +end + +# Raised when a RuboCop configuration file is not found. +# +# source://rubocop//lib/rubocop/config_loader.rb#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#33 + def initialize(config); end + + # @api private + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#39 + def reject_obsolete!; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#19 + def rules; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#19 + def warnings; end + + private + + # Cop rules are keyed by the name of the original cop + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#69 + 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#82 + 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#50 + def load_rules; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#95 + def obsoletions; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#22 + def files; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#22 + def files=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + def legacy_cop_names; end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#8 +RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#7 +class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#14 + def message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#10 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#28 + def value; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#8 +RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#7 +class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#10 + def message; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#8 +RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Base class for ConfigObsoletion rules relating to cops +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#7 +class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule + # @api private + # @return [CopRule] a new instance of CopRule + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#10 + def initialize(config, old_name); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#15 + def cop_rule?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#19 + def message; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#8 + def old_name; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#28 + def violated?; end + + # Cop rules currently can only be failures, not warnings + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#24 + def warning?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#7 +RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#8 +class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [ExtractedCop] a new instance of ExtractedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#11 + def initialize(config, old_name, gem); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 + def department; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 + def gem; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#23 + def rule_message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#17 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#32 + def affected_cops; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#41 + def feature_loaded?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#14 +RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Base class for ConfigObsoletion rules relating to parameters +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#7 +class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule + # @api private + # @return [ParameterRule] a new instance of ParameterRule + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#10 + def initialize(config, cop, parameter, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def cop; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def parameter; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#17 + def parameter_rule?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#21 + def violated?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#25 + def warning?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 + def alternative; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 + def alternatives; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + def applies_to_current_ruby_version?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 + def reason; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 + def severity; end +end + +# Encapsulation of a ConfigObsoletion rule for removing +# a previously defined cop. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#8 +class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [RemovedCop] a new instance of RemovedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#13 + def initialize(config, old_name, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 + def old_name; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#18 + def rule_message; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#36 + def alternatives; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#32 + def reason; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#11 +RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for renaming +# a cop or moving it to a new department. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#8 +class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [RenamedCop] a new instance of RenamedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#11 + def initialize(config, old_name, new_name); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 + def new_name; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#16 + def rule_message; end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#22 + def moved?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#29 + def verb; end +end + +# Abstract base class for ConfigObsoletion rules +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#7 +class RuboCop::ConfigObsoletion::Rule + # @api private + # @return [Rule] a new instance of Rule + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#8 + def initialize(config); end + + # Does this rule relate to cops? + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#13 + def cop_rule?; end + + # Does this rule relate to parameters? + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#18 + def parameter_rule?; end + + # @api private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#22 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#28 + def config; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#36 + def smart_loaded_path; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#30 + def to_sentence(collection, connector: T.unsafe(nil)); end +end + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#8 +class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [SplitCop] a new instance of SplitCop + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#11 + def initialize(config, old_name, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#16 + def rule_message; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#22 + def alternatives; end +end + +# This class handles collecting the options for regenerating a TODO file. +# +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#6 +class RuboCop::ConfigRegeneration + # Get options from the comment in the TODO file, and parse them as options + # + # @api private + # + # source://rubocop//lib/rubocop/config_regeneration.rb#12 + def options; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_regeneration.rb#29 + def generation_command; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_regeneration.rb#25 + def todo_exists?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#7 +RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#8 +RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#9 +RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Handles caching of configurations and association of inspected +# ruby files to configurations. +# +# source://rubocop//lib/rubocop/config_store.rb#6 +class RuboCop::ConfigStore + # @return [ConfigStore] a new instance of ConfigStore + # + # source://rubocop//lib/rubocop/config_store.rb#10 + def initialize; end + + # If type (file/dir) is known beforehand, + # prefer using #for_file or #for_dir for improved performance + # + # source://rubocop//lib/rubocop/config_store.rb#52 + def for(file_or_dir); end + + # source://rubocop//lib/rubocop/config_store.rb#61 + def for_dir(dir); end + + # source://rubocop//lib/rubocop/config_store.rb#42 + def for_file(file); end + + # source://rubocop//lib/rubocop/config_store.rb#46 + def for_pwd; end + + # source://rubocop//lib/rubocop/config_store.rb#33 + def force_default_config!; end + + # source://rubocop//lib/rubocop/config_store.rb#28 + def options_config=(options_config); end + + # source://rubocop//lib/rubocop/config_store.rb#37 + def unvalidated; end + + # Returns the value of attribute validated. + # + # source://rubocop//lib/rubocop/config_store.rb#7 + def validated; end + + # Returns the value of attribute validated. + # + # source://rubocop//lib/rubocop/config_store.rb#7 + def validated?; end +end + +# Handles validation of configuration, for example cop names, parameter +# names, and Ruby versions. +# +# source://rubocop//lib/rubocop/config_validator.rb#8 +class RuboCop::ConfigValidator + extend ::Forwardable + + # @return [ConfigValidator] a new instance of ConfigValidator + # + # source://rubocop//lib/rubocop/config_validator.rb#27 + def initialize(config); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def for_all_cops(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def smart_loaded_path(*args, **_arg1, &block); end + + # source://rubocop//lib/rubocop/config_validator.rb#63 + def target_ruby_version; end + + # source://rubocop//lib/rubocop/config_validator.rb#33 + 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#59 + def validate_after_resolution; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#67 + def validate_section_presence(name); end + + private + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#104 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#253 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config_validator.rb#77 + def check_obsoletions; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#84 + def check_target_ruby; end + + # source://rubocop//lib/rubocop/config_validator.rb#195 + def each_invalid_parameter(cop_name); end + + # source://rubocop//lib/rubocop/config_validator.rb#120 + 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#266 + def msg_not_boolean(parent, key, value); end + + # source://rubocop//lib/rubocop/config_validator.rb#242 + def reject_conflicting_safe_settings; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#233 + def reject_mutually_exclusive_defaults; end + + # source://rubocop//lib/rubocop/config_validator.rb#142 + def suggestion(name); end + + # Returns the value of attribute target_ruby. + # + # source://rubocop//lib/rubocop/config_validator.rb#75 + def target_ruby; end + + # source://rubocop//lib/rubocop/config_validator.rb#207 + def validate_enforced_styles(valid_cop_names); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#169 + def validate_new_cops_parameter; end + + # source://rubocop//lib/rubocop/config_validator.rb#180 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#227 + def validate_support_and_has_list(name, formats, valid); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#158 + def validate_syntax_cop; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#12 +RuboCop::ConfigValidator::COMMON_PARAMS = 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.comment_at_line(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#74 + def register_offense(offense_node, message_node); end + + # @api public + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#64 + def within?(inner, outer); end +end + +# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#10 +RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) + +# This class does autocorrection of nodes that should just be moved to +# the left or to the right, amount being determined by the instance +# variable column_delta. +# +# source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#8 +class RuboCop::Cop::AlignmentCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::Alignment + + class << self + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#29 + def align_end(corrector, processed_source, node, align_to); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#15 + def correct(corrector, processed_source, node, column_delta); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#13 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#124 + def alignment_column(align_to); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#40 + def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#81 + def block_comment_within?(expr); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#87 + def calculate_range(expr, line_begin_pos, column_delta); end + + # Some special kinds of string literals are not composed of literal + # characters between two delimiters: + # - The source map of `?a` responds to :begin and :end but its end is + # nil. + # - The source map of `__FILE__` responds to neither :begin nor :end. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#75 + def delimited_string_literal?(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#110 + def each_line(expr); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#60 + def inside_string_range(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#54 + def inside_string_ranges(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#99 + def remove(range, corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#118 + def whitespace_range(node); end + end +end + +# This module encapsulates the ability to allow certain identifiers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#6 +module RuboCop::Cop::AllowedIdentifiers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#9 + def allowed_identifier?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#13 + def allowed_identifiers; end +end + +# if a variable starts with a sigil it will be removed +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#7 +RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to allow certain methods when +# parsing. Even if the code is in offense, if it contains methods +# that are allowed. This module is equivalent to the IgnoredMethods module, +# which will be deprecated in RuboCop 2.0. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#9 +module RuboCop::Cop::AllowedMethods + private + + # @api public + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 + def allowed_method?(name); end + + # @api public + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#21 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#29 + def cop_config_allowed_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#33 + def cop_config_deprecated_values; end + + # @api public + # @deprecated Use allowed_method? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 + def ignored_method?(name); 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#30 + def allowed_patterns; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#46 + def cop_config_deprecated_methods_values; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#40 + def cop_config_patterns_values; end + + # @deprecated Use allowed_line? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 + def ignored_line?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 + def matches_allowed_pattern?(line); end + + # @deprecated Use matches_allowed_pattern?? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 + 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 + extend ::Forwardable + + # @param comment [Parser::Source::Comment] + # @param keywords [Array<String>] + # @return [AnnotationComment] a new instance of AnnotationComment + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#13 + def initialize(comment, keywords); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#19 + def annotation?; end + + # Returns the range bounds for just the annotation + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#31 + def bounds; end + + # Returns the value of attribute colon. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + def colon; end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + def comment; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#23 + def correct?(colon:); end + + # Returns the value of attribute keyword. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + def keyword; end + + # Returns the value of attribute margin. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + def margin; end + + # Returns the value of attribute note. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + def note; end + + # Returns the value of attribute space. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + def space; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#67 + def just_keyword_of_sentence?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#63 + def keyword_appearance?; end + + # Returns the value of attribute keywords. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + def keywords; end + + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#53 + def regex; end + + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#41 + def split_comment(comment); end +end + +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#50 +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#46 + def disable_offense(offense_range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#111 + def disable_offense_at_end_of_line(range, eol_comment); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#115 + def disable_offense_before_and_after(range_by_lines); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56 + def disable_offense_with_eol_or_surround_comment(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#107 + def max_line_length; end + + # Expand the given range to include all of any lines it covers. Does not + # include newline at end of the last line. + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#97 + def range_by_lines(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88 + def range_of_first_line(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67 + def surrounding_heredoc(offense_range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#78 + def surrounding_percent_array(offense_range); end +end + +# Identifier of all cops containing a department and cop name. +# +# All cops are identified by their badge. For example, the badge for +# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. +# Badges can be parsed as either `Department/CopName` or just `CopName` to +# allow for badge references in source files that omit the department for +# RuboCop to infer. +# +# source://rubocop//lib/rubocop/cop/badge.rb#12 +class RuboCop::Cop::Badge + # @return [Badge] a new instance of Badge + # + # source://rubocop//lib/rubocop/cop/badge.rb#34 + def initialize(class_name_parts); end + + # source://rubocop//lib/rubocop/cop/badge.rb#41 + def ==(other); end + + # Returns the value of attribute cop_name. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def cop_name; end + + # Returns the value of attribute department. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def department; end + + # Returns the value of attribute department_name. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def department_name; end + + # source://rubocop//lib/rubocop/cop/badge.rb#41 + def eql?(other); end + + # source://rubocop//lib/rubocop/cop/badge.rb#46 + def hash; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/badge.rb#51 + def match?(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/badge.rb#59 + def qualified?; end + + # source://rubocop//lib/rubocop/cop/badge.rb#55 + def to_s; end + + # source://rubocop//lib/rubocop/cop/badge.rb#63 + def with_department(department); end + + class << self + # source://rubocop//lib/rubocop/cop/badge.rb#27 + def camel_case(name_part); end + + # source://rubocop//lib/rubocop/cop/badge.rb#15 + def for(class_name); end + + # source://rubocop//lib/rubocop/cop/badge.rb#23 + def parse(identifier); end + end +end + +# A scaffold for concrete cops. +# +# The Cop::Base class is meant to be extended. +# +# Cops track offenses and can autocorrect them on the fly. +# +# A commissioner object is responsible for traversing the AST and invoking +# the specific callbacks on each cop. +# +# First the callback `on_new_investigation` is called; +# if a cop needs to do its own processing of the AST or depends on +# something else. +# +# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called +# with their respective nodes. +# +# Finally the callback `on_investigation_end` is called. +# +# Within these callbacks, cops are meant to call `add_offense` or +# `add_global_offense`. Use the `processed_source` method to +# get the currently processed source being investigated. +# +# In case of invalid syntax / unparsable content, +# the callback `on_other_file` is called instead of all the other +# `on_...` callbacks. +# +# Private methods are not meant for custom cops consumption, +# nor are any instance variables. +# +# source://rubocop//lib/rubocop/cop/base.rb#34 +class RuboCop::Cop::Base + include ::RuboCop::AST::Sexp + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + include ::RuboCop::Cop::IgnoredNode + include ::RuboCop::Cop::AutocorrectLogic + extend ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # @return [Base] a new instance of Base + # + # source://rubocop//lib/rubocop/cop/base.rb#129 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#239 + 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#162 + 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#172 + def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # Called before any investigation + # + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#295 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#280 + 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#223 + def config_to_allow_offenses; end + + # source://rubocop//lib/rubocop/cop/base.rb#227 + def config_to_allow_offenses=(hash); end + + # Configuration Helpers + # + # source://rubocop//lib/rubocop/cop/base.rb#217 + def cop_config; end + + # source://rubocop//lib/rubocop/cop/base.rb#209 + def cop_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#251 + 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#205 + def external_dependency_checksum; end + + # source://rubocop//lib/rubocop/cop/base.rb#308 + 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#156 + def message(_range = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/base.rb#209 + def name; end + + # @deprecated Make potential errors with previous API more obvious + # + # source://rubocop//lib/rubocop/cop/base.rb#271 + def offenses; end + + # Called after all on_... have been called + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#143 + 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#137 + 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#149 + 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#256 + def parse(source, path = T.unsafe(nil)); 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#262 + def ready; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#243 + def relevant_file?(file); end + + # source://rubocop//lib/rubocop/cop/base.rb#235 + def target_rails_version; end + + # source://rubocop//lib/rubocop/cop/base.rb#231 + def target_ruby_version; end + + private + + # source://rubocop//lib/rubocop/cop/base.rb#436 + def annotate(message); end + + # source://rubocop//lib/rubocop/cop/base.rb#320 + def apply_correction(corrector); end + + # @return [Symbol] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#400 + def attempt_correction(range, corrector); end + + # Reserved for Cop::Cop + # + # source://rubocop//lib/rubocop/cop/base.rb#316 + def callback_argument(range); end + + # Called to complete an investigation + # + # source://rubocop//lib/rubocop/cop/base.rb#349 + def complete_investigation; end + + # @return [Symbol, Corrector] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#374 + def correct(range); end + + # source://rubocop//lib/rubocop/cop/base.rb#334 + def current_corrector; end + + # Reserved for Commissioner: + # + # source://rubocop//lib/rubocop/cop/base.rb#326 + def current_offense_locations; end + + # source://rubocop//lib/rubocop/cop/base.rb#338 + def current_offenses; end + + # source://rubocop//lib/rubocop/cop/base.rb#330 + def currently_disabled_lines; end + + # source://rubocop//lib/rubocop/cop/base.rb#464 + def custom_severity; end + + # source://rubocop//lib/rubocop/cop/base.rb#460 + def default_severity; end + + # source://rubocop//lib/rubocop/cop/base.rb#414 + def disable_uncorrectable(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#450 + def enabled_line?(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#442 + def file_name_matches_any?(file, parameter, default_result); end + + # source://rubocop//lib/rubocop/cop/base.rb#432 + def find_message(range, message); end + + # source://rubocop//lib/rubocop/cop/base.rb#456 + def find_severity(_range, severity); end + + # source://rubocop//lib/rubocop/cop/base.rb#477 + def range_for_original(range); end + + # source://rubocop//lib/rubocop/cop/base.rb#421 + def range_from_node_or_range(node_or_range); end + + # source://rubocop//lib/rubocop/cop/base.rb#369 + def reset_investigation; end + + # @return [Symbol] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#389 + 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<RuboCop::Cop::Base>] + # + # source://rubocop//lib/rubocop/cop/base.rb#59 + def autocorrect_incompatible_with; end + + # Naming + # + # source://rubocop//lib/rubocop/cop/base.rb#89 + def badge; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#285 + def callbacks_needed; end + + # source://rubocop//lib/rubocop/cop/base.rb#93 + def cop_name; end + + # source://rubocop//lib/rubocop/cop/base.rb#97 + def department; end + + # Cops (other than builtin) are encouraged to implement this + # + # @api public + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/base.rb#67 + def documentation_url; end + + # Call for abstract Cop classes + # + # source://rubocop//lib/rubocop/cop/base.rb#77 + def exclude_from_registry; end + + # @private + # + # source://rubocop//lib/rubocop/cop/base.rb#71 + def inherited(subclass); end + + # Override and return the Force class(es) you need to join + # + # source://rubocop//lib/rubocop/cop/base.rb#114 + def joining_forces; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#101 + 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#107 + def match?(given_names); end + + # Returns if class supports autocorrect. + # It is recommended to extend AutoCorrector instead of overriding + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#83 + 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#125 + def support_multiple_source?; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#360 + def builtin?; end + + # source://rubocop//lib/rubocop/cop/base.rb#342 + def restrict_on_send; end + end +end + +# source://rubocop//lib/rubocop/cop/base.rb#346 +RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) + +# Reports of an investigation. +# Immutable +# Consider creation API private +# +# source://rubocop//lib/rubocop/cop/base.rb#48 +class RuboCop::Cop::Base::InvestigationReport < ::Struct + # Returns the value of attribute cop + # + # @return [Object] the current value of cop + def cop; end + + # Sets the attribute cop + # + # @param value [Object] the value to set the attribute cop to. + # @return [Object] the newly set value + def cop=(_); end + + # Returns the value of attribute corrector + # + # @return [Object] the current value of corrector + def corrector; end + + # Sets the attribute corrector + # + # @param value [Object] the value to set the attribute corrector to. + # @return [Object] the newly set value + def corrector=(_); end + + # Returns the value of attribute offenses + # + # @return [Object] the current value of offenses + def offenses; end + + # Sets the attribute offenses + # + # @param value [Object] the value to set the attribute offenses to. + # @return [Object] the newly set value + def offenses=(_); end + + # Returns the value of attribute processed_source + # + # @return [Object] the current value of processed_source + def processed_source; end + + # Sets the attribute processed_source + # + # @param value [Object] the value to set the attribute processed_source to. + # @return [Object] the newly set value + def processed_source=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# List of methods names to restrict calls for `on_send` / `on_csend` +# +# source://rubocop//lib/rubocop/cop/base.rb#51 +RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#5 +module RuboCop::Cop::Bundler; end + +# A Gem's requirements should be listed only once in a Gemfile. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rubocop' +# +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :test do +# gem 'rubocop' +# end +# +# # good +# group :development, :test do +# gem 'rubocop' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# +# # good - conditional declaration +# if Dir.exist?(local) +# gem 'rubocop', path: local +# elsif ENV['RUBOCOP_VERSION'] == 'master' +# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' +# else +# gem 'rubocop', '~> 0.90.0' +# end +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 +class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 + def gem_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 + def conditional_declaration?(nodes); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 + def duplicated_gem_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 + def register_offense(node, gem_name, line_of_first_occurrence); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 + def within_conditional?(node, conditional_node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 +RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) + +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 + def group_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 + def duplicated_group_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 + def find_source_key(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 + def group_attributes(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + +# Each gem in the Gemfile should have a comment explaining +# its purpose in the project, or the reason for its version +# or source. +# +# The optional "OnlyFor" configuration array +# can be used to only register offenses when the gems +# use certain options or have version specifiers. +# +# When "version_specifiers" is included, a comment +# will be enforced if the gem has any version specifier. +# +# When "restrictive_version_specifiers" is included, a comment +# will be enforced if the gem has a version specifier that +# holds back the version of the gem. +# +# For any other value in the array, a comment will be enforced for +# a gem if an option by the same name is present. +# A useful use case is to enforce a comment when using +# options that change the source of a gem: +# +# - `bitbucket` +# - `gist` +# - `git` +# - `github` +# - `source` +# +# For a full list of options supported by bundler, +# see https://bundler.io/man/gemfile.5.html +# . +# +# @example OnlyFor: [] (default) +# # bad +# +# gem 'foo' +# +# # good +# +# # Helpers for the foo things. +# gem 'foo' +# @example OnlyFor: ['version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: ['restrictive_version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# gem 'foo', '>= 1.0' +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: ['version_specifiers', 'github'] +# # bad +# +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# gem 'bar', '< 2.1' +# +# # good +# +# # Using this fork because baz +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# # Version 2.1 introduces breaking change baz +# gem 'bar', '< 2.1' +# +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#83 +class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + include ::RuboCop::Cop::GemDeclaration + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#94 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#135 + def checked_options_present?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#109 + def commented?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#105 + def commented_any_descendant?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#159 + def contains_checked_options?(node); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#163 + def gem_options(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#130 + def ignored_gem?(node); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#116 + def precede?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#126 + def preceding_comment?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#120 + def preceding_lines(node); end + + # Version specifications that restrict all updates going forward. This excludes versions + # like ">= 1.0" or "!= 2.0.3". + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#152 + def restrictive_version_specified_gem?(node); end + + # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, + # as long as it has one we know there's at least one version specifier. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#145 + def version_specified_gem?(node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#88 +RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#87 +RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#91 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#90 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#92 +RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#89 +RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# Verifies that a project contains Gemfile or gems.rb file and correct +# associated lock file based on the configuration. +# +# @example EnforcedStyle: Gemfile (default) +# # bad +# Project contains gems.rb and gems.locked files +# +# # bad +# Project contains Gemfile and gems.locked file +# +# # good +# Project contains Gemfile and Gemfile.lock +# @example EnforcedStyle: gems.rb +# # bad +# Project contains Gemfile and Gemfile.lock files +# +# # bad +# Project contains gems.rb and Gemfile.lock file +# +# # good +# Project contains gems.rb and gems.locked files +# +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#28 +class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#43 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#88 + def expected_gemfile?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#80 + def gemfile_offense?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#93 + def gemfile_required?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#84 + def gems_rb_offense?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#97 + def gems_rb_required?; end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#58 + def register_gemfile_offense(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#69 + def register_gems_rb_offense(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#53 + def register_offense(file_path, basename); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 +RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#41 +RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#36 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#32 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#38 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#34 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) + +# Enforce that Gem version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# # bad +# gem 'rubocop' +# +# # good +# gem 'rubocop', '~> 1.12' +# +# # good +# gem 'rubocop', '>= 1.10.0' +# +# # good +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # good +# gem 'rubocop', branch: 'feature-branch' +# +# # good +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # good +# gem 'rubocop', tag: 'v1.17.0' +# @example EnforcedStyle: forbidden +# # good +# gem 'rubocop' +# +# # bad +# gem 'rubocop', '~> 1.12' +# +# # bad +# gem 'rubocop', '>= 1.10.0' +# +# # bad +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # bad +# gem 'rubocop', branch: 'feature-branch' +# +# # bad +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # bad +# gem 'rubocop', tag: 'v1.17.0' +# +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#53 +class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemDeclaration + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#67 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#62 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#71 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#85 + def allowed_gem?(node); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#89 + def allowed_gems; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#113 + def forbidden_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#119 + def forbidden_style?; end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#103 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#107 + def required_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#123 + def required_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#127 + def version_specification?(expression); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#58 +RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#57 +RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 +RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Passing symbol arguments to `source` (e.g. `source :rubygems`) is +# deprecated because they default to using HTTP requests. Instead, specify +# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. +# +# When autocorrecting, this cop will replace symbol arguments with +# `'https://rubygems.org'`. +# +# This cop will not replace existing sources that use `http://`. This may +# be necessary where HTTPS is not available. For example, where using an +# internal gem server via an intranet, or where HTTPS is prohibited. +# However, you should strongly prefer `https://` where possible, as it is +# more secure. +# +# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. +# This option is `true` by default for safe autocorrection. +# +# @example +# # bad +# source :gemcutter +# source :rubygems +# source :rubyforge +# +# # good +# source 'https://rubygems.org' # strongly recommended +# @example AllowHttpProtocol: true (default) +# +# # good +# source 'http://rubygems.org' # use only if HTTPS is unavailable +# @example AllowHttpProtocol: false +# +# # bad +# source 'http://rubygems.org' +# +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 +class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#54 + def insecure_protocol_source?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#59 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#80 + def allow_http_protocol?; end +end + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#45 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#49 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#51 +RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Gems should be alphabetically sorted within groups. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rspec' +# +# # good +# gem 'rspec' +# gem 'rubocop' +# +# # good +# gem 'rubocop' +# +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 +class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#64 + def gem_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#57 + def previous_declaration(node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 +RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking assignment nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#6 +module RuboCop::Cop::CheckAssignment + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#19 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 + def extract_rhs(node); end + + class << self + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#29 + def extract_rhs(node); end + end +end + +# This mixin detects collections that are safe to "break" +# by inserting new lines. This is useful for breaking +# up long lines. +# +# Let's look at hashes as an example: +# +# We know hash keys are safe to break across lines. We can add +# linebreaks into hashes on lines longer than the specified maximum. +# Then in further passes cops can clean up the multi-line hash. +# For example, say the maximum line length is as indicated below: +# +# | +# v +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# In a LineLength autocorrection pass, a line is added before +# the first key that exceeds the column limit: +# +# {foo: "0000000000", bar: "0000000000", +# baz: "0000000000"} +# +# In a MultilineHashKeyLineBreaks pass, lines are inserted +# before all keys: +# +# {foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000"} +# +# Then in future passes FirstHashElementLineBreak, +# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will +# manipulate as well until we get: +# +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# (Note: Passes may not happen exactly in this sequence.) +# +# source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#44 +module RuboCop::Cop::CheckLineBreakable + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#45 + def extract_breakable_node(node, max); end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#200 + def all_on_same_line?(nodes); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#220 + def already_on_multiple_lines?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#133 + def breakable_collection?(node, elements); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#187 + def children_could_be_broken_up?(children); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#150 + def contained_by_breakable_collection_on_same_line?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#170 + def contained_by_multiline_collection_that_could_be_broken_up?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#60 + def extract_breakable_node_from_elements(node, elements, max); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#72 + def extract_first_element_over_column_limit(node, elements, max); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#92 + def first_argument_is_heredoc?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#207 + def process_args(args); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#117 + def safe_to_ignore?(node); end + + # If a send node contains a heredoc argument, splitting cannot happen + # after the heredoc or else it will cause a syntax error. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#101 + def shift_elements_for_heredoc_arg(node, elements, index); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#112 + def within_column_limit?(element, max, line); end +end + +# Common functionality for checking length of code segments. +# +# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#6 +module RuboCop::Cop::CodeLength + extend ::RuboCop::ExcludeLimit + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#49 + def build_code_length_calculator(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#31 + def check_code_length(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#27 + def count_as_one; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#23 + def count_comments?; end + + # Returns true for lines that shall not be included in the count. + # + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 + def irrelevant_line(source_line); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 + def max_length; end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#15 + def message(length, max_length); end +end + +# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#9 +RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) + +# Help methods for working with nodes containing comments. +# +# source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#6 +module RuboCop::Cop::CommentsHelp + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#25 + def comments_contain_disables?(node, cop_name); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#18 + def comments_in_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#14 + def contains_comments?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#7 + def source_range_with_comment(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#44 + def begin_pos_with_comment(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#58 + def buffer; end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#39 + def end_position_for(node); end + + # Returns the end line of a node, which might be a comment and not part of the AST + # End line is considered either the line at which another node starts, or + # the line at which the parent node ends. + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#66 + def find_end_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#54 + def start_line_position(node); end +end + +# Commissioner class is responsible for processing the AST and delegating +# work to the specified cops. +# +# source://rubocop//lib/rubocop/cop/commissioner.rb#7 +class RuboCop::Cop::Commissioner + include ::RuboCop::AST::Traversal + + # @return [Commissioner] a new instance of Commissioner + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#44 + def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#42 + def errors; end + + # @return [InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#79 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on___ENCODING__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on___FILE__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on___LINE__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_arg_expr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_array_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_array_pattern_with_tail(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_back_ref(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_break(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_cbase(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_complex(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_const_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_cvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_dsym(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_eflipflop(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_empty_else(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_false(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_find_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_float(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forward_arg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forward_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forwarded_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forwarded_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_forwarded_restarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_hash_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_if_guard(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_iflipflop(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_in_match(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_index(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_indexasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_int(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_ivar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwargs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwnilarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_kwsplat(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_lambda(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_lvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_alt(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_as(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_current_line(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_nil_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_pattern_p(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_rest(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_var(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_with_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_match_with_trailing_comma(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_mlhs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_next(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_nil(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_not(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_nth_ref(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_pin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_postexe(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_preexe(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_procarg0(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_rational(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_redo(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_regopt(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_restarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_retry(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_self(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_shadowarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_splat(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_sym(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_true(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_undef(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_unless_guard(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_when(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_while_post(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_xstr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#68 + def on_zsuper(node); end + + private + + # source://rubocop//lib/rubocop/cop/commissioner.rb#98 + def begin_investigation(processed_source, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#121 + def build_callbacks(cops); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#116 + def initialize_callbacks; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#159 + def invoke(callback, cops); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#163 + def invoke_with_argument(callback, cops, arg); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#112 + def reset; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#131 + def restrict_callbacks(callbacks); end + + # NOTE: mutates `callbacks` in place + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#149 + def restricted_map(callbacks); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#104 + def trigger_responding_cops(callback, node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#139 + def trigger_restricted_cops(event, node); end + + # Allow blind rescues here, since we're absorbing and packaging or + # re-raising exceptions that can be raised from within the individual + # cops' `#investigate` methods. + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#170 + def with_cop_error_handling(cop, node = T.unsafe(nil)); end +end + +# How a Commissioner returns the results of the investigation +# as a list of Cop::InvestigationReport and any errors caught +# during the investigation. +# Immutable +# Consider creation API private +# +# source://rubocop//lib/rubocop/cop/commissioner.rb#18 +class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct + # Returns the value of attribute cop_reports + # + # @return [Object] the current value of cop_reports + def cop_reports; end + + # Sets the attribute cop_reports + # + # @param value [Object] the value to set the attribute cop_reports to. + # @return [Object] the newly set value + def cop_reports=(_); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#19 + def cops; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#27 + def correctors; end + + # Returns the value of attribute errors + # + # @return [Object] the current value of errors + def errors; end + + # Sets the attribute errors + # + # @param value [Object] the value to set the attribute errors to. + # @return [Object] the newly set value + def errors=(_); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#35 + def merge(investigation); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#31 + def offenses; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#23 + def offenses_per_cop; end + + # Returns the value of attribute processed_source + # + # @return [Object] the current value of processed_source + def processed_source; end + + # Sets the attribute processed_source + # + # @param value [Object] the value to set the attribute processed_source to. + # @return [Object] the newly set value + def processed_source=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/commissioner.rb#10 +RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) + +# This class does condition autocorrection +# +# source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#6 +class RuboCop::Cop::ConditionCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#8 + def correct_negative_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#17 + def negated_condition(node); end + end +end + +# Handles `EnforcedStyle` configuration parameters. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#6 +module RuboCop::Cop::ConfigurableEnforcedStyle + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#88 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#96 + def alternative_styles; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#19 + def ambiguous_style_detected(*possibilities); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def conflicting_styles_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#11 + def correct_style_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#64 + def detected_style; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#68 + def detected_style=(style); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def no_acceptable_style!; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#56 + def no_acceptable_style?; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#7 + def opposite_style_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#79 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#75 + def style_configured?; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#29 + def style_detected(detected); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#107 + def style_parameter_name; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#100 + def supported_styles; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#15 + def unexpected_style_detected(unexpected); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def unrecognized_style_detected; end +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#23 +RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) + +# Shared functionality between mixins that enforce naming conventions +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#6 +module RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#9 + def check_name(node, name, name_range); end + + # A class emitter method is a singleton method in a class/module, where + # the method has the same name as a class defined in the class/module. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#29 + 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#23 + 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 ParameterName` 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#19 + 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#53 + 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#103 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @deprecated + # + # source://rubocop//lib/rubocop/cop/cop.rb#82 + def corrections; end + + # source://rubocop//lib/rubocop/cop/cop.rb#70 + 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#96 + def on_investigation_end; end + + # Called before all on_... have been called + # + # source://rubocop//lib/rubocop/cop/cop.rb#90 + def on_new_investigation; end + + # @deprecated Use class method + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/cop.rb#76 + def support_autocorrect?; end + + private + + # source://rubocop//lib/rubocop/cop/cop.rb#121 + def apply_correction(corrector); end + + # Override Base + # + # source://rubocop//lib/rubocop/cop/cop.rb#117 + def callback_argument(_range); end + + # source://rubocop//lib/rubocop/cop/cop.rb#138 + def correction_lambda; end + + # source://rubocop//lib/rubocop/cop/cop.rb#144 + def dedupe_on_node(node); end + + # Just for legacy + # + # @yield [corrector] + # + # source://rubocop//lib/rubocop/cop/cop.rb#126 + def emulate_v0_callsequence(corrector); end + + # source://rubocop//lib/rubocop/cop/cop.rb#157 + def range_for_original(range); end + + # source://rubocop//lib/rubocop/cop/cop.rb#151 + def suppress_clobbering; end + + class << self + # @deprecated Use Registry.all + # + # source://rubocop//lib/rubocop/cop/cop.rb#44 + def all; end + + # source://rubocop//lib/rubocop/cop/cop.rb#29 + def joining_forces; end + + # @deprecated Use Registry.qualified_cop_name + # + # source://rubocop//lib/rubocop/cop/cop.rb#49 + def qualified_cop_name(name, origin); end + + # @deprecated Use Registry.global + # + # source://rubocop//lib/rubocop/cop/cop.rb#39 + def registry; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/cop.rb#25 + def support_autocorrect?; end + end +end + +# @deprecated +# +# source://rubocop//lib/rubocop/cop/cop.rb#17 +class RuboCop::Cop::Cop::Correction < ::Struct + # source://rubocop//lib/rubocop/cop/cop.rb#18 + def call(corrector); end + + # Returns the value of attribute cop + # + # @return [Object] the current value of cop + def cop; end + + # Sets the attribute cop + # + # @param value [Object] the value to set the attribute cop to. + # @return [Object] the newly set value + def cop=(_); end + + # Returns the value of attribute lambda + # + # @return [Object] the current value of lambda + def lambda; end + + # Sets the attribute lambda + # + # @param value [Object] the value to set the attribute lambda to. + # @return [Object] the newly set value + def lambda=(_); end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + def node=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This class takes a source buffer and rewrite its source +# based on the different correction rules supplied. +# +# Important! +# The nodes modified by the corrections should be part of the +# AST of the source_buffer. +# +# source://rubocop//lib/rubocop/cop/corrector.rb#11 +class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter + # corrector = Corrector.new(cop) + # + # @param source [Parser::Source::Buffer, or anything + # leading to one via `(processed_source.)buffer`] + # @return [Corrector] a new instance of Corrector + # + # source://rubocop//lib/rubocop/cop/corrector.rb#32 + def initialize(source); end + + # Removes `size` characters from the beginning of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the end of `range`. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#63 + def remove_leading(node_or_range, size); end + + # Removes `size` characters prior to the source range. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#51 + def remove_preceding(node_or_range, size); end + + # Removes `size` characters from the end of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the beginning of `range`. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#75 + def remove_trailing(node_or_range, size); end + + # Legacy + # + # source://parser/3.2.2.3/lib/parser/source/tree_rewriter.rb#252 + def rewrite; end + + # Swaps sources at the given ranges. + # + # @param node_or_range1 [Parser::Source::Range, RuboCop::AST::Node] + # @param node_or_range2 [Parser::Source::Range, RuboCop::AST::Node] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#85 + def swap(node_or_range1, node_or_range2); end + + private + + # source://rubocop//lib/rubocop/cop/corrector.rb#119 + def check_range_validity(node_or_range); end + + # source://rubocop//lib/rubocop/cop/corrector.rb#104 + def to_range(node_or_range); end + + # source://rubocop//lib/rubocop/cop/corrector.rb#123 + def validate_buffer(buffer); end + + class << self + # Duck typing for get to a ::Parser::Source::Buffer + # + # source://rubocop//lib/rubocop/cop/corrector.rb#15 + def source_buffer(source); end + end +end + +# noop +# +# source://rubocop//lib/rubocop/cop/corrector.rb#12 +RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) + +# Common functionality for checking def nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/def_node.rb#6 +module RuboCop::Cop::DefNode + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#21 + def non_public_modifier?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#12 + def non_public?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#16 + def preceding_non_public_modifier?(node); end +end + +# Helpers for builtin documentation +# +# source://rubocop//lib/rubocop/cop/documentation.rb#6 +module RuboCop::Cop::Documentation + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#24 + def base_url_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#34 + def default_base_url; 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#15 + def url_for(cop_class, config = T.unsafe(nil)); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#24 + def base_url_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#34 + def default_base_url; 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#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 + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#44 + def replacement_range(end_pos); end +end + +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#9 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) + +# This class does empty line autocorrection +# +# source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#6 +class RuboCop::Cop::EmptyLineCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#8 + def correct(corrector, node); end + + # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#19 + def insert_before(corrector, node); end + end +end + +# Common code for empty parameter cops. +# +# source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#6 +module RuboCop::Cop::EmptyParameter + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#12 + def empty_arguments?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#16 + def check(node); end +end + +# Functions for checking the alignment of the `end` keyword. +# +# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#6 +module RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#60 + def accept_end_kw_alignment?(end_loc); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#50 + def add_offense_for_misalignment(node, align_with); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#19 + def check_end_kw_alignment(node, align_ranges); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#15 + def check_end_kw_in_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#75 + def line_break_before_keyword?(whole_expression, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#35 + def matching_ranges(end_loc, align_ranges); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#41 + def start_line_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#65 + def style_parameter_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#69 + def variable_alignment?(whole_expression, rhs, end_alignment_style); end +end + +# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#10 +RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for enforcing a specific superclass. +# +# IMPORTANT: RuboCop core depended on this module when it supported Rails department. +# Rails department has been extracted to RuboCop Rails gem. +# +# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility +# with existing RuboCop Rails 2.8 or lower. +# +# @api private +# @deprecated This module is deprecated and will be removed by RuboCop 2.0. +# +# source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#15 +module RuboCop::Cop::EnforceSuperclass + # @api private + # + # source://rubocop//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#55 + def collection_end; end + + # Returns the value of attribute collection_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#23 + def collection_node; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#29 + def collection_source; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def correction; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#43 + def end_position; end + + # Returns the value of attribute for_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#23 + def for_node; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#51 + def keyword_begin; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#63 + def offending_range; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#67 + def replacement_range(end_pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#37 + def requires_parentheses?; end + + # Returns the value of attribute variable_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#23 + def variable_node; end +end + +# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#9 +RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) + +# A scaffold for concrete forces. +# +# source://rubocop//lib/rubocop/cop/force.rb#6 +class RuboCop::Cop::Force + # @return [Force] a new instance of Force + # + # source://rubocop//lib/rubocop/cop/force.rb#22 + def initialize(cops); end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/cop/force.rb#7 + def cops; end + + # source://rubocop//lib/rubocop/cop/force.rb#38 + def investigate(_processed_source); end + + # source://rubocop//lib/rubocop/cop/force.rb#26 + def name; end + + # source://rubocop//lib/rubocop/cop/force.rb#30 + def run_hook(method_name, *args); end + + class << self + # source://rubocop//lib/rubocop/cop/force.rb#9 + def all; end + + # source://rubocop//lib/rubocop/cop/force.rb#18 + def force_name; end + + # @private + # + # source://rubocop//lib/rubocop/cop/force.rb#13 + def inherited(subclass); end + end +end + +# Common functionality for dealing with frozen string literals. +# +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 +module RuboCop::Cop::FrozenStringLiteral + private + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def frozen_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#21 + def frozen_string_literal?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 + def frozen_string_literal_comment_exists?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#66 + def frozen_string_literal_specified?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#60 + def frozen_string_literals_disabled?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 + def frozen_string_literals_enabled?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 + def leading_comment_lines; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 + def leading_magic_comments; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 + def uninterpolated_string?(node); end + + class << self + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 + def frozen_string_literal_comment_exists?; end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#10 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#11 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) + +# Common functionality for checking gem declarations. +# +# source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#6 +module RuboCop::Cop::GemDeclaration + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#10 + def gem_declaration?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#5 +module RuboCop::Cop::Gemspec; end + +# Enforce that gem dependency version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: required (default) +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# @example EnforcedStyle: forbidden +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#53 +class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#67 + def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#78 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#73 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#82 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#120 + 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#134 + def forbidden_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#140 + def forbidden_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#114 + 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#124 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#128 + def required_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#144 + def required_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#148 + def version_specification?(expression); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#61 +RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#58 +RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#57 +RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#64 +RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#59 +RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that deprecated attributes are not set in a gemspec file. +# Removing deprecated attributes allows the user to receive smaller packed gems. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files = Dir.glob('test/**/*') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files += Dir.glob('test/**/*') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#28 +class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#35 + def gem_specification(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#43 + def on_block(block_node); end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#86 + def format_message_from; end + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#63 + def node_and_method_name(node, attribute); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#72 + def use_deprecated_attributes?(node, block_parameter); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#32 +RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that development dependencies for a gem are specified in +# `Gemfile`, rather than in the `gemspec` using +# `add_development_dependency`. Alternatively, using `EnforcedStyle: +# gemspec`, enforce that all dependencies are specified in `gemspec`, +# rather than in `Gemfile`. +# +# @example EnforcedStyle: Gemfile (default) +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# @example EnforcedStyle: gems.rb +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# # +# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. +# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# @example EnforcedStyle: gemspec +# # Specify all dependencies in your gemspec. +# +# # bad +# # Gemfile +# gem "foo" +# +# # good +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good (with AllowedGems: ["bar"]) +# # Gemfile +# gem "bar" +# +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#70 +class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#77 + def add_development_dependency?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#82 + def gem?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#86 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#97 + def forbidden_gem?(gem_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#101 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#73 +RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#74 +RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# An attribute assignment method calls should be listed only once +# in a gemspec. +# +# Assigning to an attribute with the same name using `spec.foo =` will be +# an unintended usage. On the other hand, duplication of methods such +# as `spec.requirements`, `spec.add_runtime_dependency`, and others are +# permitted because it is the intended use of appending values. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# spec.name = 'rubocop2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.requirements << 'libmagick, v6.0' +# spec.requirements << 'A good graphics card' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('parallel', '~> 1.10') +# spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0') +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37 +class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#45 + def assignment_method_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#50 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#68 + def duplicated_assignment_method_nodes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#62 + def match_block_variable_name?(receiver_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#76 + def register_offense(node, assignment, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#41 +RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) + +# Dependencies in the gemspec should be alphabetically sorted. +# +# @example +# # bad +# spec.add_dependency 'rubocop' +# spec.add_dependency 'rspec' +# +# # good +# spec.add_dependency 'rspec' +# spec.add_dependency 'rubocop' +# +# # good +# spec.add_dependency 'rubocop' +# +# spec.add_dependency 'rspec' +# +# # bad +# spec.add_development_dependency 'rubocop' +# spec.add_development_dependency 'rspec' +# +# # good +# spec.add_development_dependency 'rspec' +# spec.add_development_dependency 'rubocop' +# +# # good +# spec.add_development_dependency 'rubocop' +# +# spec.add_development_dependency 'rspec' +# +# # bad +# spec.add_runtime_dependency 'rubocop' +# spec.add_runtime_dependency 'rspec' +# +# # good +# spec.add_runtime_dependency 'rspec' +# spec.add_runtime_dependency 'rubocop' +# +# # good +# spec.add_runtime_dependency 'rubocop' +# +# spec.add_runtime_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 +class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#95 + def dependency_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#90 + def get_dependency_name(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#84 + def previous_declaration(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 +RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) + +# Requires a gemspec to have `rubygems_mfa_required` metadata set. +# +# This setting tells RubyGems that MFA (Multi-Factor Authentication) is +# required for accounts to be able perform privileged operations, such as +# (see RubyGems' documentation for the full list of privileged +# operations): +# +# * `gem push` +# * `gem yank` +# * `gem owner --add/remove` +# * adding or removing owners using gem ownership page +# +# This helps make your gem more secure, as users can be more +# confident that gem updates were pushed by maintainers. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# # no `rubygems_mfa_required` metadata specified +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'false' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'false' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#63 +class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#70 + def metadata(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#87 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#78 + def rubygems_mfa_required(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#83 + def true_string?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#115 + def autocorrect(corrector, node, block_var, metadata); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#139 + def change_value(corrector, value); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#125 + def correct_metadata(corrector, metadata); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#133 + def insert_mfa_required(corrector, node, block_var); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#108 + def mfa_value(metadata_value); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#67 +RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) + +# Checks that `required_ruby_version` in a gemspec file is set to a valid +# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's +# configuration for the gem. +# +# This ensures that RuboCop is using the same Ruby version as the gem. +# +# @example +# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. +# +# # bad +# Gem::Specification.new do |spec| +# # no `required_ruby_version` specified +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.4.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.6.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5' +# end +# +# # accepted but not recommended +# Gem::Specification.new do |spec| +# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] +# end +# +# # accepted but not recommended, since +# # Ruby does not really follow semantic versioning +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '~> 2.5' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#55 +class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#70 + def defined_ruby_version(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#78 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#65 + def required_ruby_version?(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#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#116 + def not_equal_message(required_ruby_version, target_ruby_version); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#62 +RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#59 +RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#58 +RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `RUBY_VERSION` constant is not used in gemspec. +# Using `RUBY_VERSION` is dangerous because value of the +# constant is determined by `rake release`. +# It's possible to have dependency based on ruby version used +# to execute `rake release` and not user's ruby version. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# if RUBY_VERSION >= '3.0' +# spec.add_runtime_dependency 'gem_a' +# else +# spec.add_runtime_dependency 'gem_b' +# end +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency 'gem_a' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 +class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#36 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#34 + def ruby_version?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#44 + def gem_spec_with_ruby_version?(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#31 +RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking gem declarations. +# +# source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#6 +module RuboCop::Cop::GemspecHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#20 + def gem_specification(param0); end + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#10 + def gem_specification?(param0 = T.unsafe(nil)); end +end + +# Source and spec generator for new cops +# +# This generator will take a cop name and generate a source file +# and spec file when given a valid qualified cop name. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#10 +class RuboCop::Cop::Generator + # @api private + # @raise [ArgumentError] + # @return [Generator] a new instance of Generator + # + # source://rubocop//lib/rubocop/cop/generator.rb#113 + def initialize(name, output: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#133 + def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#129 + def inject_require(root_file_path: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#146 + def todo; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#121 + def write_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#125 + def write_spec; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#160 + def badge; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#183 + def generate(template); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#175 + def generated_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#179 + def generated_spec; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#160 + def output; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#208 + def snake_case(camel_case_string); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#198 + def source_path; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#188 + def spec_path; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#162 + def write_unless_file_exists(path, contents); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#109 +RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#9 +class RuboCop::Cop::Generator::ConfigurationInjector + # @return [ConfigurationInjector] a new instance of ConfigurationInjector + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#17 + def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#24 + def inject; end + + private + + # Returns the value of attribute badge. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def badge; end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#41 + def configuration_entries; end + + # Returns the value of attribute configuration_file_path. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def configuration_file_path; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#59 + def cop_name_line?(yaml); end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#49 + def find_target_line; end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#45 + def new_configuration_entry; end + + # Returns the value of attribute output. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def output; end + + # Returns the value of attribute version_added. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def version_added; end +end + +# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#10 +RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#9 +class RuboCop::Cop::Generator::RequireFileInjector + # @return [RequireFileInjector] a new instance of RequireFileInjector + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#12 + def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#19 + def inject; end + + private + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#64 + def injectable_require_directive; end + + # Returns the value of attribute output. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def output; end + + # Returns the value of attribute require_entries. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def require_entries; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#31 + def require_exists?; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#68 + def require_path; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#58 + def require_path_fragments(require_directive); end + + # Returns the value of attribute root_file_path. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def root_file_path; end + + # Returns the value of attribute source_path. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def source_path; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#39 + def target_line; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#35 + def updated_directives; end +end + +# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#10 +RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#11 +RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#85 +RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) + +# Common functionality for checking hash alignment. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#6 +module RuboCop::Cop::HashAlignmentStyles; end + +# Handles calculation of deltas when the enforced style is 'key'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#8 +class RuboCop::Cop::HashAlignmentStyles::KeyAlignment + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#9 + def checkable_layout?(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#20 + def deltas(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#13 + def deltas_for_first_pair(first_pair, _node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#34 + def separator_delta(pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#45 + def value_delta(pair); end +end + +# Handles calculation of deltas for `kwsplat` nodes. +# This is a special case that just ensures the kwsplat is aligned with the rest of the hash +# since a `kwsplat` does not have a key, separator or value. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#145 +class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#146 + def deltas(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'separator'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#120 +class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#123 + def deltas_for_first_pair(*_nodes); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#133 + def hash_rocket_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#129 + def key_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#137 + def value_delta(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'table'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#81 +class RuboCop::Cop::HashAlignmentStyles::TableAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # @return [TableAlignment] a new instance of TableAlignment + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#84 + def initialize; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#88 + def deltas_for_first_pair(first_pair, node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#106 + def hash_rocket_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#102 + def key_delta(first_pair, current_pair); end + + # Returns the value of attribute max_key_width. + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 + def max_key_width; end + + # Sets the attribute max_key_width + # + # @param value the value to set the attribute max_key_width to. + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#100 + def max_key_width=(_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#110 + def value_delta(first_pair, current_pair); end +end + +# Common functionality for checking alignment of hash values. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#56 +module RuboCop::Cop::HashAlignmentStyles::ValueAlignment + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#57 + def checkable_layout?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#61 + def deltas(first_pair, current_pair); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#71 + def separator_delta(first_pair, current_pair, key_delta); end +end + +# This module checks for Ruby 3.1's hash value omission syntax. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#7 +module RuboCop::Cop::HashShorthandSyntax + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def on_hash_for_mixed_shorthand(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#26 + def on_pair(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#122 + def brackets?(method_dispatch_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#152 + def breakdown_value_types_of_hash(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99 + def def_node_that_require_parentheses(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + def each_omittable_value_pair(hash_value_type_breakdown, &block); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 + def each_omitted_value_pair(hash_value_type_breakdown, &block); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#77 + def enforced_shorthand_syntax; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#114 + def find_ancestor_method_dispatch_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#164 + def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 + def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#71 + def ignore_hash_shorthand_syntax?(pair_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#66 + def ignore_mixed_hash_shorthand_syntax?(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#137 + def last_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#145 + def method_dispatch_as_argument?(method_dispatch_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#180 + def mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#196 + def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 + def register_offense(node, message, replacement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 + def require_hash_value?(hash_key_source, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#90 + def require_hash_value_for_around_hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 + def use_element_of_hash_literal_as_receiver?(ancestor, parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#131 + 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#206 +class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#215 + def first_argument; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#219 + def last_argument; end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + def node=(_); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207 + def selector; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#9 +RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#8 +RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for Style/HashTransformKeys and +# Style/HashTransformValues +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#7 +module RuboCop::Cop::HashTransformMethod + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#13 + def array_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#17 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#34 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#27 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#108 + def execute_correction(corrector, node, correction); end + + # @abstract + # @raise [NotImplementedError] + # @return [Captures] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#83 + def extract_captures(_match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#60 + def handle_possible_offense(node, match, match_desc); end + + # @abstract + # @raise [NotImplementedError] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#90 + def new_method_name; end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#41 + def on_bad_each_with_object(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#46 + def on_bad_hash_brackets_map(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#51 + def on_bad_map_to_h(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#56 + def on_bad_to_h(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#94 + def prepare_correction(node); end +end + +# Internal helper class to hold autocorrect data +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#136 +class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct + # Returns the value of attribute block_node + # + # @return [Object] the current value of block_node + def block_node; end + + # Sets the attribute block_node + # + # @param value [Object] the value to set the attribute block_node to. + # @return [Object] the newly set value + def block_node=(_); end + + # Returns the value of attribute leading + # + # @return [Object] the current value of leading + def leading; end + + # Sets the attribute leading + # + # @param value [Object] the value to set the attribute leading to. + # @return [Object] the newly set value + def leading=(_); end + + # Returns the value of attribute match + # + # @return [Object] the current value of match + def match; end + + # Sets the attribute match + # + # @param value [Object] the value to set the attribute match to. + # @return [Object] the newly set value + def match=(_); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#177 + def set_new_arg_name(transformed_argname, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#181 + def set_new_body_expression(transforming_body_expr, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#167 + def set_new_method_name(new_method_name, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#161 + def strip_prefix_and_suffix(node, corrector); end + + # Returns the value of attribute trailing + # + # @return [Object] the current value of trailing + def trailing; end + + # Sets the attribute trailing + # + # @param value [Object] the value to set the attribute trailing to. + # @return [Object] the newly set value + def trailing=(_); end + + class << self + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#137 + def from_each_with_object(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#141 + def from_hash_brackets_map(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#145 + def from_map_to_h(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#157 + def from_to_h(node, match); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Internal helper class to hold match data +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#118 +class RuboCop::Cop::HashTransformMethod::Captures < ::Struct + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#119 + def noop_transformation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#124 + def transformation_uses_both_args?; end + + # Returns the value of attribute transformed_argname + # + # @return [Object] the current value of transformed_argname + def transformed_argname; end + + # Sets the attribute transformed_argname + # + # @param value [Object] the value to set the attribute transformed_argname to. + # @return [Object] the newly set value + def transformed_argname=(_); end + + # Returns the value of attribute transforming_body_expr + # + # @return [Object] the current value of transforming_body_expr + def transforming_body_expr; end + + # Sets the attribute transforming_body_expr + # + # @param value [Object] the value to set the attribute transforming_body_expr to. + # @return [Object] the newly set value + def transforming_body_expr=(_); end + + # Returns the value of attribute unchanged_body_expr + # + # @return [Object] the current value of unchanged_body_expr + def unchanged_body_expr; end + + # Sets the attribute unchanged_body_expr + # + # @param value [Object] the value to set the attribute unchanged_body_expr to. + # @return [Object] the newly set value + def unchanged_body_expr=(_); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#128 + def use_transformed_argname?; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#10 +RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for working with heredoc strings. +# +# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#6 +module RuboCop::Cop::Heredoc + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_dstr(node); end + + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#17 + def on_heredoc(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_xstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 + def delimiter_string(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 + def heredoc_type(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 + def indent_level(str); end +end + +# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#7 +RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# This class autocorrects `if...then` structures to a multiline `if` statement +# +# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#6 +class RuboCop::Cop::IfThenCorrector + # @return [IfThenCorrector] a new instance of IfThenCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#9 + def initialize(if_node, indentation: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#14 + def call(corrector); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#50 + def branch_body_indentation; end + + # Returns the value of attribute if_node. + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 + def if_node; end + + # Returns the value of attribute indentation. + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 + def indentation; end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#22 + def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#36 + def rewrite_else_branch(else_branch, indentation); end +end + +# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#7 +RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) + +# @deprecated IgnoredMethods class has been replaced with AllowedMethods. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#40 +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#54 +RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern + +# Common functionality for checking integer nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#6 +module RuboCop::Cop::IntegerNode + private + + # source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#9 + def integer_part(node); end +end + +# Common functionality for working with string interpolations. +# +# @abstract Subclasses are expected to implement {#on_interpolation}. +# +# source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#8 +module RuboCop::Cop::Interpolation + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_dsym(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#17 + def on_node_with_interpolations(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_xstr(node); end +end + +# This class autocorrects lambda literal to method notation. +# +# source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#6 +class RuboCop::Cop::LambdaLiteralToMethodCorrector + # @return [LambdaLiteralToMethodCorrector] a new instance of LambdaLiteralToMethodCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#7 + def initialize(block_node); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#13 + def call(corrector); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 + def arg_to_unparenthesized_call?; end + + # Returns the value of attribute arguments. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def arguments; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 + def arguments_begin_pos; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 + def arguments_end_pos; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 + def block_begin; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 + def block_end; end + + # Returns the value of attribute block_node. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def block_node; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 + def insert_arguments(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 + def insert_separating_space(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 + def lambda_arg_string; end + + # Returns the value of attribute method. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def method; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 + def needs_separating_space?; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 + def remove_arguments(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 + def remove_leading_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 + def remove_trailing_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 + def remove_unparenthesized_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 + def replace_delimiters(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 + def replace_selector(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 + def selector_end; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 + def separating_space?; end +end + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#5 +module RuboCop::Cop::Layout; end + +# Bare access modifiers (those not applying to specific methods) should be +# indented as deep as method definitions, or as deep as the class/module +# keyword, depending on configuration. +# +# @example EnforcedStyle: indent (default) +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# @example EnforcedStyle: outdent +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#35 +class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#54 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 + def check_body(body, node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#65 + def check_modifier(send_node, end_range); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 + def expected_indent_offset; end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#84 + def message(range); end + + # An offset that is not expected, but correct if the configuration is + # changed. + # + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#94 + def unexpected_indent_offset; end +end + +# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 +RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) + +# Here we check if the arguments on a multi-line method +# definition are aligned. +# +# @example EnforcedStyle: with_first_argument (default) +# # good +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# foo :bar, +# :baz, +# key: value +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#46 +class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#92 + def arguments_or_first_arg_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#80 + def arguments_with_last_arg_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#108 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#68 + def autocorrect_incompatible_with_other_cops?; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#124 + def base_column(node, first_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#144 + def enforce_hash_argument_with_separator?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#116 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#72 + def flattened_arguments(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#152 + def hash_argument_config; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#112 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#101 + def multiple_arguments?(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#135 + def target_method_lineno(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#120 + def with_first_argument_style?; end +end + +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#50 +RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#52 +RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Here we check if the elements of a multi-line array literal are +# aligned. +# +# @example EnforcedStyle: with_first_element (default) +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#36 +class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#46 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#55 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#67 + def base_column(node, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#63 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#59 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#78 + def target_method_lineno(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#40 +RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#43 +RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first line of the +# right-hand-side of a multi-line assignment. +# +# The indentation of the remaining lines can be corrected with +# other cops such as `IndentationConsistency` and `EndAlignment`. +# +# @example +# # bad +# value = +# if foo +# 'bar' +# end +# +# # good +# value = +# if foo +# 'bar' +# end +# +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#24 +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#42 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#33 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#46 + def leftmost_multiple_assignment(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#29 +RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keyword of `begin` is aligned properly. +# +# Two modes are supported through the `EnforcedStyleAlignWith` configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `begin` +# keyword is. If it's set to `begin`, the `end` shall be aligned with the +# `begin` keyword. +# +# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `||= begin` that this cop targets tends to +# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# @example EnforcedStyleAlignWith: begin +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#41 +class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#48 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#63 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#59 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#54 + def check_begin_alignment(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#46 +RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly for do +# end blocks. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# `start_of_block` : the `end` shall be aligned with the +# start of the line where the `do` appeared. +# +# `start_of_line` : the `end` shall be aligned with the +# start of the line where the expression started. +# +# `either` (which is the default) : the `end` is allowed to be in either +# location. The autofixer will default to `start_of_line`. +# +# @example EnforcedStyleAlignWith: either (default) +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# @example EnforcedStyleAlignWith: start_of_block +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#66 +class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#74 + def block_end_align_target?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#89 + def style_parameter_name; end + + private + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#228 + def add_space_before(corrector, loc, delta); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#205 + def alt_start_msg(start_loc, source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#155 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + def block_end_align_target(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#123 + def check_block_alignment(start_node, block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 + def compute_do_source_line_column(node, end_loc); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#220 + def compute_start_col(ancestor_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#119 + def disqualified_parent?(parent, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + def end_align_target?(node, parent); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#168 + 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#215 + def format_source_line_column(source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + def loc_to_source_line_column(loc); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#136 + def register_offense(block_node, start_loc, end_loc, do_source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 + def remove_space_before(corrector, end_pos, delta); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + def start_for_block_node(block_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 +RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end statement of a do..end block +# is on its own line. +# +# @example +# # bad +# blah do |i| +# foo(i) end +# +# # good +# blah do |i| +# foo(i) +# end +# +# # bad +# blah { |i| +# foo(i) } +# +# # good +# blah { |i| +# foo(i) +# } +# +# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#27 +class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#66 + def last_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#62 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#76 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#49 + def register_offense(node, offense_range); end +end + +# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#31 +RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) + +# Checks how the `when` and ``in``s of a `case` expression +# are indented in relation to its `case` or `end` keyword. +# +# It will register a separate offense for each misaligned `when` and `in`. +# +# @example +# # If Layout/EndAlignment is set to keyword style (default) +# # *case* and *end* should always be aligned to same depth, +# # and therefore *when* should always be aligned to both - +# # regardless of configuration. +# +# # bad for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# @example EnforcedStyle: case (default) +# # if EndAlignment is set to other style such as +# # start_of_line (as shown below), then *when* alignment +# # configuration does have an effect. +# +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# @example EnforcedStyle: end +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#112 +class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#120 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#127 + def on_case_match(case_match_node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#193 + def base_column(case_node, base); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#150 + def check_when(when_node, branch_type); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#182 + def detect_incorrect_style(when_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#136 + def end_and_last_conditional_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#146 + def enforced_style_end?; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#169 + def incorrect_style(when_node, branch_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#161 + def indent_one_step?; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#165 + def indentation_width; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#207 + def replacement(node); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#200 + def whitespace_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#118 +RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks if the code style follows the ExpectedOrder configuration: +# +# `Categories` allows us to map macro names into a category. +# +# Consider an example of code style that covers the following order: +# +# * Module inclusion (include, prepend, extend) +# * Constants +# * Associations (has_one, has_many) +# * Public attribute macros (attr_accessor, attr_writer, attr_reader) +# * Other macros (validates, validate) +# * Public class methods +# * Initializer +# * Public instance methods +# * Protected attribute macros (attr_accessor, attr_writer, attr_reader) +# * Protected instance methods +# * Private attribute macros (attr_accessor, attr_writer, attr_reader) +# * Private instance methods +# +# You can configure the following order: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - module_inclusion +# - constants +# - association +# - public_attribute_macros +# - public_delegate +# - macros +# - public_class_methods +# - initializer +# - public_methods +# - protected_attribute_macros +# - protected_methods +# - private_attribute_macros +# - private_delegate +# - private_methods +# ---- +# +# Instead of putting all literals in the expected order, is also +# possible to group categories of macros. Visibility levels are handled +# automatically. +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Categories: +# association: +# - has_many +# - has_one +# attribute_macros: +# - attr_accessor +# - attr_reader +# - attr_writer +# macros: +# - validates +# - validate +# module_inclusion: +# - include +# - prepend +# - extend +# ---- +# +# @example +# # bad +# # Expect extend be before constant +# class Person < ApplicationRecord +# has_many :orders +# ANSWER = 42 +# +# extend SomeModule +# include AnotherModule +# end +# +# # good +# class Person +# # extend and include go first +# extend SomeModule +# include AnotherModule +# +# # inner classes +# CustomError = Class.new(StandardError) +# +# # constants are next +# SOME_CONSTANT = 20 +# +# # afterwards we have public attribute macros +# attr_reader :name +# +# # followed by other macros (if any) +# validates :name +# +# # then we have public delegate macros +# delegate :to_s, to: :name +# +# # public class methods are next in line +# def self.some_method +# end +# +# # initialization goes between class methods and instance methods +# def initialize +# end +# +# # followed by other public instance methods +# def some_method +# end +# +# # protected attribute macros and methods go next +# protected +# +# attr_reader :protected_name +# +# def some_protected_method +# end +# +# # private attribute macros, delegate macros and methods +# # are grouped near the end +# private +# +# attr_reader :private_name +# +# delegate :some_private_delegate, to: :name +# +# def some_private_method +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#142 +class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 + def on_class(class_node); end + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 + def on_sclass(class_node); end + + private + + # Autocorrect by swapping between two nodes autocorrecting them + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#174 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#305 + def begin_pos_with_comment(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#328 + def buffer; end + + # Setting categories hash allow you to group methods in group to match + # in the {expected_order}. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#340 + def categories; end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#234 + def class_elements(class_node); end + + # Classifies a node to match with something in the {expected_order} + # + # @param node to be analysed + # @return String when the node type is a `:block` then + # {classify} recursively with the first children + # @return String when the node type is a `:send` then {find_category} + # by method name + # @return String otherwise trying to {humanize_node} of the current node + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#194 + def classify(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#271 + def dynamic_constant?(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#295 + def end_position_for(node); end + + # Load expected order from `ExpectedOrder` config. + # Define new terms in the expected order by adding new {categories}. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#334 + def expected_order; end + + # Categorize a node according to the {expected_order} + # Try to match {categories} values against the node's method_name given + # also its visibility. + # + # @param node to be analysed. + # @return [String] with the key category or the `method_name` as string + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#212 + def find_category(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#324 + def find_heredoc(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#262 + def humanize_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#246 + def ignore?(node, classification); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#253 + def ignore_for_autocorrect?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#289 + def marked_as_private_constant?(node, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#279 + def private_constant?(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#320 + def start_line_position(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#225 + def walk_over_nested_class_definition(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#316 + def whole_line_comment_at_line?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 +RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#154 +RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of here document closings. +# +# @example +# +# # bad +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # good +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # bad +# +# # heredoc contents is before closing heredoc. +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48 +class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74 + def argument_indentation_correct?(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82 + def closing_indentation(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101 + def find_node_used_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90 + def heredoc_closing(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86 + def heredoc_opening(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117 + def indent_level(source_line); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94 + def indented_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70 + def opening_indentation(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52 +RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) + +# Checks the indentation of hanging closing parentheses in +# method calls, method definitions, and grouped expressions. A hanging +# closing parenthesis means `)` preceded by a line break. +# +# @example +# +# # bad +# some_method( +# a, +# b +# ) +# +# some_method( +# a, b +# ) +# +# some_method(a, b, c +# ) +# +# some_method(a, +# b, +# c +# ) +# +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# # Scenario 1: When First Parameter Is On Its Own Line +# +# # good: when first param is on a new line, right paren is *always* +# # outdented by IndentationWidth +# some_method( +# a, +# b +# ) +# +# # good +# some_method( +# a, b +# ) +# +# # Scenario 2: When First Parameter Is On The Same Line +# +# # good: when all other params are also on the same line, outdent +# # right paren by IndentationWidth +# some_method(a, b, c +# ) +# +# # good: when all other params are on multiple lines, but are lined +# # up, align right paren with left paren +# some_method(a, +# b, +# c +# ) +# +# # good: when other params are not lined up on multiple lines, outdent +# # right paren by IndentationWidth +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#71 +class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#84 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#157 + def all_elements_aligned?(elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#95 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#99 + def check(node, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#107 + def check_for_elements(node, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#125 + def check_for_no_elements(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#171 + def correct_column_candidates(node, left_paren); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#144 + def expected_column(left_paren, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#167 + def first_argument_line(elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#187 + def line_break_after_left_paren?(left_paren, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#179 + def message(correct_column, left_paren, right_paren); end +end + +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#77 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#75 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# Checks the indentation of comments. +# +# @example +# # bad +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# # good +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# @example AllowForAlignment: false (default) +# # bad +# a = 1 # A really long comment +# # spanning two lines. +# +# # good +# # A really long comment spanning one line. +# a = 1 +# @example AllowForAlignment: true +# # good +# a = 1 # A really long comment +# # spanning two lines. +# +# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#48 +class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#55 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#61 + def autocorrect(corrector, comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#88 + def autocorrect_one(corrector, comment); end + + # Corrects all comment lines that occur immediately before the given + # comment and have the same indentation. This is to avoid a long chain + # of correcting, saving the file, parsing and inspecting again, and + # then correcting one more line, and so on. + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#71 + def autocorrect_preceding_comments(corrector, comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#92 + def check(comment, comment_index); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#145 + def correct_indentation(next_line); end + + # Returns true if: + # a) the cop is configured to allow extra indentation for alignment, and + # b) the currently inspected comment is aligned with the nearest preceding end-of-line + # comment. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#121 + def correctly_aligned_with_preceding_comment?(comment_index, column); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#156 + def less_indented?(line); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#140 + def line_after_comment(comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#131 + def message(column, correct_comment_indentation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#135 + def own_line_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#82 + def should_correct?(preceding_comment, reference_comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#162 + def two_alternatives?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#52 +RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for conditions that are not on the same line as +# if/while/until. +# +# @example +# +# # bad +# +# if +# some_condition +# do_something +# end +# @example +# +# # good +# +# if some_condition +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 +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#31 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#44 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#58 + def message(condition); end +end + +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#29 +RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords of method definitions are +# aligned properly. +# +# Two modes are supported through the EnforcedStyleAlignWith configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `def` +# keyword is. If it's set to `def`, the `end` shall be aligned with the +# `def` keyword. +# +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# @example EnforcedStyleAlignWith: def +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#36 +class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#48 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#63 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#41 +RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks the . position in multi-line method calls. +# +# @example EnforcedStyle: leading (default) +# # bad +# something. +# method +# +# # good +# something +# .method +# @example EnforcedStyle: trailing +# # bad +# something +# .method +# +# # good +# something. +# method +# +# source://rubocop//lib/rubocop/cop/layout/dot_position.rb#25 +class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#137 + def ampersand_dot?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 + def autocorrect(corrector, dot, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#99 + def correct_dot_position_style?(dot_line, selector_line); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#126 + def end_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#122 + def heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#114 + def last_heredoc_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#95 + def line_between?(first_line, second_line); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#64 + def message(dot); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#74 + def proper_dot_position?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#106 + def receiver_end_line(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#130 + def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#30 + def autocorrect_incompatible_with; end + end +end + +# Checks the alignment of else keywords. Normally they should +# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there +# are special cases when they should follow the same rules as the +# alignment of end. +# +# @example +# # bad +# if something +# code +# else +# code +# end +# +# # bad +# if something +# code +# elsif something +# code +# end +# +# # good +# if something +# code +# else +# code +# end +# +# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#32 +class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#57 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#63 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#40 + def on_if(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#51 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#147 + def assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#106 + def base_for_method_definition(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#80 + def base_range_of_if(node, base); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#89 + def base_range_of_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#131 + def check_alignment(base_range, else_range); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#115 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#75 + def check_nested(node, base); end +end + +# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#38 +RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks empty comment. +# +# @example +# # bad +# +# # +# class Foo +# end +# +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# @example AllowBorderComment: true (default) +# # good +# +# def foo +# end +# +# ################# +# +# def bar +# end +# @example AllowBorderComment: false +# # bad +# +# def foo +# end +# +# ################# +# +# def bar +# end +# @example AllowMarginComment: true (default) +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# @example AllowMarginComment: false +# # bad +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#63 +class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#69 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#131 + def allow_border_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#135 + 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#127 + 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#139 + def current_token(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#117 + 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#143 + 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#179 + def heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172 + def heredoc_line(node, heredoc_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148 + def last_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162 + def last_heredoc_argument_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191 + 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#183 + 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#200 + def simplecov_directive_comment?(comment); 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 + + # Find the last magic comment in the source file. + # + # Take all comments that precede the first line of 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#54 + def last_magic_comment(source); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#43 + def offending_range(last_magic_comment); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#27 +RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after multiline condition. +# +# @example +# # bad +# if multiline && +# condition +# do_something +# end +# +# # good +# if multiline && +# condition +# +# do_something +# end +# +# # bad +# case x +# when foo, +# bar +# do_something +# end +# +# # good +# case x +# when foo, +# bar +# +# do_something +# end +# +# # bad +# begin +# do_something +# rescue FooError, +# BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, +# BarError +# +# handle_error +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#54 +class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#82 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#60 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#93 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 + def on_while_post(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#127 + def autocorrect(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#105 + def check_condition(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#120 + def multiline_rescue_exceptions?(exception_nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#116 + def multiline_when_condition?(when_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#112 + def next_line_empty?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#58 +RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether class/module/method definitions are +# separated by one or more empty lines. +# +# `NumberOfEmptyLines` can be an integer (default is 1) or +# an array (e.g. [1, 2]) to specify a minimum and maximum +# number of empty lines permitted. +# +# `AllowAdjacentOneLineDefs` configures whether adjacent +# one-line definitions are considered an offense. +# +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. +# +# # bad +# def a +# end +# def b +# end +# @example +# +# # good +# def a +# end +# +# def b +# end +# @example EmptyLineBetweenClassDefs: true (default) +# # checks for empty lines between class definitions. +# +# # bad +# class A +# end +# class B +# end +# def b +# end +# @example +# +# # good +# class A +# end +# +# class B +# end +# +# def b +# end +# @example EmptyLineBetweenModuleDefs: true (default) +# # checks for empty lines between module definitions. +# +# # bad +# module A +# end +# module B +# end +# def b +# end +# @example +# +# # good +# module A +# end +# +# module B +# end +# +# def b +# end +# @example AllowAdjacentOneLineDefs: true (default) +# +# # good +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end +# @example AllowAdjacentOneLineDefs: false +# +# # bad +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 +class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#145 + def autocorrect(corrector, prev_def, node, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#130 + def check_defs(nodes); end + + # We operate on `begin` nodes, instead of using `OnMethodDef`, + # so that we can walk over pairs of consecutive nodes and + # efficiently access a node's predecessor; #prev_node ends up + # doing a linear scan over siblings, so we don't want to call + # it on each def. + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#123 + def on_begin(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 + def allowance_range?; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 + def autocorrect_insert_lines(corrector, newline_pos, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + def autocorrect_remove_lines(corrector, newline_pos, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 + 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#171 + def candidate?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 + def class_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 + def def_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + def def_location(correction_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 + def def_start(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + def empty_line_between_macros; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 + def end_loc(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 + def expected_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 + def line_count_allowed?(count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 + def lines_between_defs(first_def_node, second_def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + def macro_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 + def maximum_empty_lines; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 + def message(node, count: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 + def method_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 + def minimum_empty_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + def module_candidate?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 + def multiple_blank_lines_groups?(first_def_node, second_def_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 + def node_type(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#114 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#112 +RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) + +# Checks for two or more consecutive blank lines. +# +# @example +# +# # bad - It has two empty lines. +# some_method +# # one empty line +# # two empty lines +# some_method +# +# # good +# some_method +# # one empty line +# some_method +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#21 +class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#28 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#45 + def each_extra_empty_line(lines); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#63 + def exceeds_line_offset?(line_diff); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#67 + def previous_and_current_lines_empty?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#26 +RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#25 +RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Access modifiers should be surrounded by blank lines. +# +# @example EnforcedStyle: around (default) +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# +# def baz; end +# end +# @example EnforcedStyle: only_before +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# def baz; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#43 +class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [EmptyLinesAroundAccessModifier] a new instance of EmptyLinesAroundAccessModifier + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#56 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#62 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#71 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#76 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#87 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#115 + def allowed_only_before_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#164 + def block_start?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#170 + def body_end?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#158 + def class_def?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#124 + def correct_next_line_if_denied_style(corrector, node, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#154 + def empty_lines_around?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#104 + def expected_empty_lines?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#180 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#189 + def message_for_around_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#199 + def message_for_only_before_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#176 + def next_empty_line_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#148 + def next_line_empty?(last_send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#141 + def previous_line_empty?(send_line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#137 + def previous_line_ignoring_comments(processed_source, send_line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#48 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#52 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#49 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#51 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#54 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the arguments +# of a method invocation. +# +# @example +# # bad +# do_something( +# foo +# +# ) +# +# process(bar, +# +# baz: qux, +# thud: fred) +# +# some_method( +# +# [1,2,3], +# x: y +# ) +# +# # good +# do_something( +# foo +# ) +# +# process(bar, +# baz: qux, +# thud: fred) +# +# some_method( +# [1,2,3], +# x: y +# ) +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#41 +class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#65 + def empty_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#71 + def extra_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#93 + def inner_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#84 + def line_numbers(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#97 + def outer_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#78 + def processed_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#61 + def receiver_and_method_call_on_different_lines?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#45 +RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for a newline after an attribute accessor or a group of them. +# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed +# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. +# +# @example +# # bad +# attr_accessor :foo +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# attr_reader :bar +# attr_writer :baz +# attr :qux +# +# def do_something +# end +# @example AllowAliasSyntax: true (default) +# # good +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# @example AllowAliasSyntax: false +# # bad +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# alias :foo? :foo +# +# def do_something +# end +# @example AllowedMethods: ['private'] +# # good +# attr_accessor :foo +# private :foo +# +# def do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#63 +class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#123 + def allow_alias?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#133 + def allow_alias_syntax?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#127 + def attribute_or_allowed_method?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#83 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#107 + def next_line_empty?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#94 + def next_line_empty_or_enable_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#101 + def next_line_enable_directive_comment?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#117 + def next_line_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#111 + def require_empty_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#68 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of begin-end +# blocks. +# +# @example +# +# # good +# +# begin +# # ... +# end +# +# # bad +# +# begin +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#24 +class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#30 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#36 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#28 +RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of blocks match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# foo do |bar| +# # ... +# end +# @example EnforcedStyle: empty_lines +# # good +# +# foo do |bar| +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#24 +class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#30 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#28 +RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) + +# Common functionality for checking if presence/absence of empty lines +# around some kind of body matches the configuration. +# +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#8 +module RuboCop::Cop::Layout::EmptyLinesAroundBody + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#20 + def constant_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#23 + def empty_line_required?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#26 + def check(node, body, adjusted_first_line: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#81 + def check_beginning(style, first_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#67 + def check_both(style, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#108 + def check_deferred_empty_line(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#43 + def check_empty_lines_except_namespace(body, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#51 + def check_empty_lines_special(body, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#85 + def check_ending(style, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#98 + def check_line(style, line, msg); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#89 + def check_source(style, line_no, desc); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#159 + def deferred_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#132 + def first_child_requires_empty_line?(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#140 + def first_empty_line_required_child(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#155 + def message(type, desc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#122 + def namespace?(body, with_one_child: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#148 + def previous_line_ignoring_comments(send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#163 + def valid_body_style?(body); end +end + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#15 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#13 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#14 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of classes match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# class Foo +# def bar +# # ... +# end +# end +# @example EnforcedStyle: empty_lines +# # good +# +# class Foo +# +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# class Foo +# class Bar +# +# # ... +# +# end +# end +# @example EnforcedStyle: empty_lines_special +# # good +# class Foo +# +# def bar; end +# +# end +# @example EnforcedStyle: beginning_only +# # good +# +# class Foo +# +# def bar +# # ... +# end +# end +# @example EnforcedStyle: ending_only +# # good +# +# class Foo +# def bar +# # ... +# end +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#67 +class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#73 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#79 + def on_sclass(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#71 +RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of `begin` +# sections. This cop doesn't check empty lines at `begin` body +# beginning/end and around method definition body. +# `Style/EmptyLinesAroundBeginBody` or `Style/EmptyLinesAroundMethodBody` +# can be used for this purpose. +# +# @example +# +# # good +# +# begin +# do_something +# rescue +# do_something2 +# else +# do_something3 +# ensure +# do_something4 +# end +# +# # good +# +# def foo +# do_something +# rescue +# do_something2 +# end +# +# # bad +# +# begin +# do_something +# +# rescue +# +# do_something2 +# +# else +# +# do_something3 +# +# ensure +# +# do_something4 +# end +# +# # bad +# +# def foo +# do_something +# +# rescue +# +# do_something2 +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#61 +class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#74 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 + def check_body(body, line_of_def_or_kwbegin); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 + def keyword_locations(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 + def keyword_locations_in_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 + def keyword_locations_in_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 + def last_rescue_and_end_on_same_line(body); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 + def message(location, keyword); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#65 +RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of methods. +# +# @example +# +# # good +# +# def foo +# # ... +# end +# +# # bad +# +# def bar +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#23 +class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#36 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#27 +RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of modules match +# the configuration. +# +# @example EnforcedStyle: no_empty_lines (default) +# # good +# +# module Foo +# def bar +# # ... +# end +# end +# @example EnforcedStyle: empty_lines +# # good +# +# module Foo +# +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# module Foo +# module Bar +# +# # ... +# +# end +# end +# @example EnforcedStyle: empty_lines_special +# # good +# module Foo +# +# def bar; end +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#47 +class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#53 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#51 +RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# If it's set to `keyword` (which is the default), the `end` +# shall be aligned with the start of the keyword (if, class, etc.). +# +# If it's set to `variable` the `end` shall be aligned with the +# left-hand-side of the variable assignment, if there is one. +# +# If it's set to `start_of_line`, the `end` shall be aligned with the +# start of the line where the matching keyword appears. +# +# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with +# `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends +# to align with the start of the line. These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: keyword (default) +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# @example EnforcedStyleAlignWith: variable +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# variable = if true +# end +# +# puts(if true +# end) +# +# # good +# +# variable = if true +# end +# +# puts(if true +# end) +# +# variable = +# if true +# end +# +# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#75 +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#105 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#81 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#93 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#89 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#85 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#101 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#97 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#161 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#172 + def alignment_node_for_variable_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#142 + def asgn_variable_align_with(outer_node, inner_node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#190 + def assignment_or_operator_method(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#116 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#131 + def check_asgn_alignment(outer_node, inner_node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#120 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#152 + def check_other_alignment(node); end +end + +# Checks for Windows-style line endings in the source code. +# +# @example EnforcedStyle: native (default) +# # The `native` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on Windows, and LF is enforced on other platforms. +# +# # bad +# puts 'Hello' # Return character is LF on Windows. +# puts 'Hello' # Return character is CR+LF on other than Windows. +# +# # good +# puts 'Hello' # Return character is CR+LF on Windows. +# puts 'Hello' # Return character is LF on other than Windows. +# @example EnforcedStyle: lf +# # The `lf` style means that LF (Line Feed) is enforced on +# # all platforms. +# +# # bad +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# # good +# puts 'Hello' # Return character is LF on all platforms. +# @example EnforcedStyle: crlf +# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on all platforms. +# +# # bad +# puts 'Hello' # Return character is LF on all platforms. +# +# # good +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#40 +class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#71 + def offense_message(line); end + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#47 + def on_new_investigation; end + + # If there is no LF on the last line, we don't care if there's no CR. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#67 + def unimportant_missing_cr?(index, last_line, line); end + + private + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#85 + def last_line(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#44 +RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#45 +RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks for extra/unnecessary whitespace. +# +# @example +# +# # good if AllowForAlignment is true +# name = "RuboCop" +# # Some comment and an empty line +# +# website += "/rubocop/rubocop" unless cond +# puts "rubocop" if debug +# +# # bad for any configuration +# set_app("RuboCop") +# website = "https://github.com/rubocop/rubocop" +# +# # good only if AllowBeforeTrailingComments is true +# object.method(arg) # this is a comment +# +# # good even if AllowBeforeTrailingComments is false or not set +# object.method(arg) # this is a comment +# +# # good with either AllowBeforeTrailingComments or AllowForAlignment +# object.method(arg) # this is a comment +# another_object.method(arg) # this is another comment +# some_object.method(arg) # this is some comment +# +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#31 +class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#176 + def align_column(asgn_token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#153 + def align_equal_sign(corrector, token, align_to); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#143 + 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#109 + def aligned_tok?(token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#165 + def all_relevant_assignment_lines(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#185 + def allow_for_trailing_comments?; end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#78 + def check_assignment(token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#87 + def check_other(token1, token2, ast); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#68 + def check_tokens(ast, token1, token2); end + + # @yield [range_between(start_pos, end_pos)] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#97 + def extra_space_range(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#139 + def force_equal_sign_alignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#117 + 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#124 + def ignored_ranges(ast); end +end + +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#37 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#36 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first argument in a method call. +# Arguments after the first one are checked by `Layout/ArgumentAlignment`, +# not by this cop. +# +# For indenting the first parameter of method _definitions_, check out +# `Layout/FirstParameterIndentation`. +# +# This cop will respect `Layout/ArgumentAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. +# +# @example +# +# # bad +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) +# # Same as `special_for_inner_method_call` except that the special rule +# # only applies if the outer method call encloses its arguments in +# # parentheses. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: consistent +# # The first argument should always be indented one step more than the +# # preceding line. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: consistent_relative_to_receiver +# # The first argument should always be indented one level relative to +# # the parent that is receiving the argument +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_params +# @example EnforcedStyle: special_for_inner_method_call +# # The first argument should normally be indented one step more than +# # the preceding line, but if it's a argument for a method call that +# # is itself a argument in a method call, then the inner argument +# # should be indented relative to the inner method. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#147 +class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#222 + def eligible_method_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_super(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#281 + def argument_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#174 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#178 + def bare_operator?(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#198 + def base_indentation(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#226 + def base_range(send_node, arg_node); end + + # Returns the column of the given range. For single line ranges, this + # is simple. For ranges with line breaks, we look a the last code line. + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#238 + def column_of(range); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#259 + def comment_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#277 + def enable_layout_first_method_argument_line_break?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#271 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#182 + def message(arg_node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#267 + def on_new_investigation; end + + # Takes the line number of a given code line and returns a string + # containing the previous line that's not a comment line or a blank + # line. + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#250 + def previous_code_line(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#170 + def should_check?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#206 + def special_inner_call_indentation?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#153 +RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first element in an array literal +# where the opening bracket and the first element are on separate lines. +# The other elements' indentations are handled by the ArrayAlignment cop. +# +# By default, array literals that are arguments in a method call with +# parentheses, and where the opening square bracket of the array is on the +# same line as the opening parenthesis of the method call, shall have +# their first element indented one step (two spaces) more than the +# position inside the opening parenthesis. +# +# Other array literals shall have their first element indented one step +# more than the start of the line where the opening square bracket is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_brackets'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first +# # element in an array literal where the opening bracket and first +# # element are on separate lines is indented one step (two spaces) more +# # than the position inside the opening parenthesis. +# +# #bad +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# #good +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first element in an array +# # literal where the opening bracket and the first element are on +# # separate lines is indented the same as an array literal which is not +# # defined inside a method call. +# +# #bad +# # consistent +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# #good +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# @example EnforcedStyle: align_brackets +# # The `align_brackets` style enforces that the opening and closing +# # brackets are indented to the same position. +# +# #bad +# # align_brackets +# and_now_for_something = [ +# :completely_different +# ] +# +# #good +# # align_brackets +# and_now_for_something = [ +# :completely_different +# ] +# +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 +class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#104 + 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#142 + def base_description(indent_base_type); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 + def check(array_node, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#126 + def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#155 + def message(base_description); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#163 + def message_for_right_bracket(indent_base_type); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 +RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line array. +# +# @example +# +# # bad +# [ :a, +# :b] +# +# # good +# [ +# :a, +# :b] +# +# # good +# [:a, :b] +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [ :a, { +# :b => :c +# }] +# +# # good +# [ +# :a, { +# :b => :c +# }] +# @example AllowMultilineFinalElement: true +# +# # good +# [:a, { +# :b => :c +# }] +# +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#43 +class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#49 + def on_array(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#57 + def assignment_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#62 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#47 +RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first key in a hash literal +# where the opening brace and the first key are on separate lines. The +# other keys' indentations are handled by the HashAlignment cop. +# +# By default, Hash literals that are arguments in a method call with +# parentheses, and where the opening curly brace of the hash is on the +# same line as the opening parenthesis of the method call, shall have +# their first key indented one step (two spaces) more than the position +# inside the opening parenthesis. +# +# Other hash literals shall have their first key indented one step more +# than the start of the line where the opening curly brace is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_braces'. Here are examples: +# +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first key +# # in a hash literal where the opening brace and the first key are on +# # separate lines is indented one step (two spaces) more than the +# # position inside the opening parentheses. +# +# # bad +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# special_inside_parentheses +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first key in a hash +# # literal where the opening brace and the first key are on +# # separate lines is indented the same as a hash literal which is not +# # defined inside a method call. +# +# # bad +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# +# # good +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# @example EnforcedStyle: align_braces +# # The `align_brackets` style enforces that the opening and closing +# # braces are indented to the same position. +# +# # bad +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#113 +class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#122 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#233 + def argument_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#137 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#191 + def base_description(indent_base_type); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#141 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#145 + def check(hash_node, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#184 + def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#164 + def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#227 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#204 + def message(base_description); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#212 + def message_for_right_brace(indent_base_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#178 + def separator_style?(first_pair); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#119 +RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line hash. +# +# @example +# +# # bad +# { a: 1, +# b: 2} +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { +# a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: true +# +# # bad +# { a: 1, +# b: { +# c: 3 +# }} +# +# # good +# { a: 1, b: { +# c: 3 +# }} +# +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#46 +class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#52 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#62 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#50 +RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first argument in a +# multi-line method call. +# +# @example +# +# # bad +# method(foo, bar, +# baz) +# +# # good +# method( +# foo, bar, +# baz) +# +# # ignored +# method foo, bar, +# baz +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, bar, { +# baz: "a", +# qux: "b", +# }) +# @example AllowMultilineFinalElement: true +# +# # bad +# method(foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# # good +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 +class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + def on_super(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 +RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first parameter in a +# multi-line method parameter definition. +# +# @example +# +# # bad +# def method(foo, bar, +# baz) +# do_something +# end +# +# # good +# def method( +# foo, bar, +# baz) +# do_something +# end +# +# # ignored +# def method foo, +# bar +# do_something +# end +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# # good +# def method( +# foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# @example AllowMultilineFinalElement: true +# +# # good +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#56 +class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#69 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#60 +RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first parameter in a method +# definition. Parameters after the first one are checked by +# Layout/ParameterAlignment, not by this cop. +# +# For indenting the first argument of method _calls_, check out +# Layout/FirstArgumentIndentation, which supports options related to +# nesting that are irrelevant for method _definitions_. +# +# @example +# +# # bad +# def some_method( +# first_param, +# second_param) +# 123 +# end +# @example EnforcedStyle: consistent (default) +# # The first parameter should always be indented one step more than the +# # preceding line. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# @example EnforcedStyle: align_parentheses +# # The first parameter should always be indented one step more than the +# # opening parenthesis. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#44 +class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#63 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#83 + def base_description(_); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#67 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#71 + def check(def_node); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#91 + def message(base_description); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#50 +RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) + +# Check that the keys, separators, and values of a multi-line hash +# literal are aligned according to configuration. The configuration +# options are: +# +# * key (left align keys, one space before hash rockets and values) +# * separator (align hash rockets and colons, right align keys) +# * table (left align keys, hash rockets, and values) +# +# The treatment of hashes passed as the last argument to a method call +# can also be configured. The options are: +# +# * always_inspect +# * always_ignore +# * ignore_implicit (without curly braces) +# +# Alternatively you can specify multiple allowed styles. That's done by +# passing a list of styles to EnforcedStyles. +# +# @example 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 EnforcedColonStyle: key (default) +# # bad +# { +# foo: bar, +# ba: baz +# } +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedColonStyle: separator +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedColonStyle: table +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedLastArgumentHashStyle: always_inspect (default) +# # Inspect both implicit and explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something( +# foo: 1, +# bar: 2 +# ) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something({ +# foo: 1, +# bar: 2 +# }) +# @example EnforcedLastArgumentHashStyle: always_ignore +# # Ignore both implicit and explicit hashes. +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# @example EnforcedLastArgumentHashStyle: ignore_implicit +# # Ignore only implicit hashes. +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit 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#208 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_yield(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#265 + def add_offenses; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#371 + def adjust(corrector, delta, range); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#300 + def alignment_for(pair); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#314 + def alignment_for_colons; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#310 + def alignment_for_hash_rockets; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#390 + def argument_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#233 + def argument_before_hash(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#222 + def autocorrect_incompatible_with_other_cops?(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#283 + def check_delta(delta, node:, alignment:); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#246 + def check_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#337 + def correct_key_value(corrector, delta, key, value, separator); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#333 + def correct_no_value(corrector, key_delta, key); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#318 + def correct_node(corrector, node, delta); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#242 + def double_splat?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#384 + def enforce_first_argument_with_fixed_indentation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#380 + def good_alignment?(column_deltas); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#291 + def ignore_hash_argument?(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#353 + def new_alignment(key); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#273 + def register_offenses_with_format(offenses, format); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#237 + def reset!; end +end + +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#183 +RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#193 +RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) + +# Checks for the placement of the closing parenthesis +# in a method call that passes a HEREDOC string as an argument. +# It should be placed at the end of the line containing the +# opening HEREDOC tag. +# +# @example +# # bad +# +# foo(<<-SQL +# bar +# SQL +# ) +# +# foo(<<-SQL, 123, <<-NOSQL, +# bar +# SQL +# baz +# NOSQL +# ) +# +# foo( +# bar(<<-SQL +# baz +# SQL +# ), +# 123, +# ) +# +# # good +# +# foo(<<-SQL) +# bar +# SQL +# +# foo(<<-SQL, 123, <<-NOSQL) +# bar +# SQL +# baz +# NOSQL +# +# foo( +# bar(<<-SQL), +# baz +# SQL +# 123, +# ) +# +# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#53 +class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#64 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#184 + def add_correct_closing_paren(node, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#271 + def add_correct_external_trailing_comma(node, corrector); end + + # Autocorrection note: + # + # Commas are a bit tricky to handle when the method call is + # embedded in another expression. Here's an example: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456, + # SELECT * FROM db + # SQL + # ), + # third_array_value, + # ] + # + # The "internal" trailing comma is after `456`. + # The "external" trailing comma is after `)`. + # + # To autocorrect, we remove the latter, and move the former up: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456), + # SELECT * FROM db + # SQL + # third_array_value, + # ] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#107 + def autocorrect(corrector, node); end + + # Closing parenthesis helpers. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#162 + def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#222 + def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#289 + def external_trailing_comma?(node); end + + # Returns nil if no trailing external comma. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#294 + def external_trailing_comma_offset_from_loc_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#137 + def extract_heredoc(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#133 + def extract_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#230 + def find_most_bottom_of_heredoc_end(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#179 + def fix_closing_parenthesis(node, corrector); end + + # External trailing comma helpers. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#266 + def fix_external_trailing_comma(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#149 + def heredoc_node?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#197 + def incorrect_parenthesis_removal_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#213 + def incorrect_parenthesis_removal_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#244 + def internal_trailing_comma?(node); end + + # Returns nil if no trailing internal comma. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#249 + def internal_trailing_comma_offset_from_last_arg(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#115 + def outermost_send_on_same_line(heredoc); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#188 + def remove_incorrect_closing_paren(node, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#277 + def remove_incorrect_external_trailing_comma(node, corrector); end + + # Internal trailing comma helpers. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#238 + def remove_internal_trailing_comma(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#207 + def safe_to_remove_line_containing_closing_paren?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#126 + def send_missing_closing_parens?(parent, child, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#153 + def single_line_send_with_heredoc_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#305 + def space?(pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#168 + def subsequent_closing_parentheses_in_same_line?(outermost_send); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#60 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#57 +RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the here document bodies. The bodies +# are indented one step. +# +# Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# this cop does not add any offenses for long here documents to +# avoid `Layout/LineLength`'s offenses. +# +# @example +# # bad +# <<-RUBY +# something +# RUBY +# +# # good +# <<~RUBY +# something +# RUBY +# +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#24 +class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36 + def on_heredoc(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120 + def adjust_minus(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 + def adjust_squiggly(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144 + def base_indent_level(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155 + def heredoc_body(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 + def heredoc_end(node); end + + # Returns '~', '-' or nil + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151 + def heredoc_indent_type(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 + def indented_body(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133 + def indented_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91 + def line_too_long?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 + def longest_line(lines); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69 + def message(heredoc_indent_type); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57 + def register_offense(node, heredoc_indent_type); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 + def type_message(indentation_width, current_indent_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107 + def unlimited_heredoc_length?; end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87 + def width_message(indentation_width); end +end + +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32 +RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34 +RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) + +# Checks for inconsistent indentation. +# +# The difference between `indented_internal_methods` and `normal` is +# that the `indented_internal_methods` style prescribes that in +# classes and modules the `protected` and `private` modifier keywords +# shall be indented the same as public methods and that protected and +# private members shall be indented one step more than the modifiers. +# Other than that, both styles mean that entities on the same logical +# depth shall have the same indentation. +# +# @example EnforcedStyle: normal (default) +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# @example EnforcedStyle: indented_internal_methods +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#121 +class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#128 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#132 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#138 + def autocorrect(corrector, node); end + + # Not all nodes define `bare_access_modifier?` (for example, + # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first + # to avoid a NoMethodError. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#145 + def bare_access_modifier?(node); end + + # Returns an integer representing the correct indentation, or nil to + # indicate that the correct indentation is that of the first child that + # is not an access modifier. + # + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#152 + def base_column_for_normal_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#172 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#187 + def check_indented_internal_methods_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#180 + def check_normal_style(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#126 +RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks that the indentation method is consistent. +# Either tabs only or spaces only are used for indentation. +# +# @example EnforcedStyle: spaces (default) +# # bad +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# @example EnforcedStyle: tabs +# # bad +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#34 +class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#58 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#82 + def autocorrect_lambda_for_spaces(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#77 + def autocorrect_lambda_for_tabs(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#66 + def find_offense(line, lineno); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#88 + def in_string_literal?(ranges, tabs_range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#109 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#92 + def string_literal_ranges(ast); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 +RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation that doesn't use the specified number +# of spaces. +# +# See also the IndentationConsistency cop which is the companion to this +# one. +# +# @example +# # bad +# class A +# def test +# puts 'hello' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# end +# end +# @example AllowedPatterns: ['^\s*module'] +# # bad +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# # good +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#45 +class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#57 + def access_modifier?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 + def on_case_match(case_match); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 + def on_if(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#61 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + def on_until(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + def on_while(node, base = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 + def access_modifier_indentation_style; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 + def check_if(node, body, else_clause, base_loc); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 + def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 + def check_members(base, members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 + def check_members_for_indented_internal_methods_style(members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 + def check_members_for_normal_style(base, members); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#341 + def check_rescue?(rescue_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#377 + def configured_indentation_width; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 + def each_member(members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 + def indentation_consistency_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 + def indentation_to_check?(base_loc, body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 + def indented_internal_methods_style?; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#381 + def leftmost_modifier_of(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 + def message(configured_indentation_width, indentation, name); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#360 + def offending_range(body_node, indentation); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 + def offense(body_node, indentation, style); end + + # Returns true if the given node is within another node that has + # already been marked for autocorrection by this cop. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 + def other_offense_in_same_range?(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 + def select_check_member(member); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 + def skip_check?(base_loc, body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 + def special_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#368 + def starts_with_access_modifier?(body_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#53 +RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation of the first non-blank non-comment +# line in a file. +# +# @example +# # bad +# class A +# def foo; end +# end +# +# # good +# class A +# def foo; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#20 +class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#26 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#36 + def first_token; end + + # @yield [range_between(space_range.begin_pos, token.begin_pos)] + # + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#40 + def space_before(token); end +end + +# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#24 +RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether comments have a leading space after the +# `#` denoting the start of the comment. The leading space is not +# required for some RDoc special syntax, like `#++`, `#--`, +# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, +# or rackup options. +# +# @example +# +# # bad +# #Some comment +# +# # good +# # Some comment +# @example AllowDoxygenCommentStyle: false (default) +# +# # bad +# +# #** +# # Some comment +# # Another line of comment +# #* +# @example AllowDoxygenCommentStyle: true +# +# # good +# +# #** +# # Some comment +# # Another line of comment +# #* +# @example AllowGemfileRubyComment: false (default) +# +# # bad +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# @example AllowGemfileRubyComment: true +# +# # good +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#52 +class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#58 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#95 + def allow_doxygen_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#103 + def allow_gemfile_ruby_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#79 + def allowed_on_first_line?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#99 + def doxygen_comment_style?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#107 + def gemfile?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 + def gemfile_ruby_comment?(comment); end + + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#75 + def hash_mark(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#91 + def rackup_config_file?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#87 + def rackup_options?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#111 + def ruby_comment_in_gemfile?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#83 + def shebang?(comment); end +end + +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#56 +RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary leading blank lines at the beginning +# of a file. +# +# @example +# +# # bad +# # (start of file) +# +# class Foo +# end +# +# # bad +# # (start of file) +# +# # a comment +# +# # good +# # (start of file) +# class Foo +# end +# +# # good +# # (start of file) +# # a comment +# +# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#30 +class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#35 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#33 +RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks that strings broken over multiple lines (by a backslash) contain +# trailing spaces instead of leading spaces (default) or leading spaces +# instead of trailing spaces. +# +# @example EnforcedStyle: trailing (default) +# # bad +# 'this text contains a lot of' \ +# ' spaces' +# +# # good +# 'this text contains a lot of ' \ +# 'spaces' +# +# # bad +# 'this text is too' \ +# ' long' +# +# # good +# 'this text is too ' \ +# 'long' +# @example EnforcedStyle: leading +# # bad +# 'this text contains a lot of ' \ +# 'spaces' +# +# # good +# 'this text contains a lot of' \ +# ' spaces' +# +# # bad +# 'this text is too ' \ +# 'long' +# +# # good +# 'this text is too' \ +# ' long' +# +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#43 +class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#54 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113 + def autocorrect(corrector, offense_range, insert_pos, spaces); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106 + def continuation?(line, line_num, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138 + def enforced_style_leading?; end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76 + def investigate(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84 + def investigate_leading_style(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95 + def investigate_trailing_style(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118 + def leading_offense_range(end_of_first_line, matches); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72 + def raw_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124 + def trailing_offense_range(end_of_first_line, matches); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#49 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#47 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#48 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#50 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# Checks that the backslash of a line continuation is separated from +# preceding text by exactly one space (default) or zero spaces. +# +# @example EnforcedStyle: space (default) +# # bad +# 'a'\ +# 'b' \ +# 'c' +# +# # good +# 'a' \ +# 'b' \ +# 'c' +# @example EnforcedStyle: no_space +# # bad +# 'a' \ +# 'b' \ +# 'c' +# +# # good +# 'a'\ +# 'b'\ +# 'c' +# +# source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#30 +class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#34 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#81 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#111 + def comment_ranges(comments); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#65 + def find_offensive_spacing(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#121 + def ignore_range?(backtick_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#91 + def ignored_literal_ranges(ast); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#125 + def ignored_ranges; end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#49 + def investigate(line, line_number); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#115 + def last_line(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#73 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#130 + def no_space_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#134 + def space_style?; end +end + +# Checks the indentation of the next line after a line that ends with a string +# literal and a backslash. +# +# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the +# first part. There are some exceptions, such as implicit return values, where the +# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. +# +# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step +# more than the first line. Lines 3 and forward shall be aligned with line 2. +# +# @example +# # bad +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# @example EnforcedStyle: aligned (default) +# # bad +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# @example EnforcedStyle: indented +# # bad +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#74 +class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#97 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#83 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#137 + def add_offense_and_correction(node, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#109 + def always_indented?(dstr_node); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#128 + def base_column(child); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#113 + def check_aligned(children, start_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#122 + def check_indented(children); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#103 + def strings_concatenated_with_backslash?(dstr_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#79 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#80 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#81 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) + +# Checks the length of lines in the source code. +# The maximum length is configurable. +# The tab size is configured in the `IndentationWidth` +# of the `Layout/IndentationStyle` cop. +# It also ignores a shebang line by default. +# +# This cop has some autocorrection capabilities. +# It can programmatically shorten certain long lines by +# inserting line breaks into expressions that can be safely +# split across lines. These include arrays, hashes, and +# method calls with argument lists. +# +# If autocorrection is enabled, the following Layout cops +# are recommended to further format the broken lines. +# (Many of these are enabled by default.) +# +# * ArgumentAlignment +# * ArrayAlignment +# * BlockAlignment +# * BlockDelimiters +# * BlockEndNewline +# * ClosingParenthesisIndentation +# * FirstArgumentIndentation +# * FirstArrayElementIndentation +# * FirstHashElementIndentation +# * FirstParameterIndentation +# * HashAlignment +# * IndentationWidth +# * MultilineArrayLineBreaks +# * MultilineBlockLayout +# * MultilineHashBraceLayout +# * MultilineHashKeyLineBreaks +# * MultilineMethodArgumentLineBreaks +# * MultilineMethodParameterLineBreaks +# * ParameterAlignment +# +# Together, these cops will pretty print hashes, arrays, +# method calls, etc. For example, let's say the max columns +# is 25: +# +# @example +# +# # bad +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# # good +# {foo: "0000000000", +# bar: "0000000000", baz: "0000000000"} +# +# # good (with recommended cops enabled) +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# source://rubocop//lib/rubocop/cop/layout/line_length.rb#63 +class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckLineBreakable + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#94 + def on_investigation_end; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_potential_breakable_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#219 + def allow_heredoc?; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#223 + def allowed_heredoc; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#183 + def allowed_line?(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#135 + def breakable_block_range(block_node); end + + # Returns the value of attribute breakable_range. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 + def breakable_range; end + + # Sets the attribute breakable_range + # + # @param value the value to set the attribute breakable_range to. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#102 + def breakable_range=(_arg0); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#143 + def breakable_range_after_semicolon(semicolon_token); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#156 + def breakable_range_by_line_index; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#250 + def check_directive_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#125 + def check_for_breakable_block(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#104 + def check_for_breakable_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#117 + def check_for_breakable_semicolons(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#171 + def check_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#267 + def check_uri_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#204 + def excess_range(uri_range, line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#227 + def extract_heredocs(ast); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#160 + def heredocs; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#164 + def highlight_start(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#246 + def line_in_heredoc?(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#237 + def line_in_permitted_heredoc?(line_number); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#215 + def max; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#193 + def register_offense(loc, line, line_index, length: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#189 + def shebang?(line, line_index); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_length.rb#72 +RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in an array literal is either +# on the same line as the last array element or on a new line. +# +# When using the `symmetrical` (default) style: +# +# If an array's opening brace is on the same line as the first element +# of the array, then the closing brace should be on the same line as +# the last element of the array. +# +# If an array's opening brace is on the line above the first element +# of the array, then the closing brace should be on the line below +# the last element of the array. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line array literal must be on the line +# after the last element of the array. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line array literal must be on the same +# line as the last element of the array. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# # good +# [ +# :a, +# :b +# ] +# @example EnforcedStyle: new_line +# # bad +# [ +# :a, +# :b ] +# +# # bad +# [ :a, +# :b ] +# +# # good +# [ :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b +# ] +# @example EnforcedStyle: same_line +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#109 + def on_array(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each item in a multi-line array +# starts on a separate line. +# +# @example +# +# # bad +# [ +# a, b, +# c +# ] +# +# # good +# [ +# a, +# b, +# c +# ] +# +# # good +# [ +# a, +# b, +# foo( +# bar +# ) +# ] +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [a, b, foo( +# bar +# )] +# @example AllowMultilineFinalElement: true +# +# # good +# [a, b, foo( +# bar +# )] +# +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#47 +class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#53 + def on_array(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#59 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#51 +RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the multiline assignments have a newline +# after the assignment operator. +# +# @example EnforcedStyle: new_line (default) +# # bad +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# begin +# compute +# rescue => e +# nil +# end +# @example EnforcedStyle: same_line +# # good +# foo = if expression +# 'bar' +# end +# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# i + 1 +# end +# @example SupportedTypes: ['block'] +# # good +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# 'bar' * i +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#60 +class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#72 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#81 + def check_by_enforced_style(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#90 + def check_new_line_offense(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#98 + def check_same_line_offense(node, rhs); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#111 + def supported_types; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#66 +RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#69 +RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# Checks whether the multiline do end blocks have a newline +# after the start of the block. Additionally, it checks whether the block +# arguments, if any, are on the same line as the start of the +# block. Putting block arguments on separate lines, because the whole +# line would otherwise be too long, is accepted. +# +# @example +# # bad +# blah do |i| foo(i) +# bar(i) +# end +# +# # bad +# blah do +# |i| foo(i) +# bar(i) +# end +# +# # good +# blah do |i| +# foo(i) +# bar(i) +# end +# +# # bad +# blah { |i| foo(i) +# bar(i) +# } +# +# # good +# blah { |i| +# foo(i) +# bar(i) +# } +# +# # good +# blah { | +# long_list, +# of_parameters, +# that_would_not, +# fit_on_one_line +# | +# foo(i) +# bar(i) +# } +# +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#51 +class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#98 + def add_offense_for_expression(node, expr, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#75 + def args_on_beginning_line?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#105 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#120 + def autocorrect_arguments(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#130 + def autocorrect_body(corrector, node, block_body); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#142 + def block_arg_string(node, args); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#90 + def characters_needed_for_space_and_pipes(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#154 + def include_trailing_comma?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#79 + def line_break_necessary_in_args?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#83 + def needed_length_for_args(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#56 +RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#55 +RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#57 +RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) + +# Checks that the closing brace in a hash literal is either +# on the same line as the last hash element, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a hash's opening brace is on the same line as the first element +# of the hash, then the closing brace should be on the same line as +# the last element of the hash. +# +# If a hash's opening brace is on the line above the first element +# of the hash, then the closing brace should be on the line below +# the last element of the hash. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line hash literal must be on the line +# after the last element of the hash. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line hash literal must be on the same +# line as the last element of the hash. +# +# @example EnforcedStyle: symmetrical (default) +# +# # bad +# { a: 1, +# b: 2 +# } +# # bad +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# # good +# { +# a: 1, +# b: 2 +# } +# @example EnforcedStyle: new_line +# # bad +# { +# a: 1, +# b: 2 } +# +# # bad +# { a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 +# } +# @example EnforcedStyle: same_line +# # bad +# { a: 1, +# b: 2 +# } +# +# # bad +# { +# a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#109 + def on_hash(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each key in a multi-line hash +# starts on a separate line. +# +# @example +# +# # bad +# { +# a: 1, b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: { +# c: 3, +# } +# } +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3, +# }} +# @example AllowMultilineFinalElement: true +# +# # good +# { a: 1, b: { +# c: 3, +# }} +# +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#46 +class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#52 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#68 + def ignore_last_element?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#64 + def starts_with_curly_brace?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#50 +RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Ensures that each argument in a multi-line method call +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. +# +# @example +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo(a, b, { +# foo: "bar", +# }) +# +# # good +# foo( +# a, +# b, +# c +# ) +# +# # good +# foo(a, b, c) +# @example AllowMultilineFinalElement: false (default) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# @example AllowMultilineFinalElement: true +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#56 +class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#62 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#81 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#60 +RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in a method call is either +# on the same line as the last method argument, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method call's opening brace is on the same line as the first +# argument of the call, then the closing brace should be on the same +# line as the last argument of the call. +# +# If an method call's opening brace is on the line above the first +# argument of the call, then the closing brace should be on the line +# below the last argument of the call. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method call must be on the line +# after the last argument of the call. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method call must be on the same +# line as the last argument of the call. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# # good +# foo( +# a, +# b +# ) +# @example EnforcedStyle: new_line +# # bad +# foo( +# a, +# b) +# +# # bad +# foo(a, +# b) +# +# # good +# foo(a, +# b +# ) +# +# # good +# foo( +# a, +# b +# ) +# @example EnforcedStyle: same_line +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#115 + def children(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#119 + def ignored_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#123 + def single_line_ignoring_receiver?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Checks the indentation of the method name part in method calls +# that span more than one line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# while myvariable +# .b +# # do something +# end +# +# # good +# while myvariable +# .b +# # do something +# end +# +# # good +# Thing.a +# .b +# .c +# @example EnforcedStyle: indented +# # good +# while myvariable +# .b +# +# # do something +# end +# @example EnforcedStyle: indented_relative_to_receiver +# # good +# while myvariable +# .a +# .b +# +# # do something +# end +# +# # good +# myvariable = Thing +# .a +# .b +# .c +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#49 +class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#55 + def validate_config; end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#136 + def align_with_base_message(rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#152 + def alignment_base(node, rhs, given_style); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#67 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#140 + def base_source; end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101 + def extra_indentation(given_style, parent); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#222 + def first_call_has_a_dot(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#213 + def get_dot_right_above(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113 + def message(node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#144 + def no_base_message(lhs, rhs, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#87 + def offending_range(node, lhs, rhs, given_style); end + + # @yield [operation_rhs.first_argument] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#232 + def operation_rhs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#242 + def operator_rhs?(node, receiver); end + + # a + # .b + # .c + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#193 + def receiver_alignment_base(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#131 + def relative_to_receiver_message(rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#71 + def relevant_node?(send_node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#75 + def right_hand_side(send_node); end + + # a.b + # .c + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#181 + def semantic_alignment_base(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#201 + def semantic_alignment_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#127 + def should_align_with_base?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#123 + def should_indent_relative_to_receiver?; end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#163 + def syntactic_alignment_base(lhs, rhs); end +end + +# Checks that the closing brace in a method definition is either +# on the same line as the last method parameter, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method definition's opening brace is on the same line as the +# first parameter of the definition, then the closing brace should be +# on the same line as the last parameter of the definition. +# +# If an method definition's opening brace is on the line above the first +# parameter of the definition, then the closing brace should be on the +# line below the last parameter of the definition. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method definition must be on the line +# after the last parameter of the definition. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method definition must be on the same +# line as the last parameter of the definition. +# +# @example EnforcedStyle: symmetrical (default) +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# @example EnforcedStyle: new_line +# # bad +# def foo( +# a, +# b) +# end +# +# # bad +# def foo(a, +# b) +# end +# +# # good +# def foo(a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# @example EnforcedStyle: same_line +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#103 +class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#115 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#118 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#111 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#107 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each parameter in a multi-line method definition +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. +# +# @example +# +# # bad +# def foo(a, b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b = { +# foo: "bar", +# } +# ) +# end +# +# # good +# def foo(a, b, c) +# end +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def foo(a, b = { +# foo: "bar", +# }) +# end +# @example AllowMultilineFinalElement: true +# +# # good +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#57 +class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#71 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#61 +RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the right hand side operand in binary operations that +# span more than one line. +# +# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` +# condition, an explicit `return` statement, etc. In other contexts, the second operand should +# be indented regardless of enforced style. +# +# @example EnforcedStyle: aligned (default) +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# @example EnforcedStyle: indented +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#43 +class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#49 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#53 + def on_or(node); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#57 + def validate_config; end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#68 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#78 + def check_and_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#110 + def message(node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#84 + def offending_range(node, lhs, rhs, given_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#72 + def relevant_node?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#121 + def right_hand_side(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#97 + def should_align?(node, rhs, given_style); end +end + +# Here we check if the parameters on a multi-line method call or +# definition are aligned. +# +# To set the alignment of the first argument, use the cop +# FirstParameterIndentation. +# +# @example EnforcedStyle: with_first_parameter (default) +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#71 +class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#81 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#90 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#102 + def base_column(node, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#98 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#94 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#113 + def target_method_lineno(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#75 +RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#78 +RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks whether certain expressions, e.g. method calls, that could fit +# completely on a single line, are broken up into multiple lines unnecessarily. +# +# @example any configuration +# # bad +# foo( +# a, +# b +# ) +# +# puts 'string that fits on ' \ +# 'a single line' +# +# things +# .select { |thing| thing.cond? } +# .join('-') +# +# # good +# foo(a, b) +# +# puts 'string that fits on a single line' +# +# things.select { |thing| thing.cond? }.join('-') +# @example InspectBlocks: false (default) +# # good +# foo(a) do |x| +# puts x +# end +# @example InspectBlocks: true +# # bad +# foo(a) do |x| +# puts x +# end +# +# # good +# foo(a) { |x| puts x } +# +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#45 +class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#72 + def check_assignment(node, _rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 + def comment_within?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#90 + def configured_to_not_be_inspected?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#114 + def convertible_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#68 + def end_with_percent_blank_string?(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#142 + def max_line_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#85 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 + def other_cop_takes_precedence?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#78 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 + def single_line_block_chain_enabled?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#107 + def suitable_as_single_line?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 + def to_single_line(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#128 + def too_long?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#49 +RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the rescue and ensure keywords are aligned +# properly. +# +# @example +# +# # bad +# begin +# something +# rescue +# puts 'error' +# end +# +# # good +# begin +# something +# rescue +# puts 'error' +# end +# +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#24 +class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#40 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#44 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#36 + def on_resbody(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#186 + def access_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#163 + def access_modifier_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#149 + def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#136 + def aligned_with_line_break_method?(ancestor_node, node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#195 + def alignment_location(alignment_node); end + + # We will use ancestor or wrapper with access modifier. + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#116 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#95 + def alignment_source(node, starting_loc); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#132 + def ancestor_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#155 + def assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#73 + def autocorrect(corrector, node, alignment_location); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#203 + def begin_end_alignment_style; end + + # Check alignment of node with rescue or ensure modifiers. + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#57 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#83 + def format_message(alignment_node, alignment_loc, kw_loc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#173 + def modifier?(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#179 + def whitespace_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#34 +RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#32 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#33 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#29 +RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks if method calls are chained onto single line blocks. It considers that a +# line break before the dot improves the readability of the code. +# +# @example +# # bad +# example.select { |item| item.cond? }.join('-') +# +# # good +# example.select { |item| item.cond? } +# .join('-') +# +# # good (not a concern for this cop) +# example.select do |item| +# item.cond? +# end.join('-') +# +# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#22 +class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#51 + 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#35 + def offending_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#57 + def selector_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 +RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for colon (:) not followed by some kind of space. +# N.B. this cop does not handle spaces after a ternary operator, which are +# instead handled by Layout/SpaceAroundOperators. +# +# @example +# # bad +# def f(a:, b:2); {a:3}; end +# +# # good +# def f(a:, b: 2); {a: 3}; end +# +# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#16 +class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#29 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#21 + def on_pair(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#43 + def followed_by_space?(colon); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#39 + def register_offense(colon); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#19 +RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) + +# Checks for comma (,) not followed by some kind of space. +# +# @example +# +# # bad +# [1,2] +# { foo:bar,} +# +# # good +# [1, 2] +# { foo:bar, } +# +# source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#17 +class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#26 + def kind(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 + def space_style_before_rcurly; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#32 + def before_semicolon?(token); end +end + +# Checks for space between a method name and a left parenthesis in defs. +# +# @example +# +# # bad +# def func (x) end +# def method= (y) end +# +# # good +# def func(x) end +# def method=(y) end +# +# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#17 +class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#21 +RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks for space after `!`. +# +# @example +# # bad +# ! something +# +# # good +# !something +# +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#14 +class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#21 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#33 + def whitespace_after_operator?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#18 +RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#19 +RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for semicolon (;) not followed by some kind of space. +# +# @example +# # bad +# x = 1;y = 2 +# +# # good +# x = 1; y = 2 +# +# source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#14 +class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#23 + def kind(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#18 + def space_style_before_rcurly; end +end + +# Checks the spacing inside and after block parameters pipes. Line breaks +# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and +# not by this cop. +# +# @example EnforcedStyleInsidePipes: no_space (default) +# # bad +# {}.each { | x, y |puts x } +# ->( x, y ) { puts x } +# +# # good +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# @example EnforcedStyleInsidePipes: space +# # bad +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# # good +# {}.each { | x, y | puts x } +# ->( x, y ) { puts x } +# +# source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#27 +class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#32 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#65 + def check_after_closing_pipe(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#125 + def check_arg(arg); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#103 + def check_closing_pipe_space(arguments, closing_pipe); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#121 + def check_each_arg(args); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#56 + def check_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#150 + def check_no_space(space_begin_pos, space_end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#73 + def check_no_space_style_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#92 + def check_opening_pipe_space(arguments, opening_pipe); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#136 + def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#85 + def check_space_style_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#113 + def last_end_pos_inside_pipes(arguments, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#44 + def pipes(arguments); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#48 + def pipes?(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#52 + def style_parameter_name; end +end + +# Checks that the equals signs in parameter default assignments +# have or don't have surrounding space depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# # good +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# @example EnforcedStyle: no_space +# # bad +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# # good +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#30 +class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#38 + def on_optarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#67 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#46 + def check_optarg(arg, equals, value); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#58 + def incorrect_style_detected(arg, value); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#83 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#79 + def no_surrounding_space?(arg, equals); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#75 + def space_on_both_sides?(arg, equals); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#36 +RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) + +# Checks the spacing around the keywords. +# +# @example +# +# # bad +# something 'test'do|x| +# end +# +# while(something) +# end +# +# something = 123if test +# +# # good +# something 'test' do |x| +# end +# +# while (something) +# end +# +# something = 123 if test +# +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#27 +class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#40 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#44 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#48 + def on_break(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#52 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#56 + def on_case_match(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#156 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#60 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#64 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#68 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#72 + def on_if_guard(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#76 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#80 + def on_kwbegin(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#85 + def on_match_pattern(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#92 + def on_match_pattern_p(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#96 + def on_next(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#100 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#104 + def on_postexe(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#108 + def on_preexe(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#112 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#116 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#120 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#124 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#128 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#136 + def on_unless_guard(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#140 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#144 + def on_when(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#148 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#152 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#132 + def on_zsuper(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#235 + def accept_left_parenthesis?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#239 + def accept_left_square_bracket?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#243 + def accept_namespace_operator?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#228 + def accepted_opening_delimiter?(range, char); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#162 + def check(node, locations, begin_keyword = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#177 + def check_begin(node, range, begin_keyword); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#183 + def check_end(node, range, begin_keyword); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#196 + def check_keyword(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#192 + def do?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#251 + def namespace_operator?(range, pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#255 + def preceded_by_operator?(node, _range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#247 + def safe_navigation_call?(range, pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#217 + def space_after_missing?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#210 + def space_before_missing?(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#36 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#37 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#38 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#33 +RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#31 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#30 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#35 +RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#34 +RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) + +# Checks method call operators to not have spaces around them. +# +# @example +# # bad +# foo. bar +# foo .bar +# foo . bar +# foo. bar .buzz +# foo +# . bar +# . buzz +# foo&. bar +# foo &.bar +# foo &. bar +# foo &. bar&. buzz +# RuboCop:: Cop +# RuboCop:: Cop:: Base +# :: RuboCop::Cop +# +# # good +# foo.bar +# foo.bar.buzz +# foo +# .bar +# .buzz +# foo&.bar +# foo&.bar&.buzz +# RuboCop::Cop +# RuboCop::Cop::Base +# ::RuboCop::Cop +# +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 +class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#53 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#87 + def check_space(begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#67 + def check_space_after_dot(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#81 + def check_space_after_double_colon(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#61 + def check_space_before_dot(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#43 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#41 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Checks that operators have space around them, except for ** which +# should or shouldn't have surrounding space depending on configuration. +# It allows vertical alignment consisting of one or more whitespace +# around operators. +# +# This cop has `AllowForAlignment` option. When `true`, allows most +# uses of extra spacing if the intent is to align with an operator on +# the previous or next line, not counting empty lines or comment lines. +# +# @example +# # bad +# total = 3*4 +# "apple"+"juice" +# my_number = 38/4 +# +# # good +# total = 3 * 4 +# "apple" + "juice" +# my_number = 38 / 4 +# @example AllowForAlignment: true (default) +# # good +# { +# 1 => 2, +# 11 => 3 +# } +# @example AllowForAlignment: false +# # bad +# { +# 1 => 2, +# 11 => 3 +# } +# @example EnforcedStyleForExponentOperator: no_space (default) +# # bad +# a ** b +# +# # good +# a**b +# @example EnforcedStyleForExponentOperator: space +# # bad +# a**b +# +# # good +# a ** b +# +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#53 +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#119 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_assignment(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + def on_binary(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#111 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#78 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#135 + def on_match_pattern(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#70 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#85 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#66 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#93 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + def on_special_asgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238 + def align_hash_cop_config; end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#181 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#165 + def check_operator(type, operator, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#191 + def enclose_operator_with_space(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#218 + def excess_leading_space?(type, operator, with_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#233 + def excess_trailing_space?(right_operand, with_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#250 + def force_equal_sign_alignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#242 + def hash_table_style?; end + + # @yield [msg] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#176 + def offense(type, operator, with_space, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#204 + def offense_message(type, operator, with_space, right_operand); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#161 + def operator_with_regular_syntax?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#155 + def regular_operator?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 + def should_not_have_surrounding_space?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#246 + def space_around_exponent_operator?; end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#62 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#60 +RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#59 +RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that block braces have or don't have a space before the opening +# brace depending on configuration. +# +# @example EnforcedStyle: space (default) +# # bad +# foo.map{ |a| +# a.bar.to_s +# } +# +# # good +# foo.map { |a| +# a.bar.to_s +# } +# @example EnforcedStyle: no_space +# # bad +# foo.map { |a| +# a.bar.to_s +# } +# +# # good +# foo.map{ |a| +# a.bar.to_s +# } +# @example EnforcedStyleForEmptyBraces: space (default) +# # bad +# 7.times{} +# +# # good +# 7.times {} +# @example EnforcedStyleForEmptyBraces: no_space +# # bad +# 7.times {} +# +# # good +# 7.times{} +# +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#44 +class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#144 + def block_delimiters_style; end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#83 + def check_empty(left_brace, space_plus_brace, used_style); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#100 + 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#140 + def conflict_with_block_delimiters?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#148 + def empty_braces?(loc); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#115 + def space_detected(left_brace, space_plus_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#108 + def space_missing(left_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#131 + def style_for_empty_braces; end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#52 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#50 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#49 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) + +# Checks for space between the name of a receiver and a left +# brackets. +# +# @example +# +# # bad +# collection [index_or_key] +# +# # good +# collection[index_or_key] +# +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#17 +class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#48 + def dot_before_brackets?(node, receiver_end_pos, selector_begin_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#35 + def offense_range(node, begin_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#54 + def offense_range_for_assignment(node, begin_pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#67 + def reference_variable_with_brackets?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#63 + def register_offense(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#21 +RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#22 +RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for comma (,) preceded by space. +# +# @example +# # bad +# [1 , 2 , 3] +# a(1 , 2) +# each { |a , b| } +# +# # good +# [1, 2, 3] +# a(1, 2) +# each { |a, b| } +# +# source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#19 +class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#23 + def kind(token); end +end + +# Checks for missing space between a token and a comment on the +# same line. +# +# @example +# # bad +# 1 + 1# this operation does ... +# +# # good +# 1 + 1 # this operation does ... +# +# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#15 +class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#20 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#18 +RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that exactly one space is used between a method name and the +# first argument for method calls without parentheses. +# +# Alternatively, extra spaces can be added to align the argument with +# something on a preceding or following line, if the AllowForAlignment +# config parameter is true. +# +# @example +# # bad +# something x +# something y, z +# something'hello' +# +# # good +# something x +# something y, z +# something 'hello' +# +# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#24 +class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#55 + def expect_params_after_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#64 + def no_space_between_method_name_and_first_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#51 + def regular_method_call_with_arguments?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#29 +RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) + +# Checks for semicolon (;) preceded by space. +# +# @example +# # bad +# x = 1 ; y = 2 +# +# # good +# x = 1; y = 2 +# +# source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#14 +class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#18 + def kind(token); end +end + +# Checks for spaces between `->` and opening parameter +# parenthesis (`(`) in lambda literals. +# +# @example EnforcedStyle: require_no_space (default) +# # bad +# a = -> (x, y) { x + y } +# +# # good +# a = ->(x, y) { x + y } +# @example EnforcedStyle: require_space +# # bad +# a = ->(x, y) { x + y } +# +# # good +# a = -> (x, y) { x + y } +# +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#22 +class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#30 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#50 + def arrow_lambda_with_args?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#72 + def lambda_arguments(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#65 + def range_of_offense(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#58 + def space_after_arrow(lambda_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#54 + def space_after_arrow?(lambda_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#28 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#27 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) + +# Checks that brackets used for array literals have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that array literals have +# # no surrounding space. +# +# # bad +# array = [ a, b, c, d ] +# +# # good +# array = [a, b, c, d] +# @example EnforcedStyle: space +# # The `space` style enforces that array literals have +# # surrounding space. +# +# # bad +# array = [a, b, c, d] +# +# # good +# array = [ a, b, c, d ] +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # array brackets, with the exception that successive left +# # or right brackets are collapsed together in nested arrays. +# +# # bad +# array = [ a, [ b, c ] ] +# array = [ +# [ a ], +# [ b, c ] +# ] +# +# # good +# array = [ a, [ b, c ]] +# array = [[ a ], +# [ b, c ]] +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets do not contain spaces. +# +# # bad +# foo = [ ] +# bar = [ ] +# +# # good +# foo = [] +# bar = [] +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets contain exactly one space. +# +# # bad +# foo = [] +# bar = [ ] +# +# # good +# foo = [ ] +# bar = [ ] +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#70 +class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#78 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#109 + def array_brackets(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#95 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#217 + def compact(corrector, bracket, side); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#203 + def compact_corrections(corrector, node, left, right); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#195 + def compact_offense(node, token, side: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#157 + def compact_offenses(node, left, right, start_ok, end_ok); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#118 + def empty_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#126 + def end_has_own_line?(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#133 + def index_for(node, token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#141 + def issue_offenses(node, left, right, start_ok, end_ok); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#137 + def line_and_column_for(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#178 + def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#189 + def next_to_bracket?(token, side: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#153 + def next_to_comment?(node, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#122 + def next_to_newline?(node, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#170 + def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#76 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#75 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside array percent literals +# (i.e. %i/%w). +# +# Note that blank percent literals (e.g. `%i( )`) are checked by +# `Layout/SpaceInsidePercentLiteralDelimiters`. +# +# @example +# +# # bad +# %w(foo bar baz) +# # good +# %i(foo bar baz) +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#18 +class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#26 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#30 + def on_percent_literal(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#40 + def each_unnecessary_space_match(node, &blk); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#23 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#24 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that block braces have or don't have surrounding space inside +# them on configuration. For blocks taking parameters, it checks that the +# left brace has or doesn't have trailing space depending on +# configuration. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that block braces have +# # surrounding space. +# +# # bad +# some_array.each {puts e} +# +# # good +# some_array.each { puts e } +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that block braces don't +# # have surrounding space. +# +# # bad +# some_array.each { puts e } +# +# # good +# some_array.each {puts e} +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # block braces don't have a space in between when empty. +# +# # bad +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# # good +# some_array.each {} +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # block braces have at least a space in between when empty. +# +# # bad +# some_array.each {} +# +# # good +# some_array.each { } +# some_array.each { } +# some_array.each { } +# @example SpaceBeforeBlockParameters: true (default) +# # The SpaceBeforeBlockParameters style set to `true` enforces that +# # there is a space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each {|n| n * 2 } +# +# # good +# [1, 2, 3].each { |n| n * 2 } +# @example SpaceBeforeBlockParameters: false +# # The SpaceBeforeBlockParameters style set to `false` enforces that +# # there is no space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each { |n| n * 2 } +# +# # good +# [1, 2, 3].each {|n| n * 2 } +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#79 +class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#122 + def adjacent_braces(left_brace, right_brace); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#161 + def aligned_braces?(inner, right_brace, column); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#130 + def braces_with_contents_inside(node, inner); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#105 + def check_inside(node, left_brace, right_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#137 + def check_left_brace(inner, left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#145 + def check_right_brace(node, inner, left_brace, right_brace, single_line); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#165 + def inner_last_space_count(inner); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#157 + def multiline_block?(left_brace, right_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#222 + def no_space(begin_pos, end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#169 + def no_space_inside_left_brace(left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#238 + def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#201 + def pipe?(args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#230 + def space(begin_pos, end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#186 + def space_inside_left_brace(left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205 + def space_inside_right_brace(inner, right_brace, column); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#253 + def style_for_empty_braces; end +end + +# Checks that braces used for hash literals have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: space (default) +# # The `space` style enforces that hash literals have +# # surrounding space. +# +# # bad +# h = {a: 1, b: 2} +# +# # good +# h = { a: 1, b: 2 } +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that hash literals have +# # no surrounding space. +# +# # bad +# h = { a: 1, b: 2 } +# +# # good +# h = {a: 1, b: 2} +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # hash braces, with the exception that successive left +# # braces or right braces are collapsed together in nested hashes. +# +# # bad +# h = { a: { b: 2 } } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# # good +# h = { a: { b: 2 }} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces do not contain spaces. +# +# # bad +# foo = { } +# bar = { } +# baz = { +# } +# +# # good +# foo = {} +# bar = {} +# baz = {} +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces contain space. +# +# # bad +# foo = {} +# +# # good +# foo = { } +# foo = { } +# foo = { +# } +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#70 +class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#78 + def on_hash(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#137 + def ambiguous_or_unexpected_style_detected(style, is_match); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#129 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#89 + def check(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#184 + def check_whitespace_only_hash(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#202 + def enforce_no_space_style_for_empty_braces?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#104 + def expect_space?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#117 + def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#150 + def message(brace, is_empty_braces, expect_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#145 + def offense?(token1, expect_space); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#196 + def range_inside_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#176 + def range_of_space_to_the_left(range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#168 + def range_of_space_to_the_right(range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#160 + def space_range(token_range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#76 +RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside ordinary round parentheses. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that parentheses do not have spaces. +# +# # bad +# f( 3) +# g = (a + 3 ) +# f( ) +# +# # good +# f(3) +# g = (a + 3) +# f() +# @example EnforcedStyle: space +# # The `space` style enforces that parentheses have a space at the +# # beginning and end. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# @example EnforcedStyle: compact +# # The `compact` style enforces that parentheses have a space at the +# # beginning with the exception that successive parentheses are allowed. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# g( f( x ) ) +# g( f( x( 3 ) ), 5 ) +# g( ( ( 3 + 5 ) * f) ** x, 5 ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# g( f( x )) +# g( f( x( 3 )), 5 ) +# g((( 3 + 5 ) * f ) ** x, 5 ) +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#57 +class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#66 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#161 + def can_be_ignored?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#99 + def correct_extraneous_space(tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#115 + def correct_extraneous_space_between_consecutive_parens(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#124 + def correct_extraneous_space_in_empty_parens(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#135 + def correct_missing_space(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#153 + def left_parens?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#149 + def parens?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#88 + def process_with_compact_style(tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#81 + def process_with_space_style(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#157 + def right_parens?(token1, token2); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#63 +RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#64 +RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside the delimiters of +# %i/%w/%x literals. +# +# @example +# +# # bad +# %i( foo bar baz ) +# +# # good +# %i(foo bar baz) +# +# # bad +# %w( foo bar baz ) +# +# # good +# %w(foo bar baz) +# +# # bad +# %x( ls -l ) +# +# # good +# %x(ls -l) +# +# # bad +# %w( ) +# %w( +# ) +# +# # good +# %w() +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#36 +class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#45 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#53 + def on_percent_literal(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#49 + def on_xstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#60 + def add_offenses_for_blank_spaces(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#69 + def add_offenses_for_unnecessary_spaces(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#85 + def body_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#79 + def regex_matches(node, &blk); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#42 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#43 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#41 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside range literals. +# +# @example +# # bad +# 1 .. 3 +# +# # good +# 1..3 +# +# # bad +# 'a' .. 'z' +# +# # good +# 'a'..'z' +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#20 +class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#29 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#25 + def on_irange(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#35 + def check(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#23 +RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks that reference brackets have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that reference brackets have +# # no surrounding space. +# +# # bad +# hash[ :key ] +# array[ index ] +# +# # good +# hash[:key] +# array[index] +# @example EnforcedStyle: space +# # The `space` style enforces that reference brackets have +# # surrounding space. +# +# # bad +# hash[:key] +# array[index] +# +# # good +# hash[ :key ] +# array[ index ] +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets do not contain spaces. +# +# # bad +# foo[ ] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[] +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets contain exactly one space. +# +# # bad +# foo[] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[ ] +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#60 +class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#70 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#92 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#121 + def closing_bracket(tokens, opening_bracket); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#137 + def empty_config; end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#110 + def left_ref_bracket(node, tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#132 + def previous_token(current_token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#104 + def reference_brackets(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#66 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#65 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#68 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for whitespace within string interpolations. +# +# @example EnforcedStyle: no_space (default) +# # bad +# var = "This is the #{ space } example" +# +# # good +# var = "This is the #{no_space} example" +# @example EnforcedStyle: space +# # bad +# var = "This is the #{no_space} example" +# +# # good +# var = "This is the #{ space } example" +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#21 +class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#31 + def on_interpolation(begin_node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#47 + def autocorrect(corrector, begin_node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#57 + def delimiters(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::NO_SPACE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::SPACE_MSG = T.let(T.unsafe(nil), String) + +# Looks for trailing blank lines and a final newline in the +# source code. +# +# @example EnforcedStyle: final_newline (default) +# # `final_newline` looks for one newline at the end of files. +# +# # bad +# class Foo; end +# +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# # EOF +# @example EnforcedStyle: final_blank_line +# # `final_blank_line` looks for one blank line followed by a new line +# # at the end of files. +# +# # bad +# class Foo; end +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# +# # EOF +# +# source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#40 +class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#45 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 + def ends_in_end?(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 + def message(wanted_blank_lines, blank_lines); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 + def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end +end + +# Looks for trailing whitespace in the source code. +# +# @example +# # The line in this example contains spaces after the 0. +# # bad +# x = 0 +# +# # The line in this example ends directly after the 0. +# # good +# x = 0 +# @example AllowInHeredoc: false (default) +# # The line in this example contains spaces after the 0. +# # bad +# code = <<~RUBY +# x = 0 +# RUBY +# +# # ok +# code = <<~RUBY +# x = 0 #{} +# RUBY +# +# # good +# trailing_whitespace = ' ' +# code = <<~RUBY +# x = 0#{trailing_whitespace} +# RUBY +# @example AllowInHeredoc: true +# # The line in this example contains spaces after the 0. +# # good +# code = <<~RUBY +# x = 0 +# RUBY +# +# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#42 +class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#57 + def on_heredoc(_node); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#49 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#112 + def extract_heredocs(ast); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#103 + def find_heredoc(line_number); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#108 + def heredocs; end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#125 + def offense_range(lineno, line); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#61 + def process_line(line, lineno); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#75 + def process_line_in_heredoc(corrector, range, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#99 + def skip_heredoc?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#95 + def static?(heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#86 + def whitespace_is_indentation?(range, level); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#90 + def whitespace_only?(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#47 +RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#5 +module RuboCop::Cop::Legacy; end + +# Legacy support for Corrector#corrections +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# +# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#8 +class RuboCop::Cop::Legacy::CorrectionsProxy + # @return [CorrectionsProxy] a new instance of CorrectionsProxy + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#9 + def initialize(corrector); end + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#13 + def <<(callable); end + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#21 + def concat(corrections); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#17 + def empty?; end + + protected + + # Returns the value of attribute corrector. + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#31 + def corrector; end + + private + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#35 + def suppress_clobbering; end +end + +# This class handles autocorrection for code that needs to be moved +# to new lines. +# +# source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#7 +class RuboCop::Cop::LineBreakCorrector + extend ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::TrailingBody + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#27 + def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#15 + def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#35 + def move_comment(eol_comment:, node:, corrector:); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#13 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#45 + def remove_semicolon(node, corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#51 + def semicolon(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#58 + def trailing_class_definition?(token, body); end + end +end + +# Help methods for determining if a line is too long. +# +# source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#6 +module RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Alignment + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#24 + def allow_uri?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#28 + def allowed_uri_position?(line, uri_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#15 + def directive_on_source_line?(line_index); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#72 + def extend_uri_end_position(line, end_position); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#36 + def find_excessive_uri_range(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#11 + def ignore_cop_directives?; end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#59 + def indentation_difference(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 + def line_length(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#105 + def line_length_without_directive(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 + def match_uris(string); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#88 + def tab_indentation_width; end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#93 + def uri_regexp; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#98 + def valid_uri?(uri_ish_string); end +end + +# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#5 +module RuboCop::Cop::Lint; end + +# Checks for mistyped shorthand assignments. +# +# @example +# # bad +# x =- y +# x =+ y +# x =* y +# x =! y +# +# # good +# x -= y # or x = -y +# x += y # or x = +y +# x *= y # or x = *y +# x != y # or x = !y +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#21 +class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_lvasgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#44 + def rhs(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#28 +RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#24 +RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#26 +RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous block association with method +# when param passed without parentheses. +# +# This cop can customize allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# @example +# +# # bad +# some_method a { |val| puts val } +# @example +# +# # good +# # With parentheses, there's no ambiguity. +# some_method(a { |val| puts val }) +# # or (different meaning) +# some_method(a) { |val| puts val } +# +# # good +# # Operator methods require no disambiguation +# foo == bar { |b| b.baz } +# +# # good +# # Lambda arguments require no disambiguation +# foo = ->(bar) { bar.baz } +# @example AllowedMethods: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# @example AllowedMethods: [change] +# +# # good +# expect { do_something }.to change { object.attribute } +# @example AllowedPatterns: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# @example AllowedPatterns: ['change'] +# +# # good +# expect { do_something }.to change { object.attribute } +# expect { do_something }.to not_change { object.attribute } +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#54 +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#64 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85 + def allowed_method_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 + def ambiguous_block_association?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91 + def message(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97 + def wrap_in_parentheses(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60 +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 +# @example +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(*some_array) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#23 +class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#45 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#64 + def find_offense_node_by(diagnostic); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#82 + def message(diagnostic); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#92 + def offense_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#88 + def offense_position?(node, diagnostic); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#101 + def unary_operator?(node, diagnostic); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#41 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#26 +RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#36 +RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) + +# Looks for expressions containing multiple binary operators +# where precedence is ambiguous due to lack of parentheses. For example, +# in `1 + 2 * 3`, the multiplication will happen before the addition, but +# lexically it appears that the addition will happen first. +# +# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison +# operators (ie. `a =~ b`) because those are not ambiguous. +# +# NOTE: Ranges are handled by `Lint/AmbiguousRange`. +# +# @example +# # bad +# a + b * c +# a || b && c +# a ** b + c +# +# # good (different precedence) +# a + (b * c) +# a || (b && c) +# (a ** b) + c +# +# # good (same precedence) +# a + b + c +# a * b / c % d +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#30 +class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#54 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#65 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#105 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#89 + def greater_precedence?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#85 + def operator?(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#97 + def operator_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#79 + def precedence(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#45 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) + +# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#34 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#44 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous ranges. +# +# Ranges have quite low precedence, which leads to unexpected behavior when +# using a range with other operators. This cop avoids that by making ranges +# explicit by requiring parenthesis around complex range boundaries (anything +# that is not a literal: numerics, strings, symbols, etc.). +# +# This cop can be configured with `RequireParenthesesForMethodChains` in order to +# specify whether method chains (including `self.foo`) should be wrapped in parens +# by this cop. +# +# NOTE: Regardless of this configuration, if a method receiver is a basic literal +# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. +# +# @example +# # bad +# x || 1..2 +# (x || 1..2) +# 1..2.to_a +# +# # good, unambiguous +# 1..2 +# 'a'..'z' +# :bar..:baz +# MyClass::MIN..MyClass::MAX +# @min..@max +# a..b +# -a..b +# +# # good, ambiguity removed +# x || (1..2) +# (x || 1)..2 +# (x || 1)..(y || 2) +# (1..2).to_a +# @example RequireParenthesesForMethodChains: false (default) +# # good +# a.foo..b.bar +# (a.foo)..(b.bar) +# @example RequireParenthesesForMethodChains: true +# # bad +# a.foo..b.bar +# +# # good +# (a.foo)..(b.bar) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#59 +class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + def on_irange(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#82 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#89 + def acceptable_call?(node); end + + # @yield [range.begin] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#77 + def each_boundary(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#99 + def require_parentheses_for_method_chain?; end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#62 +RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous regexp literals in the first argument of +# a method invocation without parentheses. +# +# @example +# +# # bad +# +# # This is interpreted as a method invocation with a regexp literal, +# # but it could possibly be `/` method invocations. +# # (i.e. `do_something./(pattern)./(i)`) +# do_something /pattern/i +# @example +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(/pattern/i) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#24 +class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#31 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#56 + def find_offense_node(node, regexp_receiver); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#49 + def find_offense_node_by(diagnostic); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#67 + def first_argument_is_regexp?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#71 + def method_chain_to_regexp_receiver?(node, regexp_receiver); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#27 +RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for assignments in the conditions of +# if/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example +# # bad +# if some_var = true +# do_something +# end +# +# # good +# if some_var == true +# do_something +# end +# @example AllowSafeAssignment: true (default) +# # good +# if (some_var = true) +# do_something +# end +# @example AllowSafeAssignment: false +# # bad +# if (some_var = true) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#41 +class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#82 + def allowed_construct?(asgn_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#86 + def conditional_assignment?(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#74 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#90 + def skip_children?(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#96 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#53 +RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#50 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#46 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. +# This cop identifies places where `BigDecimal.new()` +# can be replaced by `BigDecimal()`. +# +# @example +# # bad +# BigDecimal.new(123.456, 3) +# +# # good +# BigDecimal(123.456, 3) +# +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#17 +class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#25 + def big_decimal_new(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#30 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 +RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#22 +RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where binary operator has identical operands. +# +# It covers arithmetic operators: `-`, `/`, `%`; +# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, `<=`; +# bitwise operators: `|`, `^`, `&`; +# boolean operators: `&&`, `||` +# and "spaceship" operator - `<=>`. +# +# Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. +# Although these can be rewritten in a different way, it should not be necessary to +# do so. This does not include operations such as `-` or `/` where the result will +# always be the same (`x - x` will always be 0; `x / x` will always be 1), and +# thus are legitimate offenses. +# +# @example +# # bad +# x / x +# x.top >= x.top +# +# if a.x != 0 && a.x != 0 +# do_something +# end +# +# def child? +# left_child || left_child +# end +# +# # good +# x + x +# 1 << 1 +# +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 +class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#61 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#52 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::ALLOWED_MATH_OPERATORS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#49 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) + +# Checks for `:true` and `:false` symbols. +# In most cases it would be a typo. +# +# @example +# +# # bad +# :true +# +# # good +# true +# @example +# +# # bad +# :false +# +# # good +# false +# +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#29 +class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 + def boolean_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#37 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#50 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#32 +RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) + +# Checks for circular argument references in optional keyword +# arguments and optional ordinal arguments. +# +# This cop mirrors a warning produced by MRI since 2.2. +# +# @example +# +# # bad +# +# def bake(pie: pie) +# pie.heat_up +# end +# @example +# +# # good +# +# def bake(pie:) +# pie.refrigerate +# end +# @example +# +# # good +# +# def bake(pie: self.pie) +# pie.feed_to(user) +# end +# @example +# +# # bad +# +# def cook(dry_ingredients = dry_ingredients) +# dry_ingredients.reduce(&:+) +# end +# @example +# +# # good +# +# def cook(dry_ingredients = self.dry_ingredients) +# dry_ingredients.combine +# end +# +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 +class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#53 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#57 + def on_optarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63 + def check_for_circular_argument_references(arg_name, arg_value); end +end + +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#51 +RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) + +# Do not define constants within a block, since the block's scope does not +# isolate or namespace the constant in any way. +# +# If you are trying to define that constant once, define it outside of +# the block instead, or use a variable or method if defining the constant +# in the outer scope would be problematic. +# +# For meta-programming, use `const_set`. +# +# @example +# # bad +# task :lint do +# FILES_TO_LINT = Dir['lib/*.rb'] +# end +# +# # bad +# describe 'making a request' do +# class TestRequest; end +# end +# +# # bad +# module M +# extend ActiveSupport::Concern +# included do +# LIST = [] +# end +# end +# +# # good +# task :lint do +# files_to_lint = Dir['lib/*.rb'] +# end +# +# # good +# describe 'making a request' do +# let(:test_request) { Class.new } +# # see also `stub_const` for RSpec +# end +# +# # good +# module M +# extend ActiveSupport::Concern +# included do +# const_set(:LIST, []) +# end +# end +# @example AllowedMethods: ['enums'] (default) +# # good +# +# # `enums` for Typed Enums via `T::Enum` in Sorbet. +# # https://sorbet.org/docs/tenum +# class TestEnum < T::Enum +# enums do +# Foo = new("foo") +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#64 +class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#70 + def constant_assigned_in_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#75 + def module_defined_in_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#79 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#94 + def method_name(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#67 +RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for overwriting an exception with an exception result by use `rescue =>`. +# +# You intended to write as `rescue StandardError`. +# However, you have written `rescue => StandardError`. +# In that case, the result of `rescue` will overwrite `StandardError`. +# +# @example +# +# # bad +# begin +# something +# rescue => StandardError +# end +# +# # good +# begin +# something +# rescue StandardError +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#26 +class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#41 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#33 + def overwritten_constant(param0 = T.unsafe(nil)); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#37 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#30 +RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) + +# Check that certain constants are fully qualified. +# +# This is not enabled by default because it would mark a lot of offenses +# unnecessarily. +# +# Generally, gems should fully qualify all constants to avoid conflicts with +# the code that uses the gem. Enable this cop without using `Only`/`Ignore` +# +# Large projects will over time end up with one or two constant names that +# are problematic because of a conflict with a library or just internally +# using the same name a namespace and a class. To avoid too many unnecessary +# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]` +# +# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# this cop which is disabled by default. +# +# @example +# # By default checks every constant +# +# # bad +# User +# +# # bad +# User::Login +# +# # good +# ::User +# +# # good +# ::User::Login +# @example Only: ['Login'] +# # Restrict this cop to only being concerned about certain constants +# +# # bad +# Login +# +# # good +# ::Login +# +# # good +# User::Login +# @example Ignore: ['Login'] +# # Restrict this cop not being concerned about certain constants +# +# # bad +# User +# +# # good +# ::User::Login +# +# # good +# Login +# +# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#62 +class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#70 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#66 + def unqualified_const?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#83 + def allowed_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#78 + def const_name?(name); end + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#87 + def ignored_names; end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#63 +RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) + +# Checks for debug calls (such as `debugger` or `binding.pry`) that should +# not be kept for production code. +# +# The cop can be configured using `DebuggerMethods`. By default, a number of gems +# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, +# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. +# +# Specific default groups can be disabled if necessary: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# WebConsole: ~ +# ---- +# +# You can also add your own methods by adding a new category: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# MyDebugger: +# MyDebugger.debug_this +# ---- +# +# @example +# +# # bad (ok during development) +# +# # using pry +# def some_method +# binding.pry +# do_something +# end +# @example +# +# # bad (ok during development) +# +# # using byebug +# def some_method +# byebug +# do_something +# end +# @example +# +# # good +# +# def some_method +# do_something +# end +# @example DebuggerMethods: [my_debugger] +# +# # bad (ok during development) +# +# def some_method +# my_debugger +# end +# +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 +class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95 + def assumed_usage_context?(node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#102 + def chained_method_name(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#89 + def debugger_method?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 + def debugger_methods; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#68 +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 +# +# # Example for OpenSSL::Cipher instantiation. +# +# # bad +# OpenSSL::Cipher::AES.new(128, :GCM) +# +# # good +# OpenSSL::Cipher.new('aes-128-gcm') +# @example +# +# # Example for OpenSSL::Digest instantiation. +# +# # bad +# OpenSSL::Digest::SHA256.new +# +# # good +# OpenSSL::Digest.new('SHA256') +# @example +# +# # Example for ::Digest inherited class methods. +# +# # bad +# OpenSSL::Digest::SHA256.digest('foo') +# +# # good +# OpenSSL::Digest.digest('SHA256', 'foo') +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 +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#49 + def algorithm_const(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#59 + def digest_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#63 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 + def algorithm_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#75 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#139 + def build_cipher_arguments(node, algorithm_name, no_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#102 + def correction_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#87 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#106 + def openssl_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#128 + def replacement_args(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#120 + def sanitize_arguments(arguments); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#44 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#46 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) + +# Checks constructors for disjunctive assignments (`||=`) that should +# be plain assignments. +# +# So far, this cop is only concerned with disjunctive assignment of +# instance variables. +# +# In ruby, an instance variable is nil until a value is assigned, so the +# disjunction is unnecessary. A plain assignment has the same effect. +# +# @example +# # bad +# def initialize +# @x ||= 1 +# end +# +# # good +# def initialize +# @x = 1 +# end +# +# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#48 +class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#53 + def on_def(node); end + + private + + # @param node [DefNode] a constructor definition + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#60 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#66 + def check_body(body); end + + # @param lines [Array] the logical lines of the constructor + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#78 + def check_body_lines(lines); end + + # Add an offense if the LHS of the given disjunctive assignment is + # an instance variable. + # + # For now, we only care about assignments to instance variables. + # + # @param node [Node] a disjunctive assignment + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#99 + def check_disjunctive_assignment(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#51 +RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated bodies +# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. +# +# With `IgnoreLiteralBranches: true`, branches are not registered +# as offenses if they return a basic literal value (string, symbol, +# integer, float, rational, complex, `true`, `false`, or `nil`), or +# return an array, hash, regexp or range that only contains one of +# the above basic literal values. +# +# With `IgnoreConstantBranches: true`, branches are not registered +# as offenses if they return a constant value. +# +# @example +# # bad +# if foo +# do_foo +# do_something_else +# elsif bar +# do_foo +# do_something_else +# end +# +# # good +# if foo || bar +# do_foo +# do_something_else +# end +# +# # bad +# case x +# when foo +# do_foo +# when bar +# do_foo +# else +# do_something_else +# end +# +# # good +# case x +# when foo, bar +# do_foo +# else +# do_something_else +# end +# +# # bad +# begin +# do_something +# rescue FooError +# handle_error +# rescue BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, BarError +# handle_error +# end +# @example IgnoreLiteralBranches: true +# # good +# case size +# when "small" then 100 +# when "medium" then 250 +# when "large" then 1000 +# else 250 +# end +# @example IgnoreConstantBranches: true +# # good +# case size +# when "small" then SMALL_SIZE +# when "medium" then MEDIUM_SIZE +# when "large" then LARGE_SIZE +# else MEDIUM_SIZE +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#86 +class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_branching_statement(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#89 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#117 + def branches(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#121 + def consider_branch?(branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#147 + def const_branch?(branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#132 + def ignore_constant_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#128 + def ignore_literal_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#136 + def literal_branch?(branch); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#103 + def offense_range(duplicate_branch); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#87 +RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions +# used in case 'when' expressions. +# +# @example +# +# # bad +# +# case x +# when 'first' +# do_something +# when 'first' +# do_something_else +# end +# @example +# +# # good +# +# case x +# when 'first' +# do_something +# when 'second' +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#30 +class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#33 + def on_case(case_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#31 +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' } +# @example +# +# # good +# +# hash = { food: 'apple', other_food: 'orange' } +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 +class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Duplication + + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 + def on_hash(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 +RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated magic comments. +# +# @example +# +# # bad +# +# # encoding: ascii +# # encoding: ascii +# +# # good +# +# # encoding: ascii +# +# # bad +# +# # frozen_string_literal: true +# # frozen_string_literal: true +# +# # good +# +# # frozen_string_literal: true +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#28 +class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#35 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#51 + def magic_comment_lines; end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#65 + def register_offense(range); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#33 +RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated patterns used in `in` keywords. +# +# @example +# +# # bad +# case x +# in 'first' +# do_something +# in 'first' +# do_something_else +# end +# +# # good +# case x +# in 'first' +# do_something +# in 'second' +# do_something_else +# end +# +# # bad - repeated alternate patterns with the same conditions don't depend on the order +# case x +# in foo | bar +# first_method +# in bar | foo +# second_method +# end +# +# # good +# case x +# in foo | bar +# first_method +# in bar | baz +# second_method +# end +# +# # bad - repeated hash patterns with the same conditions don't depend on the order +# case x +# in foo: a, bar: b +# first_method +# in bar: b, foo: a +# second_method +# end +# +# # good +# case x +# in foo: a, bar: b +# first_method +# in bar: b, baz: c +# second_method +# end +# +# # bad - repeated array patterns with elements in the same order +# case x +# in [foo, bar] +# first_method +# in [foo, bar] +# second_method +# end +# +# # good +# case x +# in [foo, bar] +# first_method +# in [bar, foo] +# second_method +# end +# +# # bad - repeated the same patterns and guard conditions +# case x +# in foo if bar +# first_method +# in foo if bar +# second_method +# end +# +# # good +# case x +# in foo if bar +# first_method +# in foo if baz +# second_method +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#90 +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#97 + def on_case_match(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#108 + def pattern_identity(pattern); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#93 +RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated instance (or singleton) method +# definitions. +# +# @example +# +# # bad +# +# def foo +# 1 +# end +# +# def foo +# 2 +# end +# @example +# +# # bad +# +# def foo +# 1 +# end +# +# alias foo bar +# @example +# +# # good +# +# def foo +# 1 +# end +# +# def bar +# 2 +# end +# @example +# +# # good +# +# def foo +# 1 +# end +# +# alias bar foo +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#52 +class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base + # @return [DuplicateMethods] a new instance of DuplicateMethods + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#57 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#98 + def alias_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85 + def method_alias?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#89 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#63 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#72 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#104 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117 + def check_const_receiver(node, name, const_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#124 + def check_self_receiver(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 + def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#136 + def found_instance_method(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#159 + def found_method(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 + def found_sclass_method(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#186 + def location(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#218 + def lookup_constant(node, const_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#131 + def message_for_dup(node, method_name, key); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#178 + def method_key(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194 + def on_attr(node, attr_name, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 + def possible_dsl?(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236 + def qualified_name(enclosing, namespace, mod_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260 + def source_location(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#55 +RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 +RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#54 +RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for duplicate elements in Regexp character classes. +# +# @example +# +# # bad +# r = /[xyx]/ +# +# # bad +# r = /[0-9x0-9]/ +# +# # good +# r = /[xy]/ +# +# # good +# r = /[0-9x]/ +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#21 +class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#37 + def each_repeated_character_class_element_loc(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#29 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#102 + def escaped_octal?(string); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#54 + def group_expressions(node, expressions); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#110 + def interpolation_locs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#106 + def octal?(char); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#71 + def pop_octal_digits(current_child, expressions); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#89 + def skip_expression?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#80 + def source_range(children); end + + # Since we blank interpolations with a space for every char of the interpolation, we would + # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes + # that are within an interpolation. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#96 + def within_interpolation?(node, child); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#25 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::OCTAL_DIGITS_AFTER_ESCAPE = T.let(T.unsafe(nil), Integer) + +# Checks for duplicate ``require``s and ``require_relative``s. +# +# @example +# # bad +# require 'foo' +# require 'bar' +# require 'foo' +# +# # good +# require 'foo' +# require 'bar' +# +# # good +# require 'foo' +# require_relative 'foo' +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#26 +class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#39 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#45 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#35 + def require_call?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#30 +RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#31 +RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#32 +RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks that there are no repeated exceptions +# used in 'rescue' expressions. +# +# @example +# # bad +# begin +# something +# rescue FirstException +# handle_exception +# rescue FirstException +# handle_other_exception +# end +# +# # good +# begin +# something +# rescue FirstException +# handle_exception +# rescue SecondException +# handle_other_exception +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#28 +class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + + # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#33 + def on_rescue(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 +RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks if each_with_object is called with an immutable +# argument. Since the argument is the object that the given block shall +# make calls on to build something based on the enumerable that +# each_with_object iterates over, an immutable argument makes no sense. +# It's definitely a bug. +# +# @example +# +# # bad +# +# sum = numbers.each_with_object(0) { |e, a| a += e } +# @example +# +# # good +# +# num = 0 +# sum = numbers.each_with_object(num) { |e, a| a += e } +# +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#24 +class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + def each_with_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 +RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#26 +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 +# @example +# +# # good +# +# # This code is compatible with the bad case. It will be autocorrected like this. +# if something +# # ... +# else +# do_this +# do_that +# end +# +# # This code is incompatible with the bad case. +# # If `do_this` is a condition, `elsif` should be used instead of `else`. +# if something +# # ... +# elsif do_this +# do_that +# end +# +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#43 +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#50 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#81 + def autocorrect(corrector, node, first_else); end + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#61 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#71 + def check_else(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 +RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) + +# Checks for blocks without a body. +# Such empty blocks are typically an oversight or we should provide a comment +# be clearer what we're aiming for. +# +# Empty lambdas and procs are ignored by default. +# +# NOTE: For backwards compatibility, the configuration that allows/disallows +# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also +# applies to procs. +# +# @example +# # bad +# items.each { |item| } +# +# # good +# items.each { |item| puts item } +# @example AllowComments: true (default) +# # good +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# @example AllowComments: false +# # bad +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# @example AllowEmptyLambdas: true (default) +# # good +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# @example AllowEmptyLambdas: false +# # bad +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#63 +class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#66 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#76 + def allow_comment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#83 + def allow_empty_lambdas?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#87 + def comment_disables_cop?(comment); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#64 +RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for classes and metaclasses without a body. +# Such empty classes and metaclasses are typically an oversight or we should provide a comment +# to be clearer what we're aiming for. +# +# @example +# # bad +# class Foo +# end +# +# class Bar +# class << self +# end +# end +# +# class << obj +# end +# +# # good +# class Foo +# def do_something +# # ... code +# end +# end +# +# class Bar +# class << self +# attr_reader :bar +# end +# end +# +# class << obj +# attr_reader :bar +# end +# @example AllowComments: false (default) +# # bad +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# @example AllowComments: true +# # good +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#72 +class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#76 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#81 + def on_sclass(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#87 + def body_or_allowed_comment_lines?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#73 +RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#74 +RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `if`, `elsif` and `unless` branches without a body. +# +# NOTE: empty `else` branches are handled by `Style/EmptyElse`. +# +# @example +# # bad +# if condition +# end +# +# # bad +# unless condition +# end +# +# # bad +# if condition +# do_something +# elsif other_condition +# end +# +# # good +# if condition +# do_something +# end +# +# # good +# unless condition +# do_something +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# do_something_else +# end +# @example AllowComments: true (default) +# # good +# if condition +# do_something +# elsif other_condition +# # noop +# end +# @example AllowComments: false +# # bad +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#63 +class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#70 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#156 + def all_branches_body_missing?(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#83 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#142 + def branch_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#104 + def correct_other_branches(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#162 + def deletion_range(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 + def else_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#131 + def empty_elsif_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#123 + def empty_if_branch?(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#89 + def remove_comments(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#96 + def remove_empty_branch(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#116 + def require_other_branches_correction?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68 +RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty `ensure` blocks +# +# @example +# +# # bad +# +# def some_method +# do_something +# ensure +# end +# @example +# +# # bad +# +# begin +# do_something +# ensure +# end +# @example +# +# # good +# +# def some_method +# do_something +# ensure +# do_something_else +# end +# @example +# +# # good +# +# begin +# do_something +# ensure +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#45 +class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#50 + def on_ensure(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#48 +RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of empty expressions. +# +# @example +# +# # bad +# +# foo = () +# if () +# bar +# end +# @example +# +# # good +# +# foo = (some_expression) +# if (some_expression) +# bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#25 +class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#28 + def on_begin(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#36 + def empty_expression?(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 +RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) + +# Enforces that Ruby source files are not empty. +# +# @example +# # bad +# # Empty file +# +# # good +# # File containing non commented source lines +# @example AllowComments: true (default) +# # good +# # File consisting only of comments +# @example AllowComments: false +# # bad +# # File consisting only of comments +# +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 +class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#28 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#42 + def contains_only_comments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#38 + def empty_file?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#34 + def offending?; end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 +RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `in` pattern branches without a body. +# +# @example +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# end +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# nil +# end +# @example AllowComments: true (default) +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# @example AllowComments: false +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#45 +class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#53 + def on_case_match(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#49 +RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty interpolation. +# +# @example +# +# # bad +# +# "result is #{}" +# @example +# +# # good +# +# "result is #{some_result}" +# +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 +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#25 + def on_interpolation(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#23 +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 +# @example +# +# # good +# case condition +# when foo +# do_something +# when bar +# nil +# end +# @example AllowComments: true (default) +# +# # good +# case condition +# when foo +# do_something +# when bar +# # noop +# end +# @example AllowComments: false +# +# # bad +# case condition +# when foo +# do_something +# when bar +# # do nothing +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#47 +class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + + # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#52 + def on_case(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 +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 +# @example +# +# # good +# +# def foo +# do_something +# self +# ensure +# cleanup +# end +# +# # also 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#47 +class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#53 + def on_ensure(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51 +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#83 + def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#88 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#153 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#123 + def build_kwargs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#119 + def correct_arguments?(arguments); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#140 + def override_by_legacy_args(kwargs, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#80 +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 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# # good +# (x - 0.1).abs < Float::EPSILON +# +# # good +# tolerance = 0.0001 +# (x - 0.1).abs < tolerance +# +# # Or some other epsilon based type of comparison: +# # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ +# +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#31 +class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#79 + def check_numeric_returning_method(node); end + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63 + def check_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#47 + def float?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#34 +RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 +RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 +RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#32 +RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 +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 +# @example +# +# # good +# +# float = 42.9 +# +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#21 +class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#24 + def on_float(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#22 +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) +# @example +# +# # good +# +# format('A value: %s and another: %i', a_value, another) +# @example +# +# # bad +# +# format('Unnumbered format: %s and numbered: %2$s', a_value, another) +# @example +# +# # good +# +# format('Numbered format: %1$s and numbered %2$s', a_value, another) +# +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#38 +class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 + def called_on_string?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#49 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#137 + def count_format_matches(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 + def count_matches(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#141 + def count_percent_matches(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#129 + def countable_format?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#133 + def countable_percent?(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#153 + def expected_fields_count(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#168 + def format?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#146 + def format_method?(name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#64 + def format_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#115 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#68 + def invalid_format_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#91 + def matched_arguments_count?(expected, passed); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#186 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 + def method_with_format_args?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#77 + def offending_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 + def percent?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 + def splat_args?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#172 + def sprintf?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#195 + def string_type?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#44 +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#39 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#41 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#47 +RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#45 +RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#46 +RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) + +# Prefer using `Hash#compare_by_identity` rather than using `object_id` +# for hash keys. +# +# This cop looks for hashes being keyed by objects' `object_id`, using +# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. +# +# @example +# # bad +# hash = {} +# hash[foo.object_id] = :bar +# hash.key?(baz.object_id) +# +# # good +# hash = {}.compare_by_identity +# hash[foo] = :bar +# hash.key?(baz) +# +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#31 +class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#37 + def id_as_hash_key?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#34 +RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#32 +RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of a method call where +# the receiver of the call is a HEREDOC. +# +# @example +# # bad +# <<-SQL +# bar +# SQL +# .strip_indent +# +# <<-SQL +# bar +# SQL +# .strip_indent +# .trim +# +# # good +# <<~SQL +# bar +# SQL +# +# <<~SQL.trim +# bar +# SQL +# +# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#31 +class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#97 + def all_on_same_line?(nodes); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#50 + def autocorrect(corrector, node, heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#77 + def call_after_heredoc_range(heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#107 + def call_end_pos(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#116 + def call_line_range(node); end + + # Returns nil if no range can be safely repositioned. + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#122 + def call_range_to_safely_reposition(node, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#86 + def calls_on_multiple_lines?(node, _heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#82 + def correctly_positioned?(node, heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#111 + def heredoc_begin_line_range(heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#103 + def heredoc_end_pos(heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#73 + def heredoc_node?(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#59 + def heredoc_node_descendent_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#67 + def send_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#146 + def trailing_comma?(call_source, call_line_source); end +end + +# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#35 +RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) + +# Prefer `equal?` over `==` when comparing `object_id`. +# +# `Object#equal?` is provided to compare objects for identity, and in contrast +# `Object#==` is provided for the purpose of doing value comparison. +# +# @example +# # bad +# foo.object_id == bar.object_id +# +# # good +# foo.equal?(bar) +# +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#18 +class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#40 + def compare_between_object_id_by_double_equal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#44 + def object_id_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#21 +RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22 +RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for implicit string concatenation of string literals +# which are on the same line. +# +# @example +# +# # bad +# +# array = ['Item 1' 'Item 2'] +# @example +# +# # 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#25 +class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#33 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#83 + def display_str(node); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#50 + def each_bad_cons(node); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#65 + def ending_delimiter(str); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#91 + def str_content(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#75 + def string_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#79 + def string_literals?(node1, node2); end +end + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 +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 +# @example +# +# # good +# +# class C +# def self.method +# puts 'hi' +# end +# +# private_class_method :method +# end +# @example +# +# # good +# +# class C +# class << self +# private +# +# def method +# puts 'hi' +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 +class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55 + def private_class_methods(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#109 + def access_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#66 + def check_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#113 + def correct_visibility?(node, modifier, ignored_methods); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#78 + def format_message(modifier); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#91 + 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#74 + def private_class_method_names(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#51 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#49 +RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Looks for error classes inheriting from `Exception`. +# It is configurable to suggest using either `StandardError` (default) or +# `RuntimeError` instead. +# +# @example EnforcedStyle: standard_error (default) +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < StandardError; end +# +# C = Class.new(StandardError) +# @example EnforcedStyle: runtime_error +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < RuntimeError; end +# +# C = Class.new(RuntimeError) +# +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#40 +class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#53 + def class_new_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87 + def exception_class?(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91 + def inherit_exception_class_with_omitted_namespace?(class_node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99 + def preferred_base_class; end +end + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#44 +RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#45 +RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#50 +RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for interpolation in a single quoted string. +# +# @example +# +# # bad +# +# foo = 'something with #{interpolation} inside' +# @example +# +# # good +# +# foo = "something with #{interpolation} inside" +# +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#25 +class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#31 + def on_str(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#42 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#53 + def heredoc?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 +RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) + +# Checks uses of lambda without a literal block. +# It emulates the following warning in Ruby 3.0: +# +# $ ruby -vwe 'lambda(&proc {})' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: warning: lambda without a literal block is deprecated; use the proc without +# lambda instead +# +# This way, proc object is never converted to lambda. +# Autocorrection replaces with compatible proc argument. +# +# @example +# +# # bad +# lambda(&proc { do_something }) +# lambda(&Proc.new { do_something }) +# +# # good +# proc { do_something } +# Proc.new { do_something } +# lambda { do_something } # If you use lambda. +# +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#28 +class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#35 + def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#39 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#31 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#32 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literals used as the conditions or as +# operands in and/or expressions serving as the conditions of +# if/while/until/case-when/case-in. +# +# NOTE: Literals in `case-in` condition where the match variable is used in +# `in` are accepted as a pattern matching. +# +# @example +# +# # bad +# if 20 +# do_something +# end +# +# # bad +# if some_var && true +# do_something +# end +# +# # good +# if some_var && some_condition +# do_something +# end +# +# # good +# # When using a boolean value for an infinite loop. +# while true +# break if condition +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#35 +class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#93 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#58 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#73 + def on_case_match(case_match_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#40 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#87 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#51 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#51 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#44 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#44 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#108 + def basic_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#138 + def check_case(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#99 + def check_for_literal(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#120 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#147 + def condition(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#130 + def handle_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#116 + def primitive_array?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#155 + def when_conditions_range(when_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 +RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for interpolated literals. +# +# @example +# +# # bad +# +# "result is #{10}" +# @example +# +# # good +# +# "result is 10" +# +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#19 +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 + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62 + def autocorrected_value(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#108 + def autocorrected_value_for_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#114 + def autocorrected_value_for_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#84 + def autocorrected_value_for_string(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#92 + def autocorrected_value_for_symbol(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#125 + def autocorrected_value_in_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#99 + def autocorrected_value_in_hash_for_symbol(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#155 + def ends_heredoc_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163 + def in_array_percent_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#48 + 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#146 + def prints_as_self?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + def space_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#56 + def special_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#26 +RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 +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 +# @example +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition +# @example +# +# # good +# +# # while replacement +# loop do +# do_something +# break unless some_condition +# end +# @example +# +# # good +# +# # until replacement +# loop do +# do_something +# break if some_condition +# end +# +# source://rubocop//lib/rubocop/cop/lint/loop.rb#50 +class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#55 + def on_while_post(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#79 + def build_break_line(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#75 + def keyword_and_condition_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#65 + def register_offense(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/loop.rb#53 +RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) + +# cop disables on wide ranges of code, that latter contributors to +# a file wouldn't be aware of. +# +# @example +# # Lint/MissingCopEnableDirective: +# # MaximumRangeSize: .inf +# +# # good +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # rubocop:enable Layout/SpaceAroundOperators +# # y = 1 +# # EOF +# +# # bad +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # EOF +# @example +# # Lint/MissingCopEnableDirective: +# # MaximumRangeSize: 2 +# +# # good +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # With the previous, there are 2 lines on which cop is disabled. +# # rubocop:enable Layout/SpaceAroundOperators +# +# # bad +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# x += 1 +# # Including this, that's 3 lines on which the cop is disabled. +# # rubocop:enable Layout/SpaceAroundOperators +# +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#45 +class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#51 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#70 + def acceptable_range?(cop, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#104 + def department_enabled?(cop, comment); end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#64 + def each_missing_enable; end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#87 + def max_range; end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#91 + def message(cop, comment, type = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#48 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#49 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) + +# Checks for the presence of constructors and lifecycle callbacks +# without calls to `super`. +# +# This cop does not consider `method_missing` (and `respond_to_missing?`) +# because in some cases it makes sense to overtake what is considered a +# missing method. In other cases, the theoretical ideal handling could be +# challenging or verbose for no actual gain. +# +# Autocorrection is not supported because the position of `super` cannot be +# determined automatically. +# +# `Object` and `BasicObject` are allowed by this cop because of their +# stateless nature. However, sometimes you might want to allow other parent +# classes from this cop, for example in the case of an abstract class that is +# not meant to be called with `super`. In those cases, you can use the +# `AllowedParentClasses` option to specify which classes should be allowed +# *in addition to* `Object` and `BasicObject`. +# +# @example +# # bad +# class Employee < Person +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# class Employee < Person +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# Employee = Class.new(Person) do +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# Employee = Class.new(Person) do +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# class Parent +# def self.inherited(base) +# do_something +# end +# end +# +# # good +# class Parent +# def self.inherited(base) +# super +# do_something +# end +# end +# +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#85 +class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#99 + def class_new_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#149 + def allowed_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#153 + def allowed_classes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 + def callback_method_def?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#133 + def contains_super?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#137 + def inside_class_with_stateful_parent?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#123 + def offender?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#96 +RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#87 +RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#91 +RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#86 +RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#92 +RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#89 +RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) + +# Checks for mixed-case character ranges since they include likely unintended characters. +# +# Offenses are registered for regexp character classes like `/[A-z]/` +# as well as range objects like `('A'..'z')`. +# +# NOTE: Range objects cannot be autocorrected. +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#28 +class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#56 + def each_unsafe_regexp_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#48 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#72 + def build_source_range(range_start, range_end); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#76 + def range_for(char); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#82 + def range_pairs(expr); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#102 + def rewrite_regexp_range(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#92 + def skip_expression?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#96 + def skip_range?(range_start, range_end); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#86 + 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>FOO)(BAR)/ +# +# # good +# /(?<foo>FOO)(?<bar>BAR)/ +# +# # good +# /(?<foo>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 +# @example +# +# # good +# +# def foo +# bar = -> { puts 'hello' } +# bar.call +# end +# @example +# +# # 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 +# @example +# +# # good +# +# def foo +# class << self +# def bar +# end +# end +# end +# @example AllowedMethods: [] (default) +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# @example AllowedMethods: ['has_many'] +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# @example AllowedPatterns: [] (default) +# # bad +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 +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#133 + def eval_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#138 + def exec_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#126 + def allowed_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#121 + def scoping_method_call?(child); end +end + +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#101 +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 +# @example +# +# # 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#25 +class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#51 + def on_block_body_of_reduce(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#56 + def on_numblock_body_of_reduce(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#60 + def parent_block_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#64 + def parent_numblock_node(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 +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 +# @example +# +# # 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#43 +class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + def on_or_asgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#44 +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 + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#77 + def explicit_not_force?(param0); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#72 + def force?(param0); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#81 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#67 + def receiver_and_method_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#62 + 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#122 + def autocorrect(corrector, node, range); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#133 + def autocorrect_replace_method(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152 + def force_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#160 + def force_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156 + 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#140 + def replacement_method(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#48 +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#55 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#56 +RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# `Dir[...]` and `Dir.glob(...)` do not make any guarantees about +# the order in which files are returned. The final order is +# determined by the operating system and file system. +# This means that using them in cases where the order matters, +# such as requiring files, can lead to intermittent failures +# that are hard to debug. To ensure this doesn't happen, +# always sort the list. +# +# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. +# So all bad cases are acceptable when Ruby 3.0 or higher are used. +# +# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. +# +# @example +# +# # bad +# Dir["./lib/**/*.rb"].each do |file| +# require file +# end +# +# # good +# Dir["./lib/**/*.rb"].sort.each do |file| +# require file +# end +# +# # bad +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| +# require file +# end +# +# # good +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| +# require file +# end +# +# # bad +# Dir['./lib/**/*.rb'].each(&method(:require)) +# +# # good +# Dir['./lib/**/*.rb'].sort.each(&method(:require)) +# +# # bad +# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) +# +# # good +# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) +# +# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) +# +# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#60 +class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#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 + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#65 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#89 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#77 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#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#107 + def correct_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#117 + def correct_block_pass(corrector, node); end + + # Returns range of last argument including comma and whitespace. + # + # @return [Parser::Source::Range] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#132 + def last_arg_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#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#63 +RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-local exits from iterators without a return +# value. It registers an offense under these conditions: +# +# * No value is returned, +# * the block is preceded by a method chain, +# * the block has arguments, +# * the method which receives the block is not `define_method` +# or `define_singleton_method`, +# * the return is not contained in an inner scope, e.g. a lambda or a +# method definition. +# +# @example +# +# class ItemApi +# rescue_from ValidationError do |e| # non-iteration block with arg +# return { message: 'validation error' } unless e.errors # allowed +# error_array = e.errors.map do |error| # block with method chain +# return if error.suppress? # warned +# return "#{error.param}: invalid" unless error.message # allowed +# "#{error.param}: #{error.message}" +# end +# { message: 'validation error', errors: error_array } +# end +# +# def update_items +# transaction do # block without arguments +# return unless update_necessary? # allowed +# find_each do |item| # block without method chain +# return if item.stock == 0 # false-negative... +# item.update!(foobar: true) +# end +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#41 +class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#77 + def chained_send?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#80 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#46 + def on_return(return_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#72 + def return_value?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#68 + def scoped_node?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#42 +RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) + +# Warns the usage of unsafe number conversions. Unsafe +# number conversion can cause unexpected error if auto type conversion +# fails. Cop prefer parsing with number class instead. +# +# Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` +# if given input that is not numeric (eg. an empty string), whereas +# `to_i`, etc. will try to convert regardless of input (`''.to_i => 0`). +# As such, this cop is disabled by default because it's not necessarily +# always correct to raise if a value is not numeric. +# +# NOTE: Some values cannot be converted properly using one of the `Kernel` +# method (for instance, `Time` and `DateTime` values are allowed by this +# cop by default). Similarly, Rails' duration methods do not work well +# with `Integer()` and can be allowed with `AllowedMethods`. By default, +# there are no methods to allowed. +# +# @example +# +# # bad +# +# '10'.to_i +# '10.2'.to_f +# '10'.to_c +# '1/3'.to_r +# ['1', '2', '3'].map(&:to_i) +# foo.try(:to_f) +# bar.send(:to_c) +# +# # good +# +# Integer('10', 10) +# Float('10.2') +# Complex('10') +# Rational('1/3') +# ['1', '2', '3'].map { |i| Integer(i, 10) } +# foo.try { |i| Float(i) } +# bar.send { |i| Complex(i) } +# @example AllowedMethods: [] (default) +# +# # bad +# 10.minutes.to_i +# @example AllowedMethods: [minutes] +# +# # good +# 10.minutes.to_i +# @example AllowedPatterns: [] (default) +# +# # bad +# 10.minutes.to_i +# @example AllowedPatterns: ['min*'] +# +# # good +# 10.minutes.to_i +# @example IgnoredClasses: [Time, DateTime] (default) +# +# # good +# Time.now.to_datetime.to_i +# +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#73 +class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#103 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 + def to_method(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#98 + def to_method_symbol(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 + def allow_receiver?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#172 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#182 + def conversion_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#146 + def correct_method(node, receiver); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 + def correct_sym_method(to_method); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#129 + def handle_as_symbol(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#110 + def handle_conversion_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#190 + def ignored_class?(name); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#186 + def ignored_classes; end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 + def remove_parentheses(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#176 + def top_receiver(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#79 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#90 +RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#85 +RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of numbered parameter assignment. +# It emulates the following warning in Ruby 2.7: +# +# $ ruby -ve '_1 = :value' +# ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19] +# -e:1: warning: `_1' is reserved for numbered parameter; consider another name +# +# Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0. +# +# $ ruby -ve '_1 = :value' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: _1 is reserved for numbered parameter +# +# NOTE: The parametered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` +# as well to prevent confusion. +# +# @example +# +# # bad +# _1 = :value +# +# # good +# non_numbered_parameter_name = :value +# +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#30 +class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#35 + def on_lvasgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#32 +RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#33 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#31 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) + +# Checks for unintended or-assignment to a constant. +# +# Constants should always be assigned in the same location. And its value +# should always be the same. If constants are assigned in multiple +# locations, the result may vary depending on the order of `require`. +# +# @example +# +# # bad +# CONST ||= 1 +# +# # good +# CONST = 1 +# +# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#24 +class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#29 + def on_or_asgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#27 +RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) + +# Checks the proper ordering of magic comments and whether +# a magic comment is not placed before a shebang. +# +# @example +# # bad +# +# # frozen_string_literal: true +# # encoding: ascii +# p [''.frozen?, ''.encoding] #=> [true, #<Encoding:UTF-8>] +# +# # good +# +# # encoding: ascii +# # frozen_string_literal: true +# p [''.frozen?, ''.encoding] #=> [true, #<Encoding:US-ASCII>] +# +# # good +# +# #!/usr/bin/env ruby +# # encoding: ascii +# # frozen_string_literal: true +# p [''.frozen?, ''.encoding] #=> [true, #<Encoding:US-ASCII>] +# +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32 +class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55 + def autocorrect(corrector, encoding_line, frozen_string_literal_line); end + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63 + def magic_comment_lines; end +end + +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36 +RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) + +# Looks for references of Regexp captures that are out of range +# and thus always returns nil. +# +# @example +# +# /(foo)bar/ =~ 'foobar' +# +# # bad - always returns nil +# +# puts $2 # => nil +# +# # good +# +# puts $1 # => foo +# +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#38 +class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 + def after_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#71 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#51 + def on_match_with_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#77 + def on_nth_ref(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#65 + def on_when(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#102 + def check_regexp(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#122 + def nth_ref_receiver?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#113 + def regexp_first_argument?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#93 + def regexp_patterns(in_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#118 + def regexp_receiver?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#39 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#42 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#44 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#41 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#45 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks for space between the name of a called method and a left +# parenthesis. +# +# @example +# +# # bad +# do_something (foo) +# +# # good +# do_something(foo) +# do_something (2 + 3) * 4 +# do_something (foo * bar).baz +# +# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#18 +class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 + def chained_calls?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#49 + def first_argument_block_type?(first_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#57 + def first_argument_starts_with_left_parenthesis?(node); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#86 + def space_range(expr, space_length); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#70 + def spaces_before_left_parenthesis(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#66 + def ternary_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#39 + def valid_context?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#53 + def valid_first_argument?(first_arg); end +end + +# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#22 +RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) + +# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting strings. +# +# @example +# +# # bad +# +# %w('foo', "bar") +# @example +# +# # good +# +# %w(foo bar) +# +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 +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#44 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#48 + def on_percent_literal(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#65 + def contains_quotes_or_commas?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#38 +RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#41 +RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 +RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#39 +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) +# @example +# +# # good +# +# %i(foo bar) +# +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 +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#30 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#34 + def on_percent_literal(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#42 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#52 + def contains_colons_or_commas?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#62 + def non_alphanumeric_literal?(literal); end +end + +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#27 +RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which are +# raising `Exception` class. +# +# You can specify a module name that will be an implicit namespace +# using `AllowedImplicitNamespaces` option. The cop cause a false positive +# for namespaced `Exception` when a namespace is omitted. This option can +# prevent the false positive by specifying a namespace to be omitted for +# `Exception`. Alternatively, make `Exception` a fully qualified class +# name with an explicit namespace. +# +# @example +# # bad +# raise Exception, 'Error message here' +# +# # good +# raise StandardError, 'Error message here' +# @example AllowedImplicitNamespaces: ['Gem'] +# # good +# module Gem +# def self.foo +# raise Exception # This exception means `Gem::Exception`. +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#34 +class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#41 + def exception?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#46 + def exception_new_with_message?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#51 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#85 + def allow_implicit_namespaces; end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#73 + def implicit_namespace?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#37 +RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#38 +RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rand(1)` calls. +# Such calls always return `0`. +# +# @example +# +# # bad +# +# rand 1 +# Kernel.rand(-1) +# rand 1.0 +# rand(-1.0) +# @example +# +# # good +# +# 0 # just use 0 instead +# +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#23 +class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#32 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 + def rand_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#40 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 +RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#25 +RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# removed without causing any offenses to be reported. It's implemented +# as a cop in that it inherits from the Cop base class and calls +# add_offense. The unusual part of its implementation is that it doesn't +# have any on_* methods or an investigate method. This means that it +# doesn't take part in the investigation phase when the other cops do +# their work. Instead, it waits until it's called in a later stage of the +# execution. The reason it can't be implemented as a normal cop is that +# it depends on the results of all other cops to do its work. +# +# @example +# # bad +# # rubocop:disable Layout/LineLength +# x += 1 +# # rubocop:enable Layout/LineLength +# +# # good +# x += 1 +# +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#28 +class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [RedundantCopDisableDirective] a new instance of RedundantCopDisableDirective + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#37 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end + + # Returns the value of attribute offenses_to_check. + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 + def offenses_to_check; end + + # Sets the attribute offenses_to_check + # + # @param value the value to set the attribute offenses_to_check to. + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 + def offenses_to_check=(_arg0); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#323 + def add_department_marker(department); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#229 + def add_offense_for_entire_comment(comment, cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#244 + def add_offense_for_some_cops(comment, cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#219 + def add_offenses(redundant_cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#306 + def all_cop_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#190 + def all_disabled?(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#69 + def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#57 + def cop_disabled_line_ranges; end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#264 + def cop_range(comment, cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#210 + def department_disabled?(cop, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#315 + def department_marker?(department); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#293 + def describe(cop); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#215 + def directive_count(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#92 + def directive_range_in_list(range, ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#61 + def disabled_ranges; end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#132 + def each_already_disabled(cop, line_ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#113 + def each_line_range(cop, line_ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#106 + def each_redundant_disable(&block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#310 + def ends_its_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#202 + def expected_final_disable?(cop, line_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#166 + def find_redundant_all(range, next_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#161 + def find_redundant_cop(cop, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#176 + def find_redundant_department(cop, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#182 + def followed_ranges?(range, next_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#194 + def ignore_offense?(line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#258 + def leave_free_comment?(comment, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#271 + def matching_range(haystack, needle); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#302 + def message(cop_names); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#65 + def previous_line_blank?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#186 + def range_with_offense?(range, offenses = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#319 + def remove_department_marker(department); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#279 + def trailing_range?(ranges, range); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#32 +RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#33 +RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#287 +RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) + +# removed. +# +# that cop checks whether any cop was actually enabled. +# +# @example +# # bad +# foo = 1 +# # rubocop:enable Layout/LineLength +# +# # good +# foo = 1 +# @example +# # 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#37 +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#44 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120 + def all_or_name(name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76 + def comment_start(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80 + def cop_name_indention(comment, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#124 + def department?(directive, name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#71 + def range_of_offense(comment, name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#95 + def range_to_remove(begin_pos, end_pos, comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#84 + def range_with_comma(comment, name); end + + # If the list of cops is comma-separated, but without a empty space after the comma, + # we should **not** remove the prepending empty space, thus begin_pos += 1 + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#114 + def range_with_comma_after(comment, start, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#108 + def range_with_comma_before(start, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#53 + def register_offense(comment, cop_names); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#42 +RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# Sort globbed results by default in Ruby 3.0. +# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. +# +# @example +# +# # bad +# Dir.glob('./lib/**/*.rb').sort.each do |file| +# end +# +# Dir['./lib/**/*.rb'].sort.each do |file| +# end +# +# # good +# Dir.glob('./lib/**/*.rb').each do |file| +# end +# +# Dir['./lib/**/*.rb'].each do |file| +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#30 +class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#56 + def multiple_argument?(glob_method); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#38 +RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#36 +RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 +RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant quantifiers inside Regexp literals. +# +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# +# @example +# # bad +# /(?:x+)+/ +# +# # good +# /(?:x)+/ +# +# # good +# /(?:x+)/ +# +# # bad +# /(?:x+)?/ +# +# # good +# /(?:x)*/ +# +# # good +# /(?:x*)/ +# +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 +class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 + def character_set?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 + def each_redundantly_quantified_pair(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 + def mergeable_quantifier(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 + def merged_quantifier(exp1, exp2); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 + def message(group, child, replacement); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 + def quantifier_range(group, child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 + def redundant_group?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 + def redundantly_quantifiable?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 +RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) + +# Checks for unnecessary `require` statement. +# +# The following features are unnecessary `require` statement because +# they are already loaded. e.g. Ruby 2.2: +# +# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' +# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] +# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] +# +# Below are the features that each `TargetRubyVersion` targets. +# +# * 2.0+ ... `enumerator` +# * 2.1+ ... `thread` +# * 2.2+ ... Add `rational` and `complex` above +# * 2.5+ ... Add `pp` above +# * 2.7+ ... Add `ruby2_keywords` above +# * 3.1+ ... Add `fiber` above +# * 3.2+ ... `set` +# +# This cop target those features. +# +# @example +# # bad +# require 'unloaded_feature' +# require 'thread' +# +# # good +# require 'unloaded_feature' +# +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#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#57 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#53 + def pp_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#47 + def redundant_require_statement?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#87 + def need_to_require_pp?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#76 + 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#41 +RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array) + +# 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. +# `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods +# are checked by default. These are customizable with `AllowedMethods` option. +# +# The `AllowedMethods` option specifies nil-safe methods, +# in other words, it is a method that is allowed to skip safe navigation. +# Note that the `AllowedMethod` option is not an option that specifies methods +# for which to suppress (allow) this cop's check. +# +# In the example below, the safe navigation operator (`&.`) is unnecessary +# because `NilClass` has methods like `respond_to?` and `is_a?`. +# +# @example +# # bad +# 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 will always return `true` +# foo&.respond_to?(:to_a) +# @example AllowedMethods: [nil_safe_method] +# # bad +# do_something if attrs&.nil_safe_method(:[]) +# +# # good +# do_something if attrs.nil_safe_method(:[]) +# do_something if attrs&.not_nil_safe_method(:[]) +# +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51 +class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#65 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61 + def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#75 + def check?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 + def condition?(parent, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#56 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#58 +RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) + +# Checks for unneeded usages of splat expansion +# +# @example +# +# # bad +# a = *[1, 2, 3] +# a = *'a' +# a = *1 +# ['a', 'b', *%w(c d e), 'f', 'g'] +# +# # good +# c = [1, 2, 3] +# a = *c +# a, b = *c +# a, *b = *c +# a = *1..10 +# a = ['a'] +# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] +# +# # bad +# do_something(*['foo', 'bar', 'baz']) +# +# # good +# do_something('foo', 'bar', 'baz') +# +# # bad +# begin +# foo +# rescue *[StandardError, ApplicationError] +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, ApplicationError +# bar +# end +# +# # bad +# case foo +# when *[1, 2, 3] +# bar +# else +# baz +# end +# +# # good +# case foo +# when 1, 2, 3 +# bar +# else +# baz +# end +# @example AllowPercentLiteralArrayArgument: true (default) +# +# # good +# do_something(*%w[foo bar baz]) +# @example AllowPercentLiteralArrayArgument: false +# +# # bad +# do_something(*%w[foo bar baz]) +# +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#71 +class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#83 + def array_new?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#91 + def literal_expansion(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#95 + def on_splat(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#203 + def allow_percent_literal_array_argument?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#131 + def array_new_inside_array_literal?(array_new_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#155 + def array_splat?(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#112 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#159 + def method_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#163 + def part_of_an_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#170 + def redundant_brackets?(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#118 + def redundant_splat_expansion(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#178 + def remove_brackets(array); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#138 + def replacement_range_and_content(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#196 + def use_percent_literal_array_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#75 +RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#80 +RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#74 +RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#79 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#77 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#78 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#76 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) + +# Checks for string conversion in string interpolation, `print`, `puts`, and `warn` arguments, +# which is redundant. +# +# @example +# +# # bad +# +# "result is #{something.to_s}" +# print something.to_s +# puts something.to_s +# warn something.to_s +# @example +# +# # good +# +# "result is #{something}" +# print something +# puts something +# warn something +# +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 +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#38 + def on_interpolation(begin_node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36 + def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58 + def register_offense(node, context); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33 +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant `with_index`. +# +# @example +# # bad +# ary.each_with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#29 +class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#56 + def redundant_with_index?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#66 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#74 + def with_index_range(send); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#33 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#34 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# Checks for redundant `with_object`. +# +# @example +# # bad +# ary.each_with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#29 +class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#56 + def redundant_with_object?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#65 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#73 + def with_object_range(send); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#33 +RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#34 +RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# Checks if `include` or `prepend` is called in `refine` block. +# These methods are deprecated and should be replaced with `Refinement#import_methods`. +# +# It emulates deprecation warnings in Ruby 3.1. +# +# @example +# +# # bad +# refine Foo do +# include Bar +# end +# +# # bad +# refine Foo do +# prepend Bar +# end +# +# # good +# refine Foo do +# import_methods Bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#34 +class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#42 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#37 +RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#38 +RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for regexp literals used as `match-current-line`. +# If a regexp literal is in condition, the regexp matches `$_` implicitly. +# +# @example +# # bad +# if /foo/ +# do_something +# end +# +# # good +# if /foo/ =~ $_ +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#19 +class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#26 + def on_match_current_line(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#23 +RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for expressions where there is a call to a predicate +# method with at least one argument, where no parentheses are used around +# the parameter list, and a boolean operator, && or ||, is used in the +# last argument. +# +# The idea behind warning for these constructs is that the user might +# be under the impression that the return value from the method call is +# an operand of &&/||. +# +# @example +# +# # bad +# +# if day.is? :tuesday && month == :jan +# # ... +# end +# @example +# +# # good +# +# if day.is?(:tuesday) && month == :jan +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#30 +class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#58 + def check_predicate(predicate, node); end + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#48 + def check_ternary(ternary, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#33 +RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks that a range literal is enclosed in parentheses when the end of the range is +# at a line break. +# +# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. +# So, this cop does not provide autocorrection because it is left to user. +# +# [source,ruby] +# ---- +# case condition +# when 42.. +# do_something +# end +# ---- +# +# @example +# +# # bad - Represents `(1..42)`, not endless range. +# 1.. +# 42 +# +# # good - It's incompatible, but your intentions when using endless range may be: +# (1..) +# 42 +# +# # good +# 1..42 +# +# # good +# (1..42) +# +# # good +# (1.. +# 42) +# +# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#40 +class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 + def on_irange(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#41 +RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses a file requiring itself with `require_relative`. +# +# @example +# +# # bad +# +# # foo.rb +# require_relative 'foo' +# require_relative 'bar' +# +# # good +# +# # foo.rb +# require_relative 'bar' +# +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#21 +class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#28 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#44 + def remove_ext(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#40 + def same_file?(file_path, required_feature); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#25 +RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#26 +RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks targeting the Exception class. +# +# @example +# +# # bad +# +# begin +# do_something +# rescue Exception +# handle_exception +# end +# @example +# +# # good +# +# begin +# do_something +# rescue ArgumentError +# handle_exception +# end +# +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#27 +class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#30 + def on_resbody(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#39 + def targets_exception?(rescue_arg_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#28 +RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) + +# Check for arguments to `rescue` that will result in a `TypeError` +# if an exception is raised. +# +# @example +# # bad +# begin +# bar +# rescue nil +# baz +# end +# +# # bad +# def foo +# bar +# rescue 1, 'a', "#{b}", 0.0, [], {} +# baz +# end +# +# # good +# begin +# bar +# rescue +# baz +# end +# +# # good +# def foo +# bar +# rescue NameError +# baz +# end +# +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#37 +class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#60 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#44 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#71 + def correction(*exceptions); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#82 + def invalid_exceptions(exceptions); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#78 + 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 +# @example +# +# # 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#34 +class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#37 + def on_return(return_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#53 + def non_void_context(return_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 +RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) + +# The safe navigation operator returns nil if the receiver is +# nil. If you chain an ordinary method call after a safe +# navigation operator, it raises NoMethodError. We should use a +# safe navigation operator after a safe navigation operator. +# This cop checks for the problem outlined above. +# +# @example +# +# # bad +# +# x&.foo.bar +# x&.foo + bar +# x&.foo[bar] +# @example +# +# # good +# +# x&.foo&.bar +# x&.foo || bar +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#26 +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#37 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#44 + 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#63 + 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#82 + def autocorrect(corrector, offense_range:, send_node:); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#92 + def brackets?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 +RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#34 +RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) + +# Check to make sure that if safe navigation is used for a method +# call in an `&&` or `||` condition that safe navigation is used for all +# method calls on that same object. +# +# @example +# # bad +# foo&.bar && foo.baz +# +# # bad +# foo.bar || foo&.baz +# +# # bad +# foo&.bar && (foobar.baz || foo.baz) +# +# # good +# foo.bar && foo.baz +# +# # good +# foo&.bar || foo&.baz +# +# # good +# foo&.bar && (foobar.baz || foo&.baz) +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#29 +class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#42 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#36 + def on_csend(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#61 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 + def location(node, unsafe_method_call); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#71 + def top_conditional_ancestor(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#82 + def unsafe_method_calls(method_calls, safe_nav_receiver); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#34 +RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks to make sure safe navigation isn't used with `empty?` in +# a conditional. +# +# While the safe navigation operator is generally a good idea, when +# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# do the opposite of what the author intends. +# +# @example +# # bad +# return if foo&.empty? +# return unless foo&.empty? +# +# # good +# return if foo && foo.empty? +# return unless foo && foo.empty? +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#22 +class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#32 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#28 + def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#25 +RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) + +# Checks if a file which has a shebang line as +# its first line is granted execute permission. +# +# @example +# # bad +# +# # A file which has a shebang line as its first line is not +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has a shebang line as its first line is +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has not a shebang line as its first line is not +# # granted execute permission. +# +# puts 'hello, world' +# +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#33 +class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 + def autocorrect(comment); 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 +# +# # good +# foo = bar +# foo, bar = bar, foo +# Foo = Bar +# +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#19 +class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#41 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#49 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53 + def on_or_asgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#61 + def multiple_self_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#71 + def rhs_matches_lhs?(rhs, lhs); end +end + +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#22 +RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#20 +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#160 + def argument_references(argument); end + + # Find the first argument assignment, which doesn't reference the + # argument at the rhs. If the assignment occurs inside a branch or + # block, it is impossible to tell whether it's executed, so precise + # shadowing location is not known. + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#120 + def assignment_without_argument_usage(argument); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#82 + def check_argument(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#170 + def ignore_implicit_references?; end + + # Check whether the given node is nested into block or conditional. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#151 + def node_within_block_or_conditional?(node, stop_search_node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#143 + def reference_pos(node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#95 + def shadowing_assignment(argument); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#72 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#67 +RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for a rescued exception that get shadowed by a +# less specific exception being rescued before a more specific +# exception is rescued. +# +# An exception is considered shadowed if it is rescued after its +# ancestor is, or if it and its ancestor are both rescued in the +# same `rescue` statement. In both cases, the more specific rescue is +# unnecessary because it is covered by rescuing the less specific +# exception. (ie. `rescue Exception, StandardError` has the same behavior +# whether `StandardError` is included or not, because all ``StandardError``s +# are rescued by `rescue Exception`). +# +# @example +# +# # bad +# +# begin +# something +# rescue Exception +# handle_exception +# rescue StandardError +# handle_standard_error +# end +# +# # bad +# begin +# something +# rescue Exception, StandardError +# handle_error +# end +# +# # good +# +# begin +# something +# rescue StandardError +# handle_standard_error +# rescue Exception +# handle_exception +# end +# +# # good, however depending on runtime environment. +# # +# # This is a special case for system call errors. +# # System dependent error code depends on runtime environment. +# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are +# # the same error code or different error code depends on environment. +# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with +# # the same error code. +# begin +# something +# rescue Errno::EAGAIN, Errno::EWOULDBLOCK +# handle_standard_error +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#61 +class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#67 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#101 + def compare_exceptions(exception, other_exception); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#94 + def contains_multiple_levels_of_exceptions?(group); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119 + def evaluate_exceptions(group); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152 + def find_shadowing_rescue(rescues); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84 + def offense_range(rescues); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#90 + def rescued_groups_for(rescues); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137 + def sorted?(rescued_groups); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#115 + def system_call_err?(error); end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#65 +RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of local variable names from an outer scope +# in block arguments or block-local variables. This mirrors the warning +# given by `ruby -cw` prior to Ruby 2.6: +# "shadowing outer local variable - foo". +# +# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed +# because `Ractor` should not access outer variables. +# eg. following style is encouraged: +# +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- +# +# @example +# +# # bad +# +# def some_method +# foo = 1 +# +# 2.times do |foo| # shadowing outer `foo` +# do_something(foo) +# end +# end +# @example +# +# # 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#45 +class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#57 + def before_declaring_variable(variable, variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 + def find_conditional_node_from_ascendant(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + def node_or_its_ascendant_conditional?(node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 + def ractor_block?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#69 + def same_conditions_node_different_branch?(variable, outer_local_variable); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#83 + def variable_node(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46 +RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) + +# Checks unexpected overrides of the `Struct` built-in methods +# via `Struct.new`. +# +# @example +# # bad +# Bad = Struct.new(:members, :clone, :count) +# b = Bad.new([], true, 1) +# b.members #=> [] (overriding `Struct#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.count #=> 1 (overriding `Enumerable#count`) +# +# # good +# Good = Struct.new(:id, :name) +# g = Good.new(1, "foo") +# g.members #=> [:id, :name] +# g.clone #=> #<struct Good id=1, name="foo"> +# g.count #=> 2 +# +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#24 +class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#38 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#33 + def struct_new(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#25 +RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#27 +RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#30 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#29 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks with no body. +# +# @example +# +# # bad +# def some_method +# do_something +# rescue +# end +# +# # bad +# begin +# do_something +# rescue +# end +# +# # good +# def some_method +# do_something +# rescue +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue +# handle_exception +# end +# @example AllowComments: true (default) +# +# # good +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# @example AllowComments: false +# +# # bad +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # bad +# begin +# do_something +# rescue +# # do nothing +# end +# @example AllowNil: true (default) +# +# # good +# def some_method +# do_something +# rescue +# nil +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# # good +# do_something rescue nil +# @example AllowNil: false +# +# # bad +# def some_method +# do_something +# rescue +# nil +# end +# +# # bad +# begin +# do_something +# rescue +# nil +# end +# +# # bad +# do_something rescue nil +# +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#105 +class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#108 + def on_resbody(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#118 + def comment_between_rescue_and_end?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#126 + def nil_body?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#106 +RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of literal strings converted to +# a symbol where a literal symbol could be used instead. +# +# There are two possible styles for this cop. +# `strict` (default) will register an offense for any incorrect usage. +# `consistent` additionally requires hashes to use the same style for +# every symbol key (ie. if any symbol key needs to be quoted it requires +# all keys to be quoted). +# +# @example +# # bad +# 'string'.to_sym +# :symbol.to_sym +# 'underscored_string'.to_sym +# :'underscored_symbol' +# 'hyphenated-string'.to_sym +# +# # good +# :string +# :symbol +# :underscored_string +# :underscored_symbol +# :'hyphenated-string' +# @example EnforcedStyle: strict (default) +# +# # bad +# { +# 'a': 1, +# "b": 2, +# 'c-d': 3 +# } +# +# # good (don't quote keys that don't require quoting) +# { +# a: 1, +# b: 2, +# 'c-d': 3 +# } +# @example EnforcedStyle: consistent +# +# # bad +# { +# a: 1, +# 'b-c': 2 +# } +# +# # good (quote all keys if any need quoting) +# { +# 'a': 1, +# 'b-c': 2 +# } +# +# # good (no quoting required) +# { +# a: 1, +# b: 2 +# } +# +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#66 +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#100 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#83 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#142 + def correct_hash_key(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#161 + def correct_inconsistent_hash_keys(keys); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#134 + def in_alias?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#138 + def in_percent_literal_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#121 + def properly_quoted?(source, value); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#117 + def register_offense(node, correction:, message: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#130 + def requires_quotes?(sym_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#71 +RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#72 +RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 +RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Repacks Parser's diagnostics/errors +# into RuboCop's offenses. +# +# source://rubocop//lib/rubocop/cop/lint/syntax.rb#8 +class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#9 + def on_other_file; end + + private + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#19 + def add_offense_from_diagnostic(diagnostic, ruby_version); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#26 + def add_offense_from_error(error); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#31 + def beautify_message(message); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#37 + def find_severity(_range, _severity); end +end + +# Ensures that `to_enum`/`enum_for`, called for the current method, +# has correct arguments. +# +# @example +# # bad +# def foo(x, y = 1) +# return to_enum(__callee__, x) # `y` is missing +# end +# +# # good +# def foo(x, y = 1) +# # Alternatives to `__callee__` are `__method__` and `:foo`. +# return to_enum(__callee__, x, y) +# end +# +# # good +# def foo(x, y = 1) +# # It is also allowed if it is wrapped in some method like Sorbet. +# return to_enum(T.must(__callee__), x, y) +# end +# +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#27 +class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#33 + def enum_conversion_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#38 + def method_name?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#43 + def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#78 + def argument_match?(send_arg, def_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#63 + def arguments_match?(arguments, def_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#28 +RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#30 +RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks to make sure `#to_json` includes an optional argument. +# When overriding `#to_json`, callers may invoke JSON +# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows +# for an optional argument, your method should too. +# +# @example +# class Point +# attr_reader :x, :y +# +# # bad, incorrect arity +# def to_json +# JSON.generate([x, y]) +# end +# +# # good, preserving args +# def to_json(*args) +# JSON.generate([x, y], *args) +# end +# +# # good, discarding args +# def to_json(*_args) +# JSON.generate([x, y]) +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/to_json.rb#31 +class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/to_json.rb#36 + def on_def(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/to_json.rb#34 +RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) + +# Checks for top level return with arguments. If there is a +# top-level return statement with an argument, then the argument is +# always ignored. This is detected automatically since Ruby 2.7. +# +# @example +# # bad +# return 1 +# +# # good +# return +# +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#16 +class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#21 + def on_return(return_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#35 + def remove_arguments(corrector, return_node); end + + # This cop works by validating the ancestors of the return node. A + # top-level return node's ancestors should not be of block, def, or + # defs type. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#42 + def top_level_return?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#31 + def top_level_return_with_any_argument?(return_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19 +RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing commas in attribute declarations, such as +# `#attr_reader`. Leaving a trailing comma will nullify the next method +# definition by overriding it with a getter method. +# +# @example +# +# # bad +# class Foo +# attr_reader :foo, +# +# def bar +# puts "Unreachable." +# end +# end +# +# # good +# class Foo +# attr_reader :foo +# +# def bar +# puts "No problem!" +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#30 +class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#36 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#46 + def trailing_comma_range(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#34 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) + +# Checks for "triple quotes" (strings delimited by any odd number +# of quotes greater than 1). +# +# Ruby allows multiple strings to be implicitly concatenated by just +# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes +# gives the impression that there is something special about triple quotes, but +# in fact it is just extra unnecessary quotes and produces the same string. Each +# pair of quotes produces an additional concatenated empty string, so the result +# is still only the "actual" string within the delimiters. +# +# NOTE: Although this cop is called triple quotes, the same behavior is present +# for strings delimited by 5, 7, etc. quotation marks. +# +# @example +# # bad +# """ +# A string +# """ +# +# # bad +# ''' +# A string +# ''' +# +# # good +# " +# A string +# " +# +# # good +# <<STRING +# A string +# STRING +# +# # good (but not the same spacing as the bad case) +# 'A string' +# +# source://rubocop//lib/rubocop/cop/lint/triple_quotes.rb#42 +class RuboCop::Cop::Lint::TripleQuotes < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/triple_quotes.rb#47 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/triple_quotes.rb#65 + def empty_str_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/triple_quotes.rb#45 +RuboCop::Cop::Lint::TripleQuotes::MSG = T.let(T.unsafe(nil), String) + +# Checks for underscore-prefixed variables that are actually +# used. +# +# Since block keyword arguments cannot be arbitrarily named at call +# sites, the `AllowKeywordBlockArguments` will allow use of underscore- +# prefixed block keyword arguments. +# +# @example AllowKeywordBlockArguments: false (default) +# +# # bad +# +# [1, 2, 3].each do |_num| +# do_something(_num) +# end +# +# query(:sales) do |_id:, revenue:, cost:| +# {_id: _id, profit: revenue - cost} +# end +# +# # good +# +# [1, 2, 3].each do |num| +# do_something(num) +# end +# +# [1, 2, 3].each do |_num| +# do_something # not using `_num` +# end +# @example AllowKeywordBlockArguments: true +# +# # good +# +# query(:sales) do |_id:, revenue:, cost:| +# {_id: _id, profit: revenue - cost} +# end +# +# source://rubocop//lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb#43 +class RuboCop::Cop::Lint::UnderscorePrefixedVariableName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb#50 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb#54 + def check_variable(variable); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb#72 + def allowed_keyword_block_argument?(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb#46 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb#44 +RuboCop::Cop::Lint::UnderscorePrefixedVariableName::MSG = T.let(T.unsafe(nil), String) + +# Checks for a block that is known to need more positional +# block arguments than are given (by default this is configured for +# `Enumerable` methods needing 2 arguments). Optional arguments are allowed, +# although they don't generally make sense as the default value will +# be used. Blocks that have no receiver, or take splatted arguments +# (ie. `*args`) are always accepted. +# +# Keyword arguments (including `**kwargs`) do not get counted towards +# this, as they are not used by the methods in question. +# +# Method names and their expected arity can be configured like this: +# +# [source,yaml] +# ---- +# Methods: +# inject: 2 +# reduce: 2 +# ---- +# +# @example +# # bad +# values.reduce {} +# values.min { |a| a } +# values.sort { |a; b| a + b } +# +# # good +# values.reduce { |memo, obj| memo << obj } +# values.min { |a, b| a <=> b } +# values.sort { |*x| x[0] <=> x[1] } +# +# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#41 +class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#63 + def acceptable?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#75 + def arg_count(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#71 + def expected_arity(method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#67 + def included_method?(name); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#59 + def methods; end +end + +# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#42 +RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) + +# Checks for using Fixnum or Bignum constant. +# +# @example +# +# # bad +# +# 1.is_a?(Fixnum) +# 1.is_a?(Bignum) +# @example +# +# # good +# +# 1.is_a?(Integer) +# +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#20 +class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 + def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#30 + def on_const(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#23 +RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) + +# Looks for `reduce` or `inject` blocks where the value returned (implicitly or +# explicitly) does not include the accumulator. A block is considered valid as +# long as at least one return value includes the accumulator. +# +# If the accumulator is not included in the return value, then the entire +# block will just return a transformation of the last element value, and +# could be rewritten as such without a loop. +# +# Also catches instances where an index of the accumulator is returned, as +# this may change the type of object being retained. +# +# NOTE: For the purpose of reducing false positives, this cop only flags +# returns in `reduce` blocks where the element is the only variable in +# the expression (since we will not be able to tell what other variables +# relate to via static analysis). +# +# @example +# +# # bad +# (1..4).reduce(0) do |acc, el| +# el * 2 +# end +# +# # bad, may raise a NoMethodError after the first iteration +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# end +# +# # good +# (1..4).reduce(0) do |acc, el| +# acc + el * 2 +# end +# +# # good, element is returned but modified using the accumulator +# values.reduce do |acc, el| +# el << acc +# el +# end +# +# # good, returns the accumulator instead of the index +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# acc +# end +# +# # good, at least one branch returns the accumulator +# values.reduce(nil) do |result, value| +# break result if something? +# value +# end +# +# # good, recursive +# keys.reduce(self) { |result, key| result[key] } +# +# # ignored as the return value cannot be determined +# enum.reduce do |acc, el| +# x = foo(acc, el) +# bar(x) +# end +# +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#65 +class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#78 + def accumulator_index?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#83 + def element_modified?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#104 + def expression_values(param0); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#93 + def lvar_used?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#70 + def reduce_with_block?(param0 = T.unsafe(nil)); end + + private + + # Determine if a return value is acceptable for the purposes of this cop + # If it is an expression containing the accumulator, it is acceptable + # Otherwise, it is only unacceptable if it contains the iterated element, since we + # otherwise do not have enough information to prevent false positives. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#190 + 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#198 + def allowed_type?(parent_node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#158 + def block_arg_name(node, index); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#141 + def check_return_values(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#175 + 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#127 + 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#166 + 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#182 + 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 +# @example +# +# # good +# +# def some_method +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#37 +class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#55 + def flow_command?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#87 + def check_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81 + def check_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 + def flow_expression?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#38 +RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) + +# Checks for loops that will have at most one iteration. +# +# A loop that can never reach the second iteration is a possible error in the code. +# In rare cases where only one iteration (or at most one iteration) is intended behavior, +# the code should be refactored to use `if` conditionals. +# +# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. +# +# `AllowedPatterns` can be used to match against the block receiver in order to allow +# code that would otherwise be registered as an offense (eg. `times` used not in an +# `Enumerable` context). +# +# @example +# # bad +# while node +# do_something(node) +# node = node.parent +# break +# end +# +# # good +# while node +# do_something(node) +# node = node.parent +# end +# +# # bad +# def verify_list(head) +# item = head +# begin +# if verify(item) +# return true +# else +# return false +# end +# end while(item) +# end +# +# # good +# def verify_list(head) +# item = head +# begin +# if verify(item) +# item = item.next +# else +# return false +# end +# end while(item) +# +# true +# end +# +# # bad +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# else +# raise NotFoundError +# end +# end +# end +# +# # good +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# end +# end +# raise NotFoundError +# end +# +# # bad +# 2.times { raise ArgumentError } +# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) +# +# # good +# exactly(2).times { raise StandardError } +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#86 +class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#143 + def break_command?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#104 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#153 + def break_statement?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#119 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#176 + def check_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#170 + def check_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#194 + def conditional_continue_keyword?(break_statement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#110 + def loop_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#184 + def preceded_by_continue_statement?(break_statement); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 + def statements(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#90 +RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#89 +RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops handling unused arguments. +# +# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#7 +module RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#10 + def after_leaving_scope(scope, _variable_table); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#16 + def check_argument(variable); end +end + +# Checks for unused block arguments. +# +# @example +# # bad +# do_something do |used, unused| +# puts used +# end +# +# do_something do |bar| +# puts :foo +# end +# +# define_method(:foo) do |bar| +# puts :baz +# end +# +# # good +# do_something do |used, _unused| +# puts used +# end +# +# do_something do +# puts :foo +# end +# +# define_method(:foo) do |_bar| +# puts :baz +# end +# @example IgnoreEmptyBlocks: true (default) +# # good +# do_something { |unused| } +# @example IgnoreEmptyBlocks: false +# # bad +# do_something { |unused| } +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# do_something do |unused: 42| +# foo +# end +# @example AllowUnusedKeywordArguments: true +# # good +# do_something do |unused: 42| +# foo +# end +# +# source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#55 +class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#162 + def allow_unused_keyword_arguments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#81 + def allowed_block?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#85 + def allowed_keyword_argument?(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#99 + def augment_message(message, variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#65 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#69 + def check_argument(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#149 + def define_method_call?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#156 + def empty_block?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#166 + def ignore_empty_blocks?; end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#89 + def message(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#132 + def message_for_lambda(variable, all_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#120 + def message_for_normal_block(variable, all_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#144 + def message_for_underscore_prefix(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#77 + def used_block_local?(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#112 + def variable_type(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#59 + def joining_forces; end + end +end + +# Checks for unused method arguments. +# +# @example +# # bad +# def some_method(used, unused, _unused_but_allowed) +# puts used +# end +# +# # good +# def some_method(used, _unused, _unused_but_allowed) +# puts used +# end +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# def do_something(used, unused: 42) +# used +# end +# @example AllowUnusedKeywordArguments: true +# # good +# def do_something(used, unused: 42) +# used +# end +# @example IgnoreEmptyMethods: true (default) +# # good +# def do_something(unused) +# end +# @example IgnoreEmptyMethods: false +# # bad +# def do_something(unused) +# end +# @example IgnoreNotImplementedMethods: true (default) +# # good +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# @example IgnoreNotImplementedMethods: false +# # bad +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#61 +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#66 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#85 + def check_argument(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#93 + def ignored_method?(body); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#98 + def message(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#71 + def autocorrect_incompatible_with; end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 + def joining_forces; end + end +end + +# Identifies places where `URI.escape` can be replaced by +# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` +# depending on your specific use case. +# Also this cop identifies places where `URI.unescape` can be replaced by +# `CGI.unescape`, `URI.decode_www_form`, +# or `URI.decode_www_form_component` depending on your specific use case. +# +# @example +# # bad +# URI.escape('http://example.com') +# URI.encode('http://example.com') +# +# # good +# CGI.escape('http://example.com') +# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) +# URI.encode_www_form(page: 10, locale: 'en') +# URI.encode_www_form_component('http://example.com') +# +# # bad +# URI.unescape(enc_uri) +# URI.decode(enc_uri) +# +# # good +# CGI.unescape(enc_uri) +# URI.decode_www_form(enc_uri) +# URI.decode_www_form_component(enc_uri) +# +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#32 +class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#57 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#51 + def uri_escape_unescape?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#33 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#38 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#47 +RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#44 +RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#48 +RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI.regexp` is obsolete and should +# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. +# +# @example +# # bad +# URI.regexp('http://example.com') +# +# # good +# URI::DEFAULT_PARSER.make_regexp('http://example.com') +# +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#16 +class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#19 +RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#21 +RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#20 +RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) + +# Checks for redundant access modifiers, including those with no +# code, those which are repeated, and leading `public` modifiers in a +# class or module body. Conditionally-defined methods are considered as +# always being defined, and thus access modifiers guarding such methods +# are not redundant. +# +# This cop has `ContextCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create its own context in the module's current access context. +# +# It also has `MethodCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create other methods in the module's current access context. +# +# @example +# # bad +# class Foo +# public # this is redundant (default access is public) +# +# def method +# end +# end +# +# # bad +# class Foo +# # The following is redundant (methods defined on the class' +# # singleton class are not affected by the private modifier) +# private +# +# def self.method3 +# end +# end +# +# # bad +# class Foo +# protected +# +# define_method(:method2) do +# end +# +# protected # this is redundant (repeated from previous modifier) +# +# [1,2,3].each do |i| +# define_method("foo#{i}") do +# end +# end +# end +# +# # bad +# class Foo +# private # this is redundant (no following methods are defined) +# end +# +# # good +# class Foo +# private # this is not redundant (a method is defined) +# +# def method2 +# end +# end +# +# # good +# class Foo +# # The following is not redundant (conditionally defined methods are +# # considered as always defining a method) +# private +# +# if condition? +# def method +# end +# end +# end +# +# # good +# class Foo +# protected # this is not redundant (a method is defined) +# +# define_method(:method2) do +# end +# end +# @example ContextCreatingMethods: concerning +# # Lint/UselessAccessModifier: +# # ContextCreatingMethods: +# # - concerning +# +# # good +# require 'active_support/concern' +# class Foo +# concerning :Bar do +# def some_public_method +# end +# +# private +# +# def some_private_method +# end +# end +# +# # this is not redundant because `concerning` created its own context +# private +# +# def some_other_private_method +# end +# end +# @example MethodCreatingMethods: delegate +# # Lint/UselessAccessModifier: +# # MethodCreatingMethods: +# # - delegate +# +# # good +# require 'active_support/core_ext/module/delegation' +# class Foo +# # this is not redundant because `delegate` creates methods +# private +# +# delegate :method_a, to: :method_b +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#127 +class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#166 + def class_or_instance_eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#161 + def dynamic_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#156 + def static_method_definition?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#182 + def access_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#280 + def any_context_creating_methods?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#257 + def any_method_definition?(child); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#149 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#196 + def check_child_nodes(node, unused, cur_vis); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#226 + def check_new_visibility(node, unused, new_vis, cur_vis); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#170 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#186 + def check_scope(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#215 + def check_send_node(node, cur_vis, unused); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#274 + def eval_call?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#247 + def included_block?(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#251 + def method_definition?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#270 + def start_of_new_scope?(child); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#131 +RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for every useless assignment to local variable in every +# scope. +# The basic idea for this cop was from the warning of `ruby -cw`: +# +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- +# +# Currently this cop has advanced logic that detects unreferenced +# reassignments and properly handles varied cases such as branch, loop, +# rescue, ensure, etc. +# +# 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 +# @example +# +# # good +# +# def some_method +# some_var = 1 +# do_something(some_var) +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 +class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 + def autocorrect(corrector, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + def chained_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 + def check_for_unused_assignments(variable); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 + def collect_variable_like_names(scope); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 + def message_for_useless_assignment(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 + def message_specification(assignment, variable); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 + def multiple_assignment_message(variable_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + def offense_range(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 + def operator_assignment_message(scope, assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 + def remove_exception_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 + def remove_local_variable_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 + def remove_trailing_character_from_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 + def rename_variable_with_underscore(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 + def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end + + # TODO: More precise handling (rescue, ensure, nested begin, etc.) + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 + def return_value_node_of_scope(scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + def sequential_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + def similar_name_message(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 + def variable_like_method_invocation?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 +RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless `else` in `begin..end` without `rescue`. +# +# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. +# +# @example +# +# # bad +# +# begin +# do_something +# else +# do_something_else # This will never be run. +# end +# @example +# +# # good +# +# begin +# do_something +# rescue +# handle_errors +# else +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#31 +class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base + # 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#32 +RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless method definitions, specifically: empty constructors +# and methods just delegating to `super`. +# +# @example +# # bad +# def initialize +# super +# end +# +# def method +# super +# end +# +# # good - with default arguments +# def initialize(x = Object.new) +# super +# end +# +# # good +# def initialize +# super +# initialize_internals +# end +# +# def method(*args) +# super(:extra_arg, *args) +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#38 +class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#65 + def delegating?(node, def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#57 + def method_definition_with_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#61 + def use_rest_or_optional_args?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 +RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless `rescue`s, which only reraise rescued exceptions. +# +# @example +# # bad +# def foo +# do_something +# rescue +# raise +# end +# +# # bad +# def foo +# do_something +# rescue => e +# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' +# end +# +# # good +# def foo +# do_something +# rescue +# do_cleanup +# raise +# end +# +# # bad (latest rescue) +# def foo +# do_something +# rescue ArgumentError +# # noop +# rescue +# raise +# end +# +# # good (not the latest rescue) +# def foo +# do_something +# rescue ArgumentError +# raise +# rescue +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#49 +class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#52 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#83 + def exception_objects(resbody_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#60 + def only_reraising?(resbody_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#75 + def use_exception_variable_in_ensure?(resbody_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#50 +RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) + +# Looks for `ruby2_keywords` calls for methods that do not need it. +# +# `ruby2_keywords` should only be called on methods that accept an argument splat +# (`\*args`) but do not explicit keyword arguments (`k:` or `k: true`) or +# a keyword splat (`**kwargs`). +# +# @example +# # good (splat argument without keyword arguments) +# ruby2_keywords def foo(*args); end +# +# # bad (no arguments) +# ruby2_keywords def foo; end +# +# # good +# def foo; end +# +# # bad (positional argument) +# ruby2_keywords def foo(arg); end +# +# # good +# def foo(arg); end +# +# # bad (double splatted argument) +# ruby2_keywords def foo(**args); end +# +# # good +# def foo(**args); end +# +# # bad (keyword arguments) +# ruby2_keywords def foo(i:, j:); end +# +# # good +# def foo(i:, j:); end +# +# # bad (splat argument with keyword arguments) +# ruby2_keywords def foo(*args, i:, j:); end +# +# # good +# def foo(*args, i:, j:); end +# +# # bad (splat argument with double splat) +# ruby2_keywords def foo(*args, **kwargs); end +# +# # good +# def foo(*args, **kwargs); end +# +# # bad (ruby2_keywords given a symbol) +# def foo; end +# ruby2_keywords :foo +# +# # good +# def foo; end +# +# # bad (ruby2_keywords with dynamic method) +# define_method(:foo) { |arg| } +# ruby2_keywords :foo +# +# # good +# define_method(:foo) { |arg| } +# +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#66 +class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base + # Looks for statically or dynamically defined methods with a given name + # + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#72 + def method_definition(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#79 + def on_send(node); end + + private + + # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments + # + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#118 + def allowed_arguments(arguments); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#109 + def find_method_definition(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#91 + def inspect_def(node, def_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#97 + def inspect_sym(node, sym_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#67 +RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#68 +RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for setter call to local variable as the final +# expression of a function definition. +# +# @example +# +# # bad +# +# def something +# x = Something.new +# x.attr = 5 +# end +# @example +# +# # good +# +# def something +# x = Something.new +# x.attr = 5 +# x +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 +class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 + def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#67 + def last_expression(body); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#39 +RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#38 +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#76 +class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker + # @return [MethodVariableTracker] a new instance of MethodVariableTracker + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#77 + def initialize(body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#163 + def constructor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#82 + def contain_local_object?(variable_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#152 + def process_assignment(asgn_node, rhs_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#100 + def process_assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#142 + def process_binary_operator_assignment(op_asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#133 + def process_logical_operator_assignment(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#114 + def process_multiple_assignment(masgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#92 + def scan(node, &block); end +end + +# Checks for uses of `Integer#times` that will never yield +# (when the integer <= 0) or that will only ever yield once +# (`1.times`). +# +# @example +# # bad +# -5.times { do_something } +# 0.times { do_something } +# 1.times { do_something } +# 1.times { |i| do_something(i) } +# +# # good +# do_something +# do_something(1) +# +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#24 +class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#37 + def block_arg(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#42 + def block_reassigns_arg?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#32 + def times_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#62 + def autocorrect(corrector, count, node, proc_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#84 + def autocorrect_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#80 + def autocorrect_block_pass(corrector, node, proc_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#94 + def fix_indentation(source, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#72 + def never_process?(count, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#106 + def own_line?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#76 + def remove_node(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#28 +RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#29 +RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for operators, variables, literals, lambda, proc and nonmutating +# methods used in void context. +# +# @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#43 +class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/void.rb#80 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#71 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#80 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#71 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/void.rb#194 + def autocorrect_nonmutating_send(corrector, node, suggestion); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#190 + def autocorrect_void_expression(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#178 + def autocorrect_void_op(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#87 + def check_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#93 + def check_expression(expr); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#128 + def check_literal(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#152 + def check_nonmutating(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#136 + def check_self(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#113 + def check_var(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#144 + def check_void_expression(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#104 + def check_void_op(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + def in_void_context?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/void.rb#55 +RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#52 +RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#50 +RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#66 +RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#68 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#59 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#53 +RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#57 +RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#48 +RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#51 +RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#56 +RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#49 +RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#58 +RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) + +# Common functionality for obtaining source ranges from regexp matches +# +# source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 +module RuboCop::Cop::MatchRange + include ::RuboCop::Cop::RangeHelp + + private + + # Return a new `Range` covering the first matching group number for each + # match of `regex` inside `range` + # + # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#13 + def each_match_range(range, regex); end + + # For a `match` inside `range`, return a new `Range` covering the match + # + # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#18 + def match_range(range, match); end +end + +# Message Annotator class annotates a basic offense message +# based on params passed into initializer. +# +# #=> 'Cop/CopName: message (http://example.org/styleguide)' +# +# @example +# RuboCop::Cop::MessageAnnotator.new( +# config, cop_name, cop_config, @options +# ).annotate('message') +# @see #initialize +# +# source://rubocop//lib/rubocop/cop/message_annotator.rb#15 +class RuboCop::Cop::MessageAnnotator + # @option cop_config + # @option cop_config + # @option cop_config + # @option options + # @option options + # @option options + # @option options + # @param config [RuboCop::Config] Check configs for all cops + # @note Message Annotator specifically checks the + # following config options for_all_cops + # :StyleGuideBaseURL [String] URL for styleguide + # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs + # :ExtraDetails [Boolean] Include cop details + # :DisplayCopNames [Boolean] Include cop name + # @param cop_name [String] for specific cop name + # @param cop_config [Hash] configs for specific cop, from config#for_cop + # @param options [Hash, nil] optional + # @return [MessageAnnotator] a new instance of MessageAnnotator + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#47 + def initialize(config, cop_name, cop_config, options); end + + # Returns the annotated message, + # based on params passed into initializer + # + # @return [String] annotated message + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#58 + def annotate(message); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def config; end + + # Returns the value of attribute cop_config. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def cop_config; end + + # Returns the value of attribute cop_name. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def cop_name; end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def options; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#68 + def urls; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#111 + def debug?; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#124 + def details; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#115 + def display_cop_names?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#98 + def display_style_guide?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#107 + def extra_details?; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#102 + def reference_urls; end + + # Returns the base style guide URL from AllCops or the specific department + # + # @return [String] style guide URL + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#91 + def style_guide_base_url; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#74 + def style_guide_url; end + + class << self + # Returns the value of attribute style_guide_urls. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#21 + def style_guide_urls; end + end +end + +# This module handles measurement and reporting of complexity in methods. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#8 +module RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#37 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 + def on_block(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 + def on_def(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 + def on_defs(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 + def on_numblock(node); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#42 + def check_complexity(node, method_name); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 + def complexity(body); end +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: The `ExcludedMethods` configuration is deprecated and only kept +# for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` +# instead. By default, there are no methods to allowed. +# +# NOTE: This cop does not apply for `Struct` definitions. +# +# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# +# something do +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +3 +# key: 'value' +# } +# +# msg = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 6 points +# +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#44 +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#51 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#80 + def cop_label; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#62 + def method_receiver_excluded?(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 +RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for excessive nesting of conditional and looping +# constructs. +# +# You can configure if blocks are considered using the `CountBlocks` +# option. When set to `false` (the default) blocks are not counted +# towards the nesting level. Set to `true` to count blocks as well. +# +# The maximum level of nesting allowed is configurable. +# +# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#14 +class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#19 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#28 + def check_nesting_level(node, max, current_level); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + def consider_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#54 + def count_blocks?; end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#50 + def message(max); end +end + +# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#15 +RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) + +# Checks if the length of a class exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct +# will be counted as one line regardless of its actual size. +# +# NOTE: This cop also applies for `Struct` definitions. +# +# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# +# class Foo +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +3 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 6 points +# +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#39 +class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#65 + def message(length, max_length); end +end + +# Checks for literals with extremely many entries. This is indicative of +# configuration or data that may be better extracted somewhere else, like +# a database, fetched from an API, or read from a non-code file (CSV, +# JSON, YAML, etc.). +# +# @example +# # bad +# # Huge Array literal +# [1, 2, '...', 999_999_999] +# +# # bad +# # Huge Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} +# +# # bad +# # Huge Set "literal" +# Set[1, 2, '...', 999_999_999] +# +# # good +# # Reasonably sized Array literal +# [1, 2, '...', 10] +# +# # good +# # Reading huge Array from external data source +# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) +# +# # good +# # Reasonably sized Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} +# +# # good +# # Reading huge Hash from external data source +# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| +# hash[row["key"].to_i] = row["value"].to_i +# end +# +# # good +# # Reasonably sized Set "literal" +# Set[1, 2, '...', 10] +# +# # good +# # Reading huge Set from external data source +# SomeFramework.config_for(:something)[:numbers].to_set +# +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#50 +class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 + def on_index(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#64 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#70 + def collection_threshold; end +end + +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#51 +RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#53 +RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that the cyclomatic complexity of methods is not higher +# than the configured maximum. The cyclomatic complexity is the number of +# linearly independent paths through a method. The algorithm counts +# decision points and adds one. +# +# An if statement (or unless or ?:) increases the complexity by one. An +# else branch does not, since it doesn't add a decision point. The && +# operator (or keyword and) can be converted to a nested if statement, +# and ||/or is shorthand for a sequence of ifs, so they also add one. +# Loops can be said to have an exit condition, so they add one. +# Blocks that are calls to builtin iteration methods +# (e.g. `ary.map{...}) also add one, others are ignored. +# +# def each_child_node(*types) # count begins: 1 +# unless block_given? # unless: +1 +# return to_enum(__method__, *types) +# +# children.each do |child| # each{}: +1 +# next unless child.is_a?(Node) # unless: +1 +# +# yield child if types.empty? || # if: +1, ||: +1 +# types.include?(child.type) +# end +# +# self +# end # total: 6 +# +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#32 +class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + + private + + # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#42 + def complexity_score_for(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#49 + def count_block?(block); end +end + +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#37 +RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#36 +RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a method exceeds some maximum value. +# Comment lines can optionally be allowed. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct +# will be counted as one line regardless of its actual size. +# +# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is +# deprecated and only kept for backwards compatibility. +# Please use `AllowedMethods` and `AllowedPatterns` instead. +# By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# +# def m +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +3 +# key: 'value' +# } +# +# <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 6 points +# +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#42 +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#56 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 + def cop_label; end +end + +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#47 +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', 'heredoc', 'method_call'] +# +# module M +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +3 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 6 points +# +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#37 +class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#51 + def module_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#44 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#40 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#55 + def message(length, max_length); end +end + +# Checks for methods with too many parameters. +# +# The maximum number of parameters is configurable. +# Keyword arguments can optionally be excluded from the total count, +# as they add less complexity than positional or optional parameters. +# +# Any number of arguments for `initialize` method inside a block of +# `Struct.new` and `Data.define` like this is always allowed: +# +# [source,ruby] +# ---- +# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do +# def initialize(one:, two:, three:, four:, five:) +# end +# end +# ---- +# +# This is because checking the number of arguments of the `initialize` method +# does not make sense. +# +# NOTE: Explicit block argument `&block` is not counted to prevent +# erroneous change that is avoided by making block argument implicit. +# +# This cop also checks for the maximum number of optional parameters. +# This can be configured using the `MaxOptionalParameters` config option. +# +# @example Max: 3 +# # good +# def foo(a, b, c = 1) +# end +# @example Max: 2 +# # bad +# def foo(a, b, c = 1) +# end +# @example CountKeywordArgs: true (default) +# # counts keyword args towards the maximum +# +# # bad (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# # good (assuming Max is 3) +# def foo(a, b, c: 1) +# end +# @example CountKeywordArgs: false +# # don't count keyword args towards the maximum +# +# # good (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# @example MaxOptionalParameters: 3 (default) +# # good +# def foo(a = 1, b = 2, c = 3) +# end +# @example MaxOptionalParameters: 2 +# # bad +# def foo(a = 1, b = 2, c = 3) +# end +# +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#70 +class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#121 + def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max_optional_parameters=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#104 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#81 + def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#125 + def args_count(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#141 + def count_keyword_args?; end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#137 + def max_optional_parameters; end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#133 + def max_params; end +end + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#74 +RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#77 +RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#75 +RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) + +# Tries to produce a complexity score that's a measure of the +# complexity the reader experiences when looking at a method. For that +# reason it considers `when` nodes as something that doesn't add as much +# complexity as an `if` or a `&&`. Except if it's one of those special +# `case`/`when` constructs where there's no expression after `case`. Then +# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` +# nodes count. In contrast to the CyclomaticComplexity cop, this cop +# considers `else` nodes as adding complexity. +# +# @example +# +# def my_method # 1 +# if cond # 1 +# case var # 2 (0.8 + 4 * 0.2, rounded) +# when 1 then func_one +# when 2 then func_two +# when 3 then func_three +# when 4..10 then func_other +# end +# else # 1 +# do_something until a && b # 2 +# end # === +# end # 7 complexity points +# +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#29 +class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity + private + + # source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#36 + def complexity_score_for(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#32 +RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#30 +RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#6 +module RuboCop::Cop::Metrics::Utils; end + +# > ABC is .. a software size metric .. computed by counting the number +# > of assignments, branches and conditions for a section of code. +# > http://c2.com/cgi/wiki?AbcMetric +# +# We separate the *calculator* from the *cop* so that the calculation, +# the formula itself, is easier to test. +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#13 +class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator + include ::RuboCop::AST::Sexp + include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + + # @return [AbcSizeCalculator] a new instance of AbcSizeCalculator + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#42 + def calculate; end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 + def calculate_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#65 + def else_branch?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 + def evaluate_branch_nodes(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#60 + def evaluate_condition_node(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127 + def argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#86 + def assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123 + def branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#119 + def capturing_variable?(name); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#95 + def compound_assignment(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131 + def condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#108 + def simple_assignment?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#71 + def visit_depth_last(node, &block); end + + class << self + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#30 + def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end + end +end + +# > Branch -- an explicit forward program branch out of scope -- a +# > function call, class method call .. +# > http://c2.com/cgi/wiki?AbcMetric +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#21 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) + +# > Condition -- a logical/Boolean test, == != <= >= < > else case +# > default try catch ? and unary conditionals. +# > http://c2.com/cgi/wiki?AbcMetric +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#26 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) + +# Helps to calculate code length for the provided node. +# +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#8 +class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + extend ::RuboCop::AST::NodePattern::Macros + + # @return [CodeLengthCalculator] a new instance of CodeLengthCalculator + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#16 + def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#24 + def calculate; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#182 + def another_args?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 + def build_foldable_checks(types); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#90 + def classlike_code_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#138 + def classlike_node?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#66 + def code_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#163 + def count_comments?; end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 + def each_top_level_descendant(node, types, &block); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#146 + def extract_body(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#142 + def foldable_node?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#121 + def heredoc_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#86 + def heredoc_node?(node); end + + # Returns true for lines that shall not be included in the count. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#159 + def irrelevant_line?(source_line); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 + def line_numbers_of_inner_nodes(node, *types); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#106 + def namespace_module?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#186 + def node_with_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 + def normalize_foldable_types(types); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#167 + def omit_length(descendant); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#178 + def parenthesized?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#190 + def source_from_node_with_heredoc(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#12 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) + +# Used to identify iterating blocks like `.map{}` and `.map(&:...)` +# +# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#8 +module RuboCop::Cop::Metrics::Utils::IteratingBlock + # Returns the name of the method called with a block + # if node is a block node, or a block-pass node. + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#37 + def block_method_name(node); end + + # Returns nil if node is neither a block node or a block-pass node. + # Otherwise returns true/false if method call is a known iterating call + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#53 + def iterating_block?(node); end + + # Returns true iff name is a known iterating type (e.g. :each, :transform_values) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#47 + def iterating_method?(name); end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#33 +RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) + +# Identifies repetitions `{c}send` calls with no arguments: +# +# foo.bar +# foo.bar # => repeated +# foo.bar.baz.qux # => inner send repeated +# foo.bar.baz.other # => both inner send repeated +# foo.bar(2) # => not repeated +# +# It also invalidates sequences if a receiver is reassigned: +# +# xx.foo.bar +# xx.foo.baz # => inner send repeated +# self.xx = any # => invalidates everything so far +# xx.foo.baz # => no repetition +# self.xx.foo.baz # => all repeated +# +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#25 +module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + + # Plug into the calculator + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#61 + def attribute_call?(param0 = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 + def calculate_node(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#43 + def discount_repeated_attributes?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 + def evaluate_branch_nodes(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#92 + def root_node?(param0 = T.unsafe(nil)); end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#66 + def discount_repeated_attribute?(send_node); end + + # Returns the "known_attributes" for the `node` by walking the receiver tree + # If at any step the subdirectory does not exist, it is yielded with the + # associated key (method_name) + # If the node is not a series of `(c)send` calls with no arguments, + # then `nil` is yielded + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#103 + def find_attributes(node, &block); end + + # or `nil` if it is not a setter. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#126 + def setter_to_getter(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#80 + def update_repeated_attribute(node); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#117 +RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) + +# Identifies repetitions `&.` on the same variable: +# +# my_var&.foo +# my_var&.bar # => repeated +# my_var = baz # => reset +# my_var&.qux # => not repeated +# +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#15 +module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#20 + def discount_for_repeated_csend?(csend_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#34 + def reset_on_lvasgn(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#16 + def reset_repeated_csend; end +end + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#5 +module RuboCop::Cop::Migration; end + +# department name. +# +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#8 +class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#21 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#47 + def check_cop_name(name, comment, offset); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#69 + def contain_unexpected_character_for_department_name?(name); end + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#43 + def disable_comment_offset; end + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#73 + def qualified_legacy_cop_name(cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#63 + def valid_content_token?(content_token); end +end + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#14 +RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# The token that makes up a disable comment. +# `DepartmentName/CopName` or` all`. +# +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#19 +RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#12 +RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking minimum body length. +# +# source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#6 +module RuboCop::Cop::MinBodyLength + private + + # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#13 + def min_body_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#9 + def min_body_length?(node); end +end + +# Common functionality for checking minimum branches count. +# +# source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#6 +module RuboCop::Cop::MinBranchesCount + private + + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#29 + def if_conditional_branches(node, branches = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#22 + def min_branches_count; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#9 + def min_branches_count?(node); end +end + +# Common code for indenting the first elements in multiline +# array literals, hash literals, and method definitions. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#7 +module RuboCop::Cop::MultilineElementIndentation + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#42 + def check_expected_style(styles); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#26 + def check_first(first, left_brace, left_parenthesis, offset); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#80 + def detected_styles(actual_column, offset, left_parenthesis, left_brace); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#85 + def detected_styles_for_column(column, left_parenthesis, left_brace); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#10 + def each_argument_node(node, type); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#66 + def hash_pair_where_value_beginning_with(left_brace, first); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#98 + def incorrect_style_detected(styles, first, base_column_type); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#50 + def indent_base(left_brace, first, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#72 + def key_and_value_begin_on_same_line?(pair); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#76 + def right_sibling_begins_on_subsequent_line?(pair); end +end + +# Common functionality for checking for a line break before each +# element in a multi-line collection. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#7 +module RuboCop::Cop::MultilineElementLineBreaks + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#23 + def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#10 + def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end +end + +# Common functionality for checking multiline method calls and binary +# operations. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7 +module RuboCop::Cop::MultilineExpressionIndentation + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#131 + def argument_in_method_call(node, kind); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#187 + def assignment_rhs(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#64 + 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#54 + def correct_indentation(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#159 + def disqualified_rhs?(candidate, ancestor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#203 + def grouped_expression?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#72 + def incorrect_style_detected(range, node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#84 + def indentation(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#121 + def indented_keyword_expression(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#207 + def inside_arg_list_parentheses?(node, ancestor); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#98 + def keyword_message_tail(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#106 + def kw_node_with_special_indentation(node); end + + # In a chain of method calls, we regard the top send node as the base + # for indentation of all lines following the first. For example: + # a. + # b c { block }. <-- b is indented relative to a + # d <-- d is indented relative to a + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#31 + def left_hand_side(lhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#197 + def not_for_this_cop?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#88 + def operation_description(node, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#145 + def part_of_assignment_rhs(node, candidate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#183 + 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#216 + def postfix_conditional?(node); end + + # The []= operator and setters (a.b = c) are parsed as :send nodes. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#175 + def valid_method_rhs_candidate?(candidate, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#164 + def valid_rhs?(candidate, ancestor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#179 + def valid_rhs_candidate?(candidate, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#220 + def within_node?(inner, outer); end +end + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#11 +RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#10 +RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#8 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#12 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#9 +RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) + +# Autocorrection logic for the closing brace of a literal either +# on the same line as the last contained elements, or a new line. +# +# source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#7 +class RuboCop::Cop::MultilineLiteralBraceCorrector + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::RangeHelp + + # @return [MultilineLiteralBraceCorrector] a new instance of MultilineLiteralBraceCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#15 + def initialize(corrector, node, processed_source); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#21 + def call; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#61 + def content_if_comment_present(corrector, node); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#51 + def correct_heredoc_argument_method_chain(corrector, end_range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#46 + def correct_next_line_brace(corrector, end_range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#42 + def correct_same_line_brace(corrector); end + + # Returns the value of attribute corrector. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def corrector; end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#94 + def last_element_range_with_trailing_comma(node); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#103 + def last_element_trailing_comma_range(node); end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def node; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def processed_source; end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#90 + def remove_trailing_content_of_comment(corrector, range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#80 + def select_content_to_be_inserted_after_last_element(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#73 + def use_heredoc_argument_method_chain?(parent); end + + class << self + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#11 + def correct(corrector, node, processed_source); end + end +end + +# Common functionality for checking the closing brace of a literal is +# either on the same line as the last contained elements or a new line. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#7 +module RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#34 + def check(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#12 + def check_brace_layout(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#42 + def check_new_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#50 + def check_same_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#58 + def check_symmetrical(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#86 + def children(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#98 + def closing_brace_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#74 + def empty_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#82 + def ignored_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#78 + def implicit_literal?(node); end + + # Starting with the parent node and recursively for the parent node's + # children, check if the node is a HEREDOC and if the HEREDOC ends below + # or on the last line of the parent node. + # + # Example: + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => false + # foo(a, + # b: { + # a: 1, + # c: <<-EOM + # baz + # EOM + # } + # ) + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => true + # foo(a, + # b: <<-EOM + # baz + # EOM + # ) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#126 + def last_line_heredoc?(node, parent = T.unsafe(nil)); end + + # Returns true for the case + # [a, + # b # comment + # ].some_method + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#26 + def new_line_needed_before_closing_brace?(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#92 + def opening_brace_on_same_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#5 +module RuboCop::Cop::Naming; end + +# Makes sure that accessor methods are named properly. Applies +# to both instance and class methods. +# +# NOTE: Offenses are only registered for methods with the expected +# arity. Getters (`get_attribute`) must have no arguments to be +# registered, and setters (`set_attribute(value)`) must have exactly +# one. +# +# @example +# # bad +# def set_attribute(value) +# end +# +# # good +# def attribute=(value) +# end +# +# # bad +# def get_attribute +# end +# +# # good +# def attribute +# end +# +# # accepted, incorrect arity for getter +# def get_value(attr) +# end +# +# # accepted, incorrect arity for setter +# def set_value +# end +# +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#38 +class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#61 + def bad_reader_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#65 + def bad_writer_name?(node); end + + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#53 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 +RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#40 +RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) + +# Checks for non-ascii characters in identifier and constant names. +# Identifiers are always checked and whether constants are checked +# can be controlled using AsciiConstants config. +# +# @example +# # bad +# def καλημερα # Greek alphabet (non-ascii) +# end +# +# # bad +# def こんにちはと言う # Japanese character (non-ascii) +# end +# +# # bad +# def hello_🍣 # Emoji (non-ascii) +# end +# +# # good +# def say_hello +# end +# +# # bad +# 신장 = 10 # Hangul character (non-ascii) +# +# # good +# height = 10 +# +# # bad +# params[:عرض_gteq] # Arabic character (non-ascii) +# +# # good +# params[:width_gteq] +# @example AsciiConstants: true (default) +# # bad +# class Foö +# end +# +# FOÖ = "foo" +# @example AsciiConstants: false +# # good +# class Foö +# end +# +# FOÖ = "foo" +# +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#53 +class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#59 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#84 + def first_non_ascii_chars(string); end + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#74 + def first_offense_range(identifier); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#70 + def should_check?(token); end +end + +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#57 +RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#56 +RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) + +# Makes sure that certain binary operator methods have their +# sole parameter named `other`. +# +# @example +# +# # bad +# def +(amount); end +# +# # good +# def +(other); end +# +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#16 +class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#29 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#25 + def op_method_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#45 + def op_method?(name); end +end + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#22 +RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#19 +RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#21 +RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`. +# +# It also supports the opposite style by alternative `explicit` option. +# You can specify the block variable name for autocorrection with `BlockForwardingName`. +# The default variable name is `block`. If the name is already in use, it will not be +# autocorrected. +# +# @example EnforcedStyle: anonymous (default) +# +# # bad +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# @example EnforcedStyle: explicit +# +# # bad +# def foo(&) +# bar(&) +# end +# +# # good +# def foo(&block) +# bar(&block) +# end +# +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#40 +class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + def anonymous_block_argument?(node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 + def block_forwarding_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#73 + def expected_block_forwarding_style?(node, last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + def explicit_block_argument?(node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 + def register_offense(block_argument, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#111 + def use_block_argument_as_local_variable?(node, last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#83 + def use_kwarg_in_method_definition?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#50 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#48 +RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) + +# Checks block parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 1. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# bar do |varOne, varTwo| +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# foo { |num1, num2| num1 * num2 } +# +# # With `MinNameLength` set to number greater than 1 +# baz { |a, b, c| do_stuff(a, b, c) } +# +# # good +# bar do |thud, fred| +# thud + fred +# end +# +# foo { |speed, distance| speed * distance } +# +# baz { |age, height, gender| do_stuff(age, height, gender) } +# +# source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#38 +class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#41 + def on_block(node); end +end + +# Checks for class and module names with +# an underscore in them. +# +# `AllowedNames` config takes an array of permitted names. +# Its default value is `['module_parent']`. +# These names can be full class/module names or part of the name. +# eg. Adding `my_class` to the `AllowedNames` config will allow names like +# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. +# +# @example +# # bad +# class My_Class +# end +# module My_Module +# end +# +# # good +# class MyClass +# end +# module MyModule +# end +# class module_parent::MyModule +# end +# +# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#29 +class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#30 +RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) + +# Checks whether constant names are written using +# SCREAMING_SNAKE_CASE. +# +# To avoid false positives, it ignores cases in which we cannot know +# for certain the type of value that would be assigned to a constant. +# +# @example +# # bad +# InchInCm = 2.54 +# INCHinCM = 2.54 +# Inch_In_Cm = 2.54 +# +# # good +# INCH_IN_CM = 2.54 +# +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#20 +class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 + def class_or_struct_return_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#69 + def literal_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 + def on_casgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#56 + def allowed_assignment?(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#74 + def allowed_conditional_expression_on_rhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#63 + def allowed_method_call_on_rhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#78 + def contains_constant?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#21 +RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) + +# Use POSIX character classes, so we allow accented characters rather +# than just standard ASCII characters +# +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#24 +RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Makes sure that Ruby source files have snake_case +# names. Ruby scripts (i.e. source files with a shebang in the +# first line) are ignored. +# +# The cop also ignores `.gemspec` files, because Bundler +# recommends using dashes to separate namespaces in nested gems +# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the +# gemspec is supposed to be named `bundler-console.gemspec`. +# +# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires +# each file to have a class, module or `Struct` defined in it that matches +# the filename. This can be further configured using +# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the +# path should match the namespace of the above definition. +# +# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start +# with a shebang line are not considered by the cop. +# +# When `Regex` is set, the cop will flag any filename that does not match +# the regular expression. +# +# @example +# # bad +# lib/layoutManager.rb +# +# anything/usingCamelCase +# +# # good +# lib/layout_manager.rb +# +# anything/using_snake_case.rake +# +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#39 +class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#56 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#49 + def struct_definition(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#134 + def allowed_acronyms; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#96 + def bad_filename_allowed?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#122 + def check_definition_path_hierarchy?; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#169 + def defined_struct(node); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#126 + def definition_path_hierarchy_roots; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#118 + def expect_matching_definition?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#138 + def filename_good?(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#147 + def find_class_or_module(node, namespace); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 + def find_definition(node); end + + # @yield [source_range(processed_source.buffer, 1, 0), msg] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 + def for_bad_filename(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#114 + def ignore_executable_scripts?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#202 + def match?(expected); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#206 + def match_acronym?(expected, name); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#174 + def match_namespace(node, namespace, expected); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#92 + def matching_class?(file_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#88 + def matching_definition?(file_path); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#100 + def no_definition_message(basename, file_path); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#106 + def other_message(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#188 + def partial_matcher!(expected); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#77 + def perform_class_and_module_naming_checks(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#130 + def regex; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#240 + def to_module_name(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#213 + def to_namespace(path); end +end + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#43 +RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 +RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 +RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#46 +RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks that your heredocs are using the configured case. +# By default it is configured to enforce uppercase heredocs. +# +# @example EnforcedStyle: uppercase (default) +# # bad +# <<-sql +# SELECT * FROM foo +# sql +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# @example EnforcedStyle: lowercase +# # bad +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # good +# <<-sql +# SELECT * FROM foo +# sql +# +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#30 +class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#37 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#54 + def correct_case_delimiters?(node); end + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#58 + def correct_delimiters(source); end + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#50 + def message(_node); end +end + +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#35 +RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) + +# Checks that your heredocs are using meaningful delimiters. +# By default it disallows `END` and `EO*`, and can be configured through +# forbidden listing additional delimiters. +# +# @example +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # bad +# <<-END +# SELECT * FROM foo +# END +# +# # bad +# <<-EOS +# SELECT * FROM foo +# EOS +# +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#26 +class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#31 + def on_heredoc(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 + def forbidden_delimiters; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 + def meaningful_delimiters?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#29 +RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) + +# Recommends the use of inclusive language instead of problematic terms. +# The cop can check the following locations for offenses: +# +# - identifiers +# - constants +# - variables +# - strings +# - symbols +# - comments +# - file paths +# +# Each of these locations can be individually enabled/disabled via configuration, +# for example CheckIdentifiers = true/false. +# +# Flagged terms are configurable for the cop. For each flagged term an optional +# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can +# be configured and will be displayed as part of the offense message. +# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. +# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when +# a term matches the whole word (partial matches will not be offenses). +# +# The cop supports autocorrection when there is only one suggestion. When there are multiple +# suggestions, the best suggestion cannot be identified and will not be autocorrected. +# +# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } +# # Suggest replacing identifier whitelist with allowlist +# +# # bad +# whitelist_users = %w(user1 user1) +# +# # good +# allowlist_users = %w(user1 user2) +# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } +# # Suggest replacing master in an instance variable name with main, primary, or leader +# +# # bad +# @master_node = 'node1.example.com' +# +# # good +# @primary_node = 'node1.example.com' +# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } +# # Identify problematic terms using a Regexp +# +# # bad +# white_list = %w(user1 user2) +# +# # good +# allow_list = %w(user1 user2) +# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } +# # Specify allowed uses of the flagged term as a string or regexp. +# +# # bad +# # They had a masters +# +# # good +# # They had a master's degree +# @example FlaggedTerms: { slave: { WholeWord: true } } +# # Specify that only terms that are full matches will be flagged. +# +# # bad +# Slave +# +# # good (won't be flagged despite containing `slave`) +# TeslaVehicle +# +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#74 +class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [InclusiveLanguage] a new instance of InclusiveLanguage + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#84 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#93 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 + def add_offenses_for_token(token, word_locations); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#167 + def add_to_flagged_term_hash(regex_string, term, term_definition); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#193 + def array_to_ignorecase_regex(strings); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 + def check_token?(type); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#244 + def create_message(word, message = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#218 + def create_multiple_word_message_for_file(words); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#214 + def create_single_word_message_for_file(word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 + def ensure_regex_string(regex); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + def extract_regexp(term, term_definition); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 + def find_flagged_term(word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#266 + def format_suggestions(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 + def investigate_filepath; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 + def investigate_tokens; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#232 + def mask_input(str); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#281 + def offense_range(token, word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 + def preprocess_check_config; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 + def preprocess_flagged_terms; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#259 + def preprocess_suggestions(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 + def process_allowed_regex(allowed); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 + def scan_for_words(input); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 + def set_regexes(flagged_term_strings, allowed_strings); end +end + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#78 +RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#79 +RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#80 +RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 +class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct + # Returns the value of attribute position + # + # @return [Object] the current value of position + def position; end + + # Sets the attribute position + # + # @param value [Object] the value to set the attribute position to. + # @return [Object] the newly set value + def position=(_); end + + # Returns the value of attribute word + # + # @return [Object] the current value of word + def word; end + + # Sets the attribute word + # + # @param value [Object] the value to set the attribute word to. + # @return [Object] the newly set value + def word=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Checks for memoized methods whose instance variable name +# does not match the method name. Applies to both regular methods +# (defined with `def`) and dynamic methods (defined with +# `define_method` or `define_singleton_method`). +# +# This cop can be configured with the EnforcedStyleForLeadingUnderscores +# directive. It can be configured to allow for memoized instance variables +# prefixed with an underscore. Prefixing ivars with an underscore is a +# convention that is used to implicitly indicate that an ivar should not +# be set or referenced outside of the memoization method. +# +# @example EnforcedStyleForLeadingUnderscores: disallowed (default) +# # bad +# # Method foo is memoized using an instance variable that is +# # not `@foo`. This can cause confusion and bugs. +# def foo +# @something ||= calculate_expensive_thing +# end +# +# def foo +# return @something if defined?(@something) +# @something = calculate_expensive_thing +# end +# +# # good +# def _foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= begin +# calculate_expensive_thing +# end +# end +# +# # good +# def foo +# helper_variable = something_we_need_to_calculate_foo +# @foo ||= calculate_expensive_thing(helper_variable) +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# @example EnforcedStyleForLeadingUnderscores: required +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # bad +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# def foo +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# @example EnforcedStyleForLeadingUnderscores :optional +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148 +class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197 + def defined_memoized?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#160 + def method_definition?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#205 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#170 + def on_or_asgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#242 + def find_definition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253 + def matches?(method_name, ivar_assign); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#263 + def message(variable); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 + def style_parameter_name; end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#271 + def suggested_var(method_name); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#277 + def variable_name_candidates(method_name); end +end + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#155 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) + +# Makes sure that all methods use the configured style, +# snake_case or camelCase, for their names. +# +# This cop has `AllowedPatterns` configuration option. +# +# Naming/MethodName: +# AllowedPatterns: +# - '\AonSelectionBulkChange\z' +# - '\AonSelectionCleared\z' +# +# Method names matching patterns are always allowed. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# def fooBar; end +# +# # good +# def foo_bar; end +# @example EnforcedStyle: camelCase +# # bad +# def foo_bar; end +# +# # good +# def fooBar; end +# +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#31 +class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#55 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#44 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#42 + def str_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#39 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#64 + def attr_name(name_item); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#75 + def message(style); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#68 + def range_position(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#36 +RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks method parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 3. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# def bar(varOne, varTwo) +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# def foo(num1, num2) +# num1 * num2 +# end +# +# # With `MinNameLength` set to number greater than 1 +# def baz(a, b, c) +# do_stuff(a, b, c) +# end +# +# # good +# def bar(thud, fred) +# thud + fred +# end +# +# def foo(speed, distance) +# speed * distance +# end +# +# def baz(age_a, height_b, gender_c) +# do_stuff(age_a, height_b, gender_c) +# end +# +# source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#46 +class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 + def on_defs(node); end +end + +# Checks that predicate methods 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 defined in the `NamePrefix` configuration. +# You can change what prefixes are considered by changing this option. +# Any method name that starts with one of these prefixes is required by +# the cop to end with a `?`. Other methods can be allowed by adding to +# the `AllowedMethods` configuration. +# +# NOTE: The `is_a?` method is allowed by default. +# +# If `ForbiddenPrefixes` is set, methods that start with the configured +# prefixes will not be allowed and will be removed by autocorrection. +# +# In other words, if `ForbiddenPrefixes` is empty, a method named `is_foo` +# will register an offense only due to the lack of question mark (and will be +# autocorrected to `is_foo?`). If `ForbiddenPrefixes` contains `is_`, +# `is_foo` will register an offense both because the ? is missing and because of +# the `is_` prefix, and will be corrected to `foo?`. +# +# NOTE: `ForbiddenPrefixes` is only applied to prefixes in `NamePrefix`; +# a prefix in the former but not the latter will not be considered by +# this cop. +# +# @example +# # bad +# def is_even(value) +# end +# +# def is_even?(value) +# end +# +# # good +# def even?(value) +# end +# +# # bad +# def has_value +# end +# +# def has_value? +# end +# +# # good +# def value? +# end +# @example AllowedMethods: ['is_a?'] (default) +# # good +# def is_a?(value) +# end +# +# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59 +class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#63 + def dynamic_method_define(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#69 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + def allowed_method_name?(method_name, prefix); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#106 + def expected_name(method_name, prefix); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#120 + def forbidden_prefixes; end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#116 + def message(method_name, new_name); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#128 + def method_definition_macros(macro_name); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 + def predicate_prefixes; end +end + +# Makes sure that rescued exceptions variables are named as +# expected. +# +# The `PreferredName` config option takes a `String`. It represents +# the required name of the variable. Its default is `e`. +# +# NOTE: This cop does not consider nested rescues because it cannot +# guarantee that the variable from the outer rescue is not used within +# the inner rescue (in which case, changing the inner variable would +# shadow the outer variable). +# +# @example PreferredName: e (default) +# # bad +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _e +# # do something +# end +# @example PreferredName: exception +# # bad +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _exception +# # do something +# end +# +# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#61 +class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#66 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 + def autocorrect(corrector, node, range, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116 + 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#134 + def correct_reassignment(corrector, node, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159 + 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#143 + def preferred_name(variable_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165 + def shadowed_variable_name?(node); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 + def variable_name(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106 + def variable_name_matches?(node, name); end +end + +# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#64 +RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) + +# Makes sure that all variables use the configured style, +# snake_case or camelCase, for their names. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# fooBar = 1 +# +# # good +# foo_bar = 1 +# @example EnforcedStyle: camelCase +# # bad +# foo_bar = 1 +# +# # good +# fooBar = 1 +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) +# fooBar = 1 +# @example AllowedPatterns: ['_v\d+\z'] +# # good (with EnforcedStyle: camelCase) +# :release_v1 +# +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31 +class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_lvar(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 + def on_restarg(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 + def message(style); end +end + +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36 +RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) + +# Makes sure that all numbered variables use the +# configured style, snake_case, normalcase, or non_integer, +# for their numbering. +# +# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options +# can be used to specify whether method names and symbols should be checked. +# Both are enabled by default. +# +# @example 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 +# @example EnforcedStyle: non_integer +# # bad +# :some_sym1 +# :some_sym_1 +# +# variable1 = 1 +# variable_1 = 1 +# +# def some_method1; end +# +# def some_method_1; end +# +# def some_methodone(arg1); end +# def some_methodone(arg_1); end +# +# # good +# :some_symone +# :some_sym_one +# +# variableone = 1 +# variable_one = 1 +# +# def some_methodone; end +# +# def some_method_one; end +# +# def some_methodone(argone); end +# def some_methodone(arg_one); end +# +# # In the following examples, we assume `EnforcedStyle: normalcase` (default). +# @example CheckMethodNames: true (default) +# # bad +# def some_method_1; end +# @example CheckMethodNames: false +# # good +# def some_method_1; end +# @example CheckSymbols: true (default) +# # bad +# :some_sym_1 +# @example CheckSymbols: false +# # good +# :some_sym_1 +# @example AllowedIdentifiers: [capture3] +# # good +# expect(Open3).to receive(:capture3) +# @example AllowedPatterns: ['_v\d+\z'] +# # good +# :some_sym_v1 +# +# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 +class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#126 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#134 + def on_sym(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#110 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#143 + def message(style); end +end + +# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#108 +RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) + +# Some common code shared between `NegatedIf` and +# `NegatedWhile` cops. +# +# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#7 +module RuboCop::Cop::NegativeConditional + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#18 + def empty_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#15 + def single_negative?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#20 + def check_negative_conditional(node, message:, &block); end +end + +# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#10 +RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) + +# This module provides a list of methods that are: +# 1. In the NilClass by default +# 2. Added to NilClass by explicitly requiring any standard libraries +# 3. Cop's configuration parameter AllowedMethods. +# +# source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#9 +module RuboCop::Cop::NilMethods + include ::RuboCop::Cop::AllowedMethods + + private + + # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#14 + def nil_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#18 + def other_stdlib_methods; end +end + +# An offense represents a style violation detected by RuboCop. +# +# source://rubocop//lib/rubocop/cop/offense.rb#6 +class RuboCop::Cop::Offense + include ::Comparable + + # @api private + # @return [Offense] a new instance of Offense + # + # source://rubocop//lib/rubocop/cop/offense.rb#84 + def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end + + # Returns `-1`, `0`, or `+1` + # if this offense is less than, equal to, or greater than `other`. + # + # @api public + # @return [Integer] comparison result + # + # source://rubocop//lib/rubocop/cop/offense.rb#230 + def <=>(other); end + + # @api public + # @return [Boolean] returns `true` if two offenses contain same attributes + # + # source://rubocop//lib/rubocop/cop/offense.rb#211 + def ==(other); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#160 + def column; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#170 + def column_length; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#194 + def column_range; end + + # @api public + # @example + # 'LineLength' + # @return [String] a cop class name without department. + # i.e. type of the violation. + # + # source://rubocop//lib/rubocop/cop/offense.rb#51 + def cop_name; end + + # @api public + # @return [Boolean] whether this offense can be automatically corrected via + # autocorrect or a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#102 + def correctable?; end + + # @api public + # @return [Boolean] whether this offense is automatically corrected via + # autocorrect or a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#113 + def corrected?; end + + # @api public + # @return [Boolean] whether this offense is automatically disabled via a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#123 + def corrected_with_todo?; end + + # @api public + # @return [Corrector | nil] the autocorrection for this offense, or `nil` when not available + # + # source://rubocop//lib/rubocop/cop/offense.rb#62 + def corrector; end + + # @api public + # @return [Boolean] whether this offense was locally disabled with a + # disable or todo where it occurred. + # + # source://rubocop//lib/rubocop/cop/offense.rb#134 + def disabled?; end + + # @api public + # @return [Boolean] returns `true` if two offenses contain same attributes + # + # source://rubocop//lib/rubocop/cop/offense.rb#211 + def eql?(other); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#179 + def first_line; end + + # source://rubocop//lib/rubocop/cop/offense.rb#219 + def hash; end + + # @api public + # @return [Parser::Source::Range] the range of the code that is highlighted + # + # source://rubocop//lib/rubocop/cop/offense.rb#142 + def highlighted_area; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#189 + def last_column; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#184 + def last_line; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#155 + def line; end + + # @api public + # @return [Parser::Source::Range] the location where the violation is detected. + # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range Parser::Source::Range + # + # source://rubocop//lib/rubocop/cop/offense.rb#28 + def location; end + + # @api public + # @example + # 'Line is too long. [90/80]' + # @return [String] human-readable message + # + # source://rubocop//lib/rubocop/cop/offense.rb#39 + def message; end + + # Internally we use column number that start at 0, but when + # outputting column numbers, we want them to start at 1. One + # reason is that editors, such as Emacs, expect this. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#203 + def real_column; end + + # @api public + # @return [RuboCop::Cop::Severity] + # + # source://rubocop//lib/rubocop/cop/offense.rb#17 + def severity; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#165 + def source_line; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#54 + def status; end + + # This is just for debugging purpose. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#148 + def to_s; end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/offense.rb#10 +RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/offense.rb#81 +RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) + +# source://rubocop//lib/rubocop/cop/offense.rb#64 +class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct + # Returns the value of attribute begin_pos + # + # @return [Object] the current value of begin_pos + def begin_pos; end + + # Sets the attribute begin_pos + # + # @param value [Object] the value to set the attribute begin_pos to. + # @return [Object] the newly set value + def begin_pos=(_); end + + # Returns the value of attribute column + # + # @return [Object] the current value of column + def column; end + + # Sets the attribute column + # + # @param value [Object] the value to set the attribute column to. + # @return [Object] the newly set value + def column=(_); end + + # source://rubocop//lib/rubocop/cop/offense.rb#70 + def column_range; end + + # Returns the value of attribute end_pos + # + # @return [Object] the current value of end_pos + def end_pos; end + + # Sets the attribute end_pos + # + # @param value [Object] the value to set the attribute end_pos to. + # @return [Object] the newly set value + def end_pos=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def first_line; end + + # Returns the value of attribute column + # + # @return [Object] the current value of column + def last_column; end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def last_line; end + + # source://rubocop//lib/rubocop/cop/offense.rb#74 + def length; end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # source://rubocop//lib/rubocop/cop/offense.rb#74 + def size; end + + # Returns the value of attribute source_line + # + # @return [Object] the current value of source_line + def source_line; end + + # Sets the attribute source_line + # + # @param value [Object] the value to set the attribute source_line to. + # @return [Object] the newly set value + def source_line=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Common functionality for cops checking if and unless expressions. +# +# source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#6 +module RuboCop::Cop::OnNormalIfUnless + # source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#7 + def on_if(node); end +end + +# This autocorrects gem dependency order +# +# source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#6 +class RuboCop::Cop::OrderedGemCorrector + extend ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::RangeHelp + + class << self + # Returns the value of attribute comments_as_separators. + # + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 + def comments_as_separators; end + + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#13 + def correct(processed_source, node, previous_declaration, comments_as_separators); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#26 + def declaration_with_comment(node); end + end +end + +# Common functionality for Bundler/OrderedGems and +# Gemspec/OrderedDependencies. +# +# source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#7 +module RuboCop::Cop::OrderedGemNode + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#23 + def case_insensitive_out_of_order?(string_a, string_b); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#27 + def consecutive_lines(previous, current); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#55 + def find_gem_name(gem_node); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#18 + def gem_canonical_name(name); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#49 + def gem_name(declaration_node); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#10 + def get_source_range(node, comments_as_separators); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#32 + def register_offense(previous, current); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#61 + def treat_comments_as_separators; end +end + +# Common functionality for handling parentheses. +# +# source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#6 +module RuboCop::Cop::Parentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#9 + def parens_required?(node); end +end + +# This autocorrects parentheses +# +# source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#6 +class RuboCop::Cop::ParenthesesCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#12 + def correct(corrector, node); end + + private + + # Add a comma back after the heredoc identifier + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#74 + def add_heredoc_comma(corrector, node); end + + # If the node contains a heredoc, remove the comma too + # It'll be added back in the right place later + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#64 + def extend_range_for_heredoc(node, range); end + + # If removing parentheses leaves a comma on its own line, remove all the whitespace + # preceding it to prevent a syntax error. + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#41 + def handle_orphaned_comma(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#80 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#28 + def next_char_is_question_mark?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#32 + def only_closing_paren_before_comma?(node); end + + # Get a range for the closing parenthesis and all whitespace to the left of it + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#51 + def parens_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#24 + def ternary_condition?(node); end + end +end + +# Common functionality for handling percent arrays. +# +# source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#6 +module RuboCop::Cop::PercentArray + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#26 + def allowed_bracket_array?(node); end + + # @param node [RuboCop::AST::ArrayNode] + # @param elements [Array<String>] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#83 + def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end + + # @param preferred_array_code [String] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#56 + def build_message_for_bracketed_array(preferred_array_code); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#67 + def check_bracketed_array(node, literal_prefix); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#36 + def check_percent_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#31 + def comments_in_array?(node); end + + # Override to determine values that are invalid in a percent array + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#22 + def invalid_percent_array_contents?(_node); end + + # Ruby does not allow percent arrays in an ambiguous block context. + # + # @example + # + # foo %i[bar baz] { qux } + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#14 + def invalid_percent_array_context?(node); end + + # Provides whitespace between elements for building a bracketed array. + # %w[ a b c ] + # ^^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#98 + def whitespace_between(node); end + + # Provides leading whitespace for building a bracketed array. + # %w[ a b c ] + # ^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#111 + def whitespace_leading(node); end + + # Provides trailing whitespace for building a bracketed array. + # %w[ a b c ] + # ^^^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#120 + def whitespace_trailing(node); end +end + +# Common functionality for handling percent literals. +# +# source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#6 +module RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::RangeHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#23 + def begin_source(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#11 + def percent_literal?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#17 + def process(node, *types); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#27 + def type(node); end +end + +# This autocorrects percent literals +# +# source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#6 +class RuboCop::Cop::PercentLiteralCorrector + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + + # @return [PercentLiteralCorrector] a new instance of PercentLiteralCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#11 + def initialize(config, preferred_delimiters); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 + def config; end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#16 + def correct(corrector, node, char); end + + # Returns the value of attribute preferred_delimiters. + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 + def preferred_delimiters; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#46 + def autocorrect_multiline_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#52 + def autocorrect_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#34 + def delimiters_for(type); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#100 + def end_content(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#30 + def escape_words?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#78 + def first_line?(node, previous_line_num); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#89 + def fix_escaped_content(word_node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#69 + def line_breaks(node, source, previous_line_num, base_line_num, node_index); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#38 + def new_contents(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#82 + def process_lines(node, previous_line_num, base_line_num, source_in_lines); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#58 + def process_multiline_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#96 + def substitute_escaped_delimiters(content, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#26 + def wrap_contents(corrector, node, contents, char, delimiters); end +end + +# Common functionality for checking whether an AST node/token is aligned +# with something on a preceding or following line +# +# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#7 +module RuboCop::Cop::PrecedingFollowingAlignment + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 + def aligned_assignment?(range, line); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 + def aligned_comment_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 + def aligned_identical?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#81 + def aligned_operator?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#77 + def aligned_token?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#34 + def aligned_with_adjacent_line?(range, predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#52 + def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#42 + def aligned_with_any_line_range?(line_ranges, range, &predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98 + def aligned_with_append_operator?(range, line); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109 + def aligned_with_assignment(token, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#56 + def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#18 + def aligned_with_operator?(range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#22 + def aligned_with_preceding_assignment(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#14 + def aligned_with_something?(range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#28 + def aligned_with_subsequent_assignment(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 + def aligned_words?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 + def allow_for_alignment?; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127 + def assignment_lines; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131 + def assignment_tokens; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147 + def relevant_assignment_lines(line_range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174 + def remove_optarg_equals(asgn_tokens, processed_source); end +end + +# Common functionality for handling percent literal delimiters. +# +# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#6 +class RuboCop::Cop::PreferredDelimiters + # @return [PreferredDelimiters] a new instance of PreferredDelimiters + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#11 + def initialize(type, config, preferred_delimiters); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 + def config; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#17 + def delimiters; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 + def type; end + + private + + # @raise [ArgumentError] + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#23 + def ensure_valid_preferred_delimiters; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#30 + def preferred_delimiters; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#45 + def preferred_delimiters_config; end +end + +# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#9 +RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# This autocorrects punctuation +# +# source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#6 +class RuboCop::Cop::PunctuationCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#12 + def add_space(corrector, token); end + + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#8 + def remove_space(corrector, space_before); end + + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#16 + def swap_comma(corrector, range); end + end +end + +# Methods that calculate and return Parser::Source::Ranges +# +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 +module RuboCop::Cop::RangeHelp + private + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#141 + def add_range(range1, range2); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#82 + def column_offset_between(base_range, range); end + + # A range containing only the contents of a literal with delimiters (e.g. in + # `%i{1 2 3}` this will be the range covering `1 2 3` only). + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#32 + def contents_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#100 + def directions(side); end + + # Returns the column attribute of the range, except if the range is on + # the first line and there's a byte order mark at the beginning of that + # line, in which case 1 is subtracted from the column value. This gives + # the column as it appears when viewing the file in an editor. + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#92 + def effective_column(range); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#109 + def final_pos(src, pos, increment, continuations, newlines, whitespace); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#117 + def move_pos(src, pos, step, condition, regexp); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#123 + def move_pos_str(src, pos, step, condition, needle); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#36 + def range_between(start_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#73 + def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#134 + def range_with_comments(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#130 + def range_with_comments_and_lines(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#40 + def range_with_surrounding_comma(range, side = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#55 + def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#11 + def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end +end + +# The Unicode codepoint +# +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#9 +RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#54 +module RuboCop::Cop::RangeHelp::NOT_GIVEN; end + +# Common functionality for handling Rational literals. +# +# source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#6 +module RuboCop::Cop::RationalLiteral + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#12 + def rational_literal?(param0 = T.unsafe(nil)); end +end + +# Registry that tracks all cops by their badge and department. +# +# source://rubocop//lib/rubocop/cop/registry.rb#19 +class RuboCop::Cop::Registry + include ::Enumerable + + # @return [Registry] a new instance of Registry + # + # source://rubocop//lib/rubocop/cop/registry.rb#51 + def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#232 + def ==(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#97 + def contains_cop_matching?(names); end + + # source://rubocop//lib/rubocop/cop/registry.rb#179 + def cops; end + + # source://rubocop//lib/rubocop/cop/registry.rb#224 + def cops_for_department(department); end + + # @return [Boolean] Checks if given name is department + # + # source://rubocop//lib/rubocop/cop/registry.rb#93 + def department?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#147 + def department_missing?(badge, name); end + + # @return [Array<Symbol>] list of departments for current cops. + # + # source://rubocop//lib/rubocop/cop/registry.rb#72 + def departments; end + + # source://rubocop//lib/rubocop/cop/registry.rb#193 + def disabled(config); end + + # source://rubocop//lib/rubocop/cop/registry.rb#67 + def dismiss(cop); end + + # source://rubocop//lib/rubocop/cop/registry.rb#247 + def each(&block); end + + # source://rubocop//lib/rubocop/cop/registry.rb#189 + def enabled(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#197 + def enabled?(cop, config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#213 + def enabled_pending_cop?(cop_cfg, config); end + + # source://rubocop//lib/rubocop/cop/registry.rb#63 + def enlist(cop); end + + # @param cop_name [String] + # @return [Class, nil] + # + # source://rubocop//lib/rubocop/cop/registry.rb#253 + def find_by_cop_name(cop_name); end + + # When a cop name is given returns a single-element array with the cop class. + # When a department name is given returns an array with all the cop classes + # for that department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#260 + def find_cops_by_directive(directive); end + + # source://rubocop//lib/rubocop/cop/registry.rb#265 + def freeze; end + + # source://rubocop//lib/rubocop/cop/registry.rb#184 + def length; end + + # source://rubocop//lib/rubocop/cop/registry.rb#220 + def names; end + + # source://rubocop//lib/rubocop/cop/registry.rb#228 + def names_for_department(department); end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cop/registry.rb#49 + def options; end + + # source://rubocop//lib/rubocop/cop/registry.rb#151 + def print_warning(name, path); end + + # Convert a user provided cop name into a properly namespaced name + # + # @example gives back a correctly qualified cop name + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' + # @example fixes incorrect namespaces + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' + # @example namespaces bare cop identifiers + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' + # @example passes back unrecognized cop names + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('NotACop', '') # => 'NotACop' + # @note Emits a warning if the provided name has an incorrect namespace + # @param name [String] Cop name extracted from config + # @param path [String, nil] Path of file that `name` was extracted from + # @param warn [Boolean] Print a warning if no department given for `name` + # @raise [AmbiguousCopName] if a bare identifier with two possible namespaces is provided + # @return [String] Qualified cop name + # + # source://rubocop//lib/rubocop/cop/registry.rb#133 + def qualified_cop_name(name, path, warn: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#166 + def qualify_badge(badge); end + + # source://rubocop//lib/rubocop/cop/registry.rb#243 + def select(&block); end + + # source://rubocop//lib/rubocop/cop/registry.rb#236 + def sort!; end + + # @return [Hash{String => Array<Class>}] + # + # source://rubocop//lib/rubocop/cop/registry.rb#174 + def to_h; end + + # source://rubocop//lib/rubocop/cop/registry.rb#159 + def unqualified_cop_names; end + + # @return [Registry] Cops for that specific department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#78 + def with_department(department); end + + # @return [Registry] Cops not for a specific department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#84 + def without_department(department); end + + private + + # source://rubocop//lib/rubocop/cop/registry.rb#283 + def clear_enrollment_queue; end + + # source://rubocop//lib/rubocop/cop/registry.rb#279 + def initialize_copy(reg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#309 + def registered?(badge); end + + # source://rubocop//lib/rubocop/cop/registry.rb#299 + def resolve_badge(given_badge, real_badge, source_path); end + + # source://rubocop//lib/rubocop/cop/registry.rb#295 + def with(cops); end + + class << self + # source://rubocop//lib/rubocop/cop/registry.rb#22 + def all; end + + # Returns the value of attribute global. + # + # source://rubocop//lib/rubocop/cop/registry.rb#274 + def global; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#44 + def qualified_cop?(name); end + + # source://rubocop//lib/rubocop/cop/registry.rb#26 + def qualified_cop_name(name, origin); end + + # source://rubocop//lib/rubocop/cop/registry.rb#40 + def reset!; end + + # Changes momentarily the global registry + # Intended for testing purposes + # + # source://rubocop//lib/rubocop/cop/registry.rb#32 + def with_temporary_global(temp_global = T.unsafe(nil)); end + end +end + +# Ensure a require statement is present for a standard library determined +# by variable library_name +# +# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#7 +module RuboCop::Cop::RequireLibrary + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#12 + def ensure_required(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#24 + def remove_subsequent_requires(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#51 + def require_any_library?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#56 + def require_library_name?(param0 = T.unsafe(nil), param1); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#44 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#10 +RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class ensures a require statement is present for a standard library +# determined by the variable library_name +# +# source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#7 +class RuboCop::Cop::RequireLibraryCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#11 + def correct(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#17 + def require_statement(library_name); end + end +end + +# Common functionality for checking `rescue` nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#6 +module RuboCop::Cop::RescueNode + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#7 + def modifier_locations; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#13 + def rescue_modifier?(node); end + + # @deprecated Use ResbodyNode#exceptions instead + # + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#20 + def rescued_exceptions(resbody); end +end + +# Common functionality for safe assignment. By safe assignment we mean +# putting parentheses around an assignment to indicate "I know I'm using an +# assignment as a condition. It's not a mistake." +# +# source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#8 +module RuboCop::Cop::SafeAssignment + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#14 + def empty_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#20 + def safe_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#17 + def setter_method?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#22 + def safe_assignment_allowed?; end +end + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#5 +module RuboCop::Cop::Security; end + +# Checks for implementations of the `hash` method which combine +# values using custom logic instead of delegating to `Array#hash`. +# +# Manually combining hashes is error prone and hard to follow, especially +# when there are many values. Poor implementations may also introduce +# performance or security concerns if they are prone to collisions. +# Delegating to `Array#hash` is clearer and safer, although it might be slower +# depending on the use case. +# +# @example +# +# # bad +# def hash +# @foo ^ @bar +# end +# +# # good +# def hash +# [@foo, @bar].hash +# end +# +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#30 +class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#58 + def bad_hash_combinator?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#75 + def contained_in_hash_method?(node, &block); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#42 + def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#37 + def hash_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#63 + def monuple_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#87 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#87 + def on_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#81 + def outer_bad_hash_combinator?(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#68 + def redundant_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#51 + def static_hash_method_definition?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#31 +RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#32 +RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#34 +RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of `Kernel#eval` and `Binding#eval`. +# +# @example +# +# # bad +# +# eval(something) +# binding.eval(something) +# +# source://rubocop//lib/rubocop/cop/security/eval.rb#14 +class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/eval.rb#19 + def eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/eval.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/eval.rb#15 +RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/eval.rb#16 +RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, +# `IO.foreach`, and `IO.readlines`. +# +# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, +# a subprocess is created in the same way as `Kernel#open`, and its output is returned. +# `Kernel#open` may allow unintentional command injection, which is the reason these +# `IO` methods are a security risk. +# Consider to use `File.read` to disable the behavior of subprocess invocation. +# +# @example +# +# # bad +# IO.read(path) +# IO.read('path') +# +# # good +# File.read(path) +# File.read('path') +# IO.read('| command') # Allow intentional command invocation. +# +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#30 +class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/io_methods.rb#36 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#33 +RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#34 +RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of JSON class methods which have potential +# security issues. +# +# @example +# # bad +# JSON.load("{}") +# JSON.restore("{}") +# +# # good +# JSON.parse("{}") +# +# source://rubocop//lib/rubocop/cop/security/json_load.rb#26 +class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/json_load.rb#33 + def json_load(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/json_load.rb#37 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/json_load.rb#29 +RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/json_load.rb#30 +RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of Marshal class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# @example +# # bad +# Marshal.load("{}") +# Marshal.restore("{}") +# +# # good +# Marshal.dump("{}") +# +# # okish - deep copy hack +# Marshal.load(Marshal.dump({})) +# +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#21 +class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#26 + def marshal_load(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#31 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#22 +RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#23 +RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#open` and `URI.open` with dynamic +# data. +# +# `Kernel#open` and `URI.open` enable not only file access but also process +# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). +# So, it may lead to a serious security risk by using variable input to +# the argument of `Kernel#open` and `URI.open`. It would be better to use +# `File.open`, `IO.popen` or `URI.parse#open` explicitly. +# +# NOTE: `open` and `URI.open` with literal strings are not flagged by this +# cop. +# +# @example +# # bad +# open(something) +# open("| #{something}") +# URI.open(something) +# +# # good +# File.open(something) +# IO.popen(something) +# URI.parse(something).open +# +# # good (literal strings) +# open("foo.text") +# open("| foo") +# URI.open("http://example.com") +# +# source://rubocop//lib/rubocop/cop/security/open.rb#37 +class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/open.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/security/open.rb#42 + def open?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#75 + def composite_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#83 + def concatenated_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#79 + def interpolated_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#57 + def safe?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#67 + def safe_argument?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#71 + def simple_string?(node); end +end + +# source://rubocop//lib/rubocop/cop/security/open.rb#38 +RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/open.rb#39 +RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of YAML class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. +# +# @example +# # bad +# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default +# +# # good +# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) +# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) +# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) +# YAML.dump(foo) +# +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#26 +class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#37 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#33 + def yaml_load(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#29 +RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#30 +RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Severity class is simple value object about severity +# +# source://rubocop//lib/rubocop/cop/severity.rb#6 +class RuboCop::Cop::Severity + include ::Comparable + + # @api private + # @raise [ArgumentError] + # @return [Severity] a new instance of Severity + # + # source://rubocop//lib/rubocop/cop/severity.rb#30 + def initialize(name_or_code); end + + # source://rubocop//lib/rubocop/cop/severity.rb#62 + def <=>(other); end + + # source://rubocop//lib/rubocop/cop/severity.rb#50 + def ==(other); end + + # source://rubocop//lib/rubocop/cop/severity.rb#42 + def code; end + + # source://rubocop//lib/rubocop/cop/severity.rb#58 + def hash; end + + # source://rubocop//lib/rubocop/cop/severity.rb#46 + def level; end + + # @api public + # @return [Symbol] severity. + # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. + # + # source://rubocop//lib/rubocop/cop/severity.rb#22 + def name; end + + # source://rubocop//lib/rubocop/cop/severity.rb#38 + def to_s; end + + class << self + # source://rubocop//lib/rubocop/cop/severity.rb#24 + def name_from_code(code); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/severity.rb#12 +RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/severity.rb#9 +RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) + +# Common functionality for cops checking for missing space after +# punctuation. +# +# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#7 +module RuboCop::Cop::SpaceAfterPunctuation + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#10 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#38 + def allowed_type?(token); end + + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#20 + def each_missing_space(tokens); end + + # The normal offset, i.e., the distance from the punctuation + # token where a space should be, is 1. + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#49 + def offset; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#42 + def space_forbidden_before_rcurly?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#30 + def space_missing?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#34 + def space_required_before?(token); end +end + +# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#8 +RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops checking for space before +# punctuation. +# +# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#7 +module RuboCop::Cop::SpaceBeforePunctuation + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#12 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#22 + def each_missing_space(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#34 + def space_missing?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#38 + def space_required_after?(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#42 + def space_required_after_lcurly?; end +end + +# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#10 +RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) + +# This autocorrects whitespace +# +# source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#6 +class RuboCop::Cop::SpaceCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::SurroundingSpace + + class << self + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#36 + def add_space(processed_source, corrector, left_token, right_token); end + + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#12 + def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#10 + def processed_source; end + + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#24 + def remove_space(processed_source, corrector, left_token, right_token); end + end +end + +# Common functionality for modifier cops. +# +# source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#6 +module RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#79 + def code_after(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 + def comment_disables_cop?(comment); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 + def first_line_comment(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#58 + def if_body_source(if_body); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#44 + def length_in_modifier_form(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#97 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#67 + def method_source(if_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#38 + def modifier_fits_on_single_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#27 + def non_eligible_body?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#34 + def non_eligible_condition?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#20 + def non_eligible_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 + def parenthesize?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#12 + def single_line_as_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#51 + def to_modifier_form(node); end +end + +# Classes that include this module just implement functions to determine +# what is an offense and how to do autocorrection. They get help with +# adding offenses for the faulty string nodes, and with filtering out +# nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/string_help.rb#9 +module RuboCop::Cop::StringHelp + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#26 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#10 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#32 + def inside_interpolation?(node); end +end + +# This autocorrects string literals +# +# source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#6 +class RuboCop::Cop::StringLiteralCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#10 + def correct(corrector, node, style); end + end +end + +# Common functionality for cops checking single/double quotes. +# +# source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#6 +module RuboCop::Cop::StringLiteralsHelp + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#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. +# +# @example EnforcedStyle: group (default) +# # bad +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# # good +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# @example EnforcedStyle: inline +# # bad +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# # good +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# @example AllowModifiersOnSymbols: true (default) +# # good +# class Foo +# +# private :bar, :baz +# +# end +# @example AllowModifiersOnSymbols: false +# # bad +# class Foo +# +# private :bar, :baz +# +# end +# +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#70 +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#91 + def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#95 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#145 + def access_modifier_is_inlined?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#149 + def access_modifier_is_not_inlined?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 + def allow_modifiers_on_symbols?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#112 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + def def_source(node, def_node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#180 + def find_argument_less_modifier_node(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#169 + def find_corresponding_def_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#137 + def group_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 + def inline_style?; end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#211 + def insert_inline_modifier(corrector, node, modifier_name); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#159 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#215 + def remove_node(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#194 + def replace_def(corrector, node, def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#153 + def right_siblings_same_inline_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#188 + def select_grouped_def_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#88 +RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#76 +RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#81 +RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#86 +RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for grouping of accessors in `class` and `module` bodies. +# By default it enforces accessors to be placed in grouped declarations, +# but it can be configured to enforce separating them in multiple declarations. +# +# NOTE: If there is a method call before the accessor method it is always allowed +# as it might be intended like Sorbet. +# +# @example EnforcedStyle: grouped (default) +# # bad +# class Foo +# attr_reader :bar +# attr_reader :bax +# attr_reader :baz +# end +# +# # good +# class Foo +# attr_reader :bar, :bax, :baz +# end +# +# # good +# class Foo +# # may be intended comment for bar. +# attr_reader :bar +# +# sig { returns(String) } +# attr_reader :bax +# +# may_be_intended_annotation :baz +# attr_reader :baz +# end +# @example EnforcedStyle: separated +# # bad +# class Foo +# attr_reader :bar, :baz +# end +# +# # good +# class Foo +# attr_reader :bar +# attr_reader :baz +# end +# +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#50 +class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#82 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 + def check(send_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114 + def class_send_elements(class_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157 + def group_accessors(node, accessors); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96 + def groupable_accessor?(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 + def groupable_sibling_accessors(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 + def grouped_style?; end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 + def message(send_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148 + def preferred_accessors(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91 + def previous_line_comment?(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163 + def separate_accessors(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 + def separated_style?; end +end + +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#56 +RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#57 +RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of either `#alias` or `#alias_method` +# depending on configuration. +# It also flags uses of `alias :symbol` rather than `alias bareword`. +# +# However, it will always enforce `method_alias` when used `alias` +# in an instance method definition and in a singleton method definition. +# If used in a block, always enforce `alias_method` +# unless it is an `instance_eval` block. +# +# @example EnforcedStyle: prefer_alias (default) +# # bad +# alias_method :bar, :foo +# alias :bar :foo +# +# # good +# alias bar foo +# @example EnforcedStyle: prefer_alias_method +# # bad +# alias :bar :foo +# alias bar foo +# +# # good +# alias_method :bar, :foo +# +# source://rubocop//lib/rubocop/cop/style/alias.rb#31 +class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/alias.rb#51 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#41 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/alias.rb#85 + def add_offense_for_args(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#75 + def alias_keyword_possible?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#79 + def alias_method_possible?(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#65 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#124 + def bareword?(sym_node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#128 + def correct_alias_method_to_alias(corrector, send_node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#135 + def correct_alias_to_alias_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#142 + def correct_alias_with_symbol_args(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#147 + def identifier(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#113 + def lexical_scope_type(node); end + + # 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#96 + def scope_type(node); end +end + +# source://rubocop//lib/rubocop/cop/style/alias.rb#35 +RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#36 +RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#37 +RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#39 +RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `and` and `or`, and suggests using `&&` and +# `||` instead. It can be configured to check only in conditions or in +# all contexts. +# +# @example EnforcedStyle: conditionals (default) +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# foo.save and return +# +# # good +# if foo && bar +# end +# @example EnforcedStyle: always +# # bad +# foo.save and return +# +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# if foo && bar +# end +# +# source://rubocop//lib/rubocop/cop/style/and_or.rb#44 +class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_while_post(node); end + + private + + # ! is a special case: + # 'x and !obj.method arg' can be autocorrected if we + # recurse down a level and add parens to 'obj.method arg' + # however, 'not x' also parses as (send x :!) + # + # source://rubocop//lib/rubocop/cop/style/and_or.rb#117 + def correct_not(node, receiver, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#129 + def correct_other(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#95 + def correct_send(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#108 + def correct_setter(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/and_or.rb#143 + def correctable_send?(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#135 + def keep_operator_precedence(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#91 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#85 + def on_conditionals(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#66 + def process_logical_operator(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#147 + def whitespace_before_arg(node); end +end + +# source://rubocop//lib/rubocop/cop/style/and_or.rb#49 +RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) + +# In Ruby 2.7, arguments forwarding has been added. +# +# This cop identifies places where `do_something(*args, &block)` +# can be replaced by `do_something(...)`. +# +# In Ruby 3.2, anonymous args/kwargs forwarding has been added. +# +# This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be +# replaced by `use_args(*)`/`use_kwargs(**)`; if desired, this functionality can be disabled +# by setting UseAnonymousForwarding: false. +# +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) +# end +# +# # good +# def foo(...) +# bar(...) +# end +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# +# # good +# def foo(*, **) +# args_only(*) +# kwargs_only(**) +# end +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) +# # good +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) +# # bad +# # The following code can replace the arguments with `...`, +# # but it will change the behavior. Because `...` forwards block also. +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#75 +class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#122 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#233 + def add_parens_if_missing(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#225 + def allow_only_rest_arguments?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217 + def arguments_range(node, first_node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#114 + def extract_forwardable_args(args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 + def non_splat_or_block_pass_lvar_references(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#118 + def only_forwards_all?(send_classifications); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#207 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#191 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#229 + def use_anonymous_forwarding?; end +end + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#83 +RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#82 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#87 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # @return [SendNodeClassifier] a new instance of SendNodeClassifier + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#280 + def classification; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#247 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#274 + def forwarded_block_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#268 + def forwarded_kwrest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262 + def forwarded_rest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#244 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348 + def additional_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#344 + def additional_kwargs_or_forwarded_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + def allow_offense_for_no_block?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + def any_arg_referenced?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313 + def arguments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + def can_forward_all?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 + def forward_additional_kwargs?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309 + def forwarded_rest_and_kwrest_args; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 + def no_additional_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + def no_post_splat_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#305 + def offensive_block_forwarding?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + def referenced_block_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321 + def referenced_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#317 + def referenced_rest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#301 + def ruby_32_missing_rest_or_kwest?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#333 + def target_ruby_version; end +end + +# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. +# +# 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) + +# In Ruby 3.1, `Array#intersect?` has been added. +# +# This cop identifies places where `(array1 & array2).any?` +# can be replaced by `array1.intersect?(array2)`. +# +# The `array1.intersect?(array2)` method is faster than +# `(array1 & array2).any?` and is more readable. +# +# In cases like the following, compatibility is not ensured, +# so it will not be detected when using block argument. +# +# [source,ruby] +# ---- +# ([1] & [1,2]).any? { |x| false } # => false +# [1].intersect?([1,2]) { |x| false } # => true +# ---- +# +# @example +# # bad +# (array1 & array2).any? +# (array1 & array2).empty? +# +# # good +# array1.intersect?(array2) +# !array1.intersect?(array2) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# (array1 & array2).present? +# (array1 & array2).blank? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# (array1 & array2).present? +# (array1 & array2).blank? +# +# # good +# array1.intersect?(array2) +# !array1.intersect?(array2) +# +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49 +class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65 + def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 + def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 + def bad_intersection_check?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106 + def message(receiver, argument, method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 + def straight?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 +RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 +RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 +RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 +RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for uses of "*" as a substitute for _join_. +# +# Not all cases can reliably checked, due to Ruby's dynamic +# types, so we consider only cases when the first argument is an +# array literal or the second is a string literal. +# +# @example +# +# # bad +# %w(foo bar baz) * "," +# +# # good +# %w(foo bar baz).join(",") +# +# source://rubocop//lib/rubocop/cop/style/array_join.rb#20 +class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_join.rb#27 + def join_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_join.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/array_join.rb#23 +RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_join.rb#24 +RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#16 +class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#21 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#51 + def allowed_non_ascii_chars; end + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#42 + def first_non_ascii_chars(string); end + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#32 + def first_offense_range(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#46 + def only_allowed_non_ascii_chars?(string); end +end + +# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#19 +RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of Module#attr. +# +# @example +# # bad - creates a single attribute accessor (deprecated in Ruby 1.9) +# attr :something, true +# attr :one, :two, :three # behaves as attr_reader +# +# # good +# attr_accessor :something +# attr_reader :one, :two, :three +# +# source://rubocop//lib/rubocop/cop/style/attr.rb#17 +class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/attr.rb#74 + def class_eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#37 + def allowed_context?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#47 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#43 + def define_attr_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#59 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#63 + def replacement_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/attr.rb#21 +RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/attr.rb#22 +RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for cases when you could use a block +# accepting version of a method that does automatic +# resource cleanup. +# +# @example +# +# # bad +# f = File.open('file') +# +# # good +# File.open('file') do |f| +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#19 +class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#26 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#41 + def cleanup?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#20 +RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#24 +RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#22 +RuboCop::Cop::Style::AutoResourceCleanup::TARGET_METHODS = T.let(T.unsafe(nil), Hash) + +# Checks if usage of %() or %Q() matches configuration. +# +# @example EnforcedStyle: bare_percent (default) +# # bad +# %Q(He said: "#{greeting}") +# %q{She said: 'Hi'} +# +# # good +# %(He said: "#{greeting}") +# %{She said: 'Hi'} +# @example EnforcedStyle: percent_q +# # bad +# %|He said: "#{greeting}"| +# %/She said: 'Hi'/ +# +# # good +# %Q|He said: "#{greeting}"| +# %q/She said: 'Hi'/ +# +# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#26 +class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#32 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#36 + def on_str(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#63 + def add_offense_for_wrong_style(node, good, bad); end + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#42 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#59 + def requires_bare_percent?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#55 + def requires_percent_q?(source); end +end + +# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30 +RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) + +# Checks for BEGIN blocks. +# +# @example +# # bad +# BEGIN { test } +# +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#12 +class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/begin_block.rb#15 + def on_preexe(node); end +end + +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#13 +RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where `attr_reader` and `attr_writer` +# for the same method can be combined into single `attr_accessor`. +# +# @example +# # bad +# class Foo +# attr_reader :bar +# attr_writer :bar +# end +# +# # good +# class Foo +# attr_accessor :bar +# end +# +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#21 +class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_class(class_node); end + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_module(class_node); end + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_sclass(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_class(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_module(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#29 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_sclass(class_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#102 + def correct_reader(corrector, macro, node, range); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#114 + def correct_writer(corrector, macro, node, range); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#91 + def find_bisection(macros); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#74 + def find_macros(class_def); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#98 + def register_offense(attr); end +end + +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#27 +RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) + +# Representation of an `attr_reader`, `attr_writer` or `attr` macro +# for use by `Style/BisectedAttrAccessor`. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#10 +class RuboCop::Cop::Style::BisectedAttrAccessor::Macro + include ::RuboCop::Cop::VisibilityHelp + + # @api private + # @return [Macro] a new instance of Macro + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#19 + def initialize(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#49 + def all_bisected?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#29 + def attr_names; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def attrs; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#25 + def bisect(*names); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#33 + def bisected_names; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def bisection; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def node; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#41 + def reader?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#53 + def rest; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#37 + def visibility; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#45 + def writer?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#15 + def macro?(node); end + end +end + +# Looks for uses of block comments (=begin...=end). +# +# @example +# # bad +# =begin +# Multiple lines +# of comments... +# =end +# +# # good +# # Multiple lines +# # of comments... +# +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#19 +class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#27 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#56 + def eq_end_part(comment, expr); end + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#48 + def parts(comment); end +end + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#24 +RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#25 +RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#23 +RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) + +# Check for uses of braces or do/end around single line or +# multi-line blocks. +# +# Methods that can be either procedural or functional and cannot be +# categorised from their usage alone is ignored. +# `lambda`, `proc`, and `it` are their defaults. +# Additional methods can be added to the `AllowedMethods`. +# +# @example 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 +# @example EnforcedStyle: braces_for_chaining +# # bad +# words.each do |word| +# word.flip.flop +# end.join("-") +# +# # good +# words.each { |word| +# word.flip.flop +# }.join("-") +# @example EnforcedStyle: always_braces +# # bad +# words.each do |word| +# word.flip.flop +# end +# +# # good +# words.each { |word| +# word.flip.flop +# } +# @example BracesRequiredMethods: ['sig'] +# +# # Methods listed in the BracesRequiredMethods list, such as 'sig' +# # in this example, will require `{...}` braces. This option takes +# # precedence over all other configurations except AllowedMethods. +# +# # bad +# sig do +# params( +# foo: string, +# ).void +# end +# def bar(foo) +# puts foo +# end +# +# # good +# sig { +# params( +# foo: string, +# ).void +# } +# def bar(foo) +# puts foo +# end +# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) +# +# # good +# foo = lambda do |x| +# puts "Hello, #{x}" +# end +# +# foo = lambda do |x| +# x * 100 +# end +# @example AllowedPatterns: [] (default) +# +# # bad +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# @example AllowedPatterns: ['map'] +# +# # good +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 +class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 + def array_or_range?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 + def begin_required?(block_node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 + def braces_for_chaining_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 + def braces_for_chaining_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 + def braces_required_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 + def braces_required_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 + def braces_required_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 + def braces_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 + def conditional?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 + def correction_would_break_code?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 + def end_of_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 + def functional_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 + def functional_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 + def get_blocks(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 + def line_count_based_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 + def line_count_based_message(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 + def move_comment_before_block(corrector, comment, block_node, closing_brace); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 + def procedural_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 + def procedural_oneliners_may_have_braces?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#344 + def proper_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#316 + def remove_trailing_whitespace(corrector, range, comment); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#263 + def replace_braces_with_do_end(corrector, loc); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#279 + def replace_do_end_with_braces(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#356 + def require_braces?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 + def return_value_of_scope?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 + def return_value_used?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 + def semantic_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 + def semantic_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#364 + def special_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 + def special_method_proper_block_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 + def whitespace_after?(range, length = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#292 + def whitespace_before?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#322 + def with_block?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 +RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#177 +RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) + +# Corrector to correct conditional assignment in `case` statements. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#605 +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#610 + def correct(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#620 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#640 + def extract_branches(case_node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#634 + def extract_tail_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#650 + def move_branch_inside_condition(corrector, branch, condition, assignment, column); end + end +end + +# If `AllowOnSelfClass` option is enabled, the cop will ignore violations when the receiver of +# the case equality operator is `self.class`. Note intermediate variables are not accepted. +# +# @example +# # bad +# (1..100) === 7 +# /something/ === some_string +# +# # good +# something.is_a?(Array) +# (1..100).include?(7) +# /something/.match?(some_string) +# @example AllowOnConstant: false (default) +# # bad +# Array === something +# @example AllowOnConstant: true +# # good +# Array === something +# @example AllowOnSelfClass: false (default) +# # bad +# self.class === something +# @example AllowOnSelfClass: true +# # good +# self.class === something +# +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#40 +class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#47 + def case_equality?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#52 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#50 + def self_class?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#90 + def begin_replacement(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#96 + def const_replacement(lhs, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#65 + def offending_receiver?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#72 + def replacement(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#100 + def send_replacement(lhs, rhs); end +end + +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#43 +RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#44 +RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `if-elsif` constructions +# can be replaced with `case-when`. +# +# @example MinBranchesCount: 3 (default) +# # bad +# if status == :active +# perform_action +# elsif status == :inactive || status == :hibernating +# check_timeout +# elsif status == :invalid +# report_invalid +# else +# final_action +# end +# +# # good +# case status +# when :active +# perform_action +# when :inactive, :hibernating +# check_timeout +# when :invalid +# report_invalid +# else +# final_action +# end +# @example MinBranchesCount: 4 +# # good +# if status == :active +# perform_action +# elsif status == :inactive || status == :hibernating +# check_timeout +# elsif status == :invalid +# report_invalid +# else +# final_action +# end +# +# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#50 +class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MinBranchesCount + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#57 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#231 + def branch_conditions(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#249 + def class_reference?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#166 + def collect_conditions(node, target, conditions); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#220 + def condition_from_binary_op(lhs, rhs, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#202 + def condition_from_equality_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#213 + def condition_from_include_or_cover_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#208 + def condition_from_match_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#185 + def condition_from_send_node(node, target); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#240 + def const_reference?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#258 + def correction_range(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#253 + def deparenthesize(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#102 + def find_target(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#136 + def find_target_in_equality_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#148 + def find_target_in_include_or_cover_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#154 + def find_target_in_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#121 + def find_target_in_send_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#274 + def regexp_with_named_captures?(node); end + + # Named captures work with `=~` (if regexp is on lhs) and with `match` (both sides) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#263 + def regexp_with_working_captures?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#96 + def should_check?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#55 +RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the character literal ?x. +# Starting with Ruby 1.9 character literals are +# essentially one-character strings, so this syntax +# is mostly redundant at this point. +# +# ? character literal can be used to express meta and control character. +# That's a good use case of ? literal so it doesn't count it as an offense. +# +# @example +# # bad +# ?x +# +# # good +# 'x' +# +# # good - control & meta escapes +# ?\C-\M-d +# "\C-\M-d" # same as above +# +# source://rubocop//lib/rubocop/cop/style/character_literal.rb#24 +class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#35 + def autocorrect(corrector, node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#53 + def correct_style_detected; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#30 + def offense?(node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#49 + def opposite_style_detected; end +end + +# source://rubocop//lib/rubocop/cop/style/character_literal.rb#28 +RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks the style of children definitions at classes and +# modules. Basically there are two different styles: +# +# The compact style is only forced for classes/modules with one child. +# +# @example EnforcedStyle: nested (default) +# # good +# # have each child on its own line +# class Foo +# class Bar +# end +# end +# @example EnforcedStyle: compact +# # good +# # combine definitions as much as possible +# class Foo::Bar +# end +# +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#33 +class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#42 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#48 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#89 + def add_trailing_end(corrector, node, padding); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#170 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#159 + def check_compact_style(node, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#151 + def check_nested_style(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#141 + def check_style(node, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#94 + def compact_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#115 + def compact_identifier_name(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#100 + def compact_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#180 + def compact_node_name?(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#105 + def compact_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#137 + def leading_spaces(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#176 + def needs_compacting?(body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#62 + def nest_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#54 + def nest_or_compact(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#120 + def remove_end(corrector, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#71 + def replace_namespace_keyword(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#80 + def split_on_double_colon(corrector, node, padding); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#128 + def unindent(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#40 +RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#39 +RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) + +# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. +# +# @example EnforcedStyle: is_a? (default) +# # bad +# var.kind_of?(Date) +# var.kind_of?(Integer) +# +# # good +# var.is_a?(Date) +# var.is_a?(Integer) +# @example EnforcedStyle: kind_of? +# # bad +# var.is_a?(Time) +# var.is_a?(String) +# +# # good +# var.kind_of?(Time) +# var.kind_of?(String) +# +# source://rubocop//lib/rubocop/cop/style/class_check.rb#26 +class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#44 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_check.rb#30 +RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_check.rb#31 +RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `Object#instance_of?` instead of class comparison +# for equality. +# `==`, `equal?`, and `eql?` custom method definitions are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# var.class == Date +# var.class.equal?(Date) +# var.class.eql?(Date) +# var.class.name == 'Date' +# +# # good +# var.instance_of?(Date) +# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default) +# # good +# def ==(other) +# self.class == other.class && name == other.name +# end +# +# def equal?(other) +# self.class.equal?(other.class) && name.equal?(other.name) +# end +# +# def eql?(other) +# self.class.eql?(other.class) && name.eql?(other.name) +# end +# @example AllowedPatterns: [] (default) +# # bad +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end +# @example AllowedPatterns: ['eq'] +# # good +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end +# +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#47 +class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#59 + def class_comparison_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#65 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87 + def class_name(class_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#107 + def class_name_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#123 + def offense_range(receiver_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#111 + def require_cbase?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#119 + def trim_string_quotes(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#115 + def unable_to_determine_type?(class_node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#56 +RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#53 +RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#55 +RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of the class/module name instead of +# self, when defining class/module methods. +# +# @example +# # bad +# class SomeClass +# def SomeClass.class_method +# # ... +# end +# end +# +# # good +# class SomeClass +# def self.class_method +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_methods.rb#23 +class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#41 + def check_defs(name, node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_methods.rb#26 +RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `def self.method_name` or `class << self` to define class methods. +# +# @example EnforcedStyle: def_self (default) +# # bad +# class SomeClass +# class << self +# attr_accessor :class_accessor +# +# def class_method +# # ... +# end +# end +# end +# +# # good +# class SomeClass +# def self.class_method +# # ... +# end +# +# class << self +# attr_accessor :class_accessor +# end +# end +# +# # good - contains private method +# class SomeClass +# class << self +# attr_accessor :class_accessor +# +# private +# +# def private_class_method +# # ... +# end +# end +# end +# @example EnforcedStyle: self_class +# # bad +# class SomeClass +# def self.class_method +# # ... +# end +# end +# +# # good +# class SomeClass +# class << self +# def class_method +# # ... +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#61 +class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#81 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#71 + def on_sclass(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#95 + def all_methods_public?(sclass_node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#115 + def autocorrect_sclass(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#102 + def def_nodes(sclass_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#91 + def def_self_style?; end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#141 + def extract_def_from_sclass(def_node, sclass_node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#152 + def indentation_diff(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#137 + def sclass_only_has_methods?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#68 +RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#69 +RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) + +# Checks for uses of class variables. Offenses +# are signaled only on assignment to class variables to +# reduce the number of offenses that would be reported. +# +# You have to be careful when setting a value for a class +# variable; if a class has been inherited, changing the +# value of a class variable also affects the inheriting +# classes. This means that it's almost always better to +# use a class instance variable instead. +# +# @example +# # bad +# class A +# @@test = 10 +# end +# +# class A +# def self.test(name, value) +# class_variable_set("@@#{name}", value) +# end +# end +# +# class A; end +# A.class_variable_set(:@@test, 10) +# +# # good +# class A +# @test = 10 +# end +# +# class A +# def test +# @@test # you can access class variable without offense +# end +# end +# +# class A +# def self.test(name) +# class_variable_get("@@#{name}") # you can access without offense +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#48 +class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/class_vars.rb#52 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/class_vars.rb#56 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#49 +RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#50 +RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where custom logic on rejection nils from arrays +# and hashes can be replaced with `{Array,Hash}#{compact,compact!}`. +# +# @example +# # bad +# array.reject(&:nil?) +# array.delete_if(&:nil?) +# array.reject { |e| e.nil? } +# array.delete_if { |e| e.nil? } +# array.select { |e| !e.nil? } +# +# # good +# array.compact +# +# # bad +# hash.reject!(&:nil?) +# hash.reject! { |k, v| v.nil? } +# hash.select! { |k, v| !v.nil? } +# +# # good +# hash.compact! +# @example AllowedReceivers: ['params'] +# # good +# params.reject(&:nil?) +# +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#42 +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#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#62 + def reject_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#55 + def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#72 + def select_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#119 + def good_method_name(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#97 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#127 + def range(begin_pos_node, end_pos_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#113 + def to_enum_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#48 +RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#49 +RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 +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.inject +# items.detect +# items.find_all +# items.member? +# +# # good +# items.map +# items.map! +# items.reduce +# items.find +# items.select +# items.include? +# +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#41 +class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#53 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#61 + def check_method_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#70 + def implicit_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#78 + def message(node); end + + # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead + # of a block. + # + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#84 + def methods_accepting_symbol; end +end + +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#45 +RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) + +# Checks for methods invoked via the `::` operator instead +# of the `.` operator (like `FileUtils::rmdir` instead of `FileUtils.rmdir`). +# +# @example +# # bad +# Timeout::timeout(500) { do_something } +# FileUtils::rmdir(dir) +# Marshal::dump(obj) +# +# # good +# Timeout.timeout(500) { do_something } +# FileUtils.rmdir(dir) +# Marshal.dump(obj) +# +# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#20 +class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#26 + def java_type_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#35 + def on_send(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#23 +RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) + +# Checks for class methods that are defined using the `::` +# operator instead of the `.` operator. +# +# @example +# # bad +# class Foo +# def self::bar +# end +# end +# +# # good +# class Foo +# def self.bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#22 +class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#27 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#25 +RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where multiple consecutive loops over the same data +# can be combined into a single loop. It is very likely that combining them +# will make the code more efficient and more concise. +# +# @example +# # bad +# def method +# items.each do |item| +# do_something(item) +# end +# +# items.each do |item| +# do_something_else(item) +# end +# end +# +# # good +# def method +# items.each do |item| +# do_something(item) +# do_something_else(item) +# end +# end +# +# # bad +# def method +# for item in items do +# do_something(item) +# end +# +# for item in items do +# do_something_else(item) +# end +# end +# +# # good +# def method +# for item in items do +# do_something(item) +# do_something_else(item) +# end +# end +# +# # good +# def method +# each_slice(2) { |slice| do_something(slice) } +# each_slice(3) { |slice| do_something(slice) } +# end +# +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 +class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#79 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#90 + def collection_looping_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#107 + def combine_with_left_sibling(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 + def same_collection_looping_block?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#103 + def same_collection_looping_for?(node, sibling); end +end + +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 +RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `` or %x around command literals. +# +# @example EnforcedStyle: backticks (default) +# # bad +# folders = %x(find . -type d).split +# +# # bad +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# +# # good +# folders = `find . -type d`.split +# +# # good +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# @example EnforcedStyle: mixed +# # bad +# folders = %x(find . -type d).split +# +# # bad +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# +# # good +# folders = `find . -type d`.split +# +# # good +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# @example EnforcedStyle: percent_x +# # bad +# folders = `find . -type d`.split +# +# # bad +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# +# # good +# folders = %x(find . -type d).split +# +# # good +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# @example AllowInnerBackticks: false (default) +# # If `false`, the cop will always recommend using `%x` if one or more +# # backticks are found in the command string. +# +# # bad +# `echo \`ls\`` +# +# # good +# %x(echo `ls`) +# @example AllowInnerBackticks: true +# # good +# `echo \`ls\`` +# +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#78 +class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#85 + def on_xstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#146 + def allow_inner_backticks?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#122 + def allowed_backtick_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#131 + def allowed_percent_x_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#109 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#159 + def backtick_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#97 + def check_backtick_literal(node, message); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#103 + def check_percent_x_literal(node, message); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#167 + def command_delimiter; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#150 + def contains_backtick?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#142 + def contains_disallowed_backtick?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#171 + def default_delimiter; end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#154 + def node_body(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#163 + def preferred_delimiter; end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#175 + def preferred_delimiters_config; end +end + +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#82 +RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#83 +RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) + +# Checks that comment annotation keywords are written according +# to guidelines. +# +# Annotation keywords can be specified by overriding the cop's `Keywords` +# configuration. Keywords are allowed to be single words or phrases. +# +# NOTE: With a multiline comment block (where each line is only a +# comment), only the first line will be able to register an offense, even +# if an annotation keyword starts another line. This is done to prevent +# incorrect registering of keywords (eg. `review`) inside a paragraph as an +# annotation. +# +# @example RequireColon: true (default) +# # bad +# # TODO make better +# +# # good +# # TODO: make better +# +# # bad +# # TODO:make better +# +# # good +# # TODO: make better +# +# # bad +# # fixme: does not work +# +# # good +# # FIXME: does not work +# +# # bad +# # Optimize does not work +# +# # good +# # OPTIMIZE: does not work +# @example RequireColon: false +# # bad +# # TODO: make better +# +# # good +# # TODO make better +# +# # bad +# # fixme does not work +# +# # good +# # FIXME does not work +# +# # bad +# # Optimize does not work +# +# # good +# # OPTIMIZE does not work +# +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#61 +class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#73 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#110 + def annotation_range(annotation); end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#114 + def correct_offense(corrector, range, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#102 + def first_comment_line?(comments, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#106 + def inline_comment?(comment); end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#124 + def keywords; end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#87 + def register_offense(annotation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#120 + def requires_colon?; end +end + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#71 +RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#65 +RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#68 +RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) + +# Checks for comments put on the same line as some keywords. +# These keywords are: `class`, `module`, `def`, `begin`, `end`. +# +# Note that some comments +# are allowed. +# +# Autocorrection removes comments from `end` keyword and keeps comments +# for `class`, `module`, `def` and `begin` above the keyword. +# +# @example +# # bad +# if condition +# statement +# end # end if +# +# # bad +# class X # comment +# statement +# end +# +# # bad +# def x; end # comment +# +# # good +# if condition +# statement +# end +# +# # good +# class X # :nodoc: +# y +# end +# +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#43 +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#57 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#80 + def offensive?(comment); end + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#67 + def register_offense(comment, matched_keyword); end + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#86 + def source_line(comment); end +end + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 +RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#53 +RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 +RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#50 +RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#47 +RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 +RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) + +# Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. +# +# This cop supports autocorrection for `if/elsif/else` bad style only. +# Because `ArgumentError` occurs if the minimum and maximum of `clamp` arguments are reversed. +# When these are variables, it is not possible to determine which is the minimum and maximum: +# +# [source,ruby] +# ---- +# [1, [2, 3].max].min # => 1 +# 1.clamp(3, 1) # => min argument must be smaller than max argument (ArgumentError) +# ---- +# +# @example +# +# # bad +# [[x, low].max, high].min +# +# # bad +# if x < low +# low +# elsif high < x +# high +# else +# x +# end +# +# # good +# x.clamp(low, high) +# +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#35 +class RuboCop::Cop::Style::ComparableClamp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#61 + def array_min_max?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#47 + def if_elsif_else_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#78 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#100 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#108 + def autocorrect(corrector, node, prefer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#117 + def min_condition?(if_condition, else_body); end +end + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#42 +RuboCop::Cop::Style::ComparableClamp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#43 +RuboCop::Cop::Style::ComparableClamp::MSG_MIN_MAX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#44 +RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `Array#push(item)` instead of `Array#concat([item])` +# to avoid redundant array literals. +# +# @example +# +# # bad +# list.concat([foo]) +# list.concat([bar, baz]) +# list.concat([qux, quux], [corge]) +# +# # good +# list.push(foo) +# list.push(bar, baz) +# list.push(qux, quux, corge) +# +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#25 +class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#69 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#86 + def percent_literals_includes_only_basic_literals?(node); end + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#73 + def preferred_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#28 +RuboCop::Cop::Style::ConcatArrayLiterals::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#29 +RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#31 +RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for `if` and `case` statements where each branch is used for +# assignment to the same variable when using the return of the +# condition can be used instead. +# +# @example EnforcedStyle: assign_to_condition (default) +# # bad +# if foo +# bar = 1 +# else +# bar = 2 +# end +# +# case foo +# when 'a' +# bar += 1 +# else +# bar += 2 +# end +# +# if foo +# some_method +# bar = 1 +# else +# some_other_method +# bar = 2 +# end +# +# # good +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# @example EnforcedStyle: assign_inside_condition +# # bad +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# +# # good +# if foo +# bar = 1 +# else +# bar = 2 +# end +# +# case foo +# when 'a' +# bar += 1 +# else +# bar += 2 +# end +# +# if foo +# some_method +# bar = 1 +# else +# some_other_method +# bar = 2 +# end +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#210 +class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Style::ConditionalAssignmentHelper + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # The shovel operator `<<` does not have its own type. It is a `send` + # type. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#228 + def assignment_type?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#309 + def candidate_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#264 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#274 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#250 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#236 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#244 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#315 + def allowed_single_line?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#386 + def allowed_statements?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#311 + def allowed_ternary?(assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#319 + def assignment_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#363 + def assignment_types_match?(*nodes); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#378 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#304 + def candidate_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#286 + def check_assignment_to_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#369 + def check_node(node, branches); end + + # If `Layout/LineLength` is enabled, we do not want to introduce an + # offense by autocorrecting this cop. Find the max configured line + # length. Find the longest line of condition. Remove the assignment + # from lines that contain the offending assignment because after + # correcting, this will not be on the line anymore. Check if the length + # of the longest line + the length of the corrected assignment is + # greater than the max configured line length + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#402 + def correction_exceeds_line_limit?(node, branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#433 + def include_ternary?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#356 + def lhs_all_match?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#421 + def line_length_cop_enabled?; end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#414 + def longest_line(node, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#410 + def longest_line_exceeds_line_limit?(node, assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#425 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#340 + def move_assignment_inside_condition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#330 + def move_assignment_outside_condition(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#429 + def single_line_conditions_only?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#352 + def ternary_condition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#219 +RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 +RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#221 +RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#220 +RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#222 +RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 +RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#223 +RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#218 +RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Helper module to provide common methods to classes needed for the +# ConditionalAssignment Cop. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#8 +module RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#64 + def end_with_eq?(sym); end + + # `elsif` branches show up in the `node` as an `else`. We need + # to recursively iterate over all `else` branches and consider all + # but the last `node` an `elsif` branch and consider the last `node` + # the actual `else` branch. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#20 + def expand_elses(branch); end + + # `when` nodes contain the entire branch including the condition. + # We only need the contents of the branch, not the condition. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#28 + def expand_when_branches(when_branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#55 + def indent(cop, source); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#37 + def lhs(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#32 + def tail(branch); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#109 + def assignment_rhs_exist?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#70 + def expand_elsif(node, elsif_branches = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#96 + def lhs_for_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#83 + def lhs_for_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#105 + def setter_method?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#13 +RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#12 +RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#11 +RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#14 +RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) + +# Helper module to provide common methods to ConditionalAssignment +# correctors +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#440 +module RuboCop::Cop::Style::ConditionalCorrectorHelper + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 + def assignment(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#491 + def correct_branches(corrector, branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#468 + def correct_if_branches(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 + def remove_whitespace_in_branches(corrector, branch, condition, column); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#478 + def replace_branch_assignment(corrector, branch); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 + def white_space_range(node, column); end +end + +# Checks that constants defined in classes and modules have +# an explicit visibility declaration. By default, Ruby makes all class- +# and module constants public, which litters the public API of the +# class or module. Explicitly declaring a visibility makes intent more +# clear, and prevents outside actors from touching private state. +# +# @example +# +# # bad +# class Foo +# BAR = 42 +# BAZ = 43 +# end +# +# # good +# class Foo +# BAR = 42 +# private_constant :BAR +# +# BAZ = 43 +# public_constant :BAZ +# end +# @example IgnoreModules: false (default) +# # bad +# class Foo +# MyClass = Struct.new() +# end +# +# # good +# class Foo +# MyClass = Struct.new() +# public_constant :MyClass +# end +# @example IgnoreModules: true +# # good +# class Foo +# MyClass = Struct.new() +# end +# +# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#47 +class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#51 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#96 + def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#76 + def class_or_module_scope?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#62 + def ignore_modules?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#100 + def match_name?(name, constant_name); end + + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#70 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#66 + def module?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#87 + def visibility_declaration?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#48 +RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#21 +class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#28 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#47 + def autocorrect_notice; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#78 + def encoding_token?(processed_source, token_index); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#64 + def insert_notice_before(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#43 + def notice; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#85 + def notice_found?(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#51 + def offense_range; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#71 + def shebang_token?(processed_source, token_index); end + + # @raise [Warning] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#55 + def verify_autocorrect_notice!; end +end + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#26 +RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#25 +RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) + +# Checks for inheritance from `Data.define` to avoid creating the anonymous parent class. +# +# @example +# # bad +# class Person < Data.define(:first_name, :last_name) +# def age +# 42 +# end +# end +# +# # good +# Person = Data.define(:first_name, :last_name) do +# def age +# 42 +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#26 +class RuboCop::Cop::Style::DataInheritance < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#48 + def data_define?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#36 + def on_class(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#55 + def correct_parent(parent, corrector); end + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#65 + def range_for_empty_class_body(class_node, data_define); end +end + +# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#31 +RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) + +# Checks for consistent usage of the `DateTime` class over the +# `Time` class. This cop is disabled by default since these classes, +# although highly overlapping, have particularities that make them not +# replaceable in certain situations when dealing with multiple timezones +# and/or DST. +# +# @example +# +# # bad - uses `DateTime` for current time +# DateTime.now +# +# # good - uses `Time` for current time +# Time.now +# +# # bad - uses `DateTime` for modern date +# DateTime.iso8601('2016-06-29') +# +# # good - uses `Time` for modern date +# Time.iso8601('2016-06-29') +# +# # good - uses `DateTime` with start argument for historical date +# DateTime.iso8601('1751-04-23', Date::ENGLAND) +# @example AllowCoercion: false (default) +# +# # bad - coerces to `DateTime` +# something.to_datetime +# +# # good - coerces to `Time` +# something.to_time +# @example AllowCoercion: true +# +# # good +# something.to_datetime +# +# # good +# something.to_time +# +# source://rubocop//lib/rubocop/cop/style/date_time.rb#49 +class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#56 + def date_time?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#61 + def historic_date?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 + def on_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#85 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/date_time.rb#81 + 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 +# @example +# +# # bad +# def Baz.foo() +# do_something +# end +# +# # good +# def Baz.foo +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#42 +class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base + 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#47 + def on_defs(node); 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 places where the `#\_\_dir\_\_` method can replace more +# complex constructs to retrieve a canonicalized absolute path to the +# current file. +# +# @example +# # bad +# path = File.expand_path(File.dirname(__FILE__)) +# +# # bad +# path = File.dirname(File.realpath(__FILE__)) +# +# # good +# path = __dir__ +# +# source://rubocop//lib/rubocop/cop/style/dir.rb#19 +class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/dir.rb#29 + def dir_replacement?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/dir.rb#34 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/dir.rb#44 + def file_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/dir.rb#25 +RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dir.rb#26 +RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty. +# +# @example +# # bad +# Dir.entries('path/to/dir').size == 2 +# Dir.children('path/to/dir').empty? +# Dir.children('path/to/dir').size == 0 +# Dir.each_child('path/to/dir').none? +# +# # good +# Dir.empty?('path/to/dir') +# +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#18 +class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48 + def bang(node); end +end + +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#22 +RuboCop::Cop::Style::DirEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#23 +RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detects comments to enable/disable RuboCop. +# This is useful if want to make sure that every RuboCop error gets fixed +# and not quickly disabled with a comment. +# +# Specific cops can be allowed with the `AllowedCops` configuration. Note that +# +# @example +# # bad +# # rubocop:disable Metrics/AbcSize +# def foo +# end +# # rubocop:enable Metrics/AbcSize +# +# # good +# def foo +# end +# @example AllowedCops: [Metrics/AbcSize] +# # good +# # rubocop:disable Metrics/AbcSize +# def foo +# end +# # rubocop:enable Metrics/AbcSize +# +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#33 +class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#40 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#77 + def allowed_cops; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#81 + def any_cops_allowed?; end + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#72 + def directive_cops(comment); end + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#53 + def register_offense(comment, directive_cops, disallowed_cops); end +end + +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#37 +RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#38 +RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) + +# When using `class_eval` (or other `eval`) with string interpolation, +# add a comment block showing its appearance if interpolated (a practice used in Rails code). +# +# @example +# # from activesupport/lib/active_support/core_ext/string/output_safety.rb +# +# # bad +# UNSAFE_STRING_METHODS.each do |unsafe_method| +# if 'String'.respond_to?(unsafe_method) +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}(*params, &block) +# to_str.#{unsafe_method}(*params, &block) +# end +# +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# end +# end +# +# # good, inline comments in heredoc +# UNSAFE_STRING_METHODS.each do |unsafe_method| +# if 'String'.respond_to?(unsafe_method) +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}(*params, &block) # def capitalize(*params, &block) +# to_str.#{unsafe_method}(*params, &block) # to_str.capitalize(*params, &block) +# end # end +# +# def #{unsafe_method}!(*params) # def capitalize!(*params) +# @dirty = true # @dirty = true +# super # super +# end # end +# EOT +# end +# end +# +# # good, block comments in heredoc +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# # def capitalize!(*params) +# # @dirty = true +# # super +# # end +# +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# +# # good, block comments before heredoc +# class_eval( +# # def capitalize!(*params) +# # @dirty = true +# # super +# # end +# +# <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# ) +# +# # bad - interpolated string without comment +# class_eval("def #{unsafe_method}!(*params); end") +# +# # good - with inline comment or replace it with block comment using heredoc +# class_eval("def #{unsafe_method}!(*params); end # def capitalize!(*params); end") +# +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#77 +class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#84 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#107 + def comment_block_docs?(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#147 + def comment_regexp(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#126 + def heredoc_comment_blocks(heredoc_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#100 + def inline_comment_docs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#96 + def interpolated?(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#136 + def merge_adjacent_comments(line, index, hash); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#117 + def preceding_comment_blocks(node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#156 + def source_to_regexp(source); end +end + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#78 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#79 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#80 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#82 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for missing top-level documentation of classes and +# modules. Classes with no body are exempt from the check and so are +# namespace modules - modules that have nothing in their bodies except +# classes, other modules, constant definitions or constant visibility +# declarations. +# +# The documentation requirement is annulled if the class or module has +# same for all its children. +# +# @example +# # bad +# class Person +# # ... +# end +# +# module Math +# end +# +# # good +# # Description/Explanation of Person class +# class Person +# # ... +# end +# +# # allowed +# # Class without body +# class Person +# end +# +# # Namespace - A namespace can be a class or a module +# # Containing a class +# module Namespace +# # Description/Explanation of Person class +# class Person +# # ... +# end +# end +# +# # Containing constant visibility declaration +# module Namespace +# class Private +# end +# +# private_constant :Private +# end +# +# # Containing constant definition +# module Namespace +# Public = Class.new +# end +# +# # Macro calls +# module Namespace +# extend Foo +# end +# @example AllowedConstants: ['ClassMethods'] +# +# # good +# module A +# module ClassMethods +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation.rb#72 +class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DocumentationComment + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#79 + def constant_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#85 + def constant_visibility_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#90 + def include_statement?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#94 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#100 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#82 + def outer_module(param0); end + + private + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#174 + def allowed_constants; end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#106 + def check(node, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#147 + def compact_namespace?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#143 + def constant_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#139 + def constant_declaration?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#178 + def identifier(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#123 + def include_statement_only?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#129 + def namespace?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#170 + def nodoc(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#166 + def nodoc?(comment, require_all: T.unsafe(nil)); end + + # Note: How end-of-line comments are associated with code changed in + # parser-2.2.0.4. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#156 + def nodoc_comment?(node, require_all: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#118 + def nodoc_self_or_outer_module?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#186 + def qualify_const(node); end +end + +# source://rubocop//lib/rubocop/cop/style/documentation.rb#76 +RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for missing documentation comment for public methods. +# It can optionally be configured to also require documentation for +# non-public methods. +# +# NOTE: This cop allows `initialize` method because `initialize` is +# a special method called from `new`. In some programming languages +# they are called constructor to distinguish it from method. +# +# @example +# +# # bad +# +# class Foo +# def bar +# puts baz +# end +# end +# +# module Foo +# def bar +# puts baz +# end +# end +# +# def foo.bar +# puts baz +# end +# +# # good +# +# class Foo +# # Documentation +# def bar +# puts baz +# end +# end +# +# module Foo +# # Documentation +# def bar +# puts baz +# end +# end +# +# # Documentation +# def foo.bar +# puts baz +# end +# @example RequireForNonPublicMethods: false (default) +# # good +# class Foo +# protected +# def do_something +# end +# end +# +# class Foo +# private +# def do_something +# end +# end +# @example RequireForNonPublicMethods: true +# # bad +# class Foo +# protected +# def do_something +# end +# end +# +# class Foo +# private +# def do_something +# end +# end +# +# # good +# class Foo +# protected +# # Documentation +# def do_something +# end +# end +# +# class Foo +# private +# # Documentation +# def do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#98 +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#105 + def modifier_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#119 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#126 + def require_for_non_public_methods?; end +end + +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#102 +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 { } +# @example +# # bad +# (0...10).each {} +# +# # good +# 10.times {} +# +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#25 +class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#53 + def each_range(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#65 + def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#77 + def each_range_without_block_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#30 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#48 + def offending?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#28 +RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) + +# Looks for inject / reduce calls where the passed in object is +# returned at the end and so could be replaced by each_with_object without +# the need to return the object at the end. +# +# However, we can't replace with each_with_object if the accumulator +# parameter is assigned to within the block. +# +# @example +# # bad +# [1, 2].inject({}) { |a, e| a[e] = e; a } +# +# # good +# [1, 2].each_with_object({}) { |e, a| a[e] = e } +# +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#19 +class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#60 + def each_with_object_block_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#65 + def each_with_object_numblock_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#26 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#43 + def on_numblock(node); end + + private + + # if the accumulator parameter is assigned to in the block, + # then we can't convert to each_with_object + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#102 + def accumulator_param_assigned_to?(body, args); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#69 + def autocorrect_block(corrector, node, return_value); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#84 + def autocorrect_numblock(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#121 + def first_argument_returned?(args, return_value); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#114 + def return_value(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#129 + def return_value_occupies_whole_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#96 + def simple_method_arg?(method_arg); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#133 + def whole_line_expression(node); end +end + +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#24 +RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#23 +RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) + +# Checks for pipes for empty block parameters. Pipes for empty +# block parameters do not cause syntax errors, but they are redundant. +# +# @example +# # bad +# a do || +# do_something +# end +# +# # bad +# a { || do_something } +# +# # good +# a do +# end +# +# # good +# a { do_something } +# +# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#24 +class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EmptyParameter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#31 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#38 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#29 +RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for case statements with an empty condition. +# +# @example +# +# # bad: +# case +# when x == 0 +# puts 'x is 0' +# when y == 0 +# puts 'y is 0' +# else +# puts 'neither is 0' +# end +# +# # good: +# if x == 0 +# puts 'x is 0' +# elsif y == 0 +# puts 'y is 0' +# else +# puts 'neither is 0' +# end +# +# # good: (the case condition node is not empty) +# case n +# when 0 +# puts 'zero' +# when 1 +# puts 'one' +# else +# puts 'more' +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#38 +class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 + def on_case(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 + def autocorrect(corrector, case_node); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 + def correct_case_when(corrector, case_node, when_nodes); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 + def correct_when_conditions(corrector, when_nodes); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 + def keep_first_when_comment(case_range, corrector); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 + def replace_then_with_line_break(corrector, conditions, when_node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 +RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 +RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for empty else-clauses, possibly including comments and/or an +# explicit `nil` depending on the EnforcedStyle. +# +# @example EnforcedStyle: both (default) +# # warn on empty else and else with nil in it +# +# # bad +# if condition +# statement +# else +# nil +# end +# +# # bad +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example EnforcedStyle: empty +# # warn only on empty else +# +# # bad +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# nil +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example EnforcedStyle: nil +# # warn on else with nil in it +# +# # bad +# if condition +# statement +# else +# nil +# end +# +# # good +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example AllowComments: false (default) +# +# # bad +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # bad +# if condition +# statement +# else +# # something comment +# end +# @example AllowComments: true +# +# # good +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # good +# if condition +# statement +# else +# # something comment +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#127 +class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#139 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#135 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#172 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#193 + def autocorrect_forbidden?(type); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#186 + def base_node(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 + def comment_in_else?(loc); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 + def empty_check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 + def empty_style?; end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#197 + def missing_else_style; end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 + def nil_check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#152 + def nil_style?; end +end + +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#133 +RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for using empty heredoc to reduce redundancy. +# +# @example +# +# # bad +# <<~EOS +# EOS +# +# <<-EOS +# EOS +# +# <<EOS +# EOS +# +# # good +# '' +# +# # bad +# do_something(<<~EOS) +# EOS +# +# do_something(<<-EOS) +# EOS +# +# do_something(<<EOS) +# EOS +# +# # good +# do_something('') +# +# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#36 +class RuboCop::Cop::Style::EmptyHeredoc < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#43 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#63 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#59 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#67 + def string_literals_config; end +end + +# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#41 +RuboCop::Cop::Style::EmptyHeredoc::MSG = T.let(T.unsafe(nil), String) + +# Checks for parentheses for empty lambda parameters. Parentheses +# for empty lambda parameters do not cause syntax errors, but they are +# redundant. +# +# @example +# # bad +# -> () { do_something } +# +# # good +# -> { do_something } +# +# # good +# -> (arg) { do_something(arg) } +# +# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#19 +class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EmptyParameter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#26 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#35 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#24 +RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a method, the result of which +# would be a literal, like an empty array, hash, or string. +# +# @example +# # bad +# a = Array.new +# h = Hash.new +# s = String.new +# +# # good +# a = [] +# h = {} +# s = '' +# +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#19 +class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 + def array_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 + def array_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 + def hash_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 + def hash_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 + def str_node(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#111 + def correction(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#74 + def enforce_double_quotes?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#82 + def first_argument_unparenthesized?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#129 + def frozen_strings?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#102 + def offense_array_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#106 + def offense_hash_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#60 + def offense_message(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#70 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 + def replacement_range(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#78 + def string_literals_config; end +end + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#24 +RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 +RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 +RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#26 +RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) + +# Checks for the formatting of empty method definitions. +# By default it enforces empty method definitions to go on a single +# line (compact style), but it can be configured to enforce the `end` +# to go on its own line (expanded style). +# +# NOTE: A method definition is not considered empty if it contains +# comments. +# +# NOTE: Autocorrection will not be applied for the `compact` style +# if the resulting code is longer than the `Max` configuration for +# `Layout/LineLength`, but an offense will still be registered. +# +# @example EnforcedStyle: compact (default) +# # bad +# def foo(bar) +# end +# +# def self.foo(bar) +# end +# +# # good +# def foo(bar); end +# +# def foo(bar) +# # baz +# end +# +# def self.foo(bar); end +# @example EnforcedStyle: expanded +# # bad +# def foo(bar); end +# +# def self.foo(bar); end +# +# # good +# def foo(bar) +# end +# +# def self.foo(bar) +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#47 +class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#95 + def compact?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#103 + def compact_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#73 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#77 + def corrected(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#99 + def expanded?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#107 + def expanded_style?; end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#89 + def joint(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#111 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#69 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#51 +RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#52 +RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) + +# Checks ensures source files have no utf-8 encoding comments. +# +# @example +# # bad +# # encoding: UTF-8 +# # coding: UTF-8 +# # -*- coding: UTF-8 -*- +# +# source://rubocop//lib/rubocop/cop/style/encoding.rb#12 +class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#20 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#32 + def comments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/encoding.rb#43 + def offense?(comment); end + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#47 + def register_offense(line_number, comment); end +end + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#17 +RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#16 +RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#18 +RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for END blocks. +# +# @example +# # bad +# END { puts 'Goodbye!' } +# +# # good +# at_exit { puts 'Goodbye!' } +# +# source://rubocop//lib/rubocop/cop/style/end_block.rb#15 +class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/end_block.rb#20 + def on_postexe(node); end +end + +# source://rubocop//lib/rubocop/cop/style/end_block.rb#18 +RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for endless methods. +# +# It can enforce either the use of endless methods definitions +# for single-lined method bodies, or disallow endless methods. +# +# Other method definition types are not considered by this cop. +# +# The supported styles are: +# +# * allow_single_line (default) - only single line endless method definitions are allowed. +# * allow_always - all endless method definitions are allowed. +# * disallow - all endless method definitions are disallowed. +# +# NOTE: Incorrect endless method definitions will always be +# corrected to a multi-line definition. +# +# @example EnforcedStyle: allow_single_line (default) +# # good +# def my_method() = x +# +# # bad, multi-line endless method +# def my_method() = x.foo +# .bar +# .baz +# @example EnforcedStyle: allow_always +# # good +# def my_method() = x +# +# # good +# def my_method() = x.foo +# .bar +# .baz +# @example EnforcedStyle: disallow +# # bad +# def my_method() = x +# +# # bad +# def my_method() = x.foo +# .bar +# .baz +# +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#49 +class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#60 + def on_def(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#95 + def arguments(node, missing = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#85 + def correct_to_multiline(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#70 + def handle_allow_style(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#79 + def handle_disallow_style(node); end +end + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#56 +RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#57 +RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#58 +RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) + +# Checks for consistent usage of `ENV['HOME']`. If `nil` is used as +# the second argument of `ENV.fetch`, it is treated as a bad case like `ENV[]`. +# +# @example +# +# # bad +# ENV['HOME'] +# ENV.fetch('HOME', nil) +# +# # good +# Dir.home +# +# # good +# ENV.fetch('HOME', default) +# +# source://rubocop//lib/rubocop/cop/style/env_home.rb#31 +class RuboCop::Cop::Style::EnvHome < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/env_home.rb#38 + def env_home?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/env_home.rb#45 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/env_home.rb#34 +RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/env_home.rb#35 +RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensures that eval methods (`eval`, `instance_eval`, `class_eval` +# and `module_eval`) are given filename and line number values (`\_\_FILE\_\_` +# and `\_\_LINE\_\_`). This data is used to ensure that any errors raised +# within the evaluated code will be given the correct identification +# in a backtrace. +# +# The cop also checks that the line number given relative to `\_\_LINE\_\_` is +# correct. +# +# This cop will autocorrect incorrect or missing filename and line number +# values. However, if `eval` is called without a binding argument, the cop +# will not attempt to automatically add a binding, or add filename and +# line values. +# +# 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: +# +# @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 +# @example +# # not checked +# code = <<-RUBY +# def do_something +# end +# RUBY +# eval code +# +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#56 +class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#74 + def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#81 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#69 + def valid_eval_receiver?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#195 + def add_offense_for_different_line(node, line_node, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#142 + def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#210 + def add_offense_for_missing_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#217 + def add_offense_for_missing_location(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#189 + def add_offense_for_same_line(node, line_node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#154 + def check_file(node, file_node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#167 + def check_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 + def check_location(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 + def expected_line(sign, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 + def file_and_line(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#177 + def line_difference(line_node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#229 + def missing_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 + def register_offense(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#114 + def special_file_keyword?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 + def special_line_keyword?(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 + def string_first_line(str_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 + def with_binding?(node); end + + # FIXME: It's a Style/ConditionalAssignment's false positive. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#133 + def with_lineno?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 +RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 +RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 +RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#63 +RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#66 +RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where `Integer#even?` or `Integer#odd?` +# can be used. +# +# @example +# +# # bad +# if x % 2 == 0 +# end +# +# # good +# if x.even? +# end +# +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#18 +class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#25 + def even_odd_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#45 + def replacement_method(arg, method); end +end + +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#21 +RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#22 +RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for exact regexp match inside Regexp literals. +# +# @example +# +# # bad +# string =~ /\Astring\z/ +# string === /\Astring\z/ +# string.match(/\Astring\z/) +# string.match?(/\Astring\z/) +# +# # good +# string == 'string' +# +# # bad +# string !~ /\Astring\z/ +# +# # good +# string != 'string' +# +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#25 +class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#32 + def exact_regexp_match(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#55 + def exact_match_pattern?(parsed_regexp); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#62 + def new_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#28 +RuboCop::Cop::Style::ExactRegexpMatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#29 +RuboCop::Cop::Style::ExactRegexpMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of the `File.expand_path` arguments. +# Likewise, it also checks for the `Pathname.new` argument. +# +# Contrastive bad case and good case are alternately shown in +# the following examples. +# +# @example +# # bad +# File.expand_path('..', __FILE__) +# +# # good +# File.expand_path(__dir__) +# +# # bad +# File.expand_path('../..', __FILE__) +# +# # good +# File.expand_path('..', __dir__) +# +# # bad +# File.expand_path('.', __FILE__) +# +# # good +# File.expand_path(__FILE__) +# +# # bad +# Pathname(__FILE__).parent.expand_path +# +# # good +# Pathname(__dir__).expand_path +# +# # bad +# Pathname.new(__FILE__).parent.expand_path +# +# # good +# Pathname.new(__dir__).expand_path +# +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#43 +class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#58 + def file_expand_path(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#74 + def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#66 + def pathname_parent_expand_path(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#189 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#100 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#135 + def autocorrect_expand_path(corrector, current_path, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#162 + def depth(current_path); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#113 + def inspect_offense_for_expand_path(node, current_path, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#168 + def parent_path(current_path); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#182 + def remove_parent_method(corrector, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#155 + def strip_surrounded_quotes!(path_string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#109 + def unrecommended_argument?(default_dir); end +end + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#47 +RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#49 +RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#51 +RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#55 +RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of explicit block argument to avoid writing +# block literal that just passes its arguments to another block. +# +# NOTE: This cop only registers an offense if the block args match the +# yield args exactly. +# +# @example +# # bad +# def with_tmp_dir +# Dir.mktmpdir do |tmp_dir| +# Dir.chdir(tmp_dir) { |dir| yield dir } # block just passes arguments +# end +# end +# +# # bad +# def nine_times +# 9.times { yield } +# end +# +# # good +# def with_tmp_dir(&block) +# Dir.mktmpdir do |tmp_dir| +# Dir.chdir(tmp_dir, &block) +# end +# end +# +# with_tmp_dir do |dir| +# puts "dir is accessible as a parameter and pwd is set: #{dir}" +# end +# +# # good +# def nine_times(&block) +# 9.times(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#41 +class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [ExplicitBlockArgument] a new instance of ExplicitBlockArgument + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#57 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#62 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#49 + def yielding_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#108 + def add_block_argument(node, corrector, block_name); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#147 + def block_body_range(block_node, send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#125 + def call_like?(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#137 + def correct_call_node(node, corrector, block_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#120 + def empty_arguments?(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#87 + def extract_block_name(def_node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#129 + def insert_argument(node, corrector, block_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#95 + def yielding_arguments?(block_args, yield_args); end + + class << self + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#53 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#45 +RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) + +# Enforces consistency when using exponential notation +# for numbers in the code (eg 1.2e4). Different styles are supported: +# +# * `scientific` which enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# * `engineering` which enforces the exponent to be a multiple of 3 and the mantissa +# to be between 0.1 (inclusive) and 10 (exclusive). +# * `integral` which enforces the mantissa to always be a whole number without +# trailing zeroes. +# +# @example EnforcedStyle: scientific (default) +# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# +# # bad +# 10e6 +# 0.3e4 +# 11.7e5 +# 3.14e0 +# +# # good +# 1e7 +# 3e3 +# 1.17e6 +# 3.14 +# @example EnforcedStyle: engineering +# # Enforces using multiple of 3 exponents, +# # mantissa should be between 0.1 (inclusive) and 1000 (exclusive) +# +# # bad +# 3.2e7 +# 0.1e5 +# 12e5 +# 1232e6 +# +# # good +# 32e6 +# 10e3 +# 1.2e6 +# 1.232e9 +# @example EnforcedStyle: integral +# # Enforces the mantissa to have no decimal part and no +# # trailing zeroes. +# +# # bad +# 3.2e7 +# 0.1e5 +# 120e4 +# +# # good +# 32e6 +# 1e4 +# 12e5 +# +# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#60 +class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#68 + def on_float(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#79 + def engineering?(node); end + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#90 + def integral(node); end + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#110 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#95 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#74 + def scientific?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#62 +RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Suggests `ENV.fetch` for the replacement of `ENV[]`. +# `ENV[]` silently fails and returns `nil` when the environment variable is unset, +# which may cause unexpected behaviors when the developer forgets to set it. +# On the other hand, `ENV.fetch` raises KeyError or returns the explicitly +# specified default value. +# +# @example +# # bad +# ENV['X'] +# x = ENV['X'] +# +# # good +# ENV.fetch('X') +# x = ENV.fetch('X') +# +# # also good +# !ENV['X'] +# ENV['X'].some_method # (e.g. `.nil?`) +# +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#25 +class RuboCop::Cop::Style::FetchEnvVar < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#31 + def env_with_bracket?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#35 + def on_send(node); end + + private + + # The following are allowed cases: + # + # - Used as a flag (e.g., `if ENV['X']` or `!ENV['X']`) because + # it simply checks whether the variable is set. + # - Receiving a message with dot syntax, e.g. `ENV['X'].nil?`. + # - `ENV['key']` assigned by logical AND/OR assignment. + # - `ENV['key']` is the LHS of a `||`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#105 + def allowable_use?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#48 + def allowed_var?(node); end + + # The following are allowed cases: + # + # - `ENV['key']` is a receiver of `||=`, e.g. `ENV['X'] ||= y`. + # - `ENV['key']` is a receiver of `&&=`, e.g. `ENV['X'] &&= y`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#113 + def assigned?(node); end + + # Check if the node is a receiver and receives a message with dot syntax. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#89 + def message_chained_with_dot?(node); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#126 + def new_code(name_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#84 + def offensive?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#120 + def or_lhs?(node); end + + # Avoid offending in the following cases: + # `ENV['key'] if ENV['key'] = x` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#80 + def partial_matched?(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#53 + def used_as_flag?(node); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#60 + def used_if_condition_in_body(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#69 + def used_in_condition?(node, condition); end +end + +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#28 +RuboCop::Cop::Style::FetchEnvVar::MSG = T.let(T.unsafe(nil), String) + +# Prefer to use `File.empty?('path/to/file')` when checking if a file is empty. +# +# @example +# # bad +# File.zero?('path/to/file') +# File.size('path/to/file') == 0 +# File.size('path/to/file') >= 0 +# File.size('path/to/file').zero? +# File.read('path/to/file').empty? +# File.binread('path/to/file') == '' +# FileTest.zero?('path/to/file') +# +# # good +# File.empty?('path/to/file') +# FileTest.empty?('path/to/file') +# +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#27 +class RuboCop::Cop::Style::FileEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#37 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#49 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#62 + def bang(node); end +end + +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#31 +RuboCop::Cop::Style::FileEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#32 +RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Favor `File.(bin)read` convenience methods. +# +# @example +# ## text mode +# # bad +# 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) +# @example +# ## binary mode +# # bad +# 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#38 +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#65 + def block_read?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#49 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#60 + def send_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#84 + def evidence(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_read.rb#100 + def file_open_read?(node); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#106 + def read_method(mode); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_read.rb#92 + def read_node?(node, block_pass); end +end + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#42 +RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#46 +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#44 +RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Favor `File.(bin)write` convenience methods. +# +# NOTE: There are different method signatures between `File.write` (class method) +# and `File#write` (instance method). The following case will be allowed because +# static analysis does not know the contents of the splat argument: +# +# [source,ruby] +# ---- +# File.open(filename, 'w') do |f| +# f.write(*objects) +# end +# ---- +# +# @example +# ## text mode +# # bad +# File.open(filename, 'w').write(content) +# File.open(filename, 'w') do |f| +# f.write(content) +# end +# +# # good +# File.write(filename, content) +# @example +# ## binary mode +# # bad +# 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#41 +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#68 + def block_write?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#85 + def evidence(node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#52 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#72 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#63 + def send_write?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # @yield [content] + # + # source://rubocop//lib/rubocop/cop/style/file_write.rb#95 + def file_open_write?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_write.rb#123 + def heredoc?(write_node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#128 + def heredoc_range(first_argument); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#108 + def replacement(mode, filename, content, write_node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#104 + def write_method(mode); end +end + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#45 +RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#47 +RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#49 +RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) + +# Checks for division with integers coerced to floats. +# It is recommended to either always use `fdiv` or coerce one side only. +# This cop also provides other options for code consistency. +# +# @example EnforcedStyle: single_coerce (default) +# # bad +# a.to_f / b.to_f +# +# # good +# a.to_f / b +# a / b.to_f +# @example EnforcedStyle: left_coerce +# # bad +# a / b.to_f +# a.to_f / b.to_f +# +# # good +# a.to_f / b +# @example EnforcedStyle: right_coerce +# # bad +# a.to_f / b +# a.to_f / b.to_f +# +# # good +# a / b.to_f +# @example EnforcedStyle: fdiv +# # bad +# a / b.to_f +# a.to_f / b +# a.to_f / b.to_f +# +# # good +# a.fdiv(b) +# +# source://rubocop//lib/rubocop/cop/style/float_division.rb#53 +class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#79 + def any_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#75 + def both_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#71 + def left_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#83 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#67 + def right_coerce?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#121 + def add_to_f_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#130 + def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#141 + def extract_receiver_source(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#117 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/float_division.rb#102 + def offense_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#125 + def remove_to_f_method(corrector, send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/float_division.rb#57 +RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/float_division.rb#64 +RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of the `for` keyword or `each` method. The +# preferred alternative is set in the EnforcedStyle configuration +# parameter. An `each` call with a block on a single line is always +# allowed. +# +# @example EnforcedStyle: each (default) +# # bad +# def foo +# for n in [1, 2, 3] do +# puts n +# end +# end +# +# # good +# def foo +# [1, 2, 3].each do |n| +# puts n +# end +# end +# @example EnforcedStyle: for +# # bad +# def foo +# [1, 2, 3].each do |n| +# puts n +# end +# end +# +# # good +# def foo +# for n in [1, 2, 3] do +# puts n +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/for.rb#45 +class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/for.rb#65 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#54 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#65 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/for.rb#82 + def suspect_enumerable?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/for.rb#50 +RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/for.rb#51 +RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/for.rb#52 +RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) + +# Enforces the use of a single string formatting utility. +# Valid options include Kernel#format, Kernel#sprintf and String#%. +# +# The detection of String#% cannot be implemented in a reliable +# manner for all cases, so only two scenarios are considered - +# if the first argument is a string literal and if the second +# argument is an array literal. +# +# @example EnforcedStyle: format (default) +# # bad +# puts sprintf('%10s', 'hoge') +# puts '%10s' % 'hoge' +# +# # good +# puts format('%10s', 'hoge') +# @example EnforcedStyle: sprintf +# # bad +# puts format('%10s', 'hoge') +# puts '%10s' % 'hoge' +# +# # good +# puts sprintf('%10s', 'hoge') +# @example EnforcedStyle: percent +# # bad +# puts format('%10s', 'hoge') +# puts sprintf('%10s', 'hoge') +# +# # good +# puts '%10s' % 'hoge' +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#38 +class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#46 + def formatter(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#59 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#55 + def variable_argument?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#97 + def autocorrect_from_percent(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#111 + def autocorrect_to_percent(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#124 + def format_single_parameter(arg); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#73 + def message(detected_style); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#77 + def method_name(style_name); end +end + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#42 +RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#43 +RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use a consistent style for named format string tokens. +# +# NOTE: `unannotated` style cop only works for strings +# which are passed as arguments to those methods: +# `printf`, `sprintf`, `format`, `%`. +# The reason is that _unannotated_ format is very similar +# to encoded URLs or Date/Time formatting strings. +# +# This cop can be customized allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# It is allowed to contain unannotated token +# if the number of them is less than or equals to +# `MaxUnannotatedPlaceholdersAllowed`. +# +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%<greeting>s', greeting: 'Hello') +# @example EnforcedStyle: template +# +# # bad +# format('%<greeting>s', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%{greeting}', greeting: 'Hello') +# @example EnforcedStyle: unannotated +# +# # bad +# format('%<greeting>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('%<number>06d', number: 10) +# @example MaxUnannotatedPlaceholdersAllowed: 1 (default) +# +# # bad +# format('%s %s.', 'Hello', 'world') +# +# # good +# format('%06d', 10) +# @example AllowedMethods: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example AllowedMethods: [redirect] +# +# # good +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: ['redirect'] +# +# # good +# redirect('foo/%{bar_id}') +# +# source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 +class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#106 + def format_string_in_typical_context?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#91 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#213 + def allowed_unannotated?(detections); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#139 + def autocorrect_sequence(corrector, detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#124 + def check_sequence(detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#203 + def collect_detections(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#135 + def correctable_sequence?(detected_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#113 + def format_string_token?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#222 + def max_unannotated_placeholders_allowed; end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#160 + def message(detected_style); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#165 + def message_text(style); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#180 + def str_contents(source_map); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#190 + def token_ranges(contents); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#174 + def tokens(str_node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#156 + def unannotated_format?(node, detected_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#117 + def use_allowed_method?(node); end +end + +# Helps you transition from mutable string literals +# to frozen string literals. +# of files to enable frozen string literals. Frozen string literals may be +# default in future Ruby. The comment will be added below a shebang and +# encoding comment. The frozen string literal comment is only valid in Ruby 2.3+. +# +# Note that the cop will accept files where the comment exists but is set +# to `false` instead of `true`. +# +# To require a blank line after this comment, please see +# `Layout/EmptyLineAfterMagicComment` cop. +# +# @example EnforcedStyle: always (default) +# # The `always` style will always add the frozen string literal comment +# # to a file, regardless of the Ruby version or if `freeze` or `<<` are +# # called on a string literal. +# # bad +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: true +# +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: false +# +# module Bar +# # ... +# end +# @example EnforcedStyle: never +# # The `never` will enforce that the frozen string literal comment does +# # not exist in a file. +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# module Baz +# # ... +# end +# @example EnforcedStyle: always_true +# # The `always_true` style enforces that the frozen string literal +# # comment is set to `true`. This is a stricter option than `always` +# # and forces projects to use frozen string literals. +# # bad +# # frozen_string_literal: false +# +# module Baz +# # ... +# end +# +# # bad +# module Baz +# # ... +# end +# +# # good +# # frozen_string_literal: true +# +# module Bar +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#84 +class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#99 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 + def disabled_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 + def enable_comment(corrector); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 + def ensure_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#126 + def ensure_enabled_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 + def ensure_no_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#214 + def following_comment; end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 + def frozen_string_literal_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#196 + def insert_comment(corrector); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 + def last_special_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#206 + def line_range(line); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 + def missing_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 + def missing_true_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#210 + def preceding_comment; end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 + def remove_comment(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 + def unnecessary_comment_offense(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#96 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#94 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#93 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#95 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#97 +RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) + +# Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. +# `STDOUT/STDERR/STDIN` are constants, and while you can actually +# reassign (possibly to redirect some stream) constants in Ruby, you'll get +# an interpreter warning if you do so. +# +# @example +# # bad +# STDOUT.puts('hello') +# +# hash = { out: STDOUT, key: value } +# +# def m(out = STDOUT) +# out.puts('hello') +# end +# +# # good +# $stdout.puts('hello') +# +# hash = { out: $stdout, key: value } +# +# def m(out = $stdout) +# out.puts('hello') +# end +# +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#34 +class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#42 + def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#46 + def on_const(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#64 + def gvar_name(const_name); end + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#60 + def message(const_name); end +end + +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 +RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#39 +RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) + +# Looks for uses of global variables. +# It does not report offenses for built-in global variables. +# Built-in global variables are allowed by default. Additionally +# users can allow additional variables via the AllowedVariables option. +# +# Note that backreferences like $1, $2, etc are not global variables. +# +# @example +# # bad +# $foo = 2 +# bar = $foo + 5 +# +# # good +# FOO = 2 +# foo = 2 +# $stdin.read +# +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#22 +class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#60 + def allowed_var?(global_var); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#72 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#64 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#68 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#56 + def user_vars; end +end + +# built-in global variables and their English aliases +# https://www.zenspider.com/ruby/quickref.html +# +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#27 +RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#23 +RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) + +# Use a guard clause instead of wrapping the code inside a conditional +# expression +# +# A condition with an `elsif` or `else` branch is allowed unless +# one of `return`, `break`, `next`, `raise`, or `fail` is used +# in the body of the conditional expression. +# +# NOTE: Autocorrect works in most cases except with if-else statements +# that contain logical operators such as `foo || raise('exception')` +# +# @example +# # bad +# def test +# if something +# work +# end +# end +# +# # good +# def test +# return unless something +# +# work +# end +# +# # also good +# def test +# work if something +# end +# +# # bad +# if something +# raise 'exception' +# else +# ok +# end +# +# # good +# raise 'exception' if something +# ok +# +# # bad +# if something +# foo || raise('exception') +# else +# ok +# end +# +# # good +# foo || raise('exception') if something +# ok +# @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#95 +class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#113 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#249 + def accepted_form?(node, ending: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 + def accepted_if?(node, ending); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#271 + def allowed_consecutive_conditionals?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#239 + def and_or_guard_clause?(guard_clause); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#184 + def autocorrect(corrector, node, condition, replacement, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 + def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#133 + def check_ending_body(body); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#144 + def check_ending_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#154 + def consecutive_conditionals?(parent, node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#231 + def guard_clause_source(guard_clause); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#206 + def heredoc?(argument); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#222 + def range_of_branch_to_remove(node, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#162 + def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#267 + def remove_whole_lines(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#244 + def too_long_for_single_line?(node, example); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#253 + def trivial?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#101 +RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) + +# Checks for presence or absence of braces around hash literal as a last +# array item depending on configuration. +# +# NOTE: This cop will ignore arrays where all items are hashes, regardless of +# EnforcedStyle. +# +# @example EnforcedStyle: braces (default) +# # bad +# [1, 2, one: 1, two: 2] +# +# # good +# [1, 2, { one: 1, two: 2 }] +# +# # good +# [{ one: 1 }, { two: 2 }] +# @example EnforcedStyle: no_braces +# # bad +# [1, 2, { one: 1, two: 2 }] +# +# # good +# [1, 2, one: 1, two: 2] +# +# # good +# [{ one: 1 }, { two: 2 }] +# +# source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#31 +class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#36 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#85 + def braces_style?; end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#66 + def check_braces(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#74 + def check_no_braces(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#50 + def containing_array(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#61 + def explicit_array?(array); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#55 + def last_array_item?(array, node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#89 + def remove_last_element_trailing_comma(corrector, node); end +end + +# Checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and +# sequences of values to hashes. +# +# Correction code from splat argument (`Hash[*ary]`) is not simply determined. For example, +# `Hash[*ary]` can be replaced with `ary.each_slice(2).to_h` but it will be complicated. +# So, `AllowSplatArgument` option is true by default to allow splat argument for simple code. +# +# @example +# # bad +# Hash[ary] +# +# # good +# ary.to_h +# +# # bad +# Hash[key1, value1, key2, value2] +# +# # good +# {key1 => value1, key2 => value2} +# @example AllowSplatArgument: true (default) +# # good +# Hash[*ary] +# @example AllowSplatArgument: false +# # bad +# Hash[*ary] +# +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 +class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 + def hash_from_array?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 + def allowed_splat_argument?; end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 + def args_to_hash(args); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 + def multi_argument(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 + def register_offense_for_hash(node, hash_argument); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 + def register_offense_for_zip_method(node, zip_method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 + def requires_parens?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#71 + def single_argument(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#88 + def use_zip_method_without_argument?(first_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 +RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 +RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 +RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 +RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 +RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `each_key` and `each_value` Hash methods. +# +# NOTE: If you have an array of two-element arrays, you can put +# parentheses around the block arguments to indicate that you're not +# working with a hash, and suppress RuboCop offenses. +# +# @example +# # bad +# hash.keys.each { |k| p k } +# hash.values.each { |v| p v } +# +# # good +# hash.each_key { |k| p k } +# 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#30 +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#38 + def kv_each(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43 + def kv_each_with_block_pass(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#86 + def check_argument(variable); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 + def correct_args(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#96 + def correct_implicit(node, corrector, method_name); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101 + def correct_key_value_each(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#82 + def format_message(method_name); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117 + def kv_range(outer_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#63 + def register_kv_offense(target, method); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#72 + def register_kv_with_block_pass_offense(node, target, method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#92 + def used?(arg); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#35 +RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) + +# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods +# that can be replaced with `Hash#except` method. +# +# This cop should only be enabled on Ruby version 3.0 or higher. +# (`Hash#except` was added in Ruby 3.0.) +# +# For safe detection, it is limited to commonly used string and symbol comparisons +# when used `==`. +# And do not check `Hash#delete_if` and `Hash#keep_if` to change receiver object. +# +# @example +# +# # bad +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[foo bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[foo bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[foo bar].include?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.except(:bar) +# +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#33 +class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#60 + def bad_method_with_active_support?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#44 + def bad_method_with_poro?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#93 + def bad_method?(block); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#165 + def decorate_source(value); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#173 + def except_key(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#152 + def except_key_source(key); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#146 + def extract_body_if_negated(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#127 + def included?(negated, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 + def not_included?(negated, body); end + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#182 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 + def safe_to_register_offense?(block, except_key); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#111 + def semantically_except_method?(send, block); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#40 +RuboCop::Cop::Style::HashExcept::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#41 +RuboCop::Cop::Style::HashExcept::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where `case-when` represents a simple 1:1 +# mapping and can be replaced with a hash lookup. +# +# @example MinBranchesCount: 3 (default) +# # bad +# case country +# when 'europe' +# 'http://eu.example.com' +# when 'america' +# 'http://us.example.com' +# when 'australia' +# 'http://au.example.com' +# end +# +# # good +# SITES = { +# 'europe' => 'http://eu.example.com', +# 'america' => 'http://us.example.com', +# 'australia' => 'http://au.example.com' +# } +# SITES[country] +# @example MinBranchesCount: 4 +# # good +# case country +# when 'europe' +# 'http://eu.example.com' +# when 'america' +# 'http://us.example.com' +# when 'australia' +# 'http://au.example.com' +# end +# +# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#39 +class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MinBranchesCount + + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#45 + def hash_like_case?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#53 + def on_case(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#65 + def nodes_of_same_type?(nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#42 +RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) + +# Checks hash literal syntax. +# +# It can enforce either the use of the class hash rocket syntax or +# the use of the newer Ruby 1.9 syntax (when applicable). +# +# A separate offense is registered for each problematic pair. +# +# The supported styles are: +# +# * ruby19 - forces use of the 1.9 syntax (e.g. `{a: 1}`) when hashes have +# all symbols for keys +# * hash_rockets - forces use of hash rockets for all hashes +# * no_mixed_keys - simply checks for hashes with mixed syntaxes +# * ruby19_no_mixed_keys - forces use of ruby 1.9 syntax and forbids mixed +# syntax hashes +# +# This cop has `EnforcedShorthandSyntax` option. +# It can enforce either the use of the explicit hash value syntax or +# the use of Ruby 3.1's hash value shorthand syntax. +# +# The supported styles are: +# +# * always - forces use of the 3.1 syntax (e.g. {foo:}) +# * never - forces use of explicit hash literal value +# * either - accepts both shorthand and explicit use of hash literal value +# * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash +# +# @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: hash_rockets +# # bad +# {a: 1, b: 2} +# {c: 1, 'd' => 5} +# +# # good +# {:a => 1, :b => 2} +# @example EnforcedStyle: no_mixed_keys +# # bad +# {:a => 1, b: 2} +# {c: 1, 'd' => 2} +# +# # good +# {:a => 1, :b => 2} +# {c: 1, d: 2} +# @example EnforcedStyle: ruby19_no_mixed_keys +# # bad +# {:a => 1, :b => 2} +# {c: 2, 'd' => 3} # should just use hash rockets +# +# # good +# {a: 1, b: 2} +# {:c => 3, 'd' => 4} +# @example EnforcedShorthandSyntax: always (default) +# +# # bad +# {foo: foo, bar: bar} +# +# # good +# {foo:, bar:} +# @example EnforcedShorthandSyntax: never +# +# # bad +# {foo:, bar:} +# +# # good +# {foo: foo, bar: bar} +# @example EnforcedShorthandSyntax: either +# +# # good +# {foo: foo, bar: bar} +# +# # good +# {foo: foo, bar:} +# +# # good +# {foo:, bar:} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 +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#167 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#145 + def hash_rockets_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 + def no_mixed_keys_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#123 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 + def ruby19_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#149 + def ruby19_no_mixed_keys_check(pairs); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#198 + def acceptable_19_syntax_symbol?(sym_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#252 + def argument_without_space?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#256 + def autocorrect_hash_rockets(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#265 + def autocorrect_no_mixed_keys(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#231 + def autocorrect_ruby19(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#216 + def check(pairs, delim, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#273 + def force_hash_rockets?(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#244 + def range_for_autocorrect_ruby19(pair_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#188 + def sym_indices?(pairs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#192 + def word_symbol_pair?(pair); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#119 +RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#121 +RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120 +RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) + +# Looks for uses of `\_.each_with_object({}) {...}`, +# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just +# transforming the keys of a hash, and tries to use a simpler & faster +# call to `transform_keys` instead. +# It should only be enabled on Ruby version 2.5 or newer. +# (`transform_keys` was added in Ruby 2.5.) +# +# @example +# # bad +# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[foo(k)] = v } +# Hash[{a: 1, b: 2}.collect { |k, v| [foo(k), v] }] +# {a: 1, b: 2}.map { |k, v| [k.to_s, v] }.to_h +# {a: 1, b: 2}.to_h { |k, v| [k.to_s, v] } +# +# # good +# {a: 1, b: 2}.transform_keys { |k| foo(k) } +# {a: 1, b: 2}.transform_keys { |k| k.to_s } +# +# source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#28 +class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashTransformMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#36 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#48 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#61 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#73 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#84 + def extract_captures(match); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#89 + def new_method_name; end +end + +# Looks for uses of `\_.each_with_object({}) {...}`, +# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just +# transforming the values of a hash, and tries to use a simpler & faster +# call to `transform_values` instead. +# +# @example +# # bad +# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[k] = foo(v) } +# Hash[{a: 1, b: 2}.collect { |k, v| [k, foo(v)] }] +# {a: 1, b: 2}.map { |k, v| [k, v * v] }.to_h +# {a: 1, b: 2}.to_h { |k, v| [k, v * v] } +# +# # good +# {a: 1, b: 2}.transform_values { |v| foo(v) } +# {a: 1, b: 2}.transform_values { |v| v * v } +# +# source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#26 +class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashTransformMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#34 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#46 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#59 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#71 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#82 + def extract_captures(match); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#87 + def new_method_name; end +end + +# Checks for identical expressions at the beginning or end of +# each branch of a conditional expression. Such expressions should normally +# be placed outside the conditional expression - before or after it. +# +# NOTE: The cop is poorly named and some people might think that it actually +# checks for duplicated conditional branches. The name will probably be changed +# in a future major RuboCop release. +# +# @example +# # bad +# if condition +# do_x +# do_z +# else +# do_y +# do_z +# end +# +# # good +# if condition +# do_x +# else +# do_y +# end +# do_z +# +# # bad +# if condition +# do_z +# do_x +# else +# do_z +# do_y +# end +# +# # good +# do_z +# if condition +# do_x +# else +# do_y +# end +# +# # bad +# case foo +# when 1 +# do_x +# when 2 +# do_x +# else +# do_x +# end +# +# # good +# case foo +# when 1 +# do_x +# do_y +# when 2 +# # nothing +# else +# do_x +# do_z +# end +# +# # bad +# case foo +# in 1 +# do_x +# in 2 +# do_x +# else +# do_x +# end +# +# # good +# case foo +# in 1 +# do_x +# do_y +# in 2 +# # nothing +# else +# do_x +# do_z +# end +# +# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#110 +class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#123 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#130 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#116 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 + def check_branches(node, branches); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#168 + def check_expressions(node, expressions, insert_position); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#156 + def duplicated_expressions?(node, expressions); end + + # `elsif` branches show up in the if node as nested `else` branches. We + # need to recursively iterate over all `else` branches. + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#208 + def expand_elses(branch); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 + def head(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#192 + def last_child_of_parent?(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#202 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#198 + def single_child_branch?(branch_node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#219 + 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#560 +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#565 + def correct(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#569 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#583 + def extract_tail_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#590 + def move_branch_inside_condition(corrector, branch, condition, assignment, column); end + end +end + +# If the `else` branch of a conditional consists solely of an `if` node, +# it can be combined with the `else` to become an `elsif`. +# This helps to keep the nesting level from getting too deep. +# +# @example +# # bad +# if condition_a +# action_a +# else +# if condition_b +# action_b +# else +# action_c +# end +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# else +# action_c +# end +# @example AllowIfModifier: false (default) +# # bad +# if condition_a +# action_a +# else +# action_b if condition_b +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# end +# @example AllowIfModifier: true +# # good +# if condition_a +# action_a +# else +# action_b if condition_b +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# end +# +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#61 +class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#69 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#150 + def allow_if_modifier?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 + def allow_if_modifier_in_else_branch?(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#88 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#117 + def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#109 + def correct_to_elsif_from_modifier_form(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#135 + def find_end_range(node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 + def if_condition_range(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 + def then?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#66 +RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for `if` and `unless` statements that would fit on one line if +# written as modifier `if`/`unless`. The cop also checks for modifier +# `if`/`unless` lines that exceed the maximum line length. +# +# The maximum line length is configured in the `Layout/LineLength` +# cop. The tab size is configured in the `IndentationWidth` of the +# `Layout/IndentationStyle` cop. +# +# One-line pattern matching is always allowed. To ensure that there are few cases +# where the match variable is not used, and to prevent oversights. The variable `x` +# becomes undefined and raises `NameError` when the following example is changed to +# the modifier form: +# +# [source,ruby] +# ---- +# if [42] in [x] +# x # `x` is undefined when using modifier form. +# end +# ---- +# +# NOTE: It is allowed when `defined?` argument has an undefined value, +# because using the modifier form causes the following incompatibility: +# +# [source,ruby] +# ---- +# unless defined?(undefined_foo) +# undefined_foo = 'default_value' +# end +# undefined_foo # => 'default_value' +# +# undefined_bar = 'default_value' unless defined?(undefined_bar) +# undefined_bar # => nil +# ---- +# +# @example +# # bad +# if condition +# do_stuff(bar) +# end +# +# unless qux.empty? +# Foo.do_something +# end +# +# do_something_with_a_long_name(arg) if long_condition_that_prevents_code_fit_on_single_line +# +# # good +# do_stuff(bar) if condition +# Foo.do_something unless qux.empty? +# +# if long_condition_that_prevents_code_fit_on_single_line +# do_something_with_a_long_name(arg) +# end +# +# if short_condition # a long comment that makes it too long if it were just a single line +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#63 +class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#80 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#171 + def allowed_patterns; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#231 + def another_statement_on_same_line?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#132 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#285 + def comment_on_node_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#104 + def defined_argument_is_undefined?(if_node, defined_node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#96 + def defined_nodes(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#272 + def extract_heredoc_from(last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#215 + def line_length_enabled_at_line?(line); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#124 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#219 + def named_capture_in_condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#223 + def non_eligible_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#227 + def non_simple_if_unless?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#114 + def pattern_matching_nodes(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#289 + def remove_comment(corrector, _node, comment); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#279 + def remove_heredoc(corrector, heredoc); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#141 + def replacement_for_modifier_form(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#265 + def to_modifier_form_with_move_comment(node, indentation, comment); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#245 + def to_normal_form(node, indentation); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#253 + def to_normal_form_with_heredoc(node, indentation, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#165 + def too_long_due_to_comment_after_modifier?(node, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#160 + def too_long_due_to_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#206 + def too_long_line_based_on_allow_uri?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#189 + def too_long_line_based_on_config?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#198 + def too_long_line_based_on_ignore_cop_directives?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#176 + def too_long_single_line?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#76 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#71 +RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#74 +RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) + +# Checks for if and unless statements used as modifiers of other if or +# unless statements. +# +# @example +# +# # bad +# tired? ? 'stop' : 'go faster' if running? +# +# # bad +# if tired? +# "please stop" +# else +# "keep going" +# end if running? +# +# # good +# if running? +# tired? ? 'stop' : 'go faster' +# end +# +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#25 +class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#31 + def on_if(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#29 +RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `if` with boolean literal branches. +# It checks only conditions to return boolean value (`true` or `false`) for safe detection. +# The conditions to be checked are comparison methods, predicate methods, and +# double negation (!!). +# `nonzero?` method is allowed by default. +# These are customizable with `AllowedMethods` option. +# +# This cop targets only `if`s with a single `elsif` or `else` branch. The following +# code will be allowed, because it has two `elsif` branches: +# +# [source,ruby] +# ---- +# if foo +# true +# elsif bar > baz +# true +# elsif qux > quux # Single `elsif` is warned, but two or more `elsif`s are not. +# true +# else +# false +# end +# ---- +# +# @example +# # bad +# if foo == bar +# true +# else +# false +# end +# +# # bad +# foo == bar ? true : false +# +# # good +# foo == bar +# @example +# # bad +# if foo.do_something? +# true +# else +# false +# end +# +# # good (but potentially an unsafe correction) +# foo.do_something? +# @example AllowedMethods: ['nonzero?'] (default) +# # good +# num.nonzero? ? true : false +# +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#62 +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#74 + def double_negative?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#70 + def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#134 + def assume_boolean_value?(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 + def message(node, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#96 + def multiple_elsif?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#102 + def offense_range_with_keyword(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#151 + def opposite_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#141 + def replacement_condition(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#156 + def require_parentheses?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#120 + def return_boolean_value?(condition); end +end + +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 +RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#67 +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#23 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#38 + def autocorrect(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#56 + def build_else_branch(second_condition); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#47 + def correct_elsif(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_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 +end + +# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 +RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) + +# Use `Kernel#loop` for infinite loops. +# +# @example +# # bad +# while true +# work +# end +# +# # good +# loop do +# work +# end +# +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#23 +class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#35 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#84 + def assigned_before_loop?(var, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#80 + def assigned_inside_loop?(var, range); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#103 + def modifier_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#114 + def non_modifier_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#89 + def referenced_after_loop?(var, range); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#94 + def replace_begin_end_with_modifier(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#99 + def replace_source(corrector, range, replacement); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#53 + def while_or_until(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#31 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#27 +RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#29 +RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing inline comments. +# +# @example +# +# # good +# foo.each do |f| +# # Standalone comment +# f.bar +# end +# +# # bad +# foo.each do |f| +# f.bar # Trailing inline comment +# end +# +# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#20 +class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/inline_comment.rb#23 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#21 +RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) + +# Check for usages of not (`not` or `!`) called on a method +# when an inverse of that method can be used instead. +# +# Methods that can be inverted by a not (`not` or `!`) should be defined +# in `InverseMethods`. +# +# Methods that are inverted by inverting the return +# of the block that is passed to the method should be defined in +# `InverseBlocks`. +# +# @example +# # bad +# !foo.none? +# !foo.any? { |f| f.even? } +# !foo.blank? +# !(foo == bar) +# foo.select { |f| !f.even? } +# foo.reject { |f| f != 7 } +# +# # good +# foo.none? +# foo.blank? +# foo.any? { |f| f.even? } +# foo != bar +# foo == bar +# !!('foo' =~ /^\w+$/) +# !(foo.class < Numeric) # Checking class hierarchy is allowed +# # Blocks with guard clauses are ignored: +# foo.select do |f| +# next if f.zero? +# f != 1 +# end +# +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#43 +class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#70 + def inverse_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 + def inverse_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 + 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#176 + def camel_case_constant?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#120 + def correct_inverse_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#111 + def correct_inverse_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#127 + def correct_inverse_selector(block, corrector); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180 + 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#149 + def inverse_blocks; end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#144 + def inverse_methods; end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#190 + def message(method, inverse); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#153 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#157 + 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#171 + def possible_class_hierarchy_check?(lhs, rhs, method); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184 + def remove_end_parenthesis(corrector, node, method, method_call); 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#49 +RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 +RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 +RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 +RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#54 +RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usages of `unless` which can be replaced by `if` with inverted condition. +# Code without `unless` is easier to read, but that is subjective, so this cop +# is disabled by default. +# +# Methods that can be inverted should be defined in `InverseMethods`. Note that +# the relationship of inverse methods needs to be defined in both directions. +# For example, +# +# [source,yaml] +# ---- +# InverseMethods: +# :!=: :== +# :even?: :odd? +# :odd?: :even? +# ---- +# +# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). +# +# @example +# # bad (simple condition) +# foo unless !bar +# foo unless x != y +# foo unless x >= 10 +# foo unless x.even? +# +# # good +# foo if bar +# foo if x == y +# foo if x < 10 +# foo if x.odd? +# +# # 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#51 +class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#91 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104 + def autocorrect_send_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#85 + def inheritance_check?(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#112 + def inverse_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#70 + def invertible?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#54 +RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for hardcoded IP addresses, which can make code +# brittle. IP addresses are likely to need to be changed when code +# is deployed to a different server or environment, which may break +# a deployment if forgotten. Prefer setting IP addresses in ENV or +# other configuration. +# +# @example +# +# # bad +# ip_address = '127.59.241.29' +# +# # good +# ip_address = ENV['DEPLOYMENT_IP_ADDRESS'] +# +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#21 +class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringHelp + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#46 + def correct_style_detected; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#27 + def offense?(node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#42 + def opposite_style_detected; end + + private + + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#50 + def allowed_addresses; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#55 + def could_be_ip?(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#68 + def starts_with_hex_or_colon?(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#64 + def too_long?(str); end +end + +# IPv4-mapped IPv6 is the longest +# +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#24 +RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#25 +RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) + +# Enforces that optional keyword parameters are placed at the +# end of the parameters list. +# +# This improves readability, because when looking through the source, +# it is expected to find required parameters at the beginning of parameters list +# and optional parameters at the end. +# +# @example +# # bad +# def some_method(first: false, second:, third: 10) +# # body omitted +# end +# +# # good +# def some_method(second:, first: false, third: 10) +# # body omitted +# end +# +# # bad +# do_something do |first: false, second:, third: 10| +# # body omitted +# end +# +# # good +# do_something do |second:, first: false, third: 10| +# # body omitted +# end +# +# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#34 +class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#40 + def on_kwoptarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#58 + def append_newline_to_last_kwoptarg(arguments, corrector); end + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#66 + def remove_kwargs(kwarg_nodes, corrector); end +end + +# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#38 +RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) + +# (by default) checks for uses of the lambda literal syntax for +# single line lambdas, and the method call syntax for multiline lambdas. +# It is configurable to enforce one of the styles for both single line +# and multiline lambdas as well. +# +# @example EnforcedStyle: line_count_dependent (default) +# # bad +# f = lambda { |x| x } +# f = ->(x) do +# x +# end +# +# # good +# f = ->(x) { x } +# f = lambda do |x| +# x +# end +# @example EnforcedStyle: lambda +# # bad +# f = ->(x) { x } +# f = ->(x) do +# x +# end +# +# # good +# f = lambda { |x| x } +# f = lambda do |x| +# x +# end +# @example EnforcedStyle: literal +# # bad +# f = lambda { |x| x } +# f = lambda do |x| +# x +# end +# +# # good +# f = ->(x) { x } +# f = ->(x) do +# x +# end +# +# source://rubocop//lib/rubocop/cop/style/lambda.rb#49 +class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#115 + def arguments_with_whitespace(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#104 + def autocorrect_method_to_literal(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#119 + def lambda_arg_string(args); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#89 + def message(node, selector); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#95 + def message_line_modifier(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda.rb#83 + def offending_selector?(node, selector); end +end + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#53 +RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#54 +RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#56 +RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) + +# Checks for use of the lambda.(args) syntax. +# +# @example EnforcedStyle: call (default) +# # bad +# lambda.(x, y) +# +# # good +# lambda.call(x, y) +# @example EnforcedStyle: braces +# # bad +# lambda.call(x, y) +# +# # good +# lambda.(x, y) +# +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#21 +class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 + def explicit_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 + def implicit_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 + def prefer(node); end +end + +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 +RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for string literal concatenation at +# the end of a line. +# +# @example +# +# # bad +# some_str = 'ala' + +# 'bala' +# +# some_str = 'ala' << +# 'bala' +# +# # good +# some_str = 'ala' \ +# 'bala' +# +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#35 +class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#51 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#74 + def autocorrect(corrector, operator_range); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#57 + def check_token_set(index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#101 + def eligible_next_successor?(next_successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#97 + def eligible_operator?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#105 + def eligible_predecessor?(predecessor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#93 + def eligible_successor?(successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#87 + def eligible_token_set?(predecessor, operator, successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#124 + def standard_string_literal?(token); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#109 + def token_after_last_string(successor, base_index); end + + class << self + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#47 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#42 +RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#43 +RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#40 +RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#44 +RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#39 +RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#45 +RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#41 +RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) + +# Ensures magic comments are written consistently throughout your code base. +# Looks for discrepancies in separators (`-` vs `_`) and capitalization for +# both magic comment directives and values. +# +# Required capitalization can be set with the `DirectiveCapitalization` and +# `ValueCapitalization` configuration keys. +# +# NOTE: If one of these configuration is set to nil, any capitalization is allowed. +# +# @example 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 EnforcedStyle: kebab_case +# # The `kebab_case` style will enforce that the frozen string literal +# # comment is written in kebab case. (Words separated by hyphens) +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# # frozen-string-literal: true +# +# module Baz +# # ... +# end +# @example DirectiveCapitalization: lowercase (default) +# # bad +# # FROZEN-STRING-LITERAL: true +# +# # good +# # frozen-string-literal: true +# @example DirectiveCapitalization: uppercase +# # bad +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example DirectiveCapitalization: nil +# # any capitalization is accepted +# +# # good +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example ValueCapitalization: nil (default) +# # any capitalization is accepted +# +# # good +# # frozen-string-literal: true +# +# # good +# # frozen-string-literal: TRUE +# @example ValueCapitalization: lowercase +# # when a value is not given, any capitalization is accepted +# +# # bad +# # frozen-string-literal: TRUE +# +# # good +# # frozen-string-literal: TRUE +# @example 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 ::Forwardable + + # @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://forwardable/1.3.2/forwardable.rb#229 + def loc(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def text(*args, **_arg1, &block); 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`. +# +# @example +# +# # bad +# array.map { |e| some_condition? ? e : next }.compact +# +# # 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#40 +class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46 + def map_and_compact?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#125 + def range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#91 + 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#95 + def truthy_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#115 + def truthy_branch_for_guard?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#105 + def truthy_branch_for_if?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of `map.to_h` or `collect.to_h` that could be +# written with just `to_h` in Ruby >= 2.6. +# +# NOTE: `Style/HashTransformKeys` and `Style/HashTransformValues` will +# also change this pattern if only hash keys or hash values are being +# transformed. +# +# @example +# # bad +# something.map { |v| [v, v * 2] }.to_h +# +# # good +# something.to_h { |v| [v, v * 2] } +# +# # bad +# {foo: bar}.collect { |k, v| [k.to_s, v.do_something] }.to_h +# +# # good +# {foo: bar}.to_h { |k, v| [k.to_s, v.do_something] } +# +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#30 +class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 + def map_to_h?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#62 + def autocorrect(corrector, to_h, map); end +end + +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37 +RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#38 +RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of `map.to_set` or `collect.to_set` that could be +# written with just `to_set`. +# +# @example +# # bad +# something.map { |i| i * 2 }.to_set +# +# # good +# something.to_set { |i| i * 2 } +# +# # bad +# [1, 2, 3].collect { |i| i.to_s }.to_set +# +# # good +# [1, 2, 3].to_set { |i| i.to_s } +# +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#26 +class RuboCop::Cop::Style::MapToSet < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#34 + def map_to_set?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#55 + def autocorrect(corrector, to_set, map); end +end + +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#30 +RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#31 +RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the presence (default) or absence of parentheses in +# method calls containing parameters. +# +# In the default style (require_parentheses), macro methods are allowed. +# Additional methods can be added to the `AllowedMethods` or +# `AllowedPatterns` list. These options are valid only in the default +# style. Macros can be included by either setting `IgnoreMacros` to false +# or adding specific macros to the `IncludedMacros` list. +# +# Precedence of options is as follows: +# +# 1. `AllowedMethods` +# 2. `AllowedPatterns` +# 3. `IncludedMacros` +# +# If a method is listed in both `IncludedMacros` and `AllowedMethods`, +# then the latter takes precedence (that is, the method is allowed). +# +# In the alternative style (omit_parentheses), there are three additional +# options. +# +# 1. `AllowParenthesesInChaining` is `false` by default. Setting it to +# `true` allows the presence of parentheses in the last call during +# method chaining. +# +# 2. `AllowParenthesesInMultilineCall` is `false` by default. Setting it +# to `true` allows the presence of parentheses in multi-line method +# calls. +# +# 3. `AllowParenthesesInCamelCaseMethod` is `false` by default. This +# allows the presence of parentheses when calling a method whose name +# begins with a capital letter and which has no arguments. Setting it +# to `true` allows the presence of parentheses in such a method call +# even with arguments. +# +# NOTE: The style of `omit_parentheses` allows parentheses in cases where +# omitting them results in ambiguous or syntactically incorrect code. +# +# Non-exhaustive list of examples: +# +# - Parentheses are required allowed in method calls with arguments inside +# literals, logical operators, setting default values in position and +# keyword arguments, chaining and more. +# - Parentheses are allowed in method calls with arguments inside +# operators to avoid ambiguity. +# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an +# endless range. +# - Parentheses are allowed when forwarding arguments with the +# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an +# endless range. +# - Parentheses are required in calls with arguments when inside an +# endless method definition introduced in Ruby 3.0. +# - Ruby 3.1's hash omission syntax allows parentheses if the method call +# is in conditionals and requires parentheses if the call +# is not the value-returning expression. See +# https://bugs.ruby-lang.org/issues/18396. +# - Parentheses are required in anonymous arguments, keyword arguments +# and block passing in Ruby 3.2. +# +# @example 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 EnforcedStyle: omit_parentheses +# +# # bad +# array.delete(e) +# +# # good +# array.delete e +# +# # bad +# action.enforce(strict: true) +# +# # good +# action.enforce strict: true +# +# # good +# # Parentheses are allowed for code that can be ambiguous without +# # them. +# action.enforce(condition) || other_condition +# +# # good +# # Parentheses are allowed for calls that won't produce valid Ruby +# # without them. +# yield path, File.basename(path) +# +# # good +# # Omitting the parentheses in Ruby 3.1 hash omission syntax can lead +# # to ambiguous code. We allow them in conditionals and non-last +# # expressions. See https://bugs.ruby-lang.org/issues/18396 +# if meets(criteria:, action:) +# safe_action(action) || dangerous_action(action) +# end +# @example IgnoreMacros: true (default) +# +# # good +# class Foo +# bar :baz +# end +# @example IgnoreMacros: false +# +# # bad +# class Foo +# bar :baz +# end +# @example AllowParenthesesInMultilineCall: false (default) +# +# # bad +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInMultilineCall: true +# +# # good +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInChaining: false (default) +# +# # bad +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInChaining: true +# +# # good +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInCamelCaseMethod: false (default) +# +# # bad +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInCamelCaseMethod: true +# +# # good +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInStringInterpolation: false (default) +# +# # bad +# "#{t('this.is.bad')}" +# +# # good +# "#{t 'this.is.better'}" +# @example AllowParenthesesInStringInterpolation: true +# +# # good +# "#{t('this.is.good')}" +# +# # good +# "#{t 'this.is.also.good'}" +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 +class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + def on_yield(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 + def args_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 + def args_parenthesized?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#213 + def autocorrect_incompatible_with; end + end +end + +# Style omit_parentheses +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 +module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#70 + def allowed_camel_case_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#165 + def allowed_chained_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 + def allowed_multiline_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + def allowed_string_interpolation_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 + def ambiguous_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 + def assigned_before?(node, target); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#211 + def assignment_in_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142 + def call_as_argument_or_chain?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#99 + def call_in_literals?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 + def call_in_logical_operators?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148 + def call_in_match_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 + def call_in_optional_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#123 + def call_in_single_line_inheritance?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#127 + def call_with_ambiguous_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 + def call_with_braced_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + def forwards_anonymous_rest_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190 + def hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 + def hash_literal_in_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#44 + def inside_endless_method_def?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 + def inside_string_interpolation?(node); end + + # Require hash value omission be enclosed in parentheses to prevent the following issue: + # https://bugs.ruby-lang.org/issues/18396. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#58 + def last_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#87 + def legitimate_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#186 + def logical_operator?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 + def omit_parentheses(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + 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#194 + def regexp_slash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#49 + 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#178 + def splat?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#66 + def super_call_without_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#62 + def syntax_like_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#182 + def ternary_if?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#198 + def unary_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#11 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#10 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Style require_parentheses +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#8 +module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#27 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#31 + def eligible_for_parentheses_omission?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#39 + def ignored_macro?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#35 + def included_macros_list; end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#14 + def require_parentheses(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#9 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) + +# Checks for unwanted parentheses in parameterless method calls. +# +# This cop can be customized allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# @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#26 +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#33 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#60 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#74 + def any_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#56 + def default_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#52 + def ineligible_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#97 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#45 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#64 + def same_name_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#90 + def variable_in_mass_assignment?(variable_name, node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#31 +RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for methods called on a do...end block. The point of +# this check is that it's easy to miss the call tacked on to the block +# when reading code. +# +# @example +# # bad +# a do +# b +# end.c +# +# # good +# a { b }.c +# +# # good +# foo = a do +# b +# end +# foo.c +# +# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#24 +class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#40 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#27 +RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for parentheses around the arguments in method +# definitions. Both instance and class/singleton methods are checked. +# +# Regardless of style, parentheses are necessary for: +# +# 1. Endless methods +# 2. Argument lists containing a `forward-arg` (`...`) +# 3. Argument lists containing an anonymous rest arguments forwarding (`*`) +# 4. Argument lists containing an anonymous keyword rest arguments forwarding (`**`) +# 5. Argument lists containing an anonymous block forwarding (`&`) +# +# Removing the parens would be a syntax error here. +# +# @example EnforcedStyle: require_parentheses (default) +# # The `require_parentheses` style requires method definitions +# # to always use parentheses +# +# # bad +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# +# # good +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# @example EnforcedStyle: require_no_parentheses +# # The `require_no_parentheses` style requires method definitions +# # to never use parentheses +# +# # bad +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# +# # good +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# @example EnforcedStyle: require_no_parentheses_except_multiline +# # The `require_no_parentheses_except_multiline` style prefers no +# # parentheses when method definition arguments fit on single line, +# # but prefers parentheses when arguments span multiple lines. +# +# # bad +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# +# # good +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#97 +class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#169 + def anonymous_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#147 + def arguments_without_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#126 + def correct_arguments(arg_node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#131 + def forced_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#151 + def missing_parentheses(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#142 + def require_parentheses?(args); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#161 + def unwanted_parentheses(args); end +end + +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#103 +RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#102 +RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) + +# Checks for potential uses of `Enumerable#minmax`. +# +# @example +# +# # bad +# bar = [foo.min, foo.max] +# return foo.min, foo.max +# +# # good +# bar = foo.minmax +# return foo.minmax +# +# source://rubocop//lib/rubocop/cop/style/min_max.rb#17 +class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#38 + def min_max_candidate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 + def on_return(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#55 + def argument_range(node); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#42 + def message(offender, receiver); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#46 + def offending_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/min_max.rb#20 +RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of `max` or `min` instead of comparison for greater or less. +# +# NOTE: It can be used if you want to present limit or threshold in Ruby 2.7+. +# That it is slow though. So autocorrection will apply generic `max` or `min`: +# +# [source,ruby] +# ---- +# a.clamp(b..) # Same as `[a, b].max` +# a.clamp(..b) # Same as `[a, b].min` +# ---- +# +# @example +# +# # bad +# a > b ? a : b +# a >= b ? a : b +# +# # good +# [a, b].max +# +# # bad +# a < b ? a : b +# a <= b ? a : b +# +# # good +# [a, b].min +# +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#37 +class RuboCop::Cop::Style::MinMaxComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#46 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#72 + def autocorrect(corrector, node, replacement); end + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#64 + def preferred_method(operator, lhs, rhs, if_branch, else_branch); end +end + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#44 +RuboCop::Cop::Style::MinMaxComparison::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#42 +RuboCop::Cop::Style::MinMaxComparison::GRATER_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#43 +RuboCop::Cop::Style::MinMaxComparison::LESS_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#41 +RuboCop::Cop::Style::MinMaxComparison::MSG = T.let(T.unsafe(nil), String) + +# Checks for `if` expressions that do not have an `else` branch. +# +# NOTE: Pattern matching is allowed to have no `else` branch because unlike `if` and `case`, +# it raises `NoMatchingPatternError` if the pattern doesn't match and without having `else`. +# +# Supported styles are: if, case, both. +# +# @example EnforcedStyle: both (default) +# # warn when an `if` or `case` expression is missing an `else` branch. +# +# # bad +# if condition +# statement +# end +# +# # bad +# case var +# when condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# @example EnforcedStyle: if +# # warn when an `if` expression is missing an `else` branch. +# +# # bad +# if condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# case var +# when condition +# statement +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# @example EnforcedStyle: case +# # warn when a `case` expression is missing an `else` branch. +# +# # bad +# case var +# when condition +# statement +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# if condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#99 +class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#115 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#121 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#108 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#146 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#159 + def case_style?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#181 + def empty_else_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#171 + def empty_else_cop_enabled?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#175 + def empty_else_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#155 + def if_style?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#135 + def message_template; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#167 + def unless_else_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#163 + def unless_else_cop_enabled?; end +end + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#104 +RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#106 +RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#105 +RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) + +# Checks for the presence of `method_missing` without also +# defining `respond_to_missing?`. +# +# @example +# #bad +# def method_missing(name, *args) +# # ... +# end +# +# #good +# def respond_to_missing?(name, include_private) +# # ... +# end +# +# def method_missing(name, *args) +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#24 +class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#27 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#37 + def implements_respond_to_missing?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#25 +RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) + +# Checks for grouping of mixins in `class` and `module` bodies. +# By default it enforces mixins to be placed in separate declarations, +# but it can be configured to enforce grouping them in one declaration. +# +# @example EnforcedStyle: separated (default) +# # bad +# class Foo +# include Bar, Qox +# end +# +# # good +# class Foo +# include Qox +# include Bar +# end +# @example EnforcedStyle: grouped +# # bad +# class Foo +# extend Bar +# extend Qox +# end +# +# # good +# class Foo +# extend Qox, Bar +# end +# +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#33 +class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#64 + def check(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#72 + def check_grouped_style(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#91 + def check_separated_style(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#127 + def group_mixins(node, mixins); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#110 + def grouped_style?; end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#53 + def range_to_remove_for_subsequent_mixin(mixins, node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#118 + def separate_mixins(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#114 + def separated_style?; end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#104 + def sibling_mixins(send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#37 +RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#38 +RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) + +# Checks that `include`, `extend` and `prepend` statements appear +# inside classes and modules, not at the top level, so as to not affect +# the behavior of `Object`. +# +# @example +# # bad +# include M +# +# class C +# end +# +# # bad +# extend M +# +# class C +# end +# +# # bad +# prepend M +# +# class C +# end +# +# # good +# class C +# include M +# end +# +# # good +# class C +# extend M +# end +# +# # good +# class C +# prepend M +# end +# +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#43 +class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#54 + def in_top_level_scope?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#48 + def include_statement(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#62 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#44 +RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#45 +RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of `extend self` or `module_function` in a module. +# +# Supported styles are: `module_function` (default), `extend_self` and `forbidden`. +# +# A couple of things to keep in mind: +# +# - `forbidden` style prohibits the usage of both styles +# - in default mode (`module_function`), the cop won't be activated when the module +# contains any private methods +# +# @example EnforcedStyle: module_function (default) +# # bad +# module Test +# extend self +# # ... +# end +# +# # good +# module Test +# module_function +# # ... +# end +# +# # good +# module Test +# extend self +# # ... +# private +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# @example EnforcedStyle: extend_self +# # bad +# module Test +# module_function +# # ... +# end +# +# # good +# module Test +# extend self +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# @example EnforcedStyle: forbidden +# # bad +# module Test +# module_function +# # ... +# end +# +# # bad +# module Test +# extend self +# # ... +# end +# +# # bad +# module Test +# extend self +# # ... +# private +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/module_function.rb#95 +class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#107 + def extend_self_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#104 + def module_function_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#112 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#110 + def private_directive?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#149 + def check_extend_self(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#155 + def check_forbidden(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#141 + def check_module_function(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#130 + def each_wrong_style(nodes, &block); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#162 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#100 +RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#101 +RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#99 +RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) + +# Checks for chaining of a block after another block that spans +# multiple lines. +# +# @example +# +# # bad +# Thread.list.select do |t| +# t.alive? +# end.map do |t| +# t.object_id +# end +# +# # good +# alive_threads = Thread.list.select do |t| +# t.alive? +# end +# alive_threads.map do |t| +# t.object_id +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#25 +class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#28 +RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of if/unless modifiers with multiple-lines bodies. +# +# @example +# +# # bad +# { +# result: 'this should not happen' +# } unless cond +# +# # good +# { result: 'ok' } if cond +# +# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#17 +class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#25 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#43 + def indented_body(body, node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#35 + def to_normal_if(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#22 +RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the `then` keyword in multi-line if statements. +# +# @example +# # bad +# # This is considered bad practice. +# if cond then +# end +# +# # good +# # If statements can contain `then` on the same line. +# if cond then a +# elsif cond then b +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#19 +class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#28 + def on_normal_if_unless(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#38 + def non_modifier_then?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#26 +RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#24 +RuboCop::Cop::Style::MultilineIfThen::NON_MODIFIER_THEN = T.let(T.unsafe(nil), Regexp) + +# Checks uses of the `then` keyword in multi-line `in` statement. +# +# @example +# # bad +# case expression +# in pattern then +# end +# +# # good +# case expression +# in pattern +# end +# +# # good +# case expression +# in pattern then do_something +# end +# +# # good +# case expression +# in pattern then do_something(arg1, +# arg2) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#30 +class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#39 + def on_in_pattern(node); end + + private + + # Requires `then` for write `in` and its body on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#51 + def require_then?(in_pattern_node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#37 +RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) + +# Checks expressions wrapping styles for multiline memoization. +# +# @example EnforcedStyle: keyword (default) +# # bad +# foo ||= ( +# bar +# baz +# ) +# +# # good +# foo ||= begin +# bar +# baz +# end +# @example EnforcedStyle: braces +# # bad +# foo ||= begin +# bar +# baz +# end +# +# # good +# foo ||= ( +# bar +# baz +# ) +# +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#33 +class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#56 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#41 + def on_or_asgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#62 + def bad_rhs?(rhs); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#72 + def keyword_autocorrect(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#78 + def keyword_begin_str(node, node_buf); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#86 + def keyword_end_str(node, node_buf); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#39 +RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#38 +RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) + +# Checks for method signatures that span multiple lines. +# +# @example +# +# # good +# +# def foo(bar, baz) +# end +# +# # bad +# +# def foo(bar, +# baz) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#21 +class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#60 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#41 + def autocorrect(corrector, node, begin_of_arguments); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#72 + def closing_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#76 + def correction_exceeds_max_line_length?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#84 + def definition_width(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#80 + def indentation_width(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#56 + def last_line_source_of_arguments(arguments); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#88 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#68 + 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#60 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#84 + def comments_in_condition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#90 + def enforce_single_line_ternary_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#56 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#70 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#94 + 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 + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#58 + def accept_node_type?(node); end + + # Requires `then` for write `when` and its body on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#49 + def require_then?(when_node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#35 +RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) + +# Checks against comparing a variable with multiple items, where +# `Array#include?`, `Set#include?` or a `case` could be used instead +# to avoid code repetition. +# It accepts comparisons of multiple method calls to avoid unnecessary method calls +# by default. It can be configured by `AllowMethodComparison` option. +# +# @example +# # bad +# a = 'a' +# foo if a == 'a' || a == 'b' || a == 'c' +# +# # good +# a = 'a' +# foo if ['a', 'b', 'c'].include?(a) +# +# VALUES = Set['a', 'b', 'c'].freeze +# # elsewhere... +# foo if VALUES.include?(a) +# +# case foo +# when 'a', 'b', 'c' then foo +# # ... +# end +# +# # accepted (but consider `case` as above) +# foo if a == b.lightweight || a == b.heavyweight +# @example AllowMethodComparison: true (default) +# # good +# foo if a == b.lightweight || a == b.heavyweight +# @example AllowMethodComparison: false +# # bad +# foo if a == b.lightweight || a == b.heavyweight +# +# # good +# foo if [b.lightweight, b.heavyweight].include?(a) +# @example ComparisonsThreshold: 2 (default) +# # bad +# foo if a == 'a' || a == 'b' +# @example ComparisonsThreshold: 3 +# # good +# foo if a == 'a' || a == 'b' +# +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52 +class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 + def simple_comparison_lhs?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 + def simple_comparison_rhs?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 + def simple_double_comparison?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 + def allow_method_comparison?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 + def comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 + def comparisons_threshold; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 + def nested_comparison?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 + def nested_variable_comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 + def reset_comparison; end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 + def root_of_or_node(or_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 + def switch_comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 + def variable_name(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 + def variables_in_node(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 + def variables_in_simple_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55 +RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# Checks whether some constant value isn't a +# mutable literal (e.g. array or hash). +# +# Strict mode can be used to freeze all constants, rather than +# just literals. +# Strict mode is considered an experimental feature. It has not been +# updated with an exhaustive list of all methods that will produce +# frozen objects so there is a decent chance of getting some false +# positives. Luckily, there is no harm in freezing an already +# frozen object. +# +# From Ruby 3.0, this cop honours the magic comment +# 'shareable_constant_value'. When this magic comment is set to any +# acceptable value other than none, it will suppress the offenses +# raised by this cop. It enforces frozen state. +# +# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. +# +# NOTE: From Ruby 3.0, interpolated strings are not frozen when +# `# frozen-string-literal: true` is used, so this cop enforces explicit +# freezing for such strings. +# +# NOTE: From Ruby 3.0, this cop allows explicit freezing of constants when +# the `shareable_constant_value` directive is used. +# +# @example EnforcedStyle: literals (default) +# # bad +# CONST = [1, 2, 3] +# +# # good +# CONST = [1, 2, 3].freeze +# +# # good +# CONST = <<~TESTING.freeze +# This is a heredoc +# TESTING +# +# # good +# CONST = Something.new +# @example EnforcedStyle: strict +# # bad +# CONST = Something.new +# +# # bad +# CONST = Struct.new do +# def foo +# puts 1 +# end +# end +# +# # good +# CONST = Something.new.freeze +# +# # good +# CONST = Struct.new do +# def foo +# puts 1 +# end +# end.freeze +# @example +# # Magic comment - shareable_constant_value: literal +# +# # bad +# CONST = [1, 2, 3] +# +# # good +# # shareable_constant_value: literal +# CONST = [1, 2, 3] +# +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#87 +class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 + def on_casgn(node); end + + # Some of these patterns may not actually return an immutable object, + # but we want to consider them immutable for this cop. + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#224 + def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#241 + def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 + def splat_value(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#169 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#158 + def check(value); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#208 + def correct_splat_expansion(corrector, expr, splat_value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#200 + def frozen_regexp_or_range_literals?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#190 + def immutable_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#184 + def mutable_literal?(value); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#141 + def on_assignment(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#204 + def requires_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#194 + def shareable_constant_value?(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#149 + def strict_check(value); end +end + +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#125 +RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) + +# Handles magic comment shareable_constant_value with O(n ^ 2) complexity +# n - number of lines in the source +# Iterates over all lines before a CONSTANT +# until it reaches shareable_constant_value +# +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#88 +module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue + private + + # Identifies the most recent magic comment with valid shareable constant values + # that's in scope for this node + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 + def magic_comment_in_scope(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#110 + def processed_source_till_node(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 + def recent_shareable_value?(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#114 + def shareable_constant_value_enabled?(value); end + + class << self + # Identifies the most recent magic comment with valid shareable constant values + # that's in scope for this node + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 + def magic_comment_in_scope(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 + def recent_shareable_value?(node); end + end +end + +# Checks for uses of if with a negated condition. Only ifs +# without else are considered. There are three different styles: +# +# * both +# * prefix +# * postfix +# +# @example EnforcedStyle: both (default) +# # enforces `unless` for `prefix` and `postfix` conditionals +# +# # bad +# +# if !foo +# bar +# end +# +# # good +# +# unless foo +# bar +# end +# +# # bad +# +# bar if !foo +# +# # good +# +# bar unless foo +# @example EnforcedStyle: prefix +# # enforces `unless` for just `prefix` conditionals +# +# # bad +# +# if !foo +# bar +# end +# +# # good +# +# unless foo +# bar +# end +# +# # good +# +# bar if !foo +# @example EnforcedStyle: postfix +# # enforces `unless` for just `postfix` conditionals +# +# # bad +# +# bar if !foo +# +# # good +# +# bar unless foo +# +# # good +# +# if !foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/negated_if.rb#71 +class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#76 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#92 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#88 + def message(node); end +end + +# Checks for uses of `if-else` and ternary operators with a negated condition +# which can be simplified by inverting condition and swapping branches. +# +# @example +# # bad +# if !x +# do_something +# else +# do_something_else +# end +# +# # good +# if x +# do_something_else +# else +# do_something +# end +# +# # bad +# !x ? do_something : do_something_else +# +# # good +# x ? do_something_else : do_something +# +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#30 +class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#39 + def double_negation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#49 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#45 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#94 + def correct_negated_condition(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#90 + def corrected_ancestor?(node); end + + # Collect the entire else branch, including whitespace and comments + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#125 + def else_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#68 + def if_else?(node); end + + # Collect the entire if branch, including whitespace and comments + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#116 + def if_range(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#84 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#79 + def negated_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#107 + def swap_branches(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#73 + def unwrap_begin_nodes(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#41 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#34 +RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#36 +RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for uses of unless with a negated condition. Only unless +# without else are considered. There are three different styles: +# +# * both +# * prefix +# * postfix +# +# @example EnforcedStyle: both (default) +# # enforces `if` for `prefix` and `postfix` conditionals +# +# # bad +# unless !foo +# bar +# end +# +# # good +# if foo +# bar +# end +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# @example EnforcedStyle: prefix +# # enforces `if` for just `prefix` conditionals +# +# # bad +# unless !foo +# bar +# end +# +# # good +# if foo +# bar +# end +# +# # good +# bar unless !foo +# @example EnforcedStyle: postfix +# # enforces `if` for just `postfix` conditionals +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# +# # good +# unless !foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/negated_unless.rb#61 +class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#66 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#82 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#78 + def message(node); end +end + +# Checks for uses of while with a negated condition. +# +# @example +# # bad +# while !foo +# bar +# end +# +# # good +# until foo +# bar +# end +# +# # bad +# bar until !foo +# +# # good +# bar while foo +# bar while !foo && baz +# +# source://rubocop//lib/rubocop/cop/style/negated_while.rb#25 +class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 + def on_while(node); end +end + +# Checks for nested `File.dirname`. +# It replaces nested `File.dirname` with the level argument introduced in Ruby 3.1. +# +# @example +# +# # bad +# File.dirname(File.dirname(path)) +# +# # good +# File.dirname(path, 2) +# +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#17 +class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#28 + def file_dirname?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#60 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#49 + def path_with_dir_level(node, level); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#22 +RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#23 +RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for nested use of if, unless, while and until in their +# modifier form. +# +# @example +# +# # bad +# something if a if b +# +# # good +# something if b && a +# +# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#16 +class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#85 + def add_parentheses_to_method_arguments(send_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#42 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#30 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#65 + def left_hand_operand(node, operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#38 + def modifier?(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#51 + def new_expression(inner_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#61 + def replacement_operator(keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#94 + def requires_parens?(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#71 + def right_hand_operand(node, left_hand_keyword); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#20 +RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for unparenthesized method calls in the argument list +# of a parenthesized method call. +# `be`, `be_a`, `be_an`, `be_between`, `be_falsey`, `be_kind_of`, `be_instance_of`, +# `be_truthy`, `be_within`, `eq`, `eql`, `end_with`, `include`, `match`, `raise_error`, +# `respond_to`, and `start_with` methods are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # good +# method1(method2(arg)) +# +# # bad +# method1(method2 arg) +# @example AllowedMethods: [foo] +# # good +# method1(foo arg) +# +# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#24 +class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#71 + def allowed?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#65 + def allowed_omission?(send_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#51 + def autocorrect(corrector, nested); end + + class << self + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#29 +RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested ternary op expressions. +# +# @example +# # bad +# a ? (b ? b1 : b2) : a2 +# +# # good +# if a +# b ? b1 : b2 +# else +# a2 +# end +# +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#18 +class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#25 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#48 + def autocorrect(corrector, if_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#41 + def if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#55 + def remove_parentheses(source); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#61 + def replace_loc_and_whitespace(corrector, range, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#23 +RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) + +# Use `next` to skip iteration instead of a condition at the end. +# +# @example EnforcedStyle: skip_modifier_ifs (default) +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# next unless a == 1 +# puts a +# end +# +# # good +# [1, 2].each do |a| +# puts a if a == 1 +# end +# @example EnforcedStyle: always +# # With `always` all conditions at the end of an iteration needs to be +# # replaced by next - with `skip_modifier_ifs` the modifier if like +# # this one are ignored: `[1, 2].each { |a| puts a if a == 1 }` +# +# # bad +# [1, 2].each do |a| +# puts a if a == 1 +# end +# +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# next unless a == 1 +# puts a +# end +# +# source://rubocop//lib/rubocop/cop/style/next.rb#49 +class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/next.rb#68 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#76 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#62 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/next.rb#68 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#76 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#76 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/next.rb#213 + def actual_indent(lines, buffer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#112 + def allowed_modifier_if?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#155 + def autocorrect_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#145 + def autocorrect_modifier(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#84 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#170 + def cond_range(node, cond); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#189 + def end_followed_by_whitespace_only?(source_buffer, end_pos); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#180 + def end_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#98 + def ends_with_condition?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#128 + def exit_body_type?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#217 + def heredoc_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#120 + def if_else_children?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#124 + def if_without_else?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#140 + def offense_location(offense_node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#134 + def offense_node(body); end + + # Adjust indentation of `lines` to match `node` + # + # source://rubocop//lib/rubocop/cop/style/next.rb#204 + def reindent(lines, node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#224 + def reindent_line(corrector, lineno, delta, buffer); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#193 + def reindentable_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#104 + def simple_if_without_break?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/next.rb#58 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/next.rb#56 +RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/next.rb#55 +RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) + +# Checks for comparison of something with nil using `==` and +# `nil?`. +# +# Supported styles are: predicate, comparison. +# +# @example EnforcedStyle: predicate (default) +# +# # bad +# if x == nil +# end +# +# # good +# if x.nil? +# end +# @example EnforcedStyle: comparison +# +# # bad +# if x.nil? +# end +# +# # good +# if x == nil +# end +# +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#31 +class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#44 + def nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#41 + def nil_comparison?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#46 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#65 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#77 + def prefer_comparison?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#69 + def style_check?(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#36 +RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#35 +RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#38 +RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for lambdas and procs that always return nil, +# which can be replaced with an empty lambda or proc instead. +# +# @example +# # bad +# -> { nil } +# +# lambda do +# next nil +# end +# +# proc { nil } +# +# Proc.new do +# break nil +# end +# +# # good +# -> {} +# +# lambda do +# end +# +# -> (x) { nil if x } +# +# proc {} +# +# Proc.new { nil if x } +# +# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#35 +class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#42 + def nil_return?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#46 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#58 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#39 +RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-nil checks, which are usually redundant. +# +# With `IncludeSemanticChanges` set to `false` by default, this cop +# does not report offenses for `!x.nil?` and does no changes that might +# change behavior. +# Also `IncludeSemanticChanges` set to `false` with `EnforcedStyle: comparison` of +# `Style/NilComparison` cop, this cop does not report offenses for `x != nil` and +# does no changes to `!x.nil?` style. +# +# With `IncludeSemanticChanges` set to `true`, this cop reports offenses +# for `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which +# is *usually* OK, but might change behavior. +# +# @example +# # bad +# if x != nil +# end +# +# # good +# if x +# end +# +# # Non-nil checks are allowed if they are the final nodes of predicate. +# # good +# def signed_in? +# !current_user.nil? +# end +# @example IncludeSemanticChanges: false (default) +# # good +# if !x.nil? +# end +# @example IncludeSemanticChanges: true +# # bad +# if !x.nil? +# end +# +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#44 +class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#59 + def nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#62 + def not_and_nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#53 + def not_equal_to_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#64 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#56 + def unless_check?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#93 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#123 + def autocorrect_comparison(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#137 + def autocorrect_non_nil(corrector, node, inner_node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#145 + def autocorrect_unless_nil(corrector, node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#119 + def include_semantic_changes?; end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#110 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#150 + def nil_comparison_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#88 + def register_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#104 + def unless_and_nil_check?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#48 +RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#47 +RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#50 +RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of the keyword `not` instead of `!`. +# +# @example +# +# # bad - parentheses are required because of op precedence +# x = (not something) +# +# # good +# x = !something +# +# source://rubocop//lib/rubocop/cop/style/not.rb#16 +class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/not.rb#32 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/not.rb#60 + def correct_opposite_method(corrector, range, child); end + + # source://rubocop//lib/rubocop/cop/style/not.rb#65 + def correct_with_parens(corrector, range, node); end + + # source://rubocop//lib/rubocop/cop/style/not.rb#70 + def correct_without_parens(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/not.rb#50 + def opposite_method?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/not.rb#54 + def requires_parens?(child); end +end + +# source://rubocop//lib/rubocop/cop/style/not.rb#20 +RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/not.rb#23 +RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/not.rb#21 +RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for numbered parameters. +# +# It can either restrict the use of numbered parameters to +# single-lined blocks, or disallow completely numbered parameters. +# +# @example EnforcedStyle: allow_single_line (default) +# # bad +# collection.each do +# puts _1 +# end +# +# # good +# collection.each { puts _1 } +# @example EnforcedStyle: disallow +# # bad +# collection.each { puts _1 } +# +# # good +# collection.each { |item| puts item } +# +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#27 +class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#36 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#31 +RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#32 +RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) + +# Detects use of an excessive amount of numbered parameters in a +# single block. Having too many numbered parameters can make code too +# cryptic and hard to read. +# +# The cop defaults to registering an offense if there is more than 1 numbered +# parameter but this maximum can be configured by setting `Max`. +# +# @example Max: 1 (default) +# # bad +# use_multiple_numbered_parameters { _1.call(_2, _3, _4) } +# +# # good +# array.each { use_array_element_as_numbered_parameter(_1) } +# hash.each { use_only_hash_value_as_numbered_parameter(_2) } +# +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#20 +class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#32 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#49 + def max_count; end + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#43 + def numbered_parameter_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#24 +RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#29 +RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#30 +RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for octal, hex, binary, and decimal literals using +# uppercase prefixes and corrects them to lowercase prefix +# or no prefix (in case of decimals). +# +# @example EnforcedOctalStyle: zero_with_o (default) +# # bad - missing octal prefix +# num = 01234 +# +# # bad - uppercase prefix +# num = 0O1234 +# num = 0X12AB +# num = 0B10101 +# +# # bad - redundant decimal prefix +# num = 0D1234 +# num = 0d1234 +# +# # good +# num = 0o1234 +# num = 0x12AB +# num = 0b10101 +# num = 1234 +# @example EnforcedOctalStyle: zero_only +# # bad +# num = 0o1234 +# num = 0O1234 +# +# # good +# num = 01234 +# +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#36 +class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IntegerNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#52 + def on_int(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#109 + def format_binary(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#113 + def format_decimal(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#105 + def format_hex(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#97 + def format_octal(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#101 + def format_octal_zero_only(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#82 + def hex_bin_dec_literal_type(literal); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#68 + def literal_type(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#64 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#74 + def octal_literal_type(literal); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#93 + def octal_zero_only?; end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#49 +RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#43 +RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#50 +RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#44 +RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#48 +RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#42 +RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#47 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#41 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#46 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#40 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks for big numeric literals without `_` between groups +# of digits in them. +# +# Additional allowed patterns can be added by adding regexps to +# the `AllowedPatterns` configuration. All regexps are treated +# as anchored even if the patterns do not contain anchors (so +# `\d{4}_\d{4}` will allow `1234_5678` but not `1234_5678_9012`). +# +# NOTE: Even if `AllowedPatterns` are given, autocorrection will +# only correct to the standard pattern of an `_` every 3 digits. +# +# @example +# +# # bad +# 1000000 +# 1_00_000 +# 1_0000 +# +# # good +# 1_000_000 +# 1000 +# @example Strict: false (default) +# +# # good +# 10_000_00 # typical representation of $10,000 in cents +# @example Strict: true +# +# # bad +# 10_000_00 # typical representation of $10,000 in cents +# @example AllowedNumbers: [3000] +# +# # good +# 3000 # You can specify allowed numbers. (e.g. port number) +# +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#43 +class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IntegerNode + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def min_digits=(value); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#60 + def on_float(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#56 + def on_int(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#118 + def allowed_numbers; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#122 + def allowed_patterns; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#66 + def check(node); end + + # @param int_part [String] + # + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#107 + def format_int_part(int_part); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#93 + def format_number(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#114 + def min_digits; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#82 + def register_offense(node, &_block); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#89 + def short_group_regex; end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#49 +RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#48 +RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of comparison operators (`==`, +# `>`, `<`) to test numbers as zero, positive, or negative. +# These can be replaced by their respective predicate methods. +# This cop can also be configured to do the reverse. +# +# This cop can be customized allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# This cop disregards `#nonzero?` as its value is truthy or falsey, +# but not `true` and `false`, and thus not always interchangeable with +# `!= 0`. +# +# This cop allows comparisons to global variables, since they are often +# populated with objects which can be compared with integers, but are +# not themselves `Integer` polymorphic. +# +# @example EnforcedStyle: predicate (default) +# # bad +# foo == 0 +# 0 > foo +# bar.baz > 0 +# +# # good +# foo.zero? +# foo.negative? +# bar.baz.positive? +# @example EnforcedStyle: comparison +# # bad +# foo.zero? +# foo.negative? +# bar.baz.positive? +# +# # good +# foo == 0 +# 0 > foo +# bar.baz > 0 +# @example AllowedMethods: [] (default) with EnforcedStyle: predicate +# # bad +# foo == 0 +# 0 > foo +# bar.baz > 0 +# @example AllowedMethods: [==] with EnforcedStyle: predicate +# # good +# foo == 0 +# +# # bad +# 0 > foo +# bar.baz > 0 +# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison +# # bad +# foo.zero? +# foo.negative? +# bar.baz.positive? +# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate +# # good +# # bad +# foo.zero? +# +# # bad +# foo.negative? +# bar.baz.positive? +# +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#78 +class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#166 + def comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#171 + 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#161 + 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#152 + def invert; end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#132 + def parenthesized_source(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 + def replacement(numeric, operation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#144 + def replacement_supported?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#140 + def require_parentheses?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#84 +RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#86 +RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#88 +RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of consistent method names +# `Object#yield_self` or `Object#then`. +# +# @example EnforcedStyle: then (default) +# +# # bad +# obj.yield_self { |x| x.do_something } +# +# # good +# obj.then { |x| x.do_something } +# @example EnforcedStyle: yield_self +# +# # bad +# obj.then { |x| x.do_something } +# +# # good +# obj.yield_self { |x| x.do_something } +# +# source://rubocop//lib/rubocop/cop/style/object_then.rb#25 +class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#34 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#34 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#40 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#48 + def check_method_node(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#68 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#57 + def preferred_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/object_then.rb#32 +RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of if/then/else/end constructs on a single line. +# AlwaysCorrectToMultiline config option can be set to true to auto-convert all offenses to +# multi-line constructs. When AlwaysCorrectToMultiline is false (default case) the +# autocorrect will first try converting them to ternary operators. +# +# @example +# # bad +# if foo then bar else baz end +# +# # bad +# unless foo then baz else bar end +# +# # good +# foo ? bar : baz +# +# # good +# bar if foo +# +# # good +# if foo then bar end +# +# # good +# if foo +# bar +# else +# baz +# end +# +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#33 +class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::OnNormalIfUnless + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#42 + def on_normal_if_unless(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#77 + def always_multiline?; end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 + def cannot_replace_to_ternary?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#93 + def expr_replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#114 + def keyword_with_changed_precedence?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#55 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#107 + def method_call_with_changed_precedence?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#99 + def requires_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#67 + def ternary_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 + def ternary_replacement(node); end +end + +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#39 +RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) + +# Flags uses of OpenStruct, as it is now officially discouraged +# to be used for performance, version compatibility, and potential security issues. +# +# @example +# +# # bad +# point = OpenStruct.new(x: 0, y: 1) +# +# # good +# Point = Struct.new(:x, :y) +# point = Point.new(0, 1) +# +# # also good +# point = { x: 0, y: 1 } +# +# # bad +# test_double = OpenStruct.new(a: 'b') +# +# # good (assumes test using rspec-mocks) +# test_double = double +# allow(test_double).to receive(:a).and_return('b') +# +# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#44 +class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#52 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#48 + def uses_open_struct?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#61 + def custom_class_or_module_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#45 +RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant dot before operator method call. +# The target operator methods are `|`, `^`, `&`, `<=>`, `==`, `===`, `=~`, `>`, `>=`, `<`, +# `<=`, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. +# +# @example +# +# # bad +# foo.+ bar +# foo.& bar +# +# # good +# foo + bar +# foo & bar +# +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#20 +class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#26 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#48 + def anonymous_forwarding?(argument); end + + # Checks for an acceptable case of `foo.+(bar).baz`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#42 + def method_call_with_parenthesized_arg?(argument); end + + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#55 + def wrap_in_parentheses_if_chained(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 +RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#24 +RuboCop::Cop::Style::OperatorMethodCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for options hashes and discourages them if the +# current Ruby version supports keyword arguments. +# +# @example +# +# # bad +# def fry(options = {}) +# temperature = options.fetch(:temperature, 300) +# # ... +# end +# +# # good +# def fry(temperature: 300) +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/option_hash.rb#22 +class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#30 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#26 + def option_hash(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#39 + def allowlist; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#48 + def super_used?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#43 + def suspicious_name?(arg_name); end +end + +# source://rubocop//lib/rubocop/cop/style/option_hash.rb#23 +RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) + +# Checks for optional arguments to methods +# that do not come at the end of the argument list. +# +# @example +# # bad +# def foo(a = 1, b, c) +# end +# +# # good +# def baz(a, b, c = 1) +# end +# +# def foobar(a = 1, b = 2, c = 3) +# end +# +# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#24 +class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#27 + def on_def(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#45 + def argument_positions(arguments); end + + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#33 + def each_misplaced_optional_arg(arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#25 +RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where keyword arguments can be used instead of +# boolean arguments when defining methods. `respond_to_missing?` method is allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# def some_method(bar = false) +# puts bar +# end +# +# # bad - common hack before keyword args were introduced +# def some_method(options = {}) +# bar = options.fetch(:bar, false) +# puts bar +# end +# +# # good +# def some_method(bar: false) +# puts bar +# end +# @example AllowedMethods: ['some_method'] +# # good +# def some_method(bar = false) +# puts bar +# end +# +# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#37 +class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#56 + def format_message(argument); end +end + +# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#40 +RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for potential usage of the `||=` operator. +# +# @example +# # bad +# name = name ? name : 'Bozhidar' +# +# # bad +# name = if name +# name +# else +# 'Bozhidar' +# end +# +# # bad +# unless name +# name = 'Bozhidar' +# end +# +# # bad +# name = 'Bozhidar' unless name +# +# # good - set name to 'Bozhidar', only if it's nil or false +# name ||= 'Bozhidar' +# +# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#29 +class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#51 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#35 + def ternary_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#44 + def unless_assignment?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#80 + def take_variable_and_default_from_ternary(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#85 + def take_variable_and_default_from_unless(node); end +end + +# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#32 +RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for simple usages of parallel assignment. +# This will only complain when the number of variables +# being assigned matched the number of assigning variables. +# +# @example +# # bad +# a, b, c = 1, 2, 3 +# a, b, c = [1, 2, 3] +# +# # good +# one, two = *foo +# a, b = foo() +# a, b = b, a +# +# a = 1 +# b = 2 +# c = 3 +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#25 +class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 + def implicit_self_getter?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 + def on_masgn(node); end + + private + + # Converts (send nil :something) nodes to (send (:self) :something). + # This makes the sorting algorithm work for expressions such as + # `self.a, self.b = b, a`. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#117 + def add_self_to_getters(right_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#64 + def allowed_lhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#58 + def allowed_masign?(lhs_elements, rhs_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#72 + def allowed_rhs?(node); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#84 + def assignment_corrector(node, rhs, order); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#49 + def autocorrect(corrector, node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#100 + def find_valid_order(left_elements, right_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#183 + def modifier_statement?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 + def return_of_method_call?(node); end +end + +# Helper class necessitated by silly design of TSort prior to Ruby 2.1 +# Newer versions have a better API, but that doesn't help us +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 +class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter + include ::TSort + extend ::RuboCop::AST::NodePattern::Macros + + # @return [AssignmentSorter] a new instance of AssignmentSorter + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#141 + def initialize(assignments); end + + # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. + # Does `rhs` access the same value which is assigned by `lhs`? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#170 + def accesses?(rhs, lhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#163 + def dependency?(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#139 + def matching_calls(param0, param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#149 + def tsort_each_child(assignment); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#145 + def tsort_each_node(&block); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 + def uses_var?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#133 + def var_name(param0 = T.unsafe(nil)); end +end + +# An internal class for correcting parallel assignment +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 +class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + include ::RuboCop::Cop::Alignment + + # @return [GenericCorrector] a new instance of GenericCorrector + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#195 + def initialize(node, rhs, modifier, config, new_elements); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def config; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#203 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#207 + def correction_range; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def node; end + + # Returns the value of attribute rescue_result. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def rescue_result; end + + # Returns the value of attribute rhs. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def rhs; end + + protected + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#213 + def assignment; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 + def cop_config; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 + def extract_sources(node); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 + def source(node); end +end + +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 +RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) + +# An internal class for correcting parallel assignment +# guarded by if, unless, while, or until +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#275 +class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 + def correction_range; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 + 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#240 +class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 + def correction_range; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 + def begin_correction(rescue_result); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 + def def_correction(rescue_result); end +end + +# Checks for the presence of superfluous parentheses around the +# condition of if/unless/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example +# # bad +# x += 1 while (x < 10) +# foo unless (bar || baz) +# +# if (x > 10) +# elsif (x < 3) +# end +# +# # good +# x += 1 while x < 10 +# foo unless bar || baz +# +# if x > 10 +# elsif x < 3 +# end +# @example AllowSafeAssignment: true (default) +# # good +# foo unless (bar = baz) +# @example AllowSafeAssignment: false +# # bad +# foo unless (bar = baz) +# @example AllowInMultilineConditions: false (default) +# # bad +# if (x > 10 && +# y > 10) +# end +# +# # good +# if x > 10 && +# y > 10 +# end +# @example AllowInMultilineConditions: true +# # good +# if (x > 10 && +# y > 10) +# end +# +# source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#56 +class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + include ::RuboCop::Cop::Parentheses + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#76 + def control_op_condition(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#62 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#122 + def allow_multiline_conditions?; end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#110 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 + def modifier_op?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#116 + 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#95 + def semicolon_separated_expressions?(first_exp, rest_exps); end +end + +# Enforces the consistent usage of `%`-literal delimiters. +# +# Specify the 'default' key to set all preferred delimiters at once. You +# can continue to specify individual preferred delimiters to override the +# default. +# +# @example +# # Style/PercentLiteralDelimiters: +# # PreferredDelimiters: +# # default: '[]' +# # '%i': '()' +# +# # good +# %w[alpha beta] + %i(gamma delta) +# +# # bad +# %W(alpha #{beta}) +# +# # bad +# %I(alpha beta) +# +# source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#26 +class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#30 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#34 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#38 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#43 + def on_sym(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#47 + def on_xstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#93 + def contains_delimiter?(node, delimiters); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#82 + def contains_preferred_delimiter?(node, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#86 + def include_same_character_as_used_for_delimiter?(node, type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#107 + def matchpairs(begin_delimiter); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#67 + def message(type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#53 + def on_percent_literal(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#74 + def preferred_delimiters_for(type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#99 + def string_source(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#78 + def uses_preferred_delimiter?(node, type); end +end + +# Checks for usage of the %Q() syntax when %q() would do. +# +# @example EnforcedStyle: lower_case_q (default) +# # The `lower_case_q` style prefers `%q` unless +# # interpolation is needed. +# # bad +# %Q[Mix the foo into the baz.] +# %Q(They all said: 'Hooray!') +# +# # good +# %q[Mix the foo into the baz] +# %q(They all said: 'Hooray!') +# @example EnforcedStyle: upper_case_q +# # The `upper_case_q` style requires the sole use of `%Q`. +# # bad +# %q/Mix the foo into the baz./ +# %q{They all said: 'Hooray!'} +# +# # good +# %Q/Mix the foo into the baz./ +# %Q{They all said: 'Hooray!'} +# +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#28 +class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#36 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#55 + def correct_literal_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#64 + def corrected(src); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#60 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#42 + def on_percent_literal(node); end +end + +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#33 +RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#34 +RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of Perl-style regexp match +# backreferences and their English versions like +# $1, $2, $&, &+, $MATCH, $PREMATCH, etc. +# +# @example +# # bad +# puts $1 +# +# # good +# puts Regexp.last_match(1) +# +# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#16 +class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#21 + def on_back_ref(node); end + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#25 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#29 + def on_nth_ref(node); end + + private + + # @param node [RuboCop::AST::Node] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#99 + def constant_prefix(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#38 + def derived_from_braceless_interpolation?(node); end + + # @param node [RuboCop::AST::Node] + # @param preferred_expression [String] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#46 + def format_message(node:, preferred_expression:); end + + # @param node [RuboCop::AST::Node] + # @private + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#109 + def on_back_ref_or_gvar_or_nth_ref(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#58 + def original_expression_of(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#70 + def preferred_expression_to(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#89 + def preferred_expression_to_node_with_constant_prefix(node); end +end + +# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#19 +RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) + +# Checks for uses of methods `Hash#has_key?` and +# `Hash#has_value?`, and suggests using `Hash#key?` and `Hash#value?` instead. +# +# It is configurable to enforce the verbose method names, by using the +# `EnforcedStyle: verbose` configuration. +# +# @example EnforcedStyle: short (default) +# # bad +# Hash#has_key? +# Hash#has_value? +# +# # good +# Hash#key? +# Hash#value? +# @example EnforcedStyle: verbose +# # bad +# Hash#key? +# Hash#value? +# +# # good +# Hash#has_key? +# Hash#has_value? +# +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#33 +class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#56 + def message(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#68 + def offending_selector?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#60 + def proper_method_name(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#37 +RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#39 +RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#41 +RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of Proc.new where Kernel#proc +# would be more appropriate. +# +# @example +# # bad +# p = Proc.new { |n| puts n } +# +# # good +# p = proc { |n| puts n } +# +# source://rubocop//lib/rubocop/cop/style/proc.rb#16 +class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#22 + def proc_new?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/proc.rb#19 +RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) + +# Checks if the quotes used for quoted symbols match the configured defaults. +# By default uses the same configuration as `Style/StringLiterals`; if that +# cop is not enabled, the default `EnforcedStyle` is `single_quotes`. +# +# String interpolation is always kept in double quotes. +# +# Note: `Lint/SymbolConversion` can be used in parallel to ensure that symbols +# are not quoted that don't need to be. This cop is for configuring the quoting +# style to use for symbols that require quotes. +# +# @example EnforcedStyle: same_as_string_literals (default) / single_quotes +# # bad +# :"abc-def" +# +# # good +# :'abc-def' +# :"#{str}" +# :"a\'b" +# @example EnforcedStyle: double_quotes +# # bad +# :'abc-def' +# +# # good +# :"abc-def" +# :"#{str}" +# :"a\'b" +# +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#33 +class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::SymbolHelp + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#44 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#108 + 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#112 + 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#116 + def wrong_quotes?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#41 +RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#39 +RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) + +# Checks the args passed to `fail` and `raise`. For exploded +# style (default), it recommends passing the exception class and message +# to `raise`, rather than construct an instance of the error. It will +# still allow passing just a message, or the construction of an error +# with more than one argument. +# +# The exploded style works identically, but with the addition that it +# will also suggest constructing error objects when the exception is +# passed multiple arguments. +# +# The exploded style has an `AllowedCompactTypes` configuration +# option that takes an Array of exception name Strings. +# +# @example EnforcedStyle: exploded (default) +# # bad +# raise StandardError.new('message') +# +# # good +# raise StandardError, 'message' +# fail 'message' +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# raise MyKwArgError.new(key1: val1, key2: val2) +# +# # With `AllowedCompactTypes` set to ['MyWrappedError'] +# raise MyWrappedError.new(obj) +# raise MyWrappedError.new(obj), 'message' +# @example EnforcedStyle: compact +# # bad +# raise StandardError, 'message' +# raise RuntimeError, arg1, arg2, arg3 +# +# # good +# raise StandardError.new('message') +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# fail 'message' +# +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#44 +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#53 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#129 + def acceptable_exploded_args?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#143 + def allowed_non_exploded_type?(arg); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#92 + def check_compact(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#108 + def check_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#66 + def correction_compact_to_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#78 + def correction_exploded_to_compact(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#149 + def requires_parens?(parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#125 + def use_new_method?(first_arg); end +end + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#49 +RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#48 +RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 +RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of randomly generated numbers, +# added/subtracted with integer literals, as well as those with +# Integer#succ and Integer#pred methods. Prefer using ranges instead, +# as it clearly states the intentions. +# +# @example +# # bad +# rand(6) + 1 +# 1 + rand(6) +# rand(6) - 1 +# 1 - rand(6) +# rand(6).succ +# rand(6).pred +# Random.rand(6) + 1 +# Kernel.rand(6) + 1 +# rand(0..5) + 1 +# +# # good +# rand(1..6) +# rand(1...7) +# +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#26 +class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#33 + def integer_op_rand?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#63 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#54 + def rand_modified?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#43 + def rand_op_integer?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#73 + def random_call(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#147 + def to_int(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#78 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#135 + def boundaries_from_random_node(random_node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#88 + def corrected_integer_op_rand(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#118 + def corrected_rand_modified(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#103 + def corrected_rand_op_integer(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#131 + def prefix_from_prefix_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#29 +RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#30 +RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for a redundant argument passed to certain methods. +# +# NOTE: This cop is limited to methods with single parameter. +# +# Method names and their redundant arguments can be configured like this: +# +# [source,yaml] +# ---- +# Methods: +# join: '' +# sum: 0 +# split: ' ' +# chomp: "\n" +# chomp!: "\n" +# foo: 2 +# ---- +# +# @example +# # bad +# array.join('') +# [1, 2, 3].join("") +# array.sum(0) +# exit(true) +# exit!(false) +# string.split(" ") +# "first\nsecond".split(" ") +# string.chomp("\n") +# string.chomp!("\n") +# A.foo(2) +# +# # good +# array.join +# [1, 2, 3].join +# array.sum +# exit +# exit! +# string.split +# "first second".split +# string.chomp +# string.chomp! +# A.foo +# +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 +class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 + def argument_range(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#86 + def redundant_arg_for_method(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#79 + def redundant_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#61 +RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#62 +RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of array using redundant `Array` constructor. +# Autocorrect replaces to array literal which is the simplest and fastest. +# +# @example +# +# # bad +# Array.new([]) +# Array[] +# Array([]) +# Array.new(['foo', 'foo', 'foo']) +# Array['foo', 'foo', 'foo'] +# Array(['foo', 'foo', 'foo']) +# +# # good +# [] +# ['foo', 'foo', 'foo'] +# Array.new(3, 'foo') +# Array.new(3) { 'foo' } +# +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25 +class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33 + def redundant_array_constructor(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69 + def register_offense(range, node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28 +RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30 +RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant assignment before returning. +# +# @example +# # bad +# def test +# x = foo +# x +# end +# +# # bad +# def test +# if x +# z = foo +# z +# elsif y +# z = bar +# z +# end +# end +# +# # good +# def test +# foo +# end +# +# # good +# def test +# if x +# foo +# elsif y +# bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#40 +class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#46 + def redundant_assignment?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 + def check_begin_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#57 + def check_branch(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#71 + def check_case_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#87 + def check_ensure_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#76 + def check_if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#83 + def check_rescue_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#43 +RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `begin` blocks. +# +# Currently it checks for code like this: +# +# @example +# +# # bad +# def redundant +# begin +# ala +# bala +# rescue StandardError => e +# something +# end +# end +# +# # good +# def preferred +# ala +# bala +# rescue StandardError => e +# something +# end +# +# # bad +# begin +# do_something +# end +# +# # good +# do_something +# +# # bad +# # When using Ruby 2.5 or later. +# do_something do +# begin +# something +# rescue => ex +# anything +# end +# end +# +# # good +# # In Ruby 2.5 or later, you can omit `begin` in `do-end` block. +# do_something do +# something +# rescue => ex +# anything +# end +# +# # good +# # Stabby lambdas don't support implicit `begin` in `do-end` blocks. +# -> do +# begin +# foo +# rescue Bar +# baz +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#65 +class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#72 + def offensive_kwbegins(param0); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#95 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#103 + def allowable_kwbegin?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 + def begin_block_has_multiline_statements?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#161 + def condition_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + def contain_rescue_or_ensure?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#154 + def correct_modifier_form_after_multiline_begin_block(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#165 + def empty_begin?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 + def register_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 + def replace_begin_with_statement(corrector, offense_range, node); end + + # Restore comments that occur between "begin" and "first_child". + # These comments will be moved to above the assignment line. + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#141 + def restore_removed_comments(corrector, offense_range, node, first_child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#148 + def use_modifier_form_after_multiline_begin_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#186 + def valid_begin_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#179 + def valid_context_using_only_begin?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 +RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of the %W() syntax when %w() would do. +# +# @example +# # bad +# %W(cat dog pig) +# %W[door wall floor] +# +# # good +# %w/swim run bike/ +# %w[shirt pants shoes] +# %W(apple #{fruit} grape) +# +# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#17 +class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#23 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#29 + def on_percent_literal(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#38 + def requires_interpolation?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#21 +RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary conditional expressions. +# +# @example +# # bad +# a = b ? b : c +# +# # good +# a = b || c +# @example +# # bad +# if b +# b +# else +# c +# end +# +# # good +# b || c +# +# # good +# if b +# b +# elsif cond +# c +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#33 +class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43 + def on_if(node); end + + private + + # If the argument is using an operator, it is an invalid syntax. + # e.g. `foo || *bar`, `foo || **bar`, and `foo || &bar`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167 + def argument_with_operator?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 + def asgn_type?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132 + def branches_have_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146 + def branches_have_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240 + def correct_ternary(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187 + def else_source(else_branch, arithmetic_operation); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 + def else_source_if_has_assignment(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203 + def else_source_if_has_method(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175 + def if_source(if_branch, arithmetic_operation); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223 + def make_ternary_form(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 + def range_of_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88 + def redundant_condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 + def require_braces?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248 + def require_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161 + def same_method?(if_branch, else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155 + def single_argument_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104 + def synonymous_condition_and_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259 + def use_arithmetic_operation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 + def use_hash_key_access?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96 + def use_hash_key_assignment?(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 + def use_if_branch?(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 + def without_argument_parentheses_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#39 +RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 +RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 +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#86 + def indented_else_node(expression, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 + def invert_expression?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#65 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#71 + def replacement_condition(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#32 +RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#34 +RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) + +# Avoid redundant `::` prefix on constant. +# +# How Ruby searches constant is a bit complicated, and it can often be difficult to +# understand from the code whether the `::` is intended or not. Where `Module.nesting` +# is empty, there is no need to prepend `::`, so it would be nice to consistently +# avoid such meaningless `::` prefix to avoid confusion. +# +# NOTE: This cop is disabled if `Lint/ConstantResolution` cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# `Lint/ConstantResolution` cop which is disabled by default. +# +# @example +# # bad +# ::Const +# +# # good +# Const +# +# # bad +# class << self +# ::Const +# end +# +# # good +# class << self +# Const +# end +# +# # good +# class A +# ::Const +# end +# +# # good +# module A +# ::Const +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#43 +class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#48 + def on_cbase(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#67 + def bad?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#63 + def lint_constant_resolution_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#59 + def lint_constant_resolution_cop_enabled?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#71 + def module_nesting_ancestors_of(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#77 + def used_in_super_class_part?(node, class_node:); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#46 +RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses a redundant current directory in path. +# +# @example +# +# # bad +# require_relative './path/to/feature' +# +# # good +# require_relative 'path/to/feature' +# +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#16 +class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant uses of double splat hash braces. +# +# @example +# +# # bad +# do_something(**{foo: bar, baz: qux}) +# +# # good +# do_something(foo: bar, baz: qux) +# +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#16 +class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#21 + def on_hash(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#39 + def closing_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#35 + def opening_brace(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#19 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `each`. +# +# @example +# +# # bad +# array.each.each { |v| do_something(v) } +# +# # good +# array.each { |v| do_something(v) } +# +# # bad +# array.each.each_with_index { |v, i| do_something(v, i) } +# +# # good +# array.each.with_index { |v, i| do_something(v, i) } +# array.each_with_index { |v, i| do_something(v, i) } +# +# # bad +# array.each.each_with_object { |v, o| do_something(v, o) } +# +# # good +# array.each.with_object { |v, o| do_something(v, o) } +# array.each_with_object { |v, o| do_something(v, o) } +# +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#34 +class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#93 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#85 + def range(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#63 + def redundant_each_method(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#104 + 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. +# +# It checks for code like this: +# +# @example +# # Bad +# raise RuntimeError, 'message' +# +# # Bad +# raise RuntimeError.new('message') +# +# # Good +# raise 'message' +# +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#19 +class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#59 + def compact?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#54 + def exploded?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#45 + def fix_compact(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + def fix_exploded(node); end + + # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and + # `raise RuntimeError.new('message')` to `raise 'message'`. + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#22 +RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 +RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#25 +RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`. +# +# In such cases `fetch(key, value)` method is faster than `fetch(key) { value }`. +# +# NOTE: The block string `'value'` in `hash.fetch(:key) { 'value' }` is detected +# but not when disabled. +# +# @example SafeForConstants: false (default) +# # bad +# hash.fetch(:key) { 5 } +# hash.fetch(:key) { true } +# hash.fetch(:key) { nil } +# array.fetch(5) { :value } +# ENV.fetch(:key) { 'value' } +# +# # good +# hash.fetch(:key, 5) +# hash.fetch(:key, true) +# hash.fetch(:key, nil) +# array.fetch(5, :value) +# ENV.fetch(:key, 'value') +# @example SafeForConstants: true +# # bad +# ENV.fetch(:key) { VALUE } +# +# # good +# ENV.fetch(:key, VALUE) +# +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#40 +class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#55 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#89 + def rails_cache?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#48 + def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#74 + def basic_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#104 + def build_bad_method(send, body); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#97 + def build_good_method(send, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#111 + def check_for_constant?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#115 + def check_for_string?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#78 + def const_type?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#93 + def fetch_range(send, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#82 + def should_not_check?(send, body); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#45 +RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of superfluous `.rb` extension in +# the filename provided to `require` and `require_relative`. +# +# Note: If the extension is omitted, Ruby tries adding '.rb', '.so', +# and so on to the name until found. If the file named cannot be found, +# a `LoadError` will be raised. +# There is an edge case where `foo.so` file is loaded instead of a `LoadError` +# if `foo.so` file exists when `require 'foo.rb'` will be changed to `require 'foo'`, +# but that seems harmless. +# +# @example +# # bad +# require 'foo.rb' +# require_relative '../foo.rb' +# +# # good +# require 'foo' +# require 'foo.so' +# require_relative '../foo' +# require_relative '../foo.so' +# +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#27 +class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#39 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#35 + def require_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#53 + def extension_range(name_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#31 +RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32 +RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `any?`, `empty?` or `none?` predicate methods +# chained to `select`/`filter`/`find_all` and change them to use predicate method instead. +# +# @example +# # bad +# arr.select { |x| x > 1 }.any? +# +# # good +# arr.any? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.empty? +# arr.select { |x| x > 1 }.none? +# +# # good +# arr.none? { |x| x > 1 } +# +# # good +# relation.select(:name).any? +# arr.select { |x| x > 1 }.any?(&:odd?) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# arr.select { |x| x > 1 }.many? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.many? { |x| x > 1 } +# +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#38 +class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#65 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#47 + def select_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#91 + def offense_range(select_node, predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#95 + def predicate_range(predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#77 + def register_offense(select_node, predicate_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#41 +RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#43 +RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 +RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#44 +RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for uses of `Object#freeze` on immutable objects. +# +# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. +# +# NOTE: From Ruby 3.0, this cop allows explicit freezing of interpolated +# string literals when `# frozen-string-literal: true` is used. +# +# @example +# # bad +# CONST = 1.freeze +# +# # good +# CONST = 1 +# +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#19 +class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#26 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#57 + def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#39 + def immutable_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#48 + def strip_parenthesis(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#23 +RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#24 +RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant heredoc delimiter quotes. +# +# @example +# +# # bad +# do_something(<<~'EOS') +# no string interpolation style text +# EOS +# +# # good +# do_something(<<~EOS) +# no string interpolation style text +# EOS +# +# do_something(<<~'EOS') +# #{string_interpolation_style_text_not_evaluated} +# EOS +# +# do_something(<<~'EOS') +# Preserve \ +# newlines +# EOS +# +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#29 +class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#36 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#48 + def need_heredoc_delimiter_quotes?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#33 +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#34 +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for `initialize` methods that are redundant. +# +# An initializer is redundant if it does not do anything, or if it only +# calls `super` with the same arguments given to it. If the initializer takes +# an argument that accepts multiple values (`restarg`, `kwrestarg`, etc.) it +# will not register an offense, because it allows the initializer to take a different +# number of arguments as its superclass potentially does. +# +# NOTE: If an initializer argument has a default value, RuboCop assumes it +# to *not* be redundant. +# +# NOTE: Empty initializers are registered as offenses, but it is possible +# to purposely create an empty `initialize` method to override a superclass's +# initializer. +# +# @example +# # bad +# def initialize +# end +# +# # bad +# def initialize +# super +# end +# +# # bad +# def initialize(a, b) +# super +# end +# +# # bad +# def initialize(a, b) +# super(a, b) +# end +# +# # good +# def initialize +# do_something +# end +# +# # good +# def initialize +# do_something +# super +# end +# +# # good (different number of parameters) +# def initialize(a, b) +# super(a) +# end +# +# # good (default value) +# def initialize(a, b = 5) +# super +# end +# +# # good (default value) +# def initialize(a, b: 5) +# super +# end +# +# # good (changes the parameter requirements) +# def initialize(*) +# end +# +# # good (changes the parameter requirements) +# def initialize(**) +# end +# +# # good (changes the parameter requirements) +# def initialize(...) +# end +# @example AllowComments: true (default) +# +# # good +# def initialize +# # Overriding to negate superclass `initialize` method. +# end +# @example AllowComments: false +# +# # bad +# def initialize +# # Overriding to negate superclass `initialize` method. +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#97 +class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#106 + def initialize_forwards?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#110 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#134 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#142 + def allow_comments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#138 + def forwards?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#128 + def register_offense(node, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#148 + def same_args?(super_node, args); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#102 +RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#103 +RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String) + +# Checks for strings that are just an interpolated expression. +# +# @example +# +# # bad +# "#{@var}" +# +# # good +# @var.to_s +# +# # good if @var is already a String +# @var +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#39 +class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#49 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#122 + def autocorrect_other(corrector, embedded_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#105 + def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#99 + def autocorrect_variable_interpolation(corrector, embedded_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#95 + def embedded_in_percent_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#91 + def implicit_concatenation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#83 + def interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#132 + def require_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#67 + def single_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#74 + def single_variable_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#87 + def variable_interpolation?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#45 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 +RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Check for redundant line continuation. +# +# This cop marks a line continuation as redundant if removing the backslash +# does not result in a syntax error. +# However, a backslash at the end of a comment or +# for string concatenation is not redundant and is not considered an offense. +# +# @example +# # bad +# foo. \ +# bar +# foo \ +# &.bar \ +# .baz +# +# # good +# foo. +# bar +# foo +# &.bar +# .baz +# +# # bad +# [foo, \ +# bar] +# {foo: \ +# bar} +# +# # good +# [foo, +# bar] +# {foo: +# bar} +# +# # bad +# foo(bar, \ +# baz) +# +# # good +# foo(bar, +# baz) +# +# # also good - backslash in string concatenation is not redundant +# foo('bar' \ +# 'baz') +# +# # also good - backslash at the end of a comment is not redundant +# foo(bar, # \ +# baz) +# +# # also good - backslash at the line following the newline begins with a + or -, +# # it is not redundant +# 1 \ +# + 2 \ +# - 3 +# +# # also good - backslash with newline between the method name and its arguments, +# # it is not redundant. +# some_method \ +# (argument) +# +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#67 +class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#78 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166 + def argument_is_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#134 + def argument_newline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#100 + def ends_with_backslash_without_comment?(source_line); end + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#146 + def find_node_for_line(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#122 + def inside_string_literal?(range, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#108 + def inside_string_literal_or_method_with_argument?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#173 + 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#130 + def method_with_argument?(current_token, next_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#114 + def redundant_line_continuation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#93 + def require_line_continuation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#152 + def same_line?(node, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#177 + def start_with_arithmetic_operator?(source_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#104 + def string_concatenation?(source_line); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 +RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71 +RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant parentheses. +# +# @example +# +# # bad +# (x) if ((y.z).nil?) +# +# # good +# x if y.z.nil? +# +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#16 +class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Parentheses + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#33 + def allowed_pin_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 + def arg_in_call_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#222 + def first_send_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#227 + def first_super_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 + def first_yield_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 + def interpolation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27 + def method_node_and_args(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#38 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#24 + def range_end?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#30 + def rescue?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#21 + def square_brackets?(param0 = T.unsafe(nil)); end + + private + + # @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_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#78 + def allowed_multiple_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#87 + def allowed_ternary?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#236 + def call_chain_starts_with_int?(begin_node, send_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#127 + def check(begin_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#142 + def check_send(begin_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#151 + def check_unary(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175 + def disallowed_literal?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 + def empty_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#112 + def first_arg_begins_with_hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 + 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#171 + def keyword_ancestor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#190 + def keyword_with_redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#100 + def like_method_argument_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 + def method_call_with_redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 + def method_chain_begins_with_hash_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#161 + def offense(node, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 + def only_begin_arg?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#46 + def parens_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179 + def raised_to_power_negative_numeric?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#167 + def suspect_unary?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#93 + def ternary_parentheses_required?; end +end + +# Checks for usage of the %q/%Q syntax when '' or "" would do. +# +# @example +# +# # bad +# name = %q(Bruce Wayne) +# time = %q(8 o'clock) +# question = %q("What did you say?") +# +# # good +# name = 'Bruce Wayne' +# time = "8 o'clock" +# question = '"What did you say?"' +# +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#20 +class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#34 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#40 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#99 + def acceptable_capital_q?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#91 + def acceptable_q?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#67 + def allowed_percent_q?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#51 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#63 + def interpolated_quotes?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#72 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#87 + def start_with_percent_q_variant?(string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#82 + def string_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#25 +RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#28 +RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#32 +RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#23 +RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#30 +RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#29 +RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#27 +RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#26 +RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#31 +RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Identifies places where argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'foo'.byteindex(/f/) +# 'foo'.byterindex(/f/) +# 'foo'.gsub(/f/, 'x') +# 'foo'.gsub!(/f/, 'x') +# 'foo'.partition(/f/) +# 'foo'.rpartition(/f/) +# 'foo'.scan(/f/) +# 'foo'.split(/f/) +# 'foo'.start_with?(/f/) +# 'foo'.sub(/f/, 'x') +# 'foo'.sub!(/f/, 'x') +# +# # good +# 'foo'.byteindex('f') +# 'foo'.byterindex('f') +# 'foo'.gsub('f', 'x') +# 'foo'.gsub!('f', 'x') +# 'foo'.partition('f') +# 'foo'.rpartition('f') +# 'foo'.scan('f') +# 'foo'.split('f') +# 'foo'.start_with?('f') +# 'foo'.sub('f', 'x') +# 'foo'.sub!('f', 'x') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 +class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + def determinist_regexp?(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + def preferred_argument(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + def replacement(regexp_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for unnecessary single-element Regexp character classes. +# +# @example +# +# # bad +# r = /[x]/ +# +# # good +# r = /x/ +# +# # bad +# r = /[\s]/ +# +# # good +# r = /\s/ +# +# # bad +# r = %r{/[b]} +# +# # good +# r = %r{/b} +# +# # good +# r = /[ab]/ +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#30 +class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#37 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#101 + def backslash_b?(elem); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#53 + def each_redundant_character_class(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#61 + def each_single_element_character_class(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#83 + def multiple_codepoints?(expression); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#107 + def octal_requiring_char_class?(elem); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#72 + def redundant_single_element_character_class?(node, char_class); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#113 + def requires_escape_outside_char_class?(elem); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#95 + def whitespace_in_free_space_mode?(node, elem); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#87 + def without_character_class(loc); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#34 +RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33 +RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`. +# Autocorrect replaces to regexp literal which is the simplest and fastest. +# +# @example +# +# # bad +# Regexp.new(/regexp/) +# Regexp.compile(/regexp/) +# +# # good +# /regexp/ +# Regexp.new('regexp') +# Regexp.compile('regexp') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20 +class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27 + def redundant_regexp_constructor(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23 +RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24 +RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant escapes inside Regexp literals. +# +# @example +# # bad +# %r{foo\/bar} +# +# # good +# %r{foo/bar} +# +# # good +# /foo\/bar/ +# +# # good +# %r/foo\/bar/ +# +# # good +# %r!foo\!bar! +# +# # bad +# /a\-b/ +# +# # good +# /a-b/ +# +# # bad +# /[\+\-]\d/ +# +# # good +# /[+\-]\d/ +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#35 +class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#45 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#60 + def allowed_escape?(node, char, index, within_character_class); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#76 + def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 + def delimiter?(node, char); end + + # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. + # It's for compatibility with regexp_parser 1.8 and will never be maintained. + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 + def each_escape(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 + def escape_range_at_index(node, index); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#41 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#43 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#42 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#39 +RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) + +# Checks for redundant `return` expressions. +# +# @example +# # These bad cases should be extended to handle methods whose body is +# # if/else or a case expression with a default branch. +# +# # bad +# def test +# return something +# end +# +# # bad +# def test +# one +# two +# three +# return something +# end +# +# # bad +# def test +# return something if something_else +# end +# +# # good +# def test +# something if something_else +# end +# +# # good +# def test +# if x +# elsif y +# else +# end +# end +# @example AllowMultipleReturnValues: false (default) +# # bad +# def test +# return x, y +# end +# @example AllowMultipleReturnValues: true +# # good +# def test +# return x, y +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 +class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#104 + def add_braces(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 + def add_brackets(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#169 + def allow_multiple_return_values?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 + def check_begin_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 + def check_branch(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 + def check_case_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 + def check_ensure_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#143 + def check_if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#155 + def check_resbody_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 + def check_rescue_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#126 + def check_return_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 + def correct_with_arguments(return_node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#76 + def correct_without_arguments(return_node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 + def hash_without_braces?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#173 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#59 +RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#60 +RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 +RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of `self`. +# +# The usage of `self` is only needed when: +# +# * Sending a message to same object with zero arguments in +# presence of a method name clash with an argument or a local +# variable. +# +# * Calling an attribute writer to prevent a local variable assignment. +# +# Note, with using explicit self you can only send messages with public or +# protected scope, you cannot send private messages this way. +# +# Note we allow uses of `self` with operators because it would be awkward +# otherwise. +# +# @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#44 +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#59 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # Assignment of self.x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#85 + 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#89 + def on_blockarg(node); end + + # Using self.x to distinguish from local variable x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + def on_def(node); end + + # Using self.x to distinguish from local variable x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + 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#98 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#93 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#73 + def on_op_asgn(node); end + + # Assignment of self.x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + 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#125 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 + def add_lhs_to_local_variables_scopes(rhs, lhs); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 + def add_masgn_lhs_variables(rhs, lhs); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#195 + def add_match_var_scopes(in_pattern_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#143 + def add_scope(node, local_variables = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 + def allow_self(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#149 + def allowed_send_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#166 + def on_argument(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#158 + def regular_method_call?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#55 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 +RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 +RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#47 +RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where redundant assignments are made for in place +# modification methods. +# +# @example +# # bad +# args = args.concat(ary) +# hash = hash.merge!(other) +# +# # good +# args.concat(foo) +# args += foo +# hash.merge!(other) +# +# # bad +# self.foo = foo.concat(ary) +# +# # good +# foo.concat(ary) +# self.foo += ary +# +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 +class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#52 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#96 + def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#86 + def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#112 + def correction_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#81 + def method_returning_self?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#105 + def redundant_assignment?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#45 +RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#38 +RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#35 +RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where conditional branch makes redundant self-assignment. +# +# It only detects local variable because it may replace state of instance variable, +# class variable, and global variable that have state across methods with `nil`. +# +# @example +# +# # bad +# foo = condition ? bar : foo +# +# # good +# foo = bar if condition +# +# # bad +# foo = condition ? foo : bar +# +# # good +# foo = bar unless condition +# +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#25 +class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#32 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#36 + def on_lvasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#59 + def inconvertible_to_modifier?(if_branch, else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#64 + def multiple_statements?(branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#74 + def register_offense(if_node, offense_branch, opposite_branch, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#70 + def self_assign?(variable, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#53 + def use_if_and_else_branch?(expression); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#29 +RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) + +# Identifies instances of sorting and then +# taking only the first or last element. The same behavior can +# be accomplished without a relatively expensive sort by using +# `Enumerable#min` instead of sorting and taking the first +# element and `Enumerable#max` instead of sorting and taking the +# last element. Similarly, `Enumerable#min_by` and +# `Enumerable#max_by` can replace `Enumerable#sort_by` calls +# after which only the first or last element is used. +# +# @example +# # bad +# [2, 1, 3].sort.first +# [2, 1, 3].sort[0] +# [2, 1, 3].sort.at(0) +# [2, 1, 3].sort.slice(0) +# +# # good +# [2, 1, 3].min +# +# # bad +# [2, 1, 3].sort.last +# [2, 1, 3].sort[-1] +# [2, 1, 3].sort.at(-1) +# [2, 1, 3].sort.slice(-1) +# +# # good +# [2, 1, 3].max +# +# # bad +# arr.sort_by(&:foo).first +# arr.sort_by(&:foo)[0] +# arr.sort_by(&:foo).at(0) +# arr.sort_by(&:foo).slice(0) +# +# # good +# arr.min_by(&:foo) +# +# # bad +# arr.sort_by(&:foo).last +# arr.sort_by(&:foo)[-1] +# arr.sort_by(&:foo).at(-1) +# arr.sort_by(&:foo).slice(-1) +# +# # good +# arr.max_by(&:foo) +# +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#79 +class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 + def on_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#192 + def accessor_start(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#182 + def arg_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#186 + def arg_value(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#147 + def autocorrect(corrector, node, sort_node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#165 + def base(accessor, arg); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#114 + def find_redundant_sort(*nodes); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#135 + def message(node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#131 + def offense_range(sort_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#124 + def register_offense(node, sort_node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#156 + def replace_with_logical_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#173 + def suffix(sorter); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#161 + def suggestion(sorter, accessor, arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#200 + def with_logical_operator?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#83 +RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#85 +RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort_by { ... }` can be replaced by +# `sort`. +# +# @example +# # bad +# array.sort_by { |x| x } +# array.sort_by do |var| +# var +# end +# +# # good +# array.sort +# +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#18 +class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#25 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#35 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#48 + def redundant_sort_by_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#53 + def redundant_sort_by_numblock(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#57 + def sort_by_range(send, node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#22 +RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#23 +RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) + +# Checks for redundant escapes in string literals. +# +# @example +# # bad - no need to escape # without following {/$/@ +# "\#foo" +# +# # bad - no need to escape single quotes inside double quoted string +# "\'foo\'" +# +# # bad - heredocs are also checked for unnecessary escapes +# <<~STR +# \#foo \"foo\" +# STR +# +# # good +# "#foo" +# +# # good +# "\#{no_interpolation}" +# +# # good +# "'foo'" +# +# # good +# "foo\ +# bar" +# +# # good +# <<~STR +# #foo "foo" +# STR +# +# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#37 +class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#43 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#79 + def allowed_escape?(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#119 + def array_literal?(node, prefix); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#73 + def begin_loc_present?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#153 + def delimiter?(node, char); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 + def disabling_interpolation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#149 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#139 + def heredoc_with_disabled_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#100 + def interpolation_not_enabled?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#167 + def literal_in_interpolated_or_multiline_string?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#59 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#135 + def percent_array_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#111 + def percent_q_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#127 + def percent_w_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#131 + def percent_w_upper_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#107 + def single_quoted?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#63 + def str_contents_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#41 +RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `//` or `%r` around regular expressions. +# +# NOTE: The following `%r` cases using a regexp starts with a blank or `=` +# as a method argument allowed to prevent syntax errors. +# +# [source,ruby] +# ---- +# do_something %r{ regexp} # `do_something / regexp/` is an invalid syntax. +# do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax. +# ---- +# +# @example EnforcedStyle: slashes (default) +# # bad +# snake_case = %r{^[\dA-Z_]+$} +# +# # bad +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# +# # good +# snake_case = /^[\dA-Z_]+$/ +# +# # good +# regex = / +# foo +# (bar) +# (baz) +# /x +# @example EnforcedStyle: percent_r +# # bad +# snake_case = /^[\dA-Z_]+$/ +# +# # bad +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# # good +# snake_case = %r{^[\dA-Z_]+$} +# +# # good +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# @example EnforcedStyle: mixed +# # bad +# snake_case = %r{^[\dA-Z_]+$} +# +# # bad +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# # good +# snake_case = /^[\dA-Z_]+$/ +# +# # good +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# @example AllowInnerSlashes: false (default) +# # If `false`, the cop will always recommend using `%r` if one or more +# # slashes are found in the regexp string. +# +# # bad +# x =~ /home\// +# +# # good +# x =~ %r{home/} +# @example AllowInnerSlashes: true +# # good +# x =~ /home\// +# +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93 +class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#101 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144 + def allow_inner_slashes?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#132 + def allowed_mixed_percent_r?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#122 + def allowed_mixed_slash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161 + def allowed_omit_parentheses_with_percent_r_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#126 + def allowed_percent_r_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#118 + def allowed_slash_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#221 + def calculate_replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#136 + def contains_disallowed_slash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140 + def contains_slash?(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#170 + def correct_delimiters(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#176 + def correct_inner_slashes(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#209 + def inner_slash_after_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#205 + def inner_slash_before_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#213 + def inner_slash_for(opening_delimiter); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#192 + def inner_slash_indices(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148 + def node_body(node, include_begin_nodes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#157 + def preferred_delimiters; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#153 + def slash_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#99 +RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#98 +RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) + +# Sort `require` and `require_relative` in alphabetical order. +# +# @example +# # bad +# require 'b' +# require 'a' +# +# # good +# require 'a' +# require 'b' +# +# # bad +# require_relative 'b' +# require_relative 'a' +# +# # good +# require_relative 'a' +# require_relative 'b' +# +# # good (sorted within each section separated by a blank line) +# require 'a' +# require 'd' +# +# require 'b' +# require 'c' +# +# # good +# require 'b' +# require_relative 'c' +# require 'a' +# +# # bad +# require 'a' +# require 'c' if foo +# require 'b' +# +# # good +# require 'a' +# require 'b' +# require 'c' if foo +# +# # bad +# require 'c' +# if foo +# require 'd' +# require 'b' +# end +# require 'a' +# +# # good +# require 'c' +# if foo +# require 'b' +# require 'd' +# end +# require 'a' +# +# source://rubocop//lib/rubocop/cop/style/require_order.rb#66 +class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#76 + def if_inside_only_require(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#83 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#115 + def autocorrect(corrector, node, previous_older_sibling); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#101 + def find_previous_older_sibling(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/require_order.rb#133 + def in_same_section?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/require_order.rb#97 + def not_modifier_form?(node); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#123 + def search_node(node); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 + def sibling_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/require_order.rb#73 +RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/require_order.rb#71 +RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `rescue` in its modifier form is added for following +# reasons: +# +# * The syntax of modifier form `rescue` can be misleading because it +# might lead us to believe that `rescue` handles the given exception +# but it actually rescue all exceptions to return the given rescue +# block. In this case, value returned by handle_error or +# SomeException. +# +# * Modifier form `rescue` would rescue all the exceptions. It would +# silently skip all exception or errors and handle the error. +# Example: If `NoMethodError` is raised, modifier form rescue would +# handle the exception. +# +# @example +# # bad +# some_method rescue handle_error +# +# # bad +# some_method rescue SomeException +# +# # good +# begin +# some_method +# rescue +# handle_error +# end +# +# # good +# begin +# some_method +# rescue SomeException +# handle_error +# end +# +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40 +class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RescueNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 + def correct_rescue_block(corrector, node, parenthesized); end + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 + def indentation_and_offset(node, parenthesized); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66 + def parenthesized?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46 +RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for rescuing `StandardError`. There are two supported +# styles `implicit` and `explicit`. This cop will not register an offense +# if any error other than `StandardError` is specified. +# +# @example EnforcedStyle: explicit (default) +# # `explicit` will enforce using `rescue StandardError` +# # instead of `rescue`. +# +# # bad +# begin +# foo +# rescue +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError +# bar +# end +# +# # good +# begin +# foo +# rescue OtherError +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, SecurityError +# bar +# end +# @example EnforcedStyle: implicit +# # `implicit` will enforce using `rescue` instead of +# # `rescue StandardError`. +# +# # bad +# begin +# foo +# rescue StandardError +# bar +# end +# +# # good +# begin +# foo +# rescue +# bar +# end +# +# # good +# begin +# foo +# rescue OtherError +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, SecurityError +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#73 +class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#92 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#88 + def rescue_standard_error?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#83 + def rescue_without_error_class?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#118 + def offense_for_explicit_enforced_style(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#107 + def offense_for_implicit_enforced_style(node, error); end +end + +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#80 +RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79 +RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) + +# Enforces consistency between 'return nil' and 'return'. +# +# Supported styles are: return, 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#31 +class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#86 + def chained_send?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#89 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#44 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#42 + def return_nil_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 + def return_node?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#72 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#81 + def scoped_node?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 +RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#36 +RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) + +# Checks if `return` or `return nil` is used in predicate method definitions. +# +# @example +# # bad +# def foo? +# return if condition +# +# do_something? +# end +# +# # bad +# def foo? +# return nil if condition +# +# do_something? +# end +# +# # good +# def foo? +# return false if condition +# +# do_something? +# end +# @example AllowedMethods: ['foo?'] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# @example AllowedPatterns: [/foo/] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + def return_nil?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 + def nil_node_at_the_end_of_method_body(body); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + def register_offense(offense_node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Transforms usages of a method call safeguarded by a non `nil` +# check for the variable whose method is being called to +# safe navigation (`&.`). If there is a method chain, all of the methods +# in the chain need to be checked for safety, and all of the methods will +# need to be changed to use safe navigation. +# +# The default for `ConvertCodeThatCanStartToReturnNil` is `false`. +# When configured to `true`, this will +# check for code in the format `!foo.nil? && foo.bar`. As it is written, +# the return of this code is limited to `false` and whatever the return +# of the method is. If this is converted to safe navigation, +# `foo&.bar` can start returning `nil` as well as what the method +# returns. +# +# The default for `MaxChainLength` is `2` +# We have limited the cop to not register an offense for method chains +# that exceed this option is set. +# +# @example +# # bad +# foo.bar if foo +# foo.bar.baz if foo +# foo.bar(param1, param2) if foo +# foo.bar { |e| e.something } if foo +# foo.bar(param) { |e| e.something } if foo +# +# foo.bar if !foo.nil? +# foo.bar unless !foo +# foo.bar unless foo.nil? +# +# foo && foo.bar +# foo && foo.bar.baz +# foo && foo.bar(param1, param2) +# foo && foo.bar { |e| e.something } +# foo && foo.bar(param) { |e| e.something } +# +# foo ? foo.bar : nil +# foo.nil? ? nil : foo.bar +# !foo.nil? ? foo.bar : nil +# !foo ? nil : foo.bar +# +# # good +# foo&.bar +# foo&.bar&.baz +# foo&.bar(param1, param2) +# foo&.bar { |e| e.something } +# foo&.bar(param) { |e| e.something } +# foo && foo.bar.baz.qux # method chain with more than 2 methods +# foo && foo.nil? # method that `nil` responds to +# +# # Method calls that do not use `.` +# foo && foo < bar +# foo < bar if foo +# +# # When checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# # do the opposite of what the author intends. +# foo && foo.empty? +# +# # This could start returning `nil` as well as the return of the method +# foo.nil? || foo.bar +# !foo || foo.bar +# +# # Methods that are used on assignment, arithmetic operation or +# # comparison should not be converted to use safe navigation +# foo.baz = bar if foo +# foo.baz + bar if foo +# foo.bar > 2 if foo +# +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#84 +class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # if format: (if checked_variable body nil) + # unless format: (if checked_variable nil body) + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#99 + def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#125 + def not_nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#127 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#114 + def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#307 + def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#200 + def allowed_if_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#154 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#299 + def begin_range(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#261 + def chain_length(method_chain, method); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#139 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#181 + def comments(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#303 + def end_range(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#166 + def extract_body(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#243 + def extract_common_parts(method_chain, checked_variable); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#209 + def extract_parts(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#233 + def extract_parts_from_and(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#218 + def extract_parts_from_if(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#251 + def find_matching_receiver_invocation(method_chain, checked_variable); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#174 + def handle_comments(corrector, node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#320 + def max_chain_length; end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 + def method_call(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#295 + def method_called?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#287 + def negated?(send_node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#187 + def relevant_comment_ranges(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#281 + def unsafe_method?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 + def unsafe_method_used?(method_chain, method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#150 + def use_var_only_in_unless_modifier?(node, variable); end +end + +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#92 +RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#90 +RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `shuffle.first`, +# `shuffle.last`, and `shuffle[]` and change them to use +# `sample` instead. +# +# @example +# # bad +# [1, 2, 3].shuffle.first +# [1, 2, 3].shuffle.first(2) +# [1, 2, 3].shuffle.last +# [2, 1, 3].shuffle.at(0) +# [2, 1, 3].shuffle.slice(0) +# [1, 2, 3].shuffle[2] +# [1, 2, 3].shuffle[0, 2] # sample(2) will do the same +# [1, 2, 3].shuffle[0..2] # sample(3) will do the same +# [1, 2, 3].shuffle(random: Random.new).first +# +# # good +# [1, 2, 3].shuffle +# [1, 2, 3].sample +# [1, 2, 3].sample(3) +# [1, 2, 3].shuffle[1, 3] # sample(3) might return a longer Array +# [1, 2, 3].shuffle[1..3] # sample(3) might return a longer Array +# [1, 2, 3].shuffle[foo, bar] +# [1, 2, 3].shuffle(random: Random.new) +# +# source://rubocop//lib/rubocop/cop/style/sample.rb#30 +class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 + def on_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#123 + def correction(shuffle_arg, method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#139 + def extract_source(args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#117 + def message(shuffle_arg, method, method_args, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sample.rb#58 + def offensive?(method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#95 + def range_size(range_node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#130 + def sample_arg(method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#69 + def sample_size(method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#78 + def sample_size_for_one_arg(arg); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#88 + def sample_size_for_two_args(first, second); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#111 + def source_range(shuffle_node, node); end +end + +# source://rubocop//lib/rubocop/cop/style/sample.rb#33 +RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/sample.rb#34 +RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for places where an subset of an Enumerable (array, +# range, set, etc.; see note below) is calculated based on a `Regexp` +# match, and suggests `grep` or `grep_v` instead. +# +# NOTE: Hashes do not behave as you may expect with `grep`, which +# means that `hash.grep` is not equivalent to `hash.select`. Although +# RuboCop is limited by static analysis, this cop attempts to avoid +# registering an offense when the receiver is a hash (hash literal, +# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). +# +# NOTE: `grep` and `grep_v` were optimized when used without a block +# in Ruby 3.0, but may be slower in previous versions. +# See https://bugs.ruby-lang.org/issues/17030 +# +# @example +# # bad (select or find_all) +# array.select { |x| x.match? /regexp/ } +# array.select { |x| /regexp/.match?(x) } +# array.select { |x| x =~ /regexp/ } +# array.select { |x| /regexp/ =~ x } +# +# # bad (reject) +# array.reject { |x| x.match? /regexp/ } +# array.reject { |x| /regexp/.match?(x) } +# array.reject { |x| x =~ /regexp/ } +# array.reject { |x| /regexp/ =~ x } +# +# # good +# array.grep(regexp) +# array.grep_v(regexp) +# +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#45 +class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#79 + def calls_lvar?(param0 = T.unsafe(nil), param1); end + + # Returns true if a node appears to return a hash + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#65 + def creates_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 + def env_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 + def regexp_match?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#132 + def extract_send_node(block_node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145 + def find_regexp(node, block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#156 + def match_predicate_without_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#141 + def opposite?(regexp_method_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#106 + def receiver_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#120 + def register_offense(node, block_node, regexp, replacement); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#112 + def replacement(regexp_method_send_node, node); end +end + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49 +RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 +RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#53 +RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#51 +RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#50 +RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use the shorthand for self-assignment. +# +# @example +# +# # bad +# x = x + 1 +# +# # good +# x += 1 +# +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#15 +class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#33 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#29 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#25 + def on_lvasgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#94 + def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#74 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#89 + def autocorrect_boolean_node(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 + def autocorrect_send_node(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#39 + def check(node, var_type); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#62 + def check_boolean_node(node, rhs, var_name, var_type); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#50 + def check_send_node(node, rhs, var_name, var_type); end + + class << self + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#21 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#18 +RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#19 +RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) + +# Checks for multiple expressions placed on the same line. +# It also checks for lines terminated with a semicolon. +# +# This cop has `AllowAsExpressionSeparator` configuration option. +# It allows `;` to separate several expressions on the same line. +# +# @example +# # bad +# foo = 1; bar = 2; +# baz = 3; +# +# # good +# foo = 1 +# bar = 2 +# baz = 3 +# @example AllowAsExpressionSeparator: false (default) +# # bad +# foo = 1; bar = 2 +# @example AllowAsExpressionSeparator: true +# # good +# foo = 1; bar = 2 +# +# source://rubocop//lib/rubocop/cop/style/semicolon.rb#29 +class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#45 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#64 + def check_for_line_terminator_or_opener; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#70 + def each_semicolon; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 + def exist_semicolon_after_left_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#110 + def exist_semicolon_after_left_string_interpolation_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#98 + def exist_semicolon_before_right_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 + def exist_semicolon_before_right_string_interpolation_brace?(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#134 + def expressions_per_line(exprs); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 + def find_range_node(token_before_semicolon); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#140 + def find_semicolon_positions(line); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#154 + def range_nodes; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 + def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#83 + def semicolon_position(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 + def tokens_for_lines; end + + class << self + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#35 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/semicolon.rb#33 +RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of the send method. +# +# @example +# # bad +# Foo.send(:bar) +# quuz.send(:fred) +# +# # good +# Foo.__send__(:bar) +# quuz.public_send(:fred) +# +# source://rubocop//lib/rubocop/cop/style/send.rb#16 +class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/send.rb#20 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/send.rb#20 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/send.rb#17 +RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send.rb#18 +RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `fail` and `raise`. +# +# @example EnforcedStyle: only_raise (default) +# # The `only_raise` style enforces the sole use of `raise`. +# # bad +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# # handle it +# end +# +# Kernel.fail +# +# # good +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# raise +# rescue Exception +# # handle it +# end +# +# Kernel.raise +# @example EnforcedStyle: only_fail +# # The `only_fail` style enforces the sole use of `fail`. +# # bad +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# raise +# rescue Exception +# # handle it +# end +# +# Kernel.raise +# +# # good +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# # handle it +# end +# +# Kernel.fail +# @example EnforcedStyle: semantic +# # The `semantic` style enforces the use of `fail` to signal an +# # exception, then will use `raise` to trigger an offense after +# # it has been rescued. +# # bad +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# # Error thrown +# rescue Exception +# fail +# end +# +# Kernel.fail +# Kernel.raise +# +# # good +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# raise 'Preferably with descriptive message' +# end +# +# explicit_receiver.fail +# explicit_receiver.raise +# +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#107 +class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#120 + def custom_fail_methods(param0); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#117 + def kernel_call?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#122 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#134 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#206 + def allow(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#188 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#167 + def check_scope(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#180 + def check_send(method_name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#200 + def command_or_kernel_call?(name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#149 + def custom_fail_defined?; end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#210 + def each_command_or_kernel_call(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#156 + def message(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#111 +RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#112 +RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#114 +RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Sometimes using dig method ends up with just a single +# argument. In such cases, dig should be replaced with []. +# +# @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#31 +class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 + def single_argument_dig?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 +RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#35 +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 method definitions that contain a body. +# It will accept single-line methods with no body. +# +# Endless methods added in Ruby 3.0 are also accepted by this cop. +# +# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow_single_line` or +# `allow_always`, single-line methods will be autocorrected to endless +# methods if there is only one statement in the body. +# +# @example +# # bad +# def some_method; body end +# def link_to(url); {:name => url}; end +# def @table.columns; super; end +# +# # good +# def self.resource_class=(klass); end +# def @table.columns; end +# def some_method() = body +# @example AllowIfMethodIsEmpty: true (default) +# # good +# def no_op; end +# @example AllowIfMethodIsEmpty: false +# # bad +# def no_op; end +# +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#34 +class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#60 + def allow_empty?; end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#52 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#97 + def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#88 + def correct_to_endless(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#64 + def correct_to_endless?(body_node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#74 + def correct_to_multiline(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#136 + def disallow_endless_method_style?; end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#104 + def each_part(body); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#121 + def method_body_source(method_body); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#114 + def move_comment(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#132 + def require_parentheses?(method_body); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#38 +RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#39 +RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) + +# Checks that arrays are sliced with endless ranges instead of +# `ary[start..-1]` on Ruby 2.6+. +# +# @example +# # bad +# items[1..-1] +# +# # good +# items[1..] +# +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#28 +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#40 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#38 + def range_till_minus_one?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#34 +RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#35 +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#242 + def allow_modifier?; end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 + def assigned_variables(condition); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#98 + def autocorrect(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#110 + def autocorrect_outer_condition_basic(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#125 + def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 + def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#175 + def correct_for_comment(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 + def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#165 + def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 + def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 + def correct_outer_condition(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 + def insert_bang(corrector, node, is_modify_form); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 + def insert_bang_for_and(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#89 + def offending_branch?(node, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 + def outer_condition_modify_form?(node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 + def replace_condition(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 + def require_parentheses?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#74 + def use_variable_assignment_in_condition?(condition, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#155 + def wrap_condition(corrector, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 + def wrap_condition?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#55 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53 +RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of Perl-style global variables. +# Correcting to global variables in the 'English' library +# will add a require statement to the top of the file if +# enabled by RequireEnglish config. +# +# Like `use_perl_names` but allows builtin global vars. +# +# # good +# 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 $* +# @example EnforcedStyle: use_builtin_english_names +# +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87 +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#176 + def autocorrect(corrector, node, global_var); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#168 + def message(global_var); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#152 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#147 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#247 + def add_require_english?; end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#241 + def english_name_replacement(preferred_name, node); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#190 + 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#212 + def format_list(items); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#198 + def format_message(english, regular, global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#235 + def matching_styles(global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#227 + def preferred_names(global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216 + def replacement(node, global_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251 + def should_require_english?(global_var); end +end + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128 +RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100 +RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#145 +RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#93 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#96 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#98 +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#122 +RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#124 +RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#139 +RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) + +# Check for parentheses around stabby lambda arguments. +# There are two different styles. Defaults to `require_parentheses`. +# +# @example EnforcedStyle: require_parentheses (default) +# # bad +# ->a,b,c { a + b + c } +# +# # good +# ->(a,b,c) { a + b + c} +# @example EnforcedStyle: require_no_parentheses +# # bad +# ->(a,b,c) { a + b + c } +# +# # good +# ->a,b,c { a + b + c} +# +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#22 +class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#28 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#54 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#46 + def missing_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#58 + def missing_parentheses_corrector(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#73 + def parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#50 + def redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#69 + def stabby_lambda_with_args?(node); end + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#62 + def unwanted_parentheses_corrector(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#27 +RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#26 +RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) + +# Checks for places where classes with only class methods can be +# replaced with a module. Classes should be used only when it makes sense to create +# instances out of them. +# +# @example +# # bad +# class SomeClass +# def self.some_method +# # body omitted +# end +# +# def self.some_other_method +# # body omitted +# end +# end +# +# # good +# module SomeModule +# module_function +# +# def some_method +# # body omitted +# end +# +# def some_other_method +# # body omitted +# end +# end +# +# # good - has instance method +# class SomeClass +# def instance_method; end +# def self.class_method; end +# end +# +# source://rubocop//lib/rubocop/cop/style/static_class.rb#46 +class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#53 + def on_class(class_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#64 + def autocorrect(corrector, class_node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#77 + def autocorrect_def(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#83 + def autocorrect_sclass(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#90 + def class_convertible_to_module?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#114 + def class_elements(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#102 + def extend_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#106 + def sclass_convertible_to_module?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/static_class.rb#51 +RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `$stderr.puts` can be replaced by +# `warn`. The latter has the advantage of easily being disabled by, +# the `-W0` interpreter flag or setting `$VERBOSE` to `nil`. +# +# @example +# # bad +# $stderr.puts('hello') +# +# # good +# warn('hello') +# +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#17 +class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#32 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#25 + def stderr_puts?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#43 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#47 + def stderr_gvar?(sym); end + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#51 + def stderr_puts_range(send); end +end + +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#21 +RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#22 +RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `String#split` with empty string or regexp literal argument. +# +# @example +# # bad +# string.split(//) +# string.split('') +# +# # good +# string.chars +# +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#21 +class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#27 +RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#25 +RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#26 +RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where string concatenation +# can be replaced with string interpolation. +# +# The cop can autocorrect simple cases but will skip autocorrecting +# more complex cases where the resulting code would be harder to read. +# In those cases, it might be useful to extract statements to local +# variables or methods which you can then interpolate in a string. +# +# NOTE: When concatenation between two strings is broken over multiple +# lines, this cop does not register an offense; instead, +# `Style/LineEndConcatenation` will pick up the offense if enabled. +# +# Two modes are supported: +# 1. `aggressive` style checks and corrects all occurrences of `+` where +# either the left or right side of `+` is a string literal. +# 2. `conservative` style on the other hand, checks and corrects only if +# left side (receiver of `+` method call) is a string literal. +# This is useful when the receiver is some expression that returns string like `Pathname` +# instead of a string literal. +# +# @example Mode: aggressive (default) +# # bad +# email_with_name = user.name + ' <' + user.email + '>' +# Pathname.new('/') + 'test' +# +# # good +# email_with_name = "#{user.name} <#{user.email}>" +# email_with_name = format('%s <%s>', user.name, user.email) +# "#{Pathname.new('/')}test" +# +# # accepted, line-end concatenation +# name = 'First' + +# 'Last' +# @example Mode: conservative +# # bad +# 'Hello' + user.name +# +# # good +# "Hello #{user.name}" +# user.name + '!!' +# Pathname.new('/') + 'test' +# +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#53 +class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#69 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#73 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#62 + def string_concatenation?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#116 + def collect_parts(node, parts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#141 + def corrected_ancestor?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#108 + def find_topmost_plus_node(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#162 + def handle_quotes(parts); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#135 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#98 + def line_end_concatenation?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#172 + def mode; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#127 + def plus_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#86 + def register_offense(topmost_plus_node, parts); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#145 + def replacement(parts); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#168 + def single_quoted?(str_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#131 + def uncorrectable?(part); end +end + +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#58 +RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#59 +RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of strings as keys in hashes. The use of +# symbols is preferred instead. +# +# @example +# # bad +# { 'one' => 1, 'two' => 2, 'three' => 3 } +# +# # good +# { one: 1, two: 2, three: 3 } +# +# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#19 +class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#42 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#30 + def receive_environments_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#25 + def string_hash_key?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#22 +RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) + +# Checks if uses of quotes match the configured preference. +# +# @example EnforcedStyle: single_quotes (default) +# # bad +# "No special symbols" +# "No string interpolation" +# "Just text" +# +# # good +# 'No special symbols' +# 'No string interpolation' +# 'Just text' +# "Wait! What's #{this}!" +# @example EnforcedStyle: double_quotes +# # bad +# 'Just some text' +# 'No special chars or interpolation' +# +# # good +# "Just some text" +# "No special chars or interpolation" +# "Every string in #{project} uses double_quotes" +# +# source://rubocop//lib/rubocop/cop/style/string_literals.rb#29 +class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::StringLiteralsHelp + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#37 + def on_dstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#123 + def accept_child_double_quotes?(nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#71 + def all_string_literals?(nodes); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#61 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#105 + def check_multiline_quote_style(node, quote); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#101 + def consistent_multiline?; end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#75 + def detect_quote_styles(node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#87 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#97 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#65 + def register_offense(node, message: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#119 + def unexpected_double_quotes?(quote); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#115 + def unexpected_single_quotes?(quote); end +end + +# source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 +RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) + +# Checks that quotes inside string, symbol, and regexp interpolations +# match the configured preference. +# +# @example EnforcedStyle: single_quotes (default) +# # bad +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# +# # good +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ +# @example EnforcedStyle: double_quotes +# # bad +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ +# +# # good +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# +# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 +class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::StringLiteralsHelp + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 + def autocorrect(corrector, node); end + + # Cop classes that include the StringHelp module usually ignore regexp + # nodes. Not so for this cop, which is why we override the on_regexp + # definition with an empty one. + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 + def offense?(node); end +end + +# Enforces the use of consistent method names +# from the String class. +# +# @example +# # bad +# 'name'.intern +# 'var'.unfavored_method +# +# # good +# 'name'.to_sym +# 'var'.preferred_method +# +# source://rubocop//lib/rubocop/cop/style/string_methods.rb#17 +class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/string_methods.rb#21 +RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `lstrip.rstrip` can be replaced by +# `strip`. +# +# @example +# # bad +# 'abc'.lstrip.rstrip +# 'abc'.rstrip.lstrip +# +# # good +# 'abc'.strip +# +# source://rubocop//lib/rubocop/cop/style/strip.rb#16 +class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/strip.rb#24 + def lstrip_rstrip(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/strip.rb#20 +RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/strip.rb#21 +RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for inheritance from Struct.new. +# +# @example +# # bad +# class Person < Struct.new(:first_name, :last_name) +# def age +# 42 +# end +# end +# +# # good +# Person = Struct.new(:first_name, :last_name) do +# def age +# 42 +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#26 +class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#33 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#45 + def struct_constructor?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#52 + def correct_parent(parent, corrector); end + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#62 + def range_for_empty_class_body(class_node, struct_new); end +end + +# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 +RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of shorthand-style swapping of 2 variables. +# +# @example +# # bad +# tmp = x +# x = y +# y = tmp +# +# # good +# x, y = y, x +# +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#21 +class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_lvasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#47 + def allowed_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#104 + def correction_range(tmp_assign, y_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#81 + def lhs(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#66 + def message(x_assign, y_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#75 + def replacement(x_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#95 + def rhs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#60 + def simple_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#51 + def swapping_values?(tmp_assign, x_assign, y_assign); end +end + +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#25 +RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#28 +RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) + +# Checks for array literals made up of symbols that are not +# using the %i() syntax. +# +# Alternatively, it checks for symbol arrays using the %i() syntax on +# projects which do not want to use that syntax, perhaps because they +# support a version of Ruby lower than 2.0. +# +# Configuration option: MinSize +# If set, arrays with fewer elements than this value will not trigger the +# cop. For example, a `MinSize` of `3` will not enforce a style on an +# array of 2 or fewer elements. +# +# @example EnforcedStyle: percent (default) +# # good +# %i[foo bar baz] +# +# # bad +# [:foo, :bar, :baz] +# +# # bad (contains spaces) +# %i[foo\ bar baz\ quux] +# +# # bad (contains [] with spaces) +# %i[foo \[ \]] +# +# # bad (contains () with spaces) +# %i(foo \( \)) +# @example EnforcedStyle: brackets +# # good +# [:foo, :bar, :baz] +# +# # bad +# %i[foo bar baz] +# +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 +class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ArrayMinSize + include ::RuboCop::Cop::ArraySyntax + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::PercentArray + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 + def build_bracketed_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 + def complex_content?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 + def symbol_without_quote?(string); end + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 + def to_symbol_literal(string); end + + class << self + # Returns the value of attribute largest_brackets. + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 + def largest_brackets; end + + # Sets the attribute largest_brackets + # + # @param value the value to set the attribute largest_brackets to. + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 + def largest_brackets=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 +RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 +RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 +RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + +# Checks symbol literal syntax. +# +# @example +# +# # bad +# :"symbol" +# +# # good +# :symbol +# +# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#15 +class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#20 + def on_sym(node); end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#18 +RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) + +# Use symbols as procs when possible. +# +# If you prefer a style that allows block for method with arguments, +# please set `true` to `AllowMethodsWithArguments`. +# `define_method?` methods are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# something.map { |s| s.upcase } +# something.map { _1.upcase } +# +# # good +# something.map(&:upcase) +# @example AllowMethodsWithArguments: false (default) +# # bad +# something.do_something(foo) { |o| o.bar } +# +# # good +# something.do_something(foo, &:bar) +# @example AllowMethodsWithArguments: true +# # good +# something.do_something(foo) { |o| o.bar } +# @example AllowComments: false (default) +# # bad +# something.do_something do |s| # some comment +# # some comment +# s.upcase # some comment +# # some comment +# end +# @example AllowComments: true +# # good - if there are comment in either position +# something.do_something do |s| # some comment +# # some comment +# s.upcase # some comment +# # some comment +# end +# @example AllowedMethods: [define_method] (default) +# # good +# define_method(:foo) { |foo| foo.bar } +# @example AllowedPatterns: [] (default) +# # bad +# something.map { |s| s.upcase } +# @example AllowedPatterns: ['map'] (default) +# # good +# something.map { |s| s.upcase } +# +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87 +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#136 + def destructuring_block_argument?(argument_node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#98 + def proc_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#104 + def symbol_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#101 + def symbol_proc_receiver?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 + def allow_comments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + def allow_if_method_has_argument?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#151 + def allowed_method_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#164 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#176 + def autocorrect_with_args(corrector, node, args, method_name); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 + def autocorrect_without_args(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#190 + def begin_pos_for_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#185 + def block_range_with_space(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 + def register_offense(node, method_name, block_method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 + 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#143 + def unsafe_hash_usage?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#111 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#94 +RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#95 +RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) + +# Corrector to correct conditional assignment in ternary conditions. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#500 +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#505 + def correct(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#509 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#523 + def correction(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#536 + def element_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#540 + def extract_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#553 + def move_branch_inside_condition(corrector, branch, assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#548 + def remove_parentheses(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#527 + def ternary(node); end + end +end + +# Checks for the presence of parentheses around ternary +# conditions. It is configurable to enforce inclusion or omission of +# parentheses using `EnforcedStyle`. Omission is only enforced when +# removing the parentheses won't cause a different behavior. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example EnforcedStyle: require_no_parentheses (default) +# # bad +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = (bar && baz) ? a : b +# +# # good +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = bar && baz ? a : b +# @example EnforcedStyle: require_parentheses +# # bad +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = bar && baz ? a : b +# +# # good +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = (bar && baz) ? a : b +# @example EnforcedStyle: require_parentheses_when_complex +# # bad +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = bar && baz ? a : b +# +# # good +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = (bar && baz) ? a : b +# @example AllowSafeAssignment: true (default) +# # good +# foo = (bar = baz) ? a : b +# @example AllowSafeAssignment: false +# # bad +# foo = (bar = baz) ? a : b +# +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#57 +class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#193 + def method_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#69 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#100 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#183 + def below_ternary_precedence?(child); end + + # If the condition is parenthesized we recurse and check for any + # complex expressions within it. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#131 + def complex_condition?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#89 + def condition_as_parenthesized_one_line_pattern_matching?(condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#198 + def correct_parenthesized(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#208 + def correct_unparenthesized(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#151 + def message(node); end + + # Anything that is not a variable, constant, or method/.method call + # will be counted as a complex expression. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#141 + def non_complex_expression?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#145 + def non_complex_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#113 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#85 + def only_closing_parenthesis_is_last_line?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#169 + def parenthesized?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#161 + def require_parentheses?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#165 + def require_parentheses_when_complex?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#179 + def unparenthesized_method_call?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#173 + def unsafe_autocorrect?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#212 + def whitespace_after?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#66 +RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#67 +RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#64 +RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#63 +RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) + +# Newcomers to ruby applications may write top-level methods, +# when ideally they should be organized in appropriate classes or modules. +# This cop looks for definitions of top-level methods and warns about them. +# +# However for ruby scripts it is perfectly fine to use top-level methods. +# Hence this cop is disabled by default. +# +# @example +# # bad +# def some_method +# end +# +# # bad +# def self.some_method +# end +# +# # bad +# define_method(:foo) { puts 1 } +# +# # good +# module Foo +# def some_method +# end +# end +# +# # good +# class Foo +# def self.some_method +# end +# end +# +# # good +# Struct.new do +# def some_method +# end +# end +# +# # good +# class Foo +# define_method(:foo) { puts 1 } +# end +# +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#47 +class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#79 + def define_method_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#70 + def top_level_method_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#48 +RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#50 +RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for trailing code after the class definition. +# +# @example +# # bad +# class Foo; def foo; end +# end +# +# # good +# class Foo +# def foo; end +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#18 +class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 + def on_sclass(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#23 +RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing code after the method definition. +# +# NOTE: It always accepts endless method definitions that are basically on the same line. +# +# @example +# # bad +# def some_method; do_stuff +# end +# +# def f(x); b = foo +# b[c: x] +# end +# +# # good +# def some_method +# do_stuff +# end +# +# def f(x) +# b = foo +# b[c: x] +# end +# +# def endless_method = do_stuff +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#31 +class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#36 +RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing code after the module definition. +# +# @example +# # bad +# module Foo extend self +# end +# +# # good +# module Foo +# extend self +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#18 +class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#25 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#23 +RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing comma in argument lists. +# The supported styles are: +# +# * `consistent_comma`: Requires a comma after the last argument, +# for all parenthesized method calls with arguments. +# * `comma`: Requires a comma after the last argument, but only for +# parenthesized method calls where each argument is on its own line. +# * `no_comma`: Requires that there is no comma after the last +# argument. +# +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # good +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# @example EnforcedStyleForMultiline: comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # bad +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, +# 3 +# ) +# +# # bad +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, 2, 3 +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# @example EnforcedStyleForMultiline: no_comma (default) +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # good +# method( +# 1, +# 2 +# ) +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#87 +class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + def on_send(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#91 + def autocorrect_incompatible_with; end + end +end + +# Checks for trailing comma in array literals. +# The configuration options are: +# +# * `consistent_comma`: Requires a comma after the +# last item of all non-empty, multiline array literals. +# * `comma`: Requires a comma after last item in an array, +# but only when each item is on its own line. +# * `no_comma`: Does not require a comma after the +# last item in an array +# +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # good +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# @example EnforcedStyleForMultiline: comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # bad +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, +# 3 +# ] +# +# # bad +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, 2, 3 +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# @example EnforcedStyleForMultiline: no_comma (default) +# # bad +# a = [1, 2,] +# +# # good +# a = [ +# 1, +# 2 +# ] +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#84 +class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#88 + def on_array(node); end +end + +# Checks whether trailing commas in block arguments are +# required. Blocks with only one argument and a trailing comma require +# that comma to be present. Blocks with more than one argument never +# require a trailing comma. +# +# @example +# # bad +# add { |foo, bar,| foo + bar } +# +# # good +# add { |foo, bar| foo + bar } +# +# # good +# add { |foo,| foo } +# +# # good +# add { foo } +# +# # bad +# add do |foo, bar,| +# foo + bar +# end +# +# # good +# add do |foo, bar| +# foo + bar +# end +# +# # good +# add do |foo,| +# foo +# end +# +# # good +# add do +# foo + bar +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#62 +class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#67 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#83 + def arg_count(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#95 + def argument_tokens(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#91 + def last_comma(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#87 + def trailing_comma?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#79 + def useless_trailing_comma?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#65 +RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing comma in hash literals. +# The configuration options are: +# +# * `consistent_comma`: Requires a comma after the +# last item of all non-empty, multiline hash literals. +# * `comma`: Requires a comma after the last item in a hash, +# but only when each item is on its own line. +# * `no_comma`: Does not require a comma after the +# last item in a hash +# +# @example EnforcedStyleForMultiline: consistent_comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# @example EnforcedStyleForMultiline: comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # bad +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3 +# } +# +# # bad +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3 +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# @example EnforcedStyleForMultiline: no_comma (default) +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { +# foo: 1, +# bar: 2 +# } +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#87 +class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#91 + def on_hash(node); end +end + +# Checks for trailing code after the method definition. +# +# @example +# # bad +# def some_method +# do_stuff; end +# +# def do_this(x) +# baz.map { |b| b.this(x) } end +# +# def foo +# block do +# bar +# end end +# +# # good +# def some_method +# do_stuff +# end +# +# def do_this(x) +# baz.map { |b| b.this(x) } +# end +# +# def foo +# block do +# bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#36 +class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#41 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#55 + def body_and_end_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#51 + def trailing_end?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#39 +RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) + +# Checks for extra underscores in variable assignment. +# +# @example +# # bad +# a, b, _ = foo() +# a, b, _, = foo() +# a, _, _ = foo() +# a, _, _, = foo() +# +# # good +# a, b, = foo() +# a, = foo() +# *a, b, _ = foo() +# # => We need to know to not include 2 variables in a +# a, *b, _ = foo() +# # => The correction `a, *b, = foo()` is a syntax error +# @example AllowNamedUnderscoreVariables: true (default) +# # good +# a, b, _something = foo() +# @example AllowNamedUnderscoreVariables: false +# # bad +# a, b, _something = foo() +# +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#31 +class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#41 + def on_masgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#92 + def allow_named_underscore_variables; end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#125 + def children_offenses(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#57 + def find_first_offense(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#66 + def find_first_possible_offense(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#108 + def main_node_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#146 + def range_for_parentheses(offense, left); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#88 + def reverse_index(collection, item); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#80 + def splat_variable_before?(first_offense, variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#96 + def unneeded_ranges(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#133 + def unused_range(node_type, mlhs_node, right); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#129 + def unused_variables_only?(offense, variables); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#38 +RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#36 +RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#37 +RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) + +# Looks for trivial reader/writer methods, that could +# have been created with the attr_* family of functions automatically. +# `to_ary`, `to_a`, `to_c`, `to_enum`, `to_h`, `to_hash`, `to_i`, `to_int`, `to_io`, +# `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods +# are allowed by default. These are customizable with `AllowedMethods` option. +# +# @example +# # 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 ExactNameMatch: true (default) +# # good +# def name +# @other_name +# end +# @example ExactNameMatch: false +# # bad +# def name +# @other_name +# end +# @example AllowPredicates: true (default) +# # good +# def foo? +# @foo +# end +# @example AllowPredicates: false +# # bad +# def foo? +# @foo +# end +# +# # good +# attr_reader :foo +# @example AllowDSLWriters: true (default) +# # good +# def on_exception(action) +# @on_exception=action +# end +# @example AllowDSLWriters: false +# # bad +# def on_exception(action) +# @on_exception=action +# end +# +# # good +# attr_writer :on_exception +# @example IgnoreClassMethods: false (default) +# # bad +# def self.foo +# @foo +# end +# +# # good +# class << self +# attr_reader :foo +# end +# @example IgnoreClassMethods: true +# # good +# def self.foo +# @foo +# end +# @example AllowedMethods: ['allowed_method'] +# # good +# def allowed_method +# @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#104 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#222 + def accessor(kind, method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#161 + def allow_dsl_writers?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#157 + def allow_predicates?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#195 + def allowed_method_name?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#169 + def allowed_method_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#204 + def allowed_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#200 + def allowed_writer?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#142 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#234 + def autocorrect_class(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#226 + def autocorrect_instance(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#173 + def dsl_writer?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#153 + def exact_name_match?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#165 + def ignore_class_methods?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#115 + def in_module_or_instance_eval?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#181 + def looks_like_trivial_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#208 + def names_match?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#129 + def on_method_def(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#248 + def top_level_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#214 + def trivial_accessor_kind(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#177 + def trivial_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#185 + def trivial_writer?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#102 +RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) + +# Looks for `unless` expressions with `else` clauses. +# +# @example +# # bad +# unless foo_bar.nil? +# # do something... +# else +# # do a different thing... +# end +# +# # good +# if foo_bar.present? +# # do something... +# else +# # do a different thing... +# end +# +# source://rubocop//lib/rubocop/cop/style/unless_else.rb#22 +class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#28 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#45 + def range_between_condition_and_else(node, condition); end + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#49 + def range_between_else_and_end(node); end +end + +# source://rubocop//lib/rubocop/cop/style/unless_else.rb#26 +RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of logical operators in an `unless` condition. +# It discourages such code, as the condition becomes more difficult +# to read and understand. +# +# This cop supports two styles: +# +# - `forbid_mixed_logical_operators` (default) +# - `forbid_logical_operators` +# +# `forbid_mixed_logical_operators` style forbids the use of more than one type +# of logical operators. This makes the `unless` condition easier to read +# because either all conditions need to be met or any condition need to be met +# in order for the expression to be truthy or falsey. +# +# `forbid_logical_operators` style forbids any use of logical operator. +# This makes it even more easy to read the `unless` condition as +# there is only one condition in the expression. +# +# @example EnforcedStyle: forbid_mixed_logical_operators (default) +# # bad +# return unless a || b && c +# return unless a && b || c +# return unless a && b and c +# return unless a || b or c +# return unless a && b or c +# return unless a || b and c +# +# # good +# return unless a && b && c +# return unless a || b || c +# return unless a and b and c +# return unless a or b or c +# return unless a? +# @example EnforcedStyle: forbid_logical_operators +# # bad +# return unless a || b +# return unless a && b +# return unless a or b +# return unless a and b +# +# # good +# return unless a +# return unless a? +# +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#50 +class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#62 + def and_with_or?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#67 + def logical_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#71 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#57 + def or_with_and?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#83 + def mixed_logical_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#90 + def mixed_precedence_and?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#97 + def mixed_precedence_or?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#54 +RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#53 +RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) + +# Checks for accessing the first element of `String#unpack` +# which can be replaced with the shorter method `unpack1`. +# +# @example +# +# # bad +# 'foo'.unpack('h*').first +# 'foo'.unpack('h*')[0] +# 'foo'.unpack('h*').slice(0) +# 'foo'.unpack('h*').at(0) +# +# # good +# 'foo'.unpack1('h*') +# +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#20 +class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#38 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#31 + def unpack_and_first_element?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#54 + 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#28 +RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for variable interpolation (like "#@ivar"). +# +# @example +# # bad +# "His name is #$name" +# /check #$pattern/ +# "Let's go to the #@store" +# +# # good +# "His name is #{$name}" +# /check #{$pattern}/ +# "Let's go to the #{@store}" +# +# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#18 +class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#25 + def on_node_with_interpolations(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#35 + def message(range); end + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#39 + def var_nodes(nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#22 +RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for `when;` uses in `case` expressions. +# +# @example +# # bad +# case foo +# when 1; 'baz' +# when 2; 'bar' +# end +# +# # good +# case foo +# when 1 then 'baz' +# when 2 then 'bar' +# end +# +# source://rubocop//lib/rubocop/cop/style/when_then.rb#20 +class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/when_then.rb#25 + def on_when(node); end +end + +# source://rubocop//lib/rubocop/cop/style/when_then.rb#23 +RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `do` in multi-line `while/until` statements. +# +# @example +# +# # bad +# while x.any? do +# do_something(x.pop) +# end +# +# # good +# while x.any? +# do_something(x.pop) +# end +# @example +# +# # 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#31 +class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + def on_while(node); end +end + +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 +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 +# @example +# # bad +# until x > 10 +# x += 1 +# end +# +# # good +# x += 1 until x > 10 +# @example +# # bad +# x += 100 while x < 500 # a long comment that makes code too long if it were a single line +# +# # good +# while x < 500 # a long comment that makes code too long if it were a single line +# x += 100 +# end +# +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#36 +class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + def on_while(node); end +end + +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 +RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for array literals made up of word-like +# strings, that are not using the %w() syntax. +# +# Alternatively, it can check for uses of the %w() syntax, in projects +# which do not want to include that syntax. +# +# NOTE: When using the `percent` style, %w() arrays containing a space +# will be registered as offenses. +# +# Configuration option: MinSize +# If set, arrays with fewer elements than this value will not trigger the +# cop. For example, a `MinSize` of `3` will not enforce a style on an +# array of 2 or fewer elements. +# +# @example EnforcedStyle: percent (default) +# # good +# %w[foo bar baz] +# +# # bad +# ['foo', 'bar', 'baz'] +# +# # bad (contains spaces) +# %w[foo\ bar baz\ quux] +# +# # bad +# [ +# ['one', 'One'], +# ['two', 'Two'] +# ] +# +# # good +# [ +# %w[one One], +# %w[two Two] +# ] +# +# # good (2d array containing spaces) +# [ +# ['one', 'One'], +# ['two', 'Two'], +# ['forty two', 'Forty Two'] +# ] +# @example EnforcedStyle: brackets +# # good +# ['foo', 'bar', 'baz'] +# +# # bad +# %w[foo bar baz] +# +# # good (contains spaces) +# ['foo bar', 'baz quux'] +# +# # good +# [ +# ['one', 'One'], +# ['two', 'Two'] +# ] +# +# # bad +# [ +# %w[one One], +# %w[two Two] +# ] +# +# source://rubocop//lib/rubocop/cop/style/word_array.rb#71 +class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ArrayMinSize + include ::RuboCop::Cop::ArraySyntax + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::PercentArray + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#94 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#85 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#138 + def build_bracketed_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#118 + def complex_content?(strings, complex_regex: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#129 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#113 + def matrix_of_complex_content?(array); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#107 + def within_matrix_of_complex_content?(node); end + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#134 + def word_regex; end + + class << self + # Returns the value of attribute largest_brackets. + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 + def largest_brackets; end + + # Sets the attribute largest_brackets + # + # @param value the value to set the attribute largest_brackets to. + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 + def largest_brackets=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/style/word_array.rb#79 +RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/word_array.rb#78 +RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with +# `File.read` argument. +# +# NOTE: `YAML.safe_load_file` was introduced in Ruby 3.0. +# +# @example +# +# # bad +# YAML.load(File.read(path)) +# YAML.parse(File.read(path)) +# +# # good +# YAML.load_file(path) +# YAML.parse_file(path) +# +# # bad +# YAML.safe_load(File.read(path)) # Ruby 3.0 and newer +# +# # good +# YAML.safe_load_file(path) # Ruby 3.0 and newer +# +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#27 +class RuboCop::Cop::Style::YAMLFileRead < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#34 + def yaml_file_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#60 + def offense_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#30 +RuboCop::Cop::Style::YAMLFileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#31 +RuboCop::Cop::Style::YAMLFileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces or forbids Yoda conditions, +# i.e. comparison operations where the order of expression is reversed. +# eg. `5 == x` +# +# @example EnforcedStyle: forbid_for_all_comparison_operators (default) +# # bad +# 99 == foo +# "bar" != foo +# 42 >= foo +# 10 < bar +# 99 == CONST +# +# # good +# foo == 99 +# foo == "bar" +# foo <= 42 +# bar > 10 +# CONST == 99 +# "#{interpolation}" == foo +# /#{interpolation}/ == foo +# @example EnforcedStyle: forbid_for_equality_operators_only +# # bad +# 99 == foo +# "bar" != foo +# +# # good +# 99 >= foo +# 3 < a && a < 5 +# @example EnforcedStyle: require_for_all_comparison_operators +# # bad +# foo == 99 +# foo == "bar" +# foo <= 42 +# bar > 10 +# +# # good +# 99 == foo +# "bar" != foo +# 42 >= foo +# 10 < bar +# @example EnforcedStyle: require_for_equality_operators_only +# # bad +# 99 >= foo +# 3 < a && a < 5 +# +# # good +# 99 == foo +# "bar" != foo +# +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#77 +class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#90 + def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#94 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 + def actual_code_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#145 + def constant_portion?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 + def corrected_code(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#107 + def enforce_yoda?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#112 + def equality_only?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 + def interpolation?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#134 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 + def non_equality_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 + def noncommutative_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 + def program_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 + def reverse_comparison(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 + def source_file_path_constant?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#122 + def valid_yoda?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#117 + def yoda_compatible_condition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#84 +RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#82 +RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#85 +RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#86 +RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#87 +RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#83 +RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) + +# Forbids Yoda expressions, i.e. binary operations (using `*`, `+`, `&`, `|`, +# and `^` operators) where the order of expression is reversed, eg. `1 + x`. +# This cop complements `Style/YodaCondition` cop, which has a similar purpose. +# +# This cop is disabled by default to respect user intentions such as: +# +# [source,ruby] +# ---- +# config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i +# ---- +# +# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) +# # bad +# 10 * y +# 1 + x +# 1 & z +# 1 | x +# 1 ^ x +# 1 + CONST +# +# # good +# y * 10 +# x + 1 +# z & 1 +# x | 1 +# x ^ 1 +# CONST + 1 +# 60 * 24 +# +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 +class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73 + def constant_portion?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81 + def offended_ancestor?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85 + def offended_nodes; end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77 + def supported_operators; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69 + def yoda_expression_constant?(lhs, rhs); end +end + +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 +RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 +RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for numeric comparisons that can be replaced +# by a predicate method, such as `receiver.length == 0`, +# `receiver.length > 0`, and `receiver.length != 0`, +# `receiver.length < 1` and `receiver.size == 0` that can be +# replaced by `receiver.empty?` and `!receiver.empty?`. +# +# NOTE: `File`, `Tempfile`, and `StringIO` do not have `empty?` +# so allow `size == 0` and `size.zero?`. +# +# @example +# # bad +# [1, 2, 3].length == 0 +# 0 == "foobar".length +# array.length < 1 +# {a: 1, b: 2}.length != 0 +# string.length > 0 +# hash.size > 0 +# +# # good +# [1, 2, 3].empty? +# "foobar".empty? +# array.empty? +# !{a: 1, b: 2}.empty? +# !string.empty? +# !hash.empty? +# +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#37 +class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # Some collection like objects in the Ruby standard library + # implement `#size`, but not `#empty`. We ignore those to + # reduce false positives. + # + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#139 + def non_polymorphic_collection?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#109 + def nonzero_length_comparison(param0 = T.unsafe(nil)); 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#130 + def other_receiver(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + def zero_length_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#96 + def zero_length_predicate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#122 + def zero_length_receiver(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#80 + def check_nonzero_length_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#65 + def check_zero_length_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#53 + def check_zero_length_predicate(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 + def replacement(node); end +end + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#41 +RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#43 +RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#40 +RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking and correcting surrounding whitespace. +# +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#6 +module RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::RangeHelp + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#110 + def empty_brackets?(left_bracket_token, right_bracket_token, tokens: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#104 + def empty_offense(node, range, message, command); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#94 + def empty_offenses(node, left, right, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#68 + def extra_space?(token, side); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#129 + def no_character_between?(left_bracket_token, right_bracket_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#38 + def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#120 + def offending_empty_no_space?(config, left_token, right_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#116 + def offending_empty_space?(config, left_token, right_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#33 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#78 + def reposition(src, pos, step, include_newlines: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#16 + def side_space_range(range:, side:, include_newlines: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#124 + def space_between?(left_bracket_token, right_bracket_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#85 + def space_offense(node, token, side, message, command); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#53 + def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#9 +RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#12 +RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#10 +RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) + +# Classes that include this module just implement functions for working +# with symbol nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#7 +module RuboCop::Cop::SymbolHelp + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#8 + def hash_key?(node); end +end + +# Common functionality for checking target ruby version. +# +# source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#6 +module RuboCop::Cop::TargetRubyVersion + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 + def minimum_target_ruby_version(version); end + + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#7 + def required_minimum_ruby_version; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 + def support_target_ruby_version?(version); end +end + +# A group of cops, ready to be called on duty to inspect files. +# Team is responsible for selecting only relevant cops to be sent on duty, +# as well as insuring that the needed forces are sent along with them. +# +# For performance reasons, Team will first dispatch cops & forces in two groups, +# first the ones needed for autocorrection (if any), then the rest +# (unless autocorrections happened). +# +# source://rubocop//lib/rubocop/cop/team.rb#12 +class RuboCop::Cop::Team + # @return [Team] a new instance of Team + # + # source://rubocop//lib/rubocop/cop/team.rb#55 + def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#66 + def autocorrect?; end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def cops; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#70 + def debug?; end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def errors; end + + # source://rubocop//lib/rubocop/cop/team.rb#114 + def external_dependency_checksum; end + + # @deprecated + # + # source://rubocop//lib/rubocop/cop/team.rb#110 + def forces; end + + # source://rubocop//lib/rubocop/cop/team.rb#76 + def inspect_file(processed_source); end + + # @return [Commissioner::InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/team.rb#81 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # Returns the value of attribute updated_source_file. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def updated_source_file; end + + # Returns the value of attribute updated_source_file. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def updated_source_file?; end + + # Returns the value of attribute warnings. + # + # source://rubocop//lib/rubocop/cop/team.rb#51 + def warnings; end + + private + + # source://rubocop//lib/rubocop/cop/team.rb#121 + def autocorrect(processed_source, report, original:, offset:); end + + # source://rubocop//lib/rubocop/cop/team.rb#182 + def autocorrect_report(report, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#140 + def be_ready; end + + # source://rubocop//lib/rubocop/cop/team.rb#188 + def collate_corrections(report, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#204 + def each_corrector(report); end + + # source://rubocop//lib/rubocop/cop/team.rb#254 + def handle_error(error, location, cop); end + + # source://rubocop//lib/rubocop/cop/team.rb#246 + def handle_warning(error, location); end + + # @return [Commissioner::InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/team.rb#154 + def investigate_partial(cops, processed_source, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#231 + def process_errors(file, errors); end + + # source://rubocop//lib/rubocop/cop/team.rb#148 + def reset; end + + # @return [Array<cop>] + # + # source://rubocop//lib/rubocop/cop/team.rb#160 + def roundup_relevant_cops(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#176 + def support_target_rails_version?(cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#170 + def support_target_ruby_version?(cop); end + + # source://rubocop//lib/rubocop/cop/team.rb#219 + def suppress_clobbering; end + + # source://rubocop//lib/rubocop/cop/team.rb#225 + def validate_config; end + + class << self + # @return [Array<Force>] needed for the given cops + # + # source://rubocop//lib/rubocop/cop/team.rb#37 + def forces_for(cops); end + + # @return [Team] with cops assembled from the given `cop_classes` + # + # source://rubocop//lib/rubocop/cop/team.rb#22 + def mobilize(cop_classes, config, options = T.unsafe(nil)); end + + # @return [Array<Cop::Base>] + # + # source://rubocop//lib/rubocop/cop/team.rb#28 + def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end + + # @return [Team] + # + # source://rubocop//lib/rubocop/cop/team.rb#14 + def new(cop_or_classes, config, options = T.unsafe(nil)); end + end +end + +# Common methods shared by TrailingBody cops +# +# source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#6 +module RuboCop::Cop::TrailingBody + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#12 + def body_on_first_line?(node, body); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#16 + def first_part_of(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#7 + def trailing_body?(node); end +end + +# Common methods shared by Style/TrailingCommaInArguments and +# Style/TrailingCommaInLiteral +# +# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#7 +module RuboCop::Cop::TrailingComma + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # A single argument with the closing bracket on the same line as the end + # of the argument is not considered multiline, even if the argument + # itself might span multiple lines. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#104 + def allowed_multiline_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#167 + def any_heredoc?(items); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#159 + def autocorrect_range(item); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#133 + def avoid_comma(kind, comma_begin_pos, extra_info); end + + # Returns true if the node has round/square/curly brackets. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#82 + def brackets?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#19 + def check(node, items, kind, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#37 + def check_comma(node, kind, comma_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#43 + def check_literal(node, kind); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#30 + def comma_offset(items, range); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#108 + def elements(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#54 + def extra_avoid_comma_info; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#171 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#189 + def heredoc_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#76 + def inside_comment?(range, comma_offset); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#93 + def method_name_and_arguments_on_same_line?(node); end + + # Returns true if the round/square/curly brackets of the given node are + # on different lines, each item within is on its own line, and the + # closing bracket is on its own line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#89 + def multiline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#123 + def no_elements_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#129 + def on_same_line?(range1, range2); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#147 + def put_comma(items, kind); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#65 + def should_have_comma?(style, node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#15 + def style_parameter_name; end +end + +# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#11 +RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) + +# Common functionality shared by Uncommunicative cops +# +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#6 +module RuboCop::Cop::UncommunicativeName + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#12 + def check(node, args); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#95 + def allow_nums; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#87 + def allowed_names; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#78 + def arg_range(arg, length); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#45 + def case_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#64 + def ends_with_num?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#91 + def forbidden_names; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#83 + def forbidden_offense(node, range, name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#36 + def issue_offenses(node, range, name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#68 + def length_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#74 + def long_enough?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#99 + def min_length; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#53 + def name_type(node); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#60 + def num_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#49 + def uppercase?(name); end +end + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#7 +RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#10 +RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#9 +RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#8 +RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) + +# This autocorrects unused arguments. +# +# source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#6 +class RuboCop::Cop::UnusedArgCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#12 + def correct(corrector, processed_source, node); end + + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#31 + def correct_for_blockarg_type(corrector, node); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#10 + def processed_source; end + end +end + +# This module contains a collection of useful utility methods. +# +# source://rubocop//lib/rubocop/cop/util.rb#7 +module RuboCop::Cop::Util + include ::RuboCop::PathUtil + + private + + # source://rubocop//lib/rubocop/cop/util.rb#35 + def add_parentheses(node, corrector); end + + # source://rubocop//lib/rubocop/cop/util.rb#56 + def any_descendant?(node, *types); end + + # source://rubocop//lib/rubocop/cop/util.rb#71 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#83 + def args_end(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#104 + 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#192 + 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#130 + def double_quotes_required?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#144 + 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#114 + def first_part_of_call_chain(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#197 + def include_or_equal?(source, target); end + + # source://rubocop//lib/rubocop/cop/util.rb#179 + def indent(node, offset: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/util.rb#161 + def interpret_string_escapes(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#165 + def line(node_or_range); end + + # source://rubocop//lib/rubocop/cop/util.rb#26 + def line_range(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#140 + def needs_escaping?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#87 + def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/util.rb#30 + def parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#173 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/util.rb#148 + def to_string_literal(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#185 + def to_supported_styles(enforced_style); end + + # source://rubocop//lib/rubocop/cop/util.rb#157 + def trim_string_interpolation_escape_character(str); end + + class << self + # source://rubocop//lib/rubocop/cop/util.rb#35 + def add_parentheses(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#56 + def any_descendant?(node, *types); end + + # source://rubocop//lib/rubocop/cop/util.rb#71 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#83 + def args_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#104 + 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#130 + def double_quotes_required?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#144 + 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#114 + def first_part_of_call_chain(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#179 + def indent(node, offset: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/util.rb#161 + def interpret_string_escapes(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#165 + def line(node_or_range); end + + # source://rubocop//lib/rubocop/cop/util.rb#26 + def line_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#140 + def needs_escaping?(string); end + + # @yield [sexp] + # + # source://rubocop//lib/rubocop/cop/util.rb#87 + def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#30 + def parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#173 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/util.rb#148 + def to_string_literal(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#185 + def to_supported_styles(enforced_style); end + + # source://rubocop//lib/rubocop/cop/util.rb#157 + def trim_string_interpolation_escape_character(str); end + end +end + +# source://rubocop//lib/rubocop/cop/util.rb#99 +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#98 +RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 +module RuboCop::Cop::Utils; end + +# Parses {Kernel#sprintf} format strings. +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#7 +class RuboCop::Cop::Utils::FormatString + # @return [FormatString] a new instance of FormatString + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#89 + def initialize(string); end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#93 + def format_sequences; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#105 + def max_digit_dollar_num; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#101 + def named_interpolation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#97 + def valid?; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#117 + def mixed_formats?; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#111 + def parse; end +end + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#8 +RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#9 +RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) + +# The syntax of a format sequence is as follows. +# +# ``` +# %[flags][width][.precision]type +# ``` +# +# A format sequence consists of a percent sign, followed by optional +# flags, width, and precision indicators, then terminated with a field +# type character. +# +# For more complex formatting, Ruby supports a reference by name. +# +# @see https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-format +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#43 +class RuboCop::Cop::Utils::FormatString::FormatSequence + # @return [FormatSequence] a new instance of FormatSequence + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#46 + def initialize(match); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#61 + def annotated?; end + + # Number of arguments required for the format sequence + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#70 + def arity; end + + # Returns the value of attribute begin_pos. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def begin_pos; end + + # Returns the value of attribute end_pos. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def end_pos; end + + # Returns the value of attribute flags. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def flags; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#74 + def max_digit_dollar_num; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#57 + def percent?; end + + # Returns the value of attribute precision. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def precision; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#78 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#65 + def template?; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def type; end + + # Returns the value of attribute width. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + def width; end +end + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 +RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 +RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#10 +RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 +RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#18 +RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 +RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 +RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 +RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) + +# Helper to abstract complexity of building range pairs +# with octal escape reconstruction (needed for regexp_parser < 2.7). +# +# source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#8 +class RuboCop::Cop::Utils::RegexpRanges + # @return [RegexpRanges] a new instance of RegexpRanges + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11 + def initialize(root); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18 + def compound_token; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24 + def pairs; end + + # Returns the value of attribute root. + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9 + def root; end + + private + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78 + def compose_range(expressions, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90 + def escaped_octal?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94 + def octal_digit?(char); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98 + def pop_octal_digits(expressions); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44 + def populate(expr); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32 + def populate_all; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63 + def process_set(expressions, current); end +end + +# This force provides a way to track local variables and scopes of Ruby. +# Cops interact with this force need to override some of the hook methods. +# +# def before_entering_scope(scope, variable_table) +# end +# +# def after_entering_scope(scope, variable_table) +# end +# +# def before_leaving_scope(scope, variable_table) +# end +# +# def after_leaving_scope(scope, variable_table) +# end +# +# def before_declaring_variable(variable, variable_table) +# end +# +# def after_declaring_variable(variable, variable_table) +# end +# +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#27 +class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force + # Starting point. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#76 + def investigate(processed_source); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#85 + def process_node(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#71 + def variable_table; end + + private + + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + def after_declaring_variable(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + def after_entering_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + def after_leaving_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + def before_declaring_variable(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + def before_entering_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + def before_leaving_scope(arg); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#339 + def descendant_reference(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#329 + def each_descendant_reference(loop_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#314 + 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#94 + def inspect_variables_in_scope(scope_node); end + + # Mark all assignments which are referenced in the same loop + # as referenced by ignoring AST order since they would be referenced + # in next iteration. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#295 + def mark_assignments_as_referenced_in_loop(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#126 + def node_handler_method_name(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#100 + def process_children(origin_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#231 + def process_loop(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#160 + def process_regexp_named_captures(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#246 + def process_rescue(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#265 + def process_scope(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#284 + def process_send(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#142 + def process_variable_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#130 + def process_variable_declaration(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#219 + def process_variable_multiple_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#184 + def process_variable_operator_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#226 + def process_variable_referencing(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#257 + def process_zero_arity_super(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#178 + def regexp_captured_names(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#351 + def scanned_node?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#355 + def scanned_nodes; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#108 + def skip_children!; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#278 + def twisted_nodes(node); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#32 +RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) + +# This class represents each assignment of a variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#7 +class RuboCop::Cop::VariableForce::Assignment + include ::RuboCop::Cop::VariableForce::Branchable + + # @return [Assignment] a new instance of Assignment + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#16 + def initialize(node, variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 + def exception_assignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72 + def for_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#83 + def meta_assignment_node; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#60 + def multiple_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#29 + def name; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#78 + def operator; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54 + def operator_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#37 + def reference!(node); end + + # Returns the value of attribute referenced. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def referenced; end + + # Returns the value of attribute referenced. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def referenced?; end + + # Returns the value of attribute references. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def references; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46 + def regexp_named_capture?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66 + def rest_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33 + def scope; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#42 + def used?; end + + # Returns the value of attribute variable. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def variable; end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#125 + def find_multiple_assignment_node(grandparent_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#121 + def for_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 + def multiple_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96 + def operator_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#114 + def rest_assignment_node; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10 +RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#65 +class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#66 + def assignment?; end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + def node=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Namespace for branch classes for each control structure. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#7 +module RuboCop::Cop::VariableForce::Branch + class << self + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#8 + def of(target_node, scope: T.unsafe(nil)); end + end +end + +# left_body && right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#265 +class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# Abstract base class for branch classes. +# A branch represents a conditional branch in a scope. +# +# @example +# def some_scope +# do_something # no branch +# +# if foo +# do_something # branch A +# do_something # branch A +# else +# do_something # branch B +# if bar +# do_something # branch C (whose parent is branch B) +# end +# end +# +# do_something # no branch +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 +class RuboCop::Cop::VariableForce::Branch::Base < ::Struct + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 + def ==(other); end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#92 + def always_run?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#88 + def branched?; end + + # Returns the value of attribute child_node + # + # @return [Object] the current value of child_node + def child_node; end + + # Sets the attribute child_node + # + # @param value [Object] the value to set the attribute child_node to. + # @return [Object] the newly set value + def child_node=(_); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#70 + def control_node; end + + # @yield [_self] + # @yieldparam _self [RuboCop::Cop::VariableForce::Branch::Base] the object that the method was called on + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#80 + def each_ancestor(include_self: T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 + def eql?(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#104 + def exclusive_with?(other); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#129 + def hash; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#96 + def may_jump_to_other_branch?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#100 + def may_run_incompletely?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#74 + def parent; end + + # Returns the value of attribute scope + # + # @return [Object] the current value of scope + def scope; end + + # Sets the attribute scope + # + # @param value [Object] the value to set the attribute scope to. + # @return [Object] the newly set value + def scope=(_); end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#135 + def scan_ancestors; end + + class << self + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#43 + def classes; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#56 + def define_predicate(name, child_index: T.unsafe(nil)); end + + # @private + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#47 + def inherited(subclass); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#52 + def type; end + end +end + +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#325 +RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) + +# case target +# when /pattern/ # when_clause +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#219 +class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#224 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def target?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def when_clause?; end +end + +# case target +# in pattern # in_pattern +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#234 +class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#239 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def in_pattern?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def target?; end +end + +# begin +# main_body +# ensure +# ensure_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#314 +class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#320 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def ensure_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def main_body?; end +end + +# Mix-in module for exception handling control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#281 +module RuboCop::Cop::VariableForce::Branch::ExceptionHandler + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#282 + def may_jump_to_other_branch?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#286 + def may_run_incompletely?; end +end + +# for element in collection +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#247 +class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#252 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def collection?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def element?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# if conditional_clause +# truthy_body +# else +# falsey_body +# end +# +# unless conditional_clause +# falsey_body +# else +# truthy_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#166 +class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def falsey_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def truthy_body?; end +end + +# Mix-in module for logical operator control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#258 +module RuboCop::Cop::VariableForce::Branch::LogicalOperator + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#259 + def always_run?; end +end + +# left_body || right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#273 +class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# begin +# main_body +# rescue StandardError => error # rescue_clause +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#297 +class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#304 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def main_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def rescue_clause?; end +end + +# Mix-in module for simple conditional control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#145 +module RuboCop::Cop::VariableForce::Branch::SimpleConditional + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#150 + def always_run?; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#146 + def conditional_clause?; end +end + +# until conditional_clause +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#187 +class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# begin +# loop_body +# end until conditional_clause +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#207 +class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# while conditional_clause +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#177 +class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# begin +# loop_body +# end while conditional_clause +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#197 +class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# Mix-in module for classes which own a node and need branch information +# of the node. The user classes must implement #node and #scope. +# +# source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#8 +module RuboCop::Cop::VariableForce::Branchable + # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#9 + def branch; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#15 + def run_exclusively_with?(other); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#39 +RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 +RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#42 +RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#112 +RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#40 +RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#47 +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#50 +RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +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#55 +RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 +RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) + +# A Scope represents a context of local variable visibility. +# This is a place where local variables belong to. +# A scope instance holds a scope node and variable entries. +# +# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#9 +class RuboCop::Cop::VariableForce::Scope + # @return [Scope] a new instance of Scope + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#22 + def initialize(node); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#35 + def ==(other); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#43 + def body_node; end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#61 + def each_node(&block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#57 + def include?(target_node); end + + # Returns the value of attribute naked_top_level. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def naked_top_level; end + + # Returns the value of attribute naked_top_level. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def naked_top_level?; end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#39 + def name; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def node; end + + # Returns the value of attribute variables. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def variables; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#100 + def ancestor_node?(target_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#90 + def belong_to_inner_scope?(target_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#79 + def belong_to_outer_scope?(target_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#70 + def scan_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#10 +RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#54 +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#30 +RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 +RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) + +# A Variable represents existence of a local variable. +# This holds a variable declaration node and some states of the variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 +class RuboCop::Cop::VariableForce::Variable + # @return [Variable] a new instance of Variable + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#15 + def initialize(name, declaration_node, scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#94 + def argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#31 + def assign(node); end + + # Returns the value of attribute assignments. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def assignments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 + def block_argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#74 + def capture_with_block!; end + + # Returns the value of attribute captured_by_block. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def captured_by_block; end + + # Returns the value of attribute captured_by_block. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def captured_by_block?; end + + # Returns the value of attribute declaration_node. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def declaration_node; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 + def explicit_block_local_variable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#66 + def in_modifier_conditional?(assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 + def keyword_argument?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#98 + def method_argument?; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def name; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#40 + def reference!(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#35 + def referenced?; end + + # Returns the value of attribute references. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def references; end + + # Returns the value of attribute scope. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def scope; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 + def should_be_unused?; end + + # This is a convenient way to check whether the variable is used + # in its entire variable lifetime. + # For more precise usage check, refer Assignment#used?. + # + # Once the variable is captured by a block, we have no idea + # when, where, and how many times the block would be invoked. + # This means we cannot track the usage of the variable. + # So we consider it's used to suppress false positive offenses. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#86 + def used?; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#9 +RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#59 +class RuboCop::Cop::VariableForce::VariableReference < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#60 + def assignment?; end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# A VariableTable manages the lifetime of all scopes and local variables +# in a program. +# This holds scopes as stack structure, provides a way to add local +# variables to current scope, and find local variables by considering +# variable visibility of the current scope. +# +# source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#11 +class RuboCop::Cop::VariableForce::VariableTable + # @return [VariableTable] a new instance of VariableTable + # + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#12 + def initialize(hook_receiver = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#113 + def accessible_variables; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#56 + def assign_to_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#40 + def current_scope; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#44 + def current_scope_level; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#48 + def declare_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#94 + def find_variable(name); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#16 + def invoke_hook(hook_name, *args); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#32 + def pop_scope; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#24 + def push_scope(scope_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#68 + def reference_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#20 + def scope_stack; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#109 + def variable_exist?(name); end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#122 + def mark_variable_as_captured_by_block_if_so(variable); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#52 +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#30 + 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#80 + def all_cops?; end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/directive_comment.rb#28 + def comment; end + + # Returns array of specified in this directive cop names + # + # source://rubocop//lib/rubocop/directive_comment.rb#85 + def cop_names; end + + # Returns the value of attribute cop_registry. + # + # source://rubocop//lib/rubocop/directive_comment.rb#28 + def cop_registry; end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/directive_comment.rb#28 + def cops; end + + # Returns array of specified in this directive department names + # when all department disabled + # + # source://rubocop//lib/rubocop/directive_comment.rb#91 + def department_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#105 + def directive_count; end + + # Checks if this directive disables cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#60 + def disabled?; end + + # Checks if this directive disables all cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#75 + def disabled_all?; end + + # Checks if this directive enables cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#65 + def enabled?; end + + # Checks if this directive enables all cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#70 + def enabled_all?; end + + # Checks if directive departments include cop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#96 + def in_directive_department?(cop); end + + # Returns line number for directive + # + # source://rubocop//lib/rubocop/directive_comment.rb#110 + def line_number; end + + # Checks if this directive contains all the given cop names + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#42 + def match?(cop_names); end + + # Returns match captures to directive comment pattern + # + # source://rubocop//lib/rubocop/directive_comment.rb#55 + def match_captures; end + + # Returns the value of attribute mode. + # + # source://rubocop//lib/rubocop/directive_comment.rb#28 + def mode; end + + # Checks if cop department has already used in directive comment + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#101 + def overridden_by_department?(cop); end + + # source://rubocop//lib/rubocop/directive_comment.rb#46 + def range; end + + # Checks if this directive relates to single line + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#37 + def single_line?; end + + private + + # source://rubocop//lib/rubocop/directive_comment.rb#130 + def all_cop_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#134 + def cop_names_for_department(department); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#126 + def department?(name); end + + # source://rubocop//lib/rubocop/directive_comment.rb#140 + def exclude_redundant_directive_cop(cops); end + + # source://rubocop//lib/rubocop/directive_comment.rb#120 + def parsed_cop_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#116 + def splitted_cops_string; end + + class << self + # source://rubocop//lib/rubocop/directive_comment.rb#24 + def before_comment(line); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#17 +RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#15 +RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#13 +RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#19 +RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#11 +RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#9 +RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP_DEPARTMENT = 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 + # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. + # It's for compatibility with regexp_parser 1.8 and will never be maintained. + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#19 + def assign_properties(*_arg0); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#53 + 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 + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#68 + 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#27 + 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#61 + 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#67 + def build_location; end +end + +# Provide `CharacterSet` with `begin` and `end` locations. +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79 +module RuboCop::Ext::RegexpParser::Expression::CharacterSet + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 + def build_location; end +end + +# Source map for RegexpParser nodes +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#8 +class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map + # @return [Map] a new instance of Map + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#11 + def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end + + # Returns the value of attribute begin. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def begin; end + + # Returns the value of attribute body. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def body; end + + # Returns the value of attribute end. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def end; end + + # Returns the value of attribute quantifier. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def quantifier; end +end + +# This class handles loading files (a.k.a. features in Ruby) specified +# by `--require` command line option and `require` directive in the config. +# +# Normally, the given string is directly passed to `require`. If a string +# beginning with `.` is given, it is assumed to be relative to the given +# directory. +# +# If a string containing `-` is given, it will be used as is, but if we +# cannot find the file to load, we will replace `-` with `/` and try it +# again as when Bundler loads gems. +# +# @api private +# +# source://rubocop//lib/rubocop/feature_loader.rb#16 +class RuboCop::FeatureLoader + # @api private + # @param config_directory_path [String] + # @param feature [String] + # @return [FeatureLoader] a new instance of FeatureLoader + # + # source://rubocop//lib/rubocop/feature_loader.rb#27 + def initialize(config_directory_path:, feature:); end + + # @api private + # + # source://rubocop//lib/rubocop/feature_loader.rb#32 + def load; end + + private + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#55 + def namespaced_feature; end + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#60 + def namespaced_target; end + + # @api private + # @param [String] + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#70 + def relative(feature); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/feature_loader.rb#75 + def relative?; end + + # @api private + # @param error [LoadError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/feature_loader.rb#81 + def seems_cannot_load_such_file_error?(error); end + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#86 + def target; end + + class << self + # @api private + # @param config_directory_path [String] + # @param feature [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#20 + def load(config_directory_path:, feature:); end + end +end + +# Common methods for finding files. +# +# @api private +# +# source://rubocop//lib/rubocop/file_finder.rb#8 +module RuboCop::FileFinder + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#13 + def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#20 + def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#28 + def traverse_files_upwards(filename, start_dir, stop_dir); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level; end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level=(_arg0); end + end +end + +# A wrapper around patterns array to perform optimized search. +# +# For projects with a large set of rubocop todo files, most items in `Exclude`/`Include` +# are exact file names. It is wasteful to linearly check the list of patterns over and over +# to check if the file is relevant to the cop. +# +# This class partitions an array of patterns into a set of exact match strings and the rest +# of the patterns. This way we can firstly do a cheap check in the set and then proceed via +# the costly patterns check, if needed. +# +# @api private +# +# source://rubocop//lib/rubocop/file_patterns.rb#14 +class RuboCop::FilePatterns + # @api private + # @return [FilePatterns] a new instance of FilePatterns + # + # source://rubocop//lib/rubocop/file_patterns.rb#21 + def initialize(patterns); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/file_patterns.rb#27 + def match?(path); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/file_patterns.rb#33 + def partition_patterns(patterns); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/file_patterns.rb#17 + def from(patterns); end + end +end + +# The bootstrap module for formatter. +# +# source://rubocop//lib/rubocop/formatter.rb#5 +module RuboCop::Formatter; end + +# Does not show individual offenses in the console. +# +# source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#6 +class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter + # source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#7 + def finished(inspected_files); end +end + +# Abstract base class for formatter, implements all public API methods. +# +# ## Creating Custom Formatter +# +# You can create a custom formatter by subclassing +# `RuboCop::Formatter::BaseFormatter` and overriding some methods +# or by implementing all the methods by duck typing. +# +# ## Using Custom Formatter in Command Line +# +# You can tell RuboCop to use your custom formatter with a combination of +# `--format` and `--require` option. +# For example, when you have defined `MyCustomFormatter` in +# `./path/to/my_custom_formatter.rb`, you would type this command: +# +# rubocop --require ./path/to/my_custom_formatter --format MyCustomFormatter +# +# Note: The path passed to `--require` is directly passed to +# `Kernel.require`. +# If your custom formatter file is not in `$LOAD_PATH`, +# you need to specify the path as relative path prefixed with `./` +# explicitly or absolute path. +# +# ## Method Invocation Order +# +# For example, when RuboCop inspects 2 files, +# the invocation order should be like this: +# +# * `#initialize` +# * `#started` +# * `#file_started` +# * `#file_finished` +# * `#file_started` +# * `#file_finished` +# * `#finished` +# +# source://rubocop//lib/rubocop/formatter/base_formatter.rb#41 +class RuboCop::Formatter::BaseFormatter + # @api public + # @param output [IO] `$stdout` or opened file + # @return [BaseFormatter] a new instance of BaseFormatter + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#63 + def initialize(output, options = T.unsafe(nil)); end + + # Invoked at the end of inspecting each files. + # + # @api public + # @param file [String] the file path + # @param offenses [Array(RuboCop::Cop::Offense)] all detected offenses for the file + # @return [void] + # @see RuboCop::Cop::Offense + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#104 + def file_finished(file, offenses); end + + # Invoked at the beginning of inspecting each files. + # + # @api public + # @param file [String] the file path + # @param options [Hash] file specific information, currently this is always empty. + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#89 + def file_started(file, options); end + + # Invoked after all files are inspected or interrupted by user. + # + # @api public + # @param inspected_files [Array(String)] the inspected file paths. + # This would be same as `target_files` passed to `#started` + # unless RuboCop is interrupted by user. + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#116 + def finished(inspected_files); end + + # @api public + # @return [Hash] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#57 + def options; end + + # @api public + # @return [IO] the IO object passed to `#initialize` + # @see #initialize + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#50 + def output; end + + # Invoked once before any files are inspected. + # + # @api public + # @param target_files [Array(String)] all target file paths to be inspected + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#76 + def started(target_files); end +end + +# This formatter formats report data in clang style. +# The precise location of the problem is shown together with the +# relevant source code. +# +# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#8 +class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#11 + def report_file(file, offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#51 + def report_highlighted_area(highlighted_area); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#41 + def report_line(location); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 + def report_offense(file, offense); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 + def valid_line?(offense); end +end + +# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#9 +RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) + +# This mix-in module provides string coloring methods for terminals. +# It automatically disables coloring if coloring is disabled in the process +# globally or the formatter's output is not a terminal. +# +# source://rubocop//lib/rubocop/formatter/colorizable.rb#8 +module RuboCop::Formatter::Colorizable + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def black(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def blue(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#21 + def colorize(string, *args); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def cyan(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def green(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def magenta(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#9 + def rainbow; end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def red(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def white(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def yellow(string); end +end + +# This formatter displays a YAML configuration file where all cops that +# detected any offenses are configured to not detect the offense. +# +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#7 +class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::PathUtil + + # @return [DisabledConfigFormatter] a new instance of DisabledConfigFormatter + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#27 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#39 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 + def file_started(_file, _file_info); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#47 + def finished(_inspected_files); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#68 + def auto_gen_enforced_style?; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#72 + def command; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#156 + def cop_config_params(default_cfg, cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#176 + def default_config(cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#220 + def excludes(offending_files, cop_name, parent); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#191 + def filtered_config(cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#241 + def merge_mode_for_exclude?(cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#262 + def no_exclude_limit?; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#101 + def output_cop(cop_name, offense_count); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#128 + def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#180 + def output_cop_config(output_buffer, cfg, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#163 + def output_cop_param_comments(output_buffer, params, default_cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#210 + def output_exclude_list(output_buffer, offending_files, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#245 + def output_exclude_path(output_buffer, exclude_path, parent); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#199 + def output_offending_files(output_buffer, cfg, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#95 + def output_offenses; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#258 + def safe_autocorrect?(config); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#115 + def set_max(cfg, cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#64 + def show_offense_counts?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#60 + def show_timestamp?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#148 + def supports_safe_autocorrect?(cop_class, default_cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#152 + def supports_unsafe_autocorrect?(cop_class, default_cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#91 + def timestamp; end + + class << self + # Returns the value of attribute config_to_allow_offenses. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def config_to_allow_offenses; end + + # Sets the attribute config_to_allow_offenses + # + # @param value the value to set the attribute config_to_allow_offenses to. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def config_to_allow_offenses=(_arg0); end + + # Returns the value of attribute detected_styles. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def detected_styles; end + + # Sets the attribute detected_styles + # + # @param value the value to set the attribute detected_styles to. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#24 + def detected_styles=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#10 +RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) + +# This formatter displays the report data in format that's +# easy to process in the Emacs text editor. +# The output is machine-parsable. +# +# source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#8 +class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#9 + def file_finished(file, offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#24 + def message(offense); end +end + +# This formatter displays just a list of the files with offenses in them, +# separated by newlines. The output is machine-parsable. +# +# Here's the format: +# +# /some/file +# /some/other/file +# +# source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#12 +class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#13 + def file_finished(file, offenses); end +end + +# This is a collection of formatters. A FormatterSet can hold multiple +# formatter instances and provides transparent formatter API methods +# which invoke same method of each formatters. +# +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#10 +class RuboCop::Formatter::FormatterSet < ::Array + # @return [FormatterSet] a new instance of FormatterSet + # + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#39 + def initialize(options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#55 + def add_formatter(formatter_type, output_path = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#67 + def close_output_files; end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#50 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#44 + def file_started(file, options); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + def finished(*args); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + def started(*args); end + + private + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#86 + def builtin_formatter_class(specified_key); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#99 + def custom_formatter_class(specified_class_name); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#75 + 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#31 +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/git_hub_actions_formatter.rb#7 +class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#14 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#18 + def finished(_inspected_files); end + + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#10 + def started(_target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#29 + def github_escape(string); end + + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#41 + def github_severity(offense); end + + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#33 + def minimum_severity_to_fail; end + + # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#45 + def report_offense(file, offense); end +end + +# source://rubocop//lib/rubocop/formatter/git_hub_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#11 +class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter + # @return [HTMLFormatter] a new instance of HTMLFormatter + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#30 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#40 + def file_finished(file, offenses); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + def files; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#45 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#51 + def render_html; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#36 + def started(target_files); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + def summary; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 +class RuboCop::Formatter::HTMLFormatter::Color < ::Struct + # Returns the value of attribute alpha + # + # @return [Object] the current value of alpha + def alpha; end + + # Sets the attribute alpha + # + # @param value [Object] the value to set the attribute alpha to. + # @return [Object] the newly set value + def alpha=(_); end + + # Returns the value of attribute blue + # + # @return [Object] the current value of blue + def blue; end + + # Sets the attribute blue + # + # @param value [Object] the value to set the attribute blue to. + # @return [Object] the newly set value + def blue=(_); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#20 + def fade_out(amount); end + + # Returns the value of attribute green + # + # @return [Object] the current value of green + def green; end + + # Sets the attribute green + # + # @param value [Object] the value to set the attribute green to. + # @return [Object] the newly set value + def green=(_); end + + # Returns the value of attribute red + # + # @return [Object] the current value of red + def red; end + + # Sets the attribute red + # + # @param value [Object] the value to set the attribute red to. + # @return [Object] the newly set value + def red=(_); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#16 + def to_s; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) + +# This class provides helper methods used in the ERB template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#62 +class RuboCop::Formatter::HTMLFormatter::ERBContext + include ::RuboCop::PathUtil + include ::RuboCop::Formatter::TextUtil + + # @return [ERBContext] a new instance of ERBContext + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 + def initialize(files, summary); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#125 + def base64_encoded_logo_image; end + + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85 + def binding; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#90 + def decorated_message(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#121 + def escape(string); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + def files; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#101 + def highlight_source_tag(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 + def highlighted_source_line(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#117 + def possible_ellipses(location); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 + def source_after_highlight(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#107 + def source_before_highlight(offense); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + def summary; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 +RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#66 +RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 +class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct + # Returns the value of attribute offenses + # + # @return [Object] the current value of offenses + def offenses; end + + # Sets the attribute offenses + # + # @param value [Object] the value to set the attribute offenses to. + # @return [Object] the newly set value + def offenses=(_); end + + # Returns the value of attribute path + # + # @return [Object] the current value of path + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + def path=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 +class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct + # Returns the value of attribute inspected_files + # + # @return [Object] the current value of inspected_files + def inspected_files; end + + # Sets the attribute inspected_files + # + # @param value [Object] the value to set the attribute inspected_files to. + # @return [Object] the newly set value + def inspected_files=(_); end + + # Returns the value of attribute offense_count + # + # @return [Object] the current value of offense_count + def offense_count; end + + # Sets the attribute offense_count + # + # @param value [Object] the value to set the attribute offense_count to. + # @return [Object] the newly set value + def offense_count=(_); end + + # Returns the value of attribute target_files + # + # @return [Object] the current value of target_files + def target_files; end + + # Sets the attribute target_files + # + # @param value [Object] the value to set the attribute target_files to. + # @return [Object] the newly set value + def target_files=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13 +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#9 +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#14 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#23 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#28 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#43 + 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#65 + def hash_for_location(offense); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#50 + def hash_for_offense(offense); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#33 + def metadata_hash; end + + # Returns the value of attribute output_hash. + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#12 + def output_hash; end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#19 + def started(target_files); end +end + +# This formatter formats the report data in JUnit format. +# +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#17 +class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter + # @return [JUnitFormatter] a new instance of JUnitFormatter + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#18 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#55 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#64 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#29 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#71 + def finished(_inspected_files); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + def offenses_for_cop(all_offenses, cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#47 + def relevant_for_output?(options, target_offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#83 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#78 + def reset_count; end +end + +# This formatter displays the report data in markdown +# +# source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#6 +class RuboCop::Formatter::MarkdownFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::Formatter::TextUtil + include ::RuboCop::PathUtil + + # @return [MarkdownFormatter] a new instance of MarkdownFormatter + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#11 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#21 + def file_finished(file, offenses); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 + def files; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#26 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#17 + def started(target_files); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#9 + def summary; end + + private + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#73 + def possible_ellipses(location); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#33 + def render_markdown; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#67 + def write_code(offense); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#61 + def write_context(offense); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#42 + def write_file_messages; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#54 + def write_heading(file); end +end + +# This formatter displays the list of offended cops with a count of how +# many offenses of their kind were found. Ordered by desc offense count +# +# Here's the format: +# +# 26 LineLength +# 3 OneLineConditional +# -- +# 29 Total in 5 files +# +# source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#16 +class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#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#74 + 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#78 + def total_offense_count(offense_counts); end +end + +# This formatter prints a PACDOT per every file to be analyzed. +# Pacman will "eat" one PACDOT per file when no offense is detected. +# Otherwise it will print a Ghost. +# This is inspired by the Pacman formatter for RSpec by Carlos Rojas. +# https://github.com/go-labs/rspec_pacman_formatter +# +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#10 +class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter + include ::RuboCop::Formatter::TextUtil + + # @return [PacmanFormatter] a new instance of PacmanFormatter + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#19 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#50 + def cols; end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#37 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#33 + def file_started(_file, _options); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#43 + def next_step(offenses); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#64 + def pacdots(number); end + + # Returns the value of attribute progress_line. + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 + def progress_line; end + + # Sets the attribute progress_line + # + # @param value the value to set the attribute progress_line to. + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#12 + def progress_line=(_arg0); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#26 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#68 + def step(character); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#57 + def update_progress_line; end +end + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#14 +RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#15 +RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 +RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 +RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) + +# This formatter display dots for files with no offenses and +# letters for files with problems in the them. In the end it +# appends the regular report data in the clang style format. +# +# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#8 +class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter + include ::RuboCop::Formatter::TextUtil + + # @return [ProgressFormatter] a new instance of ProgressFormatter + # + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#13 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#24 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#33 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#50 + def report_file_as_mark(offenses); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#18 + def started(target_files); end +end + +# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#11 +RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) + +# If no offenses are found, no output is displayed. +# Otherwise, SimpleTextFormatter's output is displayed. +# +# source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#7 +class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter + # source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#8 + def report_summary(file_count, offense_count, correction_count, correctable_count); end +end + +# A basic formatter that displays only files with offenses. +# Offenses are displayed at compact form - just the +# location of the problem and the associated message. +# +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#10 +class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::Formatter::Colorizable + include ::RuboCop::PathUtil + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#29 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#36 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#43 + def report_file(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#57 + def report_summary(file_count, offense_count, correction_count, correctable_count); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#23 + def started(_target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#85 + def annotate_message(msg); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#80 + def colored_severity_code(offense); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#73 + def count_stats(offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#89 + def message(offense); end +end + +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#14 +RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) + +# A helper class for building the report summary text. +# +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#105 +class RuboCop::Formatter::SimpleTextFormatter::Report + include ::RuboCop::Formatter::Colorizable + include ::RuboCop::Formatter::TextUtil + + # @return [Report] a new instance of Report + # + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#110 + def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_autocorrect: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#123 + def summary; end + + private + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#160 + def correctable; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#153 + def corrections; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#142 + def files; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#146 + def offenses; end + + # Returns the value of attribute rainbow. + # + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#140 + def rainbow; end +end + +# This formatter formats report data using the Test Anything Protocol. +# TAP allows for to communicate tests results in a language agnostics way. +# +# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#7 +class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#14 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#8 + def started(target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 + def annotate_message(msg); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#70 + def message(offense); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 + def report_highlighted_area(highlighted_area); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#29 + def report_line(location); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#46 + def report_offense(file, offense); end +end + +# Common logic for UI texts. +# +# source://rubocop//lib/rubocop/formatter/text_util.rb#6 +module RuboCop::Formatter::TextUtil + private + + # source://rubocop//lib/rubocop/formatter/text_util.rb#9 + def pluralize(number, thing, options = T.unsafe(nil)); end + + class << self + # source://rubocop//lib/rubocop/formatter/text_util.rb#9 + def pluralize(number, thing, options = T.unsafe(nil)); end + end +end + +# This formatter displays the list of offensive files, sorted by number of +# offenses with the worst offenders first. +# +# Here's the format: +# +# 26 this/file/is/really/bad.rb +# 3 just/ok.rb +# -- +# 29 Total in 2 files +# +# source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#16 +class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#24 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#31 + def finished(_inspected_files); end + + # Returns the value of attribute offense_counts. + # + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#17 + def offense_counts; end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#55 + def ordered_offense_counts(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#36 + def report_summary(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#19 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#59 + def total_offense_count(offense_counts); end +end + +# source://rubocop//lib/rubocop/options.rb#8 +class RuboCop::IncorrectCopNameError < ::StandardError; end + +# 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#7 +class RuboCop::Lockfile + # Gems that the bundle depends on + # + # @api private + # + # source://rubocop//lib/rubocop/lockfile.rb#9 + def dependencies; end + + # All activated gems, including transitive dependencies + # + # @api private + # + # source://rubocop//lib/rubocop/lockfile.rb#16 + def gems; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#24 + def includes_gem?(name); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lockfile.rb#30 + def parser; end +end + +# source://rubocop//lib/rubocop/lsp/logger.rb#13 +module RuboCop::Lsp; end + +# Log for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/logger.rb#16 +class RuboCop::Lsp::Logger + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/logger.rb#17 + def log(message); end + end +end + +# Routes for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/routes.rb#18 +class RuboCop::Lsp::Routes + # @api private + # @return [Routes] a new instance of Routes + # + # source://rubocop//lib/rubocop/lsp/routes.rb#25 + def initialize(server); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#31 + def for(name); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#38 + def handle_initialize(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#61 + def handle_initialized(_request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#170 + def handle_method_missing(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#67 + def handle_shutdown(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#159 + def handle_unsupported_method(request, method = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#208 + def diagnostic(file_uri, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#178 + def extract_initialization_options_from(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#188 + def format_file(file_uri, command: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#222 + def remove_file_protocol_from(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#226 + def to_diagnostic(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#238 + def to_range(location); end + + class << self + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#19 + def handle(name, &block); end + end +end + +# Runtime for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/runtime.rb#16 +class RuboCop::Lsp::Runtime + # @api private + # @return [Runtime] a new instance of Runtime + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#19 + def initialize(config_store); end + + # This abuses the `--stdin` option of rubocop and reads the formatted text + # from the `options[:stdin]` that rubocop mutates. This depends on + # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup + # or reassign that options object. Risky business! + # + # Reassigning `options[:stdin]` is done here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 + # Printing `options[:stdin]` + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 + # Setting `parallel: true` would break this here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 + # + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#38 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def layout_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def lint_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#55 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def safe_autocorrect=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#77 + def config_only_options; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#84 + def redirect_stdout(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#92 + def run_rubocop(options, path); end +end + +# Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/server.rb#21 +class RuboCop::Lsp::Server + # @api private + # @return [Server] a new instance of Server + # + # source://rubocop//lib/rubocop/lsp/server.rb#22 + def initialize(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#56 + def configure(options); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#48 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#52 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#29 + def start; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#62 + def stop(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#44 + def write(response); end +end + +# Severity for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#7 +class RuboCop::Lsp::Severity + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/severity.rb#17 + def find_by(rubocop_severity); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#8 +RuboCop::Lsp::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Parse different formats of magic comments. +# +# @abstract parent of three different magic comment handlers +# +# source://rubocop//lib/rubocop/magic_comment.rb#7 +class RuboCop::MagicComment + # @return [MagicComment] a new instance of MagicComment + # + # source://rubocop//lib/rubocop/magic_comment.rb#32 + def initialize(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#36 + def any?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#104 + def encoding_specified?; end + + # Expose the `frozen_string_literal` value coerced to a boolean if possible. + # + # @return [Boolean] if value is `true` or `false` + # @return [nil] if frozen_string_literal comment isn't found + # @return [String] if comment is found but isn't true or false + # + # source://rubocop//lib/rubocop/magic_comment.rb#86 + def frozen_string_literal; end + + # Does the magic comment enable the frozen string literal feature. + # + # Test whether the frozen string literal value is `true`. Cannot + # just return `frozen_string_literal` since an invalid magic comment + # `'yes'` does not actually enable the feature + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#55 + def frozen_string_literal?; end + + # Was a magic comment for the frozen string literal found? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#70 + def frozen_string_literal_specified?; end + + # Expose the `shareable_constant_value` value coerced to a boolean if possible. + # + # @return [String] for shareable_constant_value config + # + # source://rubocop//lib/rubocop/magic_comment.rb#100 + def shareable_constant_value; end + + # Was a shareable_constant_value specified? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#77 + def shareable_constant_value_specified?; end + + # source://rubocop//lib/rubocop/magic_comment.rb#115 + def typed; end + + # Was the Sorbet `typed` sigil specified? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#111 + def typed_specified?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#43 + def valid?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#59 + def valid_literal_value?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#63 + def valid_shareable_constant_value?; end + + private + + # Match the entire comment string with a pattern and take the first capture. + # + # @param pattern [Regexp] + # @return [String] if pattern matched + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/magic_comment.rb#131 + def extract(pattern); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#121 + def specified?(value); end + + class << self + # Detect magic comment format and pass it to the appropriate wrapper. + # + # @param comment [String] + # @return [RuboCop::MagicComment] + # + # source://rubocop//lib/rubocop/magic_comment.rb#23 + def parse(comment); end + end +end + +# Parent to Vim and Emacs magic comment handling. +# +# @abstract +# +# source://rubocop//lib/rubocop/magic_comment.rb#138 +class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment + # source://rubocop//lib/rubocop/magic_comment.rb#139 + def encoding; end + + # Rewrite the comment without a given token type + # + # source://rubocop//lib/rubocop/magic_comment.rb#144 + def without(type); end + + private + + # Find a token starting with the provided keyword and extract its value. + # + # @param keyword [String] + # @return [String] extracted value if it is found + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/magic_comment.rb#159 + def match(keyword); end + + # Individual tokens composing an editor specific comment string. + # + # @return [Array<String>] + # + # source://rubocop//lib/rubocop/magic_comment.rb#174 + def tokens; end +end + +# Wrapper for Emacs style magic comments. +# +# @example Emacs style comment +# comment = RuboCop::MagicComment.parse( +# '# -*- encoding: ASCII-8BIT -*-' +# ) +# +# comment.encoding # => 'ascii-8bit' +# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html +# @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y +# +# source://rubocop//lib/rubocop/magic_comment.rb#190 +class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment + private + + # source://rubocop//lib/rubocop/magic_comment.rb#198 + def extract_frozen_string_literal; end + + # source://rubocop//lib/rubocop/magic_comment.rb#202 + def extract_shareable_constant_value; end + + # Emacs comments cannot specify Sorbet typechecking behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#207 + def extract_typed; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#192 +RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#194 +RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#191 +RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/magic_comment.rb#193 +RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#11 +RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# Wrapper for regular magic comments not bound to an editor. +# +# Simple comments can only specify one setting per comment. +# +# @example frozen string literal comments +# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') +# comment1.frozen_string_literal # => true +# comment1.encoding # => nil +# @example encoding comments +# comment2 = RuboCop::MagicComment.parse('# encoding: utf-8') +# comment2.frozen_string_literal # => nil +# comment2.encoding # => 'utf-8' +# +# source://rubocop//lib/rubocop/magic_comment.rb#262 +class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment + # Match `encoding` or `coding` + # + # source://rubocop//lib/rubocop/magic_comment.rb#263 + def encoding; end + + # Rewrite the comment without a given token type + # + # source://rubocop//lib/rubocop/magic_comment.rb#268 + def without(type); end + + private + + # Extract `frozen_string_literal`. + # + # The `frozen_string_literal` magic comment only works if it + # is the only text in the comment. + # + # Case-insensitive and dashes/underscores are acceptable. + # + # @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138 + # + # source://rubocop//lib/rubocop/magic_comment.rb#285 + def extract_frozen_string_literal; end + + # source://rubocop//lib/rubocop/magic_comment.rb#289 + def extract_shareable_constant_value; end + + # source://rubocop//lib/rubocop/magic_comment.rb#293 + def extract_typed; end +end + +# IRB's pattern for matching magic comment tokens. +# +# @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5 +# +# source://rubocop//lib/rubocop/magic_comment.rb#10 +RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp) + +# Wrapper for Vim style magic comments. +# +# @example Vim style comment +# comment = RuboCop::MagicComment.parse( +# '# vim: filetype=ruby, fileencoding=ascii-8bit' +# ) +# +# comment.encoding # => 'ascii-8bit' +# +# source://rubocop//lib/rubocop/magic_comment.rb#218 +class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment + # For some reason the fileencoding keyword only works if there + # is at least one other token included in the string. For example + # + # # works + # # vim: foo=bar, fileencoding=ascii-8bit + # + # # does nothing + # # vim: foo=bar, fileencoding=ascii-8bit + # + # source://rubocop//lib/rubocop/magic_comment.rb#234 + def encoding; end + + # Vim comments cannot specify Sorbet typechecking behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#245 + def extract_typed; end + + # Vim comments cannot specify frozen string literal behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#239 + def frozen_string_literal; end + + # Vim comments cannot specify shareable constant values behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#242 + def shareable_constant_value; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#220 +RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#223 +RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/magic_comment.rb#222 +RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#219 +RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/magic_comment.rb#221 +RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) + +# Common functionality for finding names that are similar to a given name. +# +# @api private +# +# source://rubocop//lib/rubocop/name_similarity.rb#6 +module RuboCop::NameSimilarity + private + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#9 + def find_similar_name(target_name, names); end + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#15 + def find_similar_names(target_name, names); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#9 + def find_similar_name(target_name, names); end + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#15 + def find_similar_names(target_name, names); end + end +end + +# source://rubocop//lib/rubocop/ast_aliases.rb#5 +RuboCop::NodePattern = RuboCop::AST::NodePattern + +# source://rubocop//lib/rubocop/options.rb#10 +class RuboCop::OptionArgumentError < ::StandardError; end + +# This class handles command line options. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#14 +class RuboCop::Options + # @api private + # @return [Options] a new instance of Options + # + # source://rubocop//lib/rubocop/options.rb#22 + def initialize; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#27 + def parse(command_line_args); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#228 + 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#139 + def add_autocorrection_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#204 + def add_cache_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#73 + def add_check_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#162 + def add_config_generation_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#180 + def add_cop_selection_csv_option(option, opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#240 + def add_general_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#211 + def add_lsp_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#104 + def add_output_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#252 + def add_profile_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#217 + def add_server_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#195 + 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#262 + 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#296 + 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#285 + def option(opts, *args); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#267 + def rainbow; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#301 + 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#277 + 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#497 +module RuboCop::OptionsHelp; end + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#499 +RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#498 +RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#501 +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#311 +class RuboCop::OptionsValidator + # @api private + # @return [OptionsValidator] a new instance of OptionsValidator + # + # source://rubocop//lib/rubocop/options.rb#349 + def initialize(options); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#471 + def boolean_or_empty_cache?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#437 + def disable_parallel_when_invalid_option_combo; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#463 + def display_only_fail_level_offenses_with_autocorrect?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#467 + def except_syntax?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#475 + def incompatible_options; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#450 + def invalid_arguments_for_parallel; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#458 + def only_includes_redundant_disable?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#384 + def validate_auto_gen_config; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#423 + def validate_autocorrect; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#487 + def validate_cache_enabled_for_cache_root; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#358 + def validate_compatibility; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#353 + def validate_cop_options; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#405 + def validate_display_only_correctable_and_autocorrect; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#397 + def validate_display_only_failed; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#414 + def validate_display_only_failed_and_display_only_correctable; end + + # @api private + # @raise [OptionParser::MissingArgument] + # + # source://rubocop//lib/rubocop/options.rb#479 + def validate_exclude_limit_option; 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#318 + def validate_cop_list(names); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#335 + 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#72 + def absolute?(path); end + + # Returns true for a glob + # + # source://rubocop//lib/rubocop/path_util.rb#77 + def glob?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#107 + def hidden_dir?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#90 + def hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#81 + def hidden_file_in_not_hidden_dir?(pattern, path); end + + # source://rubocop//lib/rubocop/path_util.rb#48 + def match_path?(pattern, path); end + + # Loose check to reduce memory allocations + # + # source://rubocop//lib/rubocop/path_util.rb#97 + def maybe_hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#13 + def relative_path(path, base_dir = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/path_util.rb#34 + def smart_path(path); end + + class << self + # Returns true for an absolute Unix or Windows path. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#72 + def absolute?(path); end + + # Returns true for a glob + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#77 + def glob?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#107 + def hidden_dir?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#90 + def hidden_file?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#81 + def hidden_file_in_not_hidden_dir?(pattern, path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#48 + def match_path?(pattern, path); end + + # Loose check to reduce memory allocations + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#97 + def maybe_hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#13 + def relative_path(path, base_dir = T.unsafe(nil)); end + + # Returns the value of attribute relative_paths_cache. + # + # source://rubocop//lib/rubocop/path_util.rb#7 + def relative_paths_cache; end + + # Sets the attribute relative_paths_cache + # + # @param value the value to set the attribute relative_paths_cache to. + # + # source://rubocop//lib/rubocop/path_util.rb#7 + def relative_paths_cache=(_arg0); end + + # source://rubocop//lib/rubocop/path_util.rb#34 + def smart_path(path); end + end +end + +# source://rubocop//lib/rubocop/path_util.rb#94 +RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/path_util.rb#31 +RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) + +# This module provides information on the platform that RuboCop is being run +# on. +# +# source://rubocop//lib/rubocop/platform.rb#6 +module RuboCop::Platform + class << self + # @return [Boolean] + # + # source://rubocop//lib/rubocop/platform.rb#7 + def windows?; end + end +end + +# source://rubocop//lib/rubocop/ast_aliases.rb#6 +RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource + +# Common methods and behaviors for dealing with remote config files. +# +# @api private +# +# source://rubocop//lib/rubocop/remote_config.rb#9 +class RuboCop::RemoteConfig + # @api private + # @return [RemoteConfig] a new instance of RemoteConfig + # + # source://rubocop//lib/rubocop/remote_config.rb#14 + def initialize(url, base_dir); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#19 + def file; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#32 + def inherit_from_remote(file, path); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#10 + def uri; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#95 + def cache_name_from_uri; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#78 + def cache_path; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/remote_config.rb#82 + def cache_path_exists?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/remote_config.rb#86 + def cache_path_expired?; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#101 + def cloned_url; end + + # @api private + # @yield [request] + # + # source://rubocop//lib/rubocop/remote_config.rb#53 + def generate_request(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#62 + def handle_response(response, limit, &block); end + + # @api private + # @raise [ArgumentError] + # + # source://rubocop//lib/rubocop/remote_config.rb#40 + 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#12 +class RuboCop::ResultCache + # @api private + # @return [ResultCache] a new instance of ResultCache + # + # source://rubocop//lib/rubocop/result_cache.rb#88 + def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#101 + def debug?; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#109 + def load; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#86 + def path; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#114 + def save(offenses); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#105 + def valid?; end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#147 + 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#237 + def context_checksum(team, options); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#190 + def digest(path); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#158 + def file_checksum(file, config_store); end + + # Return a hash of the options given at invocation, minus the ones that have + # no effect on which offenses and disabled line ranges are found, and thus + # don't affect caching. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#221 + def relevant_options_digest(options); end + + # The checksum of the RuboCop program running the inspection. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#175 + def rubocop_checksum; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#201 + def rubocop_extra_features; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#143 + def symlink_protection_triggered?(path); end + + # The external dependency checksums are cached per RuboCop team so that + # the checksums don't need to be recomputed for each file. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#228 + def team_checksum(team); end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#82 + def allow_symlinks_in_cache_location?(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#76 + def cache_root(config_store); end + + # Remove old files so that the cache doesn't grow too big. When the + # threshold MaxFilesInCache has been exceeded, the oldest 50% of all the + # files in the cache are removed. The reason for removing so much is that + # cleaning should be done relatively seldom, since there is a slight risk + # that some other RuboCop process was just about to read the file, when + # there's parallel execution and the cache is shared. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#29 + def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#171 + def inhibit_cleanup; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#171 + def inhibit_cleanup=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#43 + def rubocop_required_features; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#43 + def rubocop_required_features=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#171 + def source_checksum; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#171 + def source_checksum=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#66 + def remove_files(files, dirs, remove_count); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#53 + def remove_oldest_files(files, dirs, cache_root, verbose); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#49 + def requires_file_removal?(file_count, config_store); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#17 +RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#13 +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#83 + 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#196 + def add_redundant_disables(file, offenses, source); end + + # source://rubocop//lib/rubocop/runner.rb#170 + def cached_result(file, team); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#250 + 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#328 + def check_for_infinite_loop(processed_source, offenses_by_iteration); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#222 + def check_for_redundant_disables?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#423 + def considered_failure?(offense); end + + # source://rubocop//lib/rubocop/runner.rb#456 + def default_config(cop_name); end + + # source://rubocop//lib/rubocop/runner.rb#272 + def do_inspection_loop(file); end + + # source://rubocop//lib/rubocop/runner.rb#133 + def each_inspected_file(files); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#236 + def except_redundant_cop_disable_directive?; end + + # source://rubocop//lib/rubocop/runner.rb#357 + def extract_ruby_sources(processed_source); end + + # source://rubocop//lib/rubocop/runner.rb#245 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/runner.rb#174 + def file_offense_cache(file); end + + # source://rubocop//lib/rubocop/runner.rb#162 + def file_offenses(file); end + + # source://rubocop//lib/rubocop/runner.rb#240 + def file_started(file); end + + # source://rubocop//lib/rubocop/runner.rb#403 + def filter_cop_classes(cop_classes, config); end + + # source://rubocop//lib/rubocop/runner.rb#104 + def find_target_files(paths); end + + # source://rubocop//lib/rubocop/runner.rb#414 + def formatter_set; end + + # source://rubocop//lib/rubocop/runner.rb#470 + def get_processed_source(file); end + + # source://rubocop//lib/rubocop/runner.rb#342 + def inspect_file(processed_source, team = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/runner.rb#115 + def inspect_files(files); end + + # source://rubocop//lib/rubocop/runner.rb#303 + def iterate_until_no_changes(source, offenses_by_iteration); end + + # source://rubocop//lib/rubocop/runner.rb#148 + def list_files(paths); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#452 + def mark_as_safe_by_config?(config); end + + # source://rubocop//lib/rubocop/runner.rb#460 + def minimum_severity_to_fail; end + + # source://rubocop//lib/rubocop/runner.rb#364 + def mobilize_team(processed_source); end + + # source://rubocop//lib/rubocop/runner.rb#369 + def mobilized_cop_classes(config); end + + # source://rubocop//lib/rubocop/runner.rb#432 + def offenses_to_report(offenses); end + + # source://rubocop//lib/rubocop/runner.rb#152 + def process_file(file); end + + # source://rubocop//lib/rubocop/runner.rb#393 + def qualify_option_cop_names; end + + # @yield [cop] + # + # source://rubocop//lib/rubocop/runner.rb#228 + def redundant_cop_disable_directive(file); end + + # source://rubocop//lib/rubocop/runner.rb#262 + 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#492 + def standby_team(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#410 + def style_guide_cops_only?(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#444 + def supports_safe_autocorrect?(offense); end + + # @yield [team] + # + # source://rubocop//lib/rubocop/runner.rb#211 + 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#91 + 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#7 +class RuboCop::TargetFinder + # @api private + # @return [TargetFinder] a new instance of TargetFinder + # + # source://rubocop//lib/rubocop/target_finder.rb#10 + def initialize(config_store, options = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#149 + def all_cops_include; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#120 + def combined_exclude_glob_patterns(base_dir); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#176 + def configured_include?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#19 + def debug?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#23 + def fail_fast?; 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#31 + 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#83 + def find_files(base_dir, flags); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#15 + def force_exclusion?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#180 + def included_file?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#184 + def process_explicit_path(path, mode); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#153 + def ruby_executable?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#127 + def ruby_extension?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#131 + def ruby_extensions; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#172 + def ruby_file?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#138 + def ruby_filename?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#142 + def ruby_filenames; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#164 + def ruby_interpreters(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#168 + def stdin?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#112 + def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end + + # Finds all Ruby source files under the current or other supplied + # 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#56 + def target_files_in_dir(base_dir = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#69 + def to_inspect?(file, hidden_files, base_dir_config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#96 + def wanted_dir_patterns(base_dir, exclude_pattern, flags); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#201 + def order; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_finder.rb#8 +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#252 + def initialize(config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#268 + def rubocop_version_with_support; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#256 + def source; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_ruby.rb#264 + def supported?; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#260 + def version; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#238 + 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#107 +class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#108 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#141 + def bundler_lock_file_path; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#114 + def find_version; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#8 +RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) + +# If all else fails, a default version will be picked. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#226 +class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#227 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#233 + 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#148 +class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/target_ruby.rb#159 + def gem_requirement_versions(param0 = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#165 + def name; end + + # source://rubocop//lib/rubocop/target_ruby.rb#154 + def required_ruby_version(param0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#214 + def find_default_minimal_known_ruby(right_hand_side); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#171 + def find_version; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#181 + def gemspec_filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#188 + def gemspec_filepath; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#210 + def version_from_array(array); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#193 + def version_from_gemspec_file(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#198 + def version_from_right_hand_side(right_hand_side); end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#151 +RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#7 +RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#10 +RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) + +# The target ruby version may be configured in RuboCop's config. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#39 +class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#40 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#46 + def find_version; end +end + +# The target ruby version may be found in a .ruby-version file. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#53 +class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#57 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#63 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#71 + def find_version; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#67 + def pattern; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#78 + def version_file; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#54 +RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#55 +RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#242 +RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) + +# A place where information about a target ruby version is found. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#24 +class RuboCop::TargetRuby::Source + # @api private + # @return [Source] a new instance of Source + # + # source://rubocop//lib/rubocop/target_ruby.rb#27 + def initialize(config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#25 + def name; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#32 + def to_s; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#25 + def version; end +end + +# The target ruby version may be found in a .tool-versions file, in a line +# starting with `ruby`. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#86 +class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#90 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#96 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#100 + def pattern; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#87 +RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#88 +RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/ast_aliases.rb#7 +RuboCop::Token = RuboCop::AST::Token + +# This module contains a collection of useful utility methods. +# +# source://rubocop//lib/rubocop/util.rb#5 +module RuboCop::Util + class << self + # source://rubocop//lib/rubocop/util.rb#6 + def silence_warnings; end + end +end + +# source://rubocop//lib/rubocop/error.rb#10 +class RuboCop::ValidationError < ::RuboCop::Error; end + +# This module holds the RuboCop version information. +# +# source://rubocop//lib/rubocop/version.rb#5 +module RuboCop::Version + class << self + # @api private + # + # source://rubocop//lib/rubocop/version.rb#93 + def document_version; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#43 + 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#77 + def feature_version(feature); end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#98 + def server_mode; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#21 + def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end + end +end + +# source://rubocop//lib/rubocop/version.rb#12 +RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/version.rb#16 +RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/version.rb#8 +RuboCop::Version::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/version.rb#6 +RuboCop::Version::STRING = T.let(T.unsafe(nil), String) + +# A Warning exception is different from an Offense with severity 'warning' +# When a Warning is raised, this means that RuboCop was unable to perform a +# requested operation (such as inspecting or correcting a source file) due to +# user error +# For example, a configuration value in .rubocop.yml might be malformed +# +# source://rubocop//lib/rubocop/warning.rb#9 +class RuboCop::Warning < ::StandardError; end + +# Find duplicated keys from YAML. +# +# @api private +# +# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#6 +module RuboCop::YAMLDuplicationChecker + class << self + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 + def check(yaml_string, filename, &on_duplicated); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#21 + def traverse(tree, &on_duplicated); end + end +end + +# Extensions to the core String class +# +# source://rubocop//lib/rubocop/core_ext/string.rb#4 +class String + include ::Comparable + + # Checks whether a string is blank. A string is considered blank if it + # is either empty or contains only whitespace characters. + # + # @example + # ''.blank? #=> true + # @example + # ' '.blank? #=> true + # @example + # ' test'.blank? #=> false + # @return [Boolean] true is the string is blank, false otherwise + # + # source://rubocop//lib/rubocop/core_ext/string.rb#19 + def blank?; end +end diff --git a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi new file mode 100644 index 0000000000..598477e511 --- /dev/null +++ b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -0,0 +1,1317 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-progressbar` gem. +# Please instead update this file by running `bin/tapioca gem ruby-progressbar`. + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#4 +class ProgressBar + class << self + # source://ruby-progressbar//lib/ruby-progressbar.rb#9 + def create(*args); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#17 +class ProgressBar::Base + extend ::Forwardable + + # @return [Base] a new instance of Base + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#45 + def initialize(options = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def clear(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#137 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#92 + def finish; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#129 + def finished?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 + def format(other); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 + def format=(other); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#141 + def increment; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#199 + def inspect; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def log(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#102 + def pause; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 + def paused?; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def progress(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#145 + def progress=(new_progress); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#153 + def progress_mark=(mark); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def refresh(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#157 + def remainder_mark=(mark); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#114 + def reset; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#110 + def resume; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#87 + def start(options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#133 + def started?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#106 + def stop; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 + def stopped?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#161 + def title; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#165 + def title=(title); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#176 + def to_h; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#169 + def to_s(new_format = T.unsafe(nil)); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def total(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#149 + def total=(new_total); end + + protected + + # Returns the value of attribute autofinish. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autofinish; end + + # Sets the attribute autofinish + # + # @param value the value to set the attribute autofinish to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autofinish=(_arg0); end + + # Returns the value of attribute autostart. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autostart; end + + # Sets the attribute autostart + # + # @param value the value to set the attribute autostart to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autostart=(_arg0); end + + # Returns the value of attribute bar_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component; end + + # Sets the attribute bar_component + # + # @param value the value to set the attribute bar_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component=(_arg0); end + + # Returns the value of attribute finished. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def finished; end + + # Sets the attribute finished + # + # @param value the value to set the attribute finished to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def finished=(_arg0); end + + # Returns the value of attribute output. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def output=(_arg0); end + + # Returns the value of attribute percentage_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component; end + + # Sets the attribute percentage_component + # + # @param value the value to set the attribute percentage_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component=(_arg0); end + + # Returns the value of attribute progressable. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def progressable; end + + # Sets the attribute progressable + # + # @param value the value to set the attribute progressable to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def progressable=(_arg0); end + + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector=(_arg0); end + + # Returns the value of attribute rate_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component; end + + # Sets the attribute rate_component + # + # @param value the value to set the attribute rate_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component=(_arg0); end + + # Returns the value of attribute time_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component; end + + # Sets the attribute time_component + # + # @param value the value to set the attribute time_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def timer=(_arg0); end + + # Returns the value of attribute title_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component; end + + # Sets the attribute title_component + # + # @param value the value to set the attribute title_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#226 + def update_progress(*args); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#28 +ProgressBar::Base::RUNNING_AVERAGE_RATE_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#21 +ProgressBar::Base::SMOOTHING_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#2 +module ProgressBar::Calculators; end + +# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#3 +class ProgressBar::Calculators::Length + # @return [Length] a new instance of Length + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#25 + def calculate_length; end + + # Returns the value of attribute current_length. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def current_length; end + + # Sets the attribute current_length + # + # @param value the value to set the attribute current_length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def current_length=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#14 + def length; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#18 + def length_changed?; end + + # Returns the value of attribute length_override. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#4 + def length_override; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#33 + def length_override=(other); end + + # Returns the value of attribute output. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def output=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#29 + def reset_length; end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#56 + def dynamic_width; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#85 + def dynamic_width_stty; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#89 + def dynamic_width_tput; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#76 + def dynamic_width_via_io_object; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#71 + def dynamic_width_via_output_stream_object; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#81 + def dynamic_width_via_system_calls; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#43 + def terminal_width; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#93 + def unix?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#5 +module ProgressBar::Components; end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#6 +class ProgressBar::Components::Bar + # @return [Bar] a new instance of Bar + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#17 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#35 + def bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#63 + def bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#41 + def complete_bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#47 + def complete_bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#53 + def incomplete_space(length); end + + # Returns the value of attribute length. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def length=(_arg0); end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress=(_arg0); end + + # Returns the value of attribute progress_mark. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress_mark; end + + # Sets the attribute progress_mark + # + # @param value the value to set the attribute progress_mark to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress_mark=(_arg0); end + + # Returns the value of attribute remainder_mark. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def remainder_mark; end + + # Sets the attribute remainder_mark + # + # @param value the value to set the attribute remainder_mark to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def remainder_mark=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#25 + def to_s(options = T.unsafe(nil)); end + + # Returns the value of attribute upa_steps. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def upa_steps; end + + # Sets the attribute upa_steps + # + # @param value the value to set the attribute upa_steps to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def upa_steps=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#91 + def completed_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#81 + def incomplete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#71 + def integrated_percentage_complete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#77 + def standard_complete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#95 + def unknown_progress_frame; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#85 + def unknown_string; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#7 +ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#8 +ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#9 +ProgressBar::Components::Bar::DEFAULT_UPA_STEPS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#3 +class ProgressBar::Components::Percentage + # @return [Percentage] a new instance of Percentage + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#6 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#14 + def justified_percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#22 + def justified_percentage_with_precision; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#10 + def percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#18 + def percentage_with_precision; end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 + def progress=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#3 +class ProgressBar::Components::Rate + # @return [Rate] a new instance of Rate + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def progress=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#14 + def rate_of_change(format_string = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#20 + def rate_of_change_with_precision; end + + # Returns the value of attribute rate_scale. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def rate_scale; end + + # Sets the attribute rate_scale + # + # @param value the value to set the attribute rate_scale to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def rate_scale=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def timer=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#30 + def base_rate; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#34 + def elapsed_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#26 + def scaled_rate; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#6 +class ProgressBar::Components::Time + # @return [Time] a new instance of Time + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#21 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#31 + def elapsed_with_label; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#47 + def estimated_wall_clock; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#43 + def estimated_with_friendly_oob; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#27 + def estimated_with_label(out_of_bounds_time_format = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#35 + def estimated_with_no_oob; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#39 + def estimated_with_unknown_oob; end + + protected + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def progress=(_arg0); end + + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def timer=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#80 + def elapsed; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#66 + def estimated(out_of_bounds_time_format); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#94 + def estimated_seconds_remaining; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#88 + def estimated_with_elapsed_fallback(out_of_bounds_time_format); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#14 +ProgressBar::Components::Time::ELAPSED_LABEL = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#13 +ProgressBar::Components::Time::ESTIMATED_LABEL = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#12 +ProgressBar::Components::Time::NO_TIME_ELAPSED_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#11 +ProgressBar::Components::Time::OOB_FRIENDLY_TIME_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#9 +ProgressBar::Components::Time::OOB_LIMIT_IN_HOURS = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#16 +ProgressBar::Components::Time::OOB_TEXT_TO_FORMAT = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#8 +ProgressBar::Components::Time::OOB_TIME_FORMATS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#10 +ProgressBar::Components::Time::OOB_UNKNOWN_TIME_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#7 +ProgressBar::Components::Time::TIME_FORMAT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#15 +ProgressBar::Components::Time::WALL_CLOCK_FORMAT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#3 +class ProgressBar::Components::Title + # @return [Title] a new instance of Title + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute title. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 + def title; end + + # Sets the attribute title + # + # @param value the value to set the attribute title to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 + def title=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#4 +ProgressBar::Components::Title::DEFAULT_TITLE = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#2 +module ProgressBar::Format; end + +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#3 +class ProgressBar::Format::Formatter + class << self + # source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#4 + def process(format_string, max_length, bar); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#3 +class ProgressBar::Format::Molecule + # @return [Molecule] a new instance of Molecule + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#33 + def initialize(letter); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#38 + def bar_molecule?; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#46 + def full_key; end + + # Returns the value of attribute key. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def key=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#50 + def lookup_value(environment, length = T.unsafe(nil)); end + + # Returns the value of attribute method_name. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def method_name; end + + # Sets the attribute method_name + # + # @param value the value to set the attribute method_name to. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def method_name=(_arg0); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#42 + def non_bar_molecule?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#28 +ProgressBar::Format::Molecule::BAR_MOLECULES = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#4 +ProgressBar::Format::Molecule::MOLECULES = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#5 +class ProgressBar::Format::String < ::String + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#13 + def bar_molecule_placeholder_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#21 + def bar_molecules; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#9 + def displayable_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#25 + def molecules; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#17 + def non_bar_molecules; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#7 +ProgressBar::Format::String::ANSI_SGR_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#6 +ProgressBar::Format::String::MOLECULE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby-progressbar//lib/ruby-progressbar/errors/invalid_progress_error.rb#2 +class ProgressBar::InvalidProgressError < ::RuntimeError; end + +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 +class ProgressBar::Output + # @return [Output] a new instance of Output + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#10 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#37 + def clear_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#41 + def length; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#30 + def log(string); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#50 + def refresh(options = T.unsafe(nil)); end + + # Returns the value of attribute stream. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 + def stream; end + + # Sets the attribute stream + # + # @param value the value to set the attribute stream to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 + def stream=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 + def with_refresh; end + + protected + + # Returns the value of attribute bar. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def bar; end + + # Sets the attribute bar + # + # @param value the value to set the attribute bar to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def bar=(_arg0); end + + # Returns the value of attribute length_calculator. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def length_calculator; end + + # Sets the attribute length_calculator + # + # @param value the value to set the attribute length_calculator to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def length_calculator=(_arg0); end + + # Returns the value of attribute throttle. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def throttle; end + + # Sets the attribute throttle + # + # @param value the value to set the attribute throttle to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def throttle=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#66 + def print_and_flush; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#20 + def detect(options = T.unsafe(nil)); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#6 +ProgressBar::Output::DEFAULT_OUTPUT_STREAM = T.let(T.unsafe(nil), IO) + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#4 +module ProgressBar::Outputs; end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#5 +class ProgressBar::Outputs::NonTty < ::ProgressBar::Output + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#18 + def bar_update_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#8 + def clear; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#28 + def default_format; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#38 + def eol; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#14 + def last_update_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#36 + def refresh_with_format_change(*_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#32 + def resolve_format(*_arg0); end + + protected + + # Sets the attribute last_update_length + # + # @param value the value to set the attribute last_update_length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#44 + def last_update_length=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#6 +ProgressBar::Outputs::NonTty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#5 +class ProgressBar::Outputs::Tty < ::ProgressBar::Output + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#15 + def bar_update_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#10 + def clear; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#19 + def default_format; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#27 + def eol; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 + def refresh_with_format_change; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#23 + def resolve_format(other_format); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#6 +ProgressBar::Outputs::Tty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#4 +class ProgressBar::Progress + # @return [Progress] a new instance of Progress + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#104 + def absolute; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#41 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#23 + def finish; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#27 + def finished?; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#31 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#85 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#73 + def percentage_completed; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#97 + def percentage_completed_with_precision; end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#55 + def progress=(new_progress); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#51 + def reset; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#18 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute starting_position. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 + def starting_position; end + + # Sets the attribute starting_position + # + # @param value the value to set the attribute starting_position to. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 + def starting_position=(_arg0); end + + # Returns the value of attribute total. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 + def total; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#64 + def total=(new_total); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#93 + def total_with_unknown_indicator; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#89 + def unknown?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#6 +ProgressBar::Progress::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#5 +ProgressBar::Progress::DEFAULT_TOTAL = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#4 +class ProgressBar::Projector + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projector.rb#10 + def from_type(name); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#5 +ProgressBar::Projector::DEFAULT_PROJECTOR = ProgressBar::Projectors::SmoothedAverage + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#6 +ProgressBar::Projector::NAME_TO_PROJECTOR_MAP = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#2 +module ProgressBar::Projectors; end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#3 +class ProgressBar::Projectors::SmoothedAverage + # @return [SmoothedAverage] a new instance of SmoothedAverage + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#11 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#24 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#28 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#52 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#32 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#42 + def progress=(new_progress); end + + # Returns the value of attribute projection. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#9 + def projection; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#38 + def reset; end + + # Returns the value of attribute samples. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples; end + + # Sets the attribute samples + # + # @param value the value to set the attribute samples to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#19 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute strength. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength; end + + # Sets the attribute strength + # + # @param value the value to set the attribute strength to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#36 + def total=(_new_total); end + + protected + + # Sets the attribute projection + # + # @param value the value to set the attribute projection to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#62 + def projection=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#66 + def absolute; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#56 + def calculate(current_projection, new_value, rate); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#5 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#4 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_STRENGTH = T.let(T.unsafe(nil), Float) + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#2 +module ProgressBar::Refinements; end + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#3 +module ProgressBar::Refinements::Enumerator; end + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#4 +ProgressBar::Refinements::Enumerator::ARITY_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#2 +class ProgressBar::Throttle + # @return [Throttle] a new instance of Throttle + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#15 + def choke(options = T.unsafe(nil)); end + + # Returns the value of attribute rate. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def rate; end + + # Sets the attribute rate + # + # @param value the value to set the attribute rate to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def rate=(_arg0); end + + # Returns the value of attribute started_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def started_at; end + + # Sets the attribute started_at + # + # @param value the value to set the attribute started_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def started_at=(_arg0); end + + # Returns the value of attribute stopped_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def stopped_at; end + + # Sets the attribute stopped_at + # + # @param value the value to set the attribute stopped_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def stopped_at=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def timer=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/time.rb#3 +class ProgressBar::Time + # @return [Time] a new instance of Time + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#11 + def initialize(time = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#15 + def now; end + + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#19 + def unmocked_time_method; end + + protected + + # Returns the value of attribute time. + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 + def time; end + + # Sets the attribute time + # + # @param value the value to set the attribute time to. + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 + def time=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/time.rb#4 +ProgressBar::Time::TIME_MOCKING_LIBRARY_METHODS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/timer.rb#4 +class ProgressBar::Timer + # @return [Timer] a new instance of Timer + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#67 + def divide_seconds(seconds); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#57 + def elapsed_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#63 + def elapsed_whole_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#31 + def now; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#23 + def pause; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#43 + def reset; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#48 + def reset?; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#52 + def restart; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#27 + def resume; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#12 + def start; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#35 + def started?; end + + # Returns the value of attribute started_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def started_at; end + + # Sets the attribute started_at + # + # @param value the value to set the attribute started_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def started_at=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#17 + def stop; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#39 + def stopped?; end + + # Returns the value of attribute stopped_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def stopped_at; end + + # Sets the attribute stopped_at + # + # @param value the value to set the attribute stopped_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def stopped_at=(_arg0); end + + protected + + # Returns the value of attribute time. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 + def time; end + + # Sets the attribute time + # + # @param value the value to set the attribute time to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 + def time=(_arg0); end +end diff --git a/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi b/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi new file mode 100644 index 0000000000..46bfe6ee6d --- /dev/null +++ b/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby2_keywords` gem. +# Please instead update this file by running `bin/tapioca gem ruby2_keywords`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/sawyer@0.9.2.rbi b/sorbet/rbi/gems/sawyer@0.9.2.rbi new file mode 100644 index 0000000000..edb047fa6d --- /dev/null +++ b/sorbet/rbi/gems/sawyer@0.9.2.rbi @@ -0,0 +1,719 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `sawyer` gem. +# Please instead update this file by running `bin/tapioca gem sawyer`. + +# source://sawyer//lib/sawyer.rb#1 +module Sawyer; end + +# source://sawyer//lib/sawyer/agent.rb#5 +class Sawyer::Agent + # Agents handle making the requests, and passing responses to + # Sawyer::Response. + # + # endpoint - String URI of the API entry point. + # options - Hash of options. + # :allow_undefined_methods - Allow relations to call all the HTTP verbs, + # not just the ones defined. + # :faraday - Optional Faraday::Connection to use. + # :links_parser - Optional parser to parse link relations + # Defaults: Sawyer::LinkParsers::Hal.new + # :serializer - Optional serializer Class. Defaults to + # self.serializer_class. + # + # Yields the Faraday::Connection if a block is given. + # + # @return [Agent] a new instance of Agent + # @yield [@conn] + # + # source://sawyer//lib/sawyer/agent.rb#41 + def initialize(endpoint, options = T.unsafe(nil)); end + + # Returns the value of attribute allow_undefined_methods. + # + # source://sawyer//lib/sawyer/agent.rb#9 + def allow_undefined_methods; end + + # Sets the attribute allow_undefined_methods + # + # @param value the value to set the attribute allow_undefined_methods to. + # + # source://sawyer//lib/sawyer/agent.rb#9 + def allow_undefined_methods=(_arg0); end + + # @return [Boolean] + # + # source://sawyer//lib/sawyer/agent.rb#142 + def allow_undefined_methods?; end + + # Makes a request through Faraday. + # + # method - The Symbol name of an HTTP method. + # url - The String URL to access. This can be relative to the Agent's + # endpoint. + # data - The Optional Hash or Resource body to be sent. :get or :head + # requests can have no body, so this can be the options Hash + # instead. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/agent.rb#90 + def call(method, url, data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Public: Close the underlying connection. + # + # source://sawyer//lib/sawyer/agent.rb#52 + def close; end + + # Decodes a String response body to a resource. + # + # str - The String body from the response. + # + # Returns an Object resource (Hash by default). + # + # source://sawyer//lib/sawyer/agent.rb#129 + def decode_body(str); end + + # Encodes an object to a string for the API request. + # + # data - The Hash or Resource that is being sent. + # + # Returns a String. + # + # source://sawyer//lib/sawyer/agent.rb#120 + def encode_body(data); end + + # source://sawyer//lib/sawyer/agent.rb#137 + def expand_url(url, options = T.unsafe(nil)); end + + # source://sawyer//lib/sawyer/agent.rb#146 + def inspect; end + + # Returns the value of attribute links_parser. + # + # source://sawyer//lib/sawyer/agent.rb#8 + def links_parser; end + + # Sets the attribute links_parser + # + # @param value the value to set the attribute links_parser to. + # + # source://sawyer//lib/sawyer/agent.rb#8 + def links_parser=(_arg0); end + + # source://sawyer//lib/sawyer/agent.rb#155 + def marshal_dump; end + + # source://sawyer//lib/sawyer/agent.rb#159 + def marshal_load(dumped); end + + # source://sawyer//lib/sawyer/agent.rb#133 + def parse_links(data); end + + # Public: Retains a reference to the root relations of the API. + # + # Returns a Sawyer::Relation::Map. + # + # source://sawyer//lib/sawyer/agent.rb#59 + def rels; end + + # Public: Retains a reference to the root response of the API. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/agent.rb#66 + def root; end + + # Public: Hits the root of the API to get the initial actions. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/agent.rb#73 + def start; end + + # private + # + # source://sawyer//lib/sawyer/agent.rb#151 + def to_yaml_properties; end + + class << self + # source://sawyer//lib/sawyer/agent.rb#23 + def decode(data); end + + # source://sawyer//lib/sawyer/agent.rb#19 + def encode(data); end + + # source://sawyer//lib/sawyer/agent.rb#15 + def serializer; end + + # Sets the attribute serializer + # + # @param value the value to set the attribute serializer to. + # + # source://sawyer//lib/sawyer/agent.rb#12 + def serializer=(_arg0); end + end +end + +# source://sawyer//lib/sawyer/agent.rb#6 +Sawyer::Agent::NO_BODY = T.let(T.unsafe(nil), Set) + +# source://sawyer//lib/sawyer.rb#4 +class Sawyer::Error < ::StandardError; end + +# source://sawyer//lib/sawyer/link_parsers/hal.rb#2 +module Sawyer::LinkParsers; end + +# source://sawyer//lib/sawyer/link_parsers/hal.rb#4 +class Sawyer::LinkParsers::Hal + # source://sawyer//lib/sawyer/link_parsers/hal.rb#6 + def parse(data); end +end + +# source://sawyer//lib/sawyer/link_parsers/simple.rb#4 +class Sawyer::LinkParsers::Simple + # Public: Parses simple *_url style links on resources + # + # data - Hash of resource data + # + # Returns a Hash of data with separate links Hash + # + # source://sawyer//lib/sawyer/link_parsers/simple.rb#14 + def parse(data); end +end + +# source://sawyer//lib/sawyer/link_parsers/simple.rb#6 +Sawyer::LinkParsers::Simple::LINK_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://sawyer//lib/sawyer/relation.rb#2 +class Sawyer::Relation + # A Relation represents an available next action for a resource. + # + # agent - The Sawyer::Agent that made the request. + # name - The Symbol name of the relation. + # href - The String URL of the location of the next action. + # method - The Symbol HTTP method. Default: :get + # + # @return [Relation] a new instance of Relation + # + # source://sawyer//lib/sawyer/relation.rb#108 + def initialize(agent, name, href, method = T.unsafe(nil)); end + + # Returns the value of attribute agent. + # + # source://sawyer//lib/sawyer/relation.rb#56 + def agent; end + + # Returns the value of attribute available_methods. + # + # source://sawyer//lib/sawyer/relation.rb#56 + def available_methods; end + + # Public: Makes an API request with the curent Relation. + # + # data - The Optional Hash or Resource body to be sent. :get or :head + # requests can have no body, so this can be the options Hash + # instead. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Raises ArgumentError if the :method value is not in @available_methods. + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#259 + def call(data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Public: Makes an API request with the curent Relation using DELETE. + # + # data - The Optional Hash or Resource body to be sent. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#221 + def delete(data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Public: Makes an API request with the curent Relation using GET. + # + # data - The Optional Hash or Resource body to be sent. :get or :head + # requests can have no body, so this can be the options Hash + # instead. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#161 + def get(options = T.unsafe(nil)); end + + # Public: Makes an API request with the curent Relation using HEAD. + # + # data - The Optional Hash or Resource body to be sent. :get or :head + # requests can have no body, so this can be the options Hash + # instead. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#144 + def head(options = T.unsafe(nil)); end + + # source://octokit/6.1.1/lib/ext/sawyer/relation.rb#6 + def href(options = T.unsafe(nil)); end + + # Returns the value of attribute href_template. + # + # source://sawyer//lib/sawyer/relation.rb#56 + def href_template; end + + # source://sawyer//lib/sawyer/relation.rb#268 + def inspect; end + + # Returns the value of attribute method. + # + # source://sawyer//lib/sawyer/relation.rb#56 + def method; end + + # Returns the value of attribute name. + # + # source://sawyer//lib/sawyer/relation.rb#56 + def name; end + + # Public: Makes an API request with the curent Relation using OPTIONS. + # + # data - The Optional Hash or Resource body to be sent. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#236 + def options(data = T.unsafe(nil), opt = T.unsafe(nil)); end + + # Public: Makes an API request with the curent Relation using PATCH. + # + # data - The Optional Hash or Resource body to be sent. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#206 + def patch(data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Public: Makes an API request with the curent Relation using POST. + # + # data - The Optional Hash or Resource body to be sent. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#176 + def post(data = T.unsafe(nil), options = T.unsafe(nil)); end + + # Public: Makes an API request with the curent Relation using PUT. + # + # data - The Optional Hash or Resource body to be sent. + # options - Hash of option to configure the API request. + # :headers - Hash of API headers to set. + # :query - Hash of URL query params to set. + # :method - Symbol HTTP method. + # + # Returns a Sawyer::Response. + # + # source://sawyer//lib/sawyer/relation.rb#191 + def put(data = T.unsafe(nil), options = T.unsafe(nil)); end + + class << self + # Public: Builds a single Relation from the given options. These are + # usually taken from a `_links` property in a resource. + # + # agent - The Sawyer::Agent that made the request. + # name - The Symbol name of the Relation. + # options - A Hash containing the other Relation properties. + # :href - The String URL of the next action's location. + # :method - The optional String HTTP method. + # + # Returns a Relation. + # + # source://sawyer//lib/sawyer/relation.rb#93 + def from_link(agent, name, options); end + + # Public: Builds an index of Relations from the value of a `_links` + # property in a resource. :get is the default method. Any links with + # multiple specified methods will get multiple relations created. + # + # index - The Hash mapping Relation names to the Hash Relation + # options. + # rels - A Relation::Map to store the Relations. + # + # Returns a Relation::Map + # + # source://sawyer//lib/sawyer/relation.rb#71 + def from_links(agent, index, rels = T.unsafe(nil)); end + end +end + +# source://sawyer//lib/sawyer/relation.rb#3 +class Sawyer::Relation::Map + # Tracks the available next actions for a resource, and + # issues requests for them. + # + # @return [Map] a new instance of Map + # + # source://sawyer//lib/sawyer/relation.rb#6 + def initialize; end + + # Adds a Relation to the map. + # + # rel - A Relation. + # + # Returns nothing. + # + # source://sawyer//lib/sawyer/relation.rb#15 + def <<(rel); end + + # Gets the raw Relation by its name. + # + # key - The Symbol name of the Relation. + # + # Returns a Relation. + # + # source://sawyer//lib/sawyer/relation.rb#24 + def [](key); end + + # source://sawyer//lib/sawyer/relation.rb#50 + def inspect; end + + # Gets a list of the Relation names. + # + # Returns an Array of Symbols in no specific order. + # + # source://sawyer//lib/sawyer/relation.rb#38 + def keys; end + + # Gets the number of mapped Relations. + # + # Returns an Integer. + # + # source://sawyer//lib/sawyer/relation.rb#31 + def size; end + + # source://sawyer//lib/sawyer/relation.rb#42 + def to_h; end + + # source://sawyer//lib/sawyer/relation.rb#42 + def to_hash; end +end + +# source://sawyer//lib/sawyer/resource.rb#4 +class Sawyer::Resource + include ::Enumerable + extend ::Forwardable + + # Initializes a Resource with the given data. + # + # agent - The Sawyer::Agent that made the API request. + # data - Hash of key/value properties. + # + # @return [Resource] a new instance of Resource + # + # source://sawyer//lib/sawyer/resource.rb#15 + def initialize(agent, data = T.unsafe(nil)); end + + # Allow fields to be retrieved via Hash notation + # + # method - key name + # + # Returns the value from attrs if exists + # + # source://sawyer//lib/sawyer/resource.rb#57 + def [](method); end + + # Allow fields to be set via Hash notation + # + # method - key name + # value - value to set for the attr key + # + # Returns - value + # + # source://sawyer//lib/sawyer/resource.rb#69 + def []=(method, value); end + + # Returns the value of attribute _agent. + # + # source://sawyer//lib/sawyer/resource.rb#6 + def _agent; end + + # Returns the value of attribute _fields. + # + # source://sawyer//lib/sawyer/resource.rb#6 + def _fields; end + + # Returns the value of attribute _rels. + # + # source://sawyer//lib/sawyer/resource.rb#6 + def _rels; end + + # Returns the value of attribute attrs. + # + # source://sawyer//lib/sawyer/resource.rb#7 + def attrs; end + + # source://forwardable/1.3.2/forwardable.rb#229 + def dig(*args, **_arg1, &block); end + + # source://sawyer//lib/sawyer/resource.rb#127 + def each(&block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def fetch(*args, **_arg1, &block); end + + # source://sawyer//lib/sawyer/resource.rb#123 + def inspect; end + + # Checks to see if the given key is in this resource. + # + # key - A Symbol key. + # + # Returns true if the key exists, or false. + # + # @return [Boolean] + # + # source://sawyer//lib/sawyer/resource.rb#48 + def key?(key); end + + # source://sawyer//lib/sawyer/resource.rb#151 + def marshal_dump; end + + # source://sawyer//lib/sawyer/resource.rb#155 + def marshal_load(dumped); end + + # Provides access to a resource's attributes. + # + # source://sawyer//lib/sawyer/resource.rb#81 + def method_missing(method, *args); end + + # Processes an individual value of this resource. Hashes get exploded + # into another Resource, and Arrays get their values processed too. + # + # value - An Object value of a Resource's data. + # + # Returns an Object to set as the value of a Resource key. + # + # source://sawyer//lib/sawyer/resource.rb#35 + def process_value(value); end + + # source://sawyer//lib/sawyer/resource.rb#136 + def to_attrs; end + + # source://sawyer//lib/sawyer/resource.rb#136 + def to_h; end + + # source://sawyer//lib/sawyer/resource.rb#136 + def to_hash; end + + # private + # + # source://sawyer//lib/sawyer/resource.rb#132 + def to_yaml_properties; end + + class << self + # Wire up accessor methods to pull from attrs + # + # source://sawyer//lib/sawyer/resource.rb#105 + def attr_accessor(*attrs); end + end +end + +# source://sawyer//lib/sawyer/resource.rb#78 +Sawyer::Resource::ATTR_PREDICATE = T.let(T.unsafe(nil), String) + +# source://sawyer//lib/sawyer/resource.rb#77 +Sawyer::Resource::ATTR_SETTER = T.let(T.unsafe(nil), String) + +# source://sawyer//lib/sawyer/resource.rb#5 +Sawyer::Resource::SPECIAL_METHODS = T.let(T.unsafe(nil), Set) + +# source://sawyer//lib/sawyer/response.rb#2 +class Sawyer::Response + # Builds a Response after a completed request. + # + # agent - The Sawyer::Agent that is managing the API connection. + # res - A Faraday::Response. + # + # @return [Response] a new instance of Response + # + # source://sawyer//lib/sawyer/response.rb#14 + def initialize(agent, res, options = T.unsafe(nil)); end + + # Returns the value of attribute agent. + # + # source://sawyer//lib/sawyer/response.rb#3 + def agent; end + + # Returns the value of attribute body. + # + # source://sawyer//lib/sawyer/response.rb#3 + def body; end + + # source://sawyer//lib/sawyer/response.rb#25 + def data; end + + # Returns the value of attribute env. + # + # source://sawyer//lib/sawyer/response.rb#3 + def env; end + + # Returns the value of attribute headers. + # + # source://sawyer//lib/sawyer/response.rb#3 + def headers; end + + # source://sawyer//lib/sawyer/response.rb#68 + def inspect; end + + # Turns parsed contents from an API response into a Resource or + # collection of Resources. + # + # data - Either an Array or Hash parsed from JSON. + # + # Returns either a Resource or Array of Resources. + # + # source://sawyer//lib/sawyer/response.rb#38 + def process_data(data); end + + # Finds link relations from 'Link' response header + # + # Returns an array of Relations + # + # source://sawyer//lib/sawyer/response.rb#50 + def process_rels; end + + # Returns the value of attribute rels. + # + # source://sawyer//lib/sawyer/response.rb#3 + def rels; end + + # Returns the value of attribute status. + # + # source://sawyer//lib/sawyer/response.rb#3 + def status; end + + # source://sawyer//lib/sawyer/response.rb#64 + def time; end + + # source://sawyer//lib/sawyer/response.rb#60 + def timing; end +end + +# source://sawyer//lib/sawyer/serializer.rb#5 +class Sawyer::Serializer + # Public: Wraps a serialization format for Sawyer. Nested objects are + # prepared for serialization (such as changing Times to ISO 8601 Strings). + # Any serialization format that responds to #dump and #load will work. + # + # @return [Serializer] a new instance of Serializer + # + # source://sawyer//lib/sawyer/serializer.rb#39 + def initialize(format, dump_method_name = T.unsafe(nil), load_method_name = T.unsafe(nil)); end + + # Public: Decodes a String into an Object (usually a Hash or Array of + # Hashes). + # + # data - An encoded String. + # + # Returns a decoded Object. + # + # source://sawyer//lib/sawyer/serializer.rb#62 + def decode(data); end + + # source://sawyer//lib/sawyer/serializer.rb#96 + def decode_hash(hash); end + + # source://sawyer//lib/sawyer/serializer.rb#103 + def decode_hash_value(key, value); end + + # source://sawyer//lib/sawyer/serializer.rb#88 + def decode_object(data); end + + # Public: Encodes an Object (usually a Hash or Array of Hashes). + # + # data - Object to be encoded. + # + # Returns an encoded String. + # + # source://sawyer//lib/sawyer/serializer.rb#50 + def dump(data); end + + # Public: Encodes an Object (usually a Hash or Array of Hashes). + # + # data - Object to be encoded. + # + # Returns an encoded String. + # + # source://sawyer//lib/sawyer/serializer.rb#50 + def encode(data); end + + # source://sawyer//lib/sawyer/serializer.rb#77 + def encode_hash(hash); end + + # source://sawyer//lib/sawyer/serializer.rb#69 + def encode_object(data); end + + # Public: Decodes a String into an Object (usually a Hash or Array of + # Hashes). + # + # data - An encoded String. + # + # Returns a decoded Object. + # + # source://sawyer//lib/sawyer/serializer.rb#62 + def load(data); end + + # @return [Boolean] + # + # source://sawyer//lib/sawyer/serializer.rb#125 + def time_field?(key, value); end + + class << self + # source://sawyer//lib/sawyer/serializer.rb#6 + def any_json; end + + # source://sawyer//lib/sawyer/serializer.rb#18 + def json; end + + # source://sawyer//lib/sawyer/serializer.rb#30 + def message_pack; end + + # source://sawyer//lib/sawyer/serializer.rb#24 + def multi_json; end + + # source://sawyer//lib/sawyer/serializer.rb#12 + def yajl; end + end +end + +# source://sawyer//lib/sawyer.rb#2 +Sawyer::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/solargraph@0.49.0.rbi b/sorbet/rbi/gems/solargraph@0.49.0.rbi new file mode 100644 index 0000000000..d37a7d6897 --- /dev/null +++ b/sorbet/rbi/gems/solargraph@0.49.0.rbi @@ -0,0 +1,9383 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `solargraph` gem. +# Please instead update this file by running `bin/tapioca gem solargraph`. + +# source://solargraph//lib/solargraph/converters/dl.rb#1 +module ReverseMarkdown + class << self + # source://reverse_markdown/2.1.1/lib/reverse_markdown.rb#60 + def cleaner; end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown.rb#54 + def config; end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown.rb#37 + def convert(input, options = T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/converters/dl.rb#2 +module ReverseMarkdown::Converters + class << self + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#18 + def default_converter(tag_name); end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#12 + def lookup(tag_name); end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#3 + def register(tag_name, converter); end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#8 + def unregister(tag_name); end + end +end + +# source://solargraph//lib/solargraph/converters/dd.rb#3 +class ReverseMarkdown::Converters::Dd < ::ReverseMarkdown::Converters::Base + # source://solargraph//lib/solargraph/converters/dd.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/converters/dl.rb#3 +class ReverseMarkdown::Converters::Dl < ::ReverseMarkdown::Converters::Base + # source://solargraph//lib/solargraph/converters/dl.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/converters/dt.rb#3 +class ReverseMarkdown::Converters::Dt < ::ReverseMarkdown::Converters::Base + # source://solargraph//lib/solargraph/converters/dt.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/parser/rubyvm.rb#13 +class RubyVM::AbstractSyntaxTree::Node + # source://solargraph//lib/solargraph/parser/rubyvm.rb#18 + def ==(other); end + + # source://solargraph//lib/solargraph/parser/rubyvm.rb#14 + def to_sexp; end + + private + + # source://solargraph//lib/solargraph/parser/rubyvm.rb#27 + def sexp(node, depth = T.unsafe(nil)); end +end + +# Wrapper for RubyVM::AbstractSyntaxTree::Node. for return character based column +# +# source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#5 +class RubyVM::AbstractSyntaxTree::NodeWrapper < ::SimpleDelegator + # @param node [RubyVM::AbstractSyntaxTree::Node] wrapped node to return character based column + # @param code [Array<String>] source code lines for generated this node + # @return [NodeWrapper] a new instance of NodeWrapper + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#9 + def initialize(node, code); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#43 + def children; end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#24 + def class; end + + # Returns the value of attribute code. + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#6 + def code; end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#29 + def first_column; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#20 + def is_a?(type); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#36 + def last_column; end + + class << self + # source://solargraph//lib/solargraph/parser/rubyvm/node_wrapper.rb#14 + def from(node, code); end + end +end + +# The top-level namespace for the Solargraph code mapping, documentation, +# static analysis, and language server libraries. +# +# source://solargraph//lib/solargraph/version.rb#3 +module Solargraph + class << self + # A convenience method for Solargraph::Logging.logger. + # + # @return [Logger] + # + # source://solargraph//lib/solargraph.rb#53 + def logger; end + + # A helper method that runs Bundler.with_unbundled_env or falls back to + # Bundler.with_clean_env for earlier versions of Bundler. + # + # @return [void] + # + # source://solargraph//lib/solargraph.rb#61 + def with_clean_env(&block); end + end +end + +# An aggregate provider for information about workspaces, sources, gems, and +# the Ruby core. +# +# source://solargraph//lib/solargraph/api_map.rb#13 +class Solargraph::ApiMap + include ::Solargraph::ApiMap::SourceToYard + + # @param pins [Array<Solargraph::Pin::Base>] + # @return [ApiMap] a new instance of ApiMap + # + # source://solargraph//lib/solargraph/api_map.rb#30 + def initialize(pins: T.unsafe(nil)); end + + # True if the specified file was included in a bundle, i.e., it's either + # included in a workspace or open in a library. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#451 + def bundled?(filename); end + + # Catalog a bench. + # + # @param bench [Bench] + # + # source://solargraph//lib/solargraph/api_map.rb#62 + def catalog(bench); end + + # @param cursor [Source::Cursor] + # @raise [FileNotFoundError] if the cursor's file is not in the ApiMap + # @return [SourceMap::Clip] + # + # source://solargraph//lib/solargraph/api_map.rb#419 + def clip(cursor); end + + # Get a clip by filename and position. + # + # @param filename [String] + # @param position [Position, Array(Integer, Integer)] + # @return [SourceMap::Clip] + # + # source://solargraph//lib/solargraph/api_map.rb#121 + def clip_at(filename, position); end + + # source://solargraph//lib/solargraph/api_map.rb#84 + def core_pins; end + + # @param filename [String] + # @param position [Position, Array(Integer, Integer)] + # @raise [FileNotFoundError] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/api_map.rb#110 + def cursor_at(filename, position); end + + # Get YARD documentation for the specified path. + # + # @example + # api_map.document('String#split') + # @param path [String] The path to find + # @return [Array<YARD::CodeObjects::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#391 + def document(path); end + + # Get an array of document symbols from a file. + # + # @param filename [String] + # @return [Array<Pin::Symbol>] + # + # source://solargraph//lib/solargraph/api_map.rb#428 + def document_symbols(filename); end + + # Get an array of class variable pins for a namespace. + # + # @param namespace [String] A fully qualified namespace + # @return [Array<Solargraph::Pin::ClassVariable>] + # + # source://solargraph//lib/solargraph/api_map.rb#244 + def get_class_variable_pins(namespace); end + + # Get an array of method pins for a complex type. + # + # The type's namespace and the context should be fully qualified. If the + # context matches the namespace type or is a subclass of the type, + # protected methods are included in the results. If protected methods are + # included and internal is true, private methods are also included. + # + # @example + # api_map = Solargraph::ApiMap.new + # type = Solargraph::ComplexType.parse('String') + # api_map.get_complex_type_methods(type) + # @param complex_type [Solargraph::ComplexType] The complex type of the namespace + # @param context [String] The context from which the type is referenced + # @param internal [Boolean] True to include private methods + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#305 + def get_complex_type_methods(complex_type, context = T.unsafe(nil), internal = T.unsafe(nil)); end + + # Get suggestions for constants in the specified namespace. The result + # may contain both constant and namespace pins. + # + # @param namespace [String] The namespace + # @param contexts [Array<String>] The contexts + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#185 + def get_constants(namespace, *contexts); end + + # @return [Array<Solargraph::Pin::GlobalVariable>] + # + # source://solargraph//lib/solargraph/api_map.rb#254 + def get_global_variable_pins; end + + # Get an array of instance variable pins defined in specified namespace + # and scope. + # + # @param namespace [String] A fully qualified namespace + # @param scope [Symbol] :instance or :class + # @return [Array<Solargraph::Pin::InstanceVariable>] + # + # source://solargraph//lib/solargraph/api_map.rb#227 + def get_instance_variable_pins(namespace, scope = T.unsafe(nil)); end + + # Get a stack of method pins for a method name in a namespace. The order + # of the pins corresponds to the ancestry chain, with highest precedence + # first. + # + # @example + # api_map.get_method_stack('Subclass', 'method_name') + # #=> [ <Subclass#method_name pin>, <Superclass#method_name pin> ] + # @param fqns [String] + # @param name [String] + # @param scope [Symbol] :instance or :class + # @return [Array<Solargraph::Pin::Method>] + # + # source://solargraph//lib/solargraph/api_map.rb#342 + def get_method_stack(fqns, name, scope: T.unsafe(nil)); end + + # Get an array of methods available in a particular context. + # + # @param fqns [String] The fully qualified namespace to search for methods + # @param scope [Symbol] :class or :instance + # @param visibility [Array<Symbol>] :public, :protected, and/or :private + # @param deep [Boolean] True to include superclasses, mixins, etc. + # @return [Array<Solargraph::Pin::Method>] + # + # source://solargraph//lib/solargraph/api_map.rb#265 + def get_methods(fqns, scope: T.unsafe(nil), visibility: T.unsafe(nil), deep: T.unsafe(nil)); end + + # Get an array of pins that match the specified path. + # + # @param path [String] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#361 + def get_path_pins(path); end + + # Get an array of all suggestions that match the specified path. + # + # @deprecated Use #get_path_pins instead. + # @param path [String] The path to find + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#352 + def get_path_suggestions(path); end + + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#249 + def get_symbols; end + + # @return [Environ] + # + # source://solargraph//lib/solargraph/api_map.rb#103 + def implicit; end + + # @param pins [Array<Pin::Base>] + # @return [self] + # + # source://solargraph//lib/solargraph/api_map.rb#39 + def index(pins); end + + # An array of pins based on Ruby keywords (`if`, `end`, etc.). + # + # @return [Enumerable<Solargraph::Pin::Keyword>] + # + # source://solargraph//lib/solargraph/api_map.rb#159 + def keyword_pins; end + + # @param location [Solargraph::Location] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#411 + def locate_pins(location); end + + # Map a single source. + # + # @param source [Source] + # @return [self] + # + # source://solargraph//lib/solargraph/api_map.rb#53 + def map(source); end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map.rb#27 + def missing_docs; end + + # @param name [String] + # @return [YARD::Tags::MacroDirective, nil] + # + # source://solargraph//lib/solargraph/api_map.rb#94 + def named_macro(name); end + + # True if the namespace exists. + # + # @param name [String] The namespace to match + # @param context [String] The context to search + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#175 + def namespace_exists?(name, context = T.unsafe(nil)); end + + # An array of namespace names defined in the ApiMap. + # + # @return [Set<String>] + # + # source://solargraph//lib/solargraph/api_map.rb#166 + def namespaces; end + + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#141 + def pins; end + + # Get a fully qualified namespace name. This method will start the search + # in the specified context until it finds a match for the name. + # + # @param namespace [String, nil] The namespace to match + # @param context [String] The context to search + # @return [String, nil] + # + # source://solargraph//lib/solargraph/api_map.rb#208 + def qualify(namespace, context = T.unsafe(nil)); end + + # Get an array of all symbols in the workspace that match the query. + # + # @param query [String] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#402 + def query_symbols(query); end + + # source://solargraph//lib/solargraph/api_map.rb#145 + def rebindable_method_names; end + + # source://solargraph//lib/solargraph/api_map.rb#98 + def required; end + + # Get a list of documented paths that match the query. + # + # @example + # api_map.query('str') # Results will include `String` and `Struct` + # @param query [String] The text to match + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map.rb#372 + def search(query); end + + # Get a source map by filename. + # + # @param filename [String] + # @raise [FileNotFoundError] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/api_map.rb#442 + def source_map(filename); end + + # @return [Array<SourceMap>] + # + # source://solargraph//lib/solargraph/api_map.rb#434 + def source_maps; end + + # Check if a class is a superclass of another class. + # + # @param sup [String] The superclass + # @param sub [String] The subclass + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#460 + def super_and_sub?(sup, sub); end + + # Check if the host class includes the specified module. + # + # @param host [String] The class + # @param mod [String] The module + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#477 + def type_include?(host, mod); end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map.rb#22 + def unresolved_requires; end + + # source://solargraph//lib/solargraph/api_map.rb#88 + def yard_map; end + + private + + # @return [Solargraph::ApiMap::Cache] + # + # source://solargraph//lib/solargraph/api_map.rb#502 + def cache; end + + # Get the namespace's type (Class or Module). + # + # @param fqns [String] A fully qualified namespace + # @return [Symbol, nil] :class, :module, or nil + # + # source://solargraph//lib/solargraph/api_map.rb#645 + def get_namespace_type(fqns); end + + # @param fqns [String] + # @param visibility [Array<Symbol>] + # @param skip [Set<String>] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#561 + def inner_get_constants(fqns, visibility, skip); end + + # @param fqns [String] A fully qualified namespace + # @param scope [Symbol] :class or :instance + # @param visibility [Array<Symbol>] :public, :protected, and/or :private + # @param deep [Boolean] + # @param skip [Set<String>] + # @param no_core [Boolean] Skip core classes if true + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#511 + def inner_get_methods(fqns, scope, visibility, deep, skip, no_core = T.unsafe(nil)); end + + # @param name [String] + # @param root [String] + # @param skip [Set<String>] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/api_map.rb#605 + def inner_qualify(name, root, skip); end + + # @param library [String] + # @return [RbsMap] + # + # source://solargraph//lib/solargraph/api_map.rb#490 + def load_rbs_map(library); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map.rb#581 + def path_macros; end + + # Sort an array of pins to put nil or undefined variables last. + # + # @param pins [Array<Solargraph::Pin::Base>] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#657 + def prefer_non_nil_variables(pins); end + + # @param namespace [String] + # @param context [String] + # @return [String] + # + # source://solargraph//lib/solargraph/api_map.rb#588 + def qualify_lower(namespace, context); end + + # source://solargraph//lib/solargraph/api_map.rb#592 + def qualify_superclass(fqsub); end + + # @param pin [Pin::MethodAlias, Pin::Base] + # @return [Pin::Method] + # + # source://solargraph//lib/solargraph/api_map.rb#685 + def resolve_method_alias(pin); end + + # @param pins [Array<Pin::Base>] + # @param visibility [Array<Symbol>] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map.rb#673 + def resolve_method_aliases(pins, visibility = T.unsafe(nil)); end + + # A hash of source maps with filename keys. + # + # @return [Hash{String => SourceMap}] + # + # source://solargraph//lib/solargraph/api_map.rb#486 + def source_map_hash; end + + # @return [ApiMap::Store] + # + # source://solargraph//lib/solargraph/api_map.rb#497 + def store; end + + class << self + # Create an ApiMap with a workspace in the specified directory. + # + # @param directory [String] + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/api_map.rb#130 + def load(directory); end + end +end + +# source://solargraph//lib/solargraph/api_map/bundler_methods.rb#6 +module Solargraph::ApiMap::BundlerMethods + private + + # @param directory [String] + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/bundler_methods.rb#11 + def require_from_bundle(directory); end + + class << self + # @param directory [String] + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/bundler_methods.rb#11 + def require_from_bundle(directory); end + end +end + +# source://solargraph//lib/solargraph/api_map/cache.rb#5 +class Solargraph::ApiMap::Cache + # @return [Cache] a new instance of Cache + # + # source://solargraph//lib/solargraph/api_map/cache.rb#6 + def initialize; end + + # @return [void] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#54 + def clear; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#62 + def empty?; end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#23 + def get_constants(namespace, context); end + + # @return [Array<Pin::Method>] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#14 + def get_methods(fqns, scope, visibility, deep); end + + # @return [String] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#32 + def get_qualified_namespace(name, context); end + + # @return [Pin::Method] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#45 + def get_receiver_definition(path); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#40 + def receiver_defined?(path); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#27 + def set_constants(namespace, context, value); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#18 + def set_methods(fqns, scope, visibility, deep, value); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#36 + def set_qualified_namespace(name, context, value); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#49 + def set_receiver_definition(path, pin); end +end + +# source://solargraph//lib/solargraph/api_map/source_to_yard.rb#5 +module Solargraph::ApiMap::SourceToYard + # Get the YARD CodeObject at the specified path. + # + # @param path [String] + # @return [YARD::CodeObjects::Base] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#11 + def code_object_at(path); end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#16 + def code_object_paths; end + + # @param store [ApiMap::Store] ApiMap pin store + # @return [void] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#22 + def rake_yard(store); end + + private + + # @return [Hash{String => YARD::CodeObjects::Base}] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#71 + def code_object_map; end + + # @return [YARD::CodeObjects::RootObject] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#76 + def root_code_object; end +end + +# source://solargraph//lib/solargraph/api_map/store.rb#7 +class Solargraph::ApiMap::Store + # @param pins [Enumerable<Solargraph::Pin::Base>] + # @return [Store] a new instance of Store + # + # source://solargraph//lib/solargraph/api_map/store.rb#12 + def initialize(pins = T.unsafe(nil)); end + + # @return [Enumerable<Pin::Block>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#135 + def block_pins; end + + # @param fqns [String] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#112 + def domains(fqns); end + + # @param fqns [String] + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#80 + def get_class_variables(fqns); end + + # @param fqns [String] + # @param visibility [Array<Symbol>] + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#20 + def get_constants(fqns, visibility = T.unsafe(nil)); end + + # @param fqns [String] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#59 + def get_extends(fqns); end + + # @param fqns [String] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#47 + def get_includes(fqns); end + + # @param fqns [String] + # @param scope [Symbol] :class or :instance + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#72 + def get_instance_variables(fqns, scope = T.unsafe(nil)); end + + # @param fqns [String] + # @param scope [Symbol] + # @param visibility [Array<Symbol>] + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#30 + def get_methods(fqns, scope: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # @param path [String] + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#65 + def get_path_pins(path); end + + # @param fqns [String] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#53 + def get_prepends(fqns); end + + # @param fqns [String] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/api_map/store.rb#38 + def get_superclass(fqns); end + + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#85 + def get_symbols; end + + # source://solargraph//lib/solargraph/api_map/store.rb#139 + def inspect; end + + # @return [Enumerable<Solargraph::Pin::Method>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#106 + def method_pins; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/store.rb#121 + def named_macros; end + + # @param fqns [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map/store.rb#91 + def namespace_exists?(fqns); end + + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#101 + def namespace_pins; end + + # @return [Set<String>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#96 + def namespaces; end + + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#9 + def pins; end + + # @param klass [Class] + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#146 + def pins_by_class(klass); end + + private + + # source://solargraph//lib/solargraph/api_map/store.rb#206 + def all_instance_variables; end + + # source://solargraph//lib/solargraph/api_map/store.rb#191 + def extend_references; end + + # @param fqns [String] + # @return [Array<Solargraph::Pin::Namespace>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#154 + def fqns_pins(fqns); end + + # source://solargraph//lib/solargraph/api_map/store.rb#167 + def fqns_pins_map; end + + # source://solargraph//lib/solargraph/api_map/store.rb#183 + def include_references; end + + # @return [void] + # + # source://solargraph//lib/solargraph/api_map/store.rb#215 + def index; end + + # @param name [String] + # @return [Enumerable<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#197 + def namespace_children(name); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/store.rb#202 + def namespace_map; end + + # source://solargraph//lib/solargraph/api_map/store.rb#210 + def path_pin_hash; end + + # source://solargraph//lib/solargraph/api_map/store.rb#187 + def prepend_references; end + + # source://solargraph//lib/solargraph/api_map/store.rb#259 + def redefine_return_type(pin, tag); end + + # source://solargraph//lib/solargraph/api_map/store.rb#179 + def superclass_references; end + + # @return [Enumerable<Solargraph::Pin::Symbol>] + # + # source://solargraph//lib/solargraph/api_map/store.rb#175 + def symbols; end +end + +# A container of source maps and workspace data to be cataloged in an ApiMap. +# +# source://solargraph//lib/solargraph/bench.rb#8 +class Solargraph::Bench + # @param source_maps [Array<SourceMap>, Set<SourceMap>] + # @param workspace [Workspace] + # @param external_requires [Array<String>, Set<String>] + # @return [Bench] a new instance of Bench + # + # source://solargraph//lib/solargraph/bench.rb#21 + def initialize(source_maps: T.unsafe(nil), workspace: T.unsafe(nil), external_requires: T.unsafe(nil)); end + + # @return [Set<String>] + # + # source://solargraph//lib/solargraph/bench.rb#16 + def external_requires; end + + # @return [Set<SourceMap>] + # + # source://solargraph//lib/solargraph/bench.rb#10 + def source_maps; end + + # @return [Workspace] + # + # source://solargraph//lib/solargraph/bench.rb#13 + def workspace; end +end + +# source://solargraph//lib/solargraph.rb#17 +class Solargraph::BundleNotFoundError < ::StandardError; end + +# source://solargraph//lib/solargraph/cache.rb#4 +module Solargraph::Cache + class << self + # The base directory where cached documentation is installed. + # + # @return [String] + # + # source://solargraph//lib/solargraph/cache.rb#9 + def base_dir; end + + # source://solargraph//lib/solargraph/cache.rb#46 + def clear; end + + # @return [Array<Solargraph::Pin::Base>, nil] + # + # source://solargraph//lib/solargraph/cache.rb#25 + def load(*path); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/cache.rb#36 + def save(*path, pins); end + + # The working directory for the current Ruby and Solargraph versions. + # + # @return [String] + # + # source://solargraph//lib/solargraph/cache.rb#18 + def work_dir; end + end +end + +# A container for type data based on YARD type tags. +# +# source://solargraph//lib/solargraph/complex_type.rb#6 +class Solargraph::ComplexType + # @param types [Array<UniqueType>] + # @return [ComplexType] a new instance of ComplexType + # + # source://solargraph//lib/solargraph/complex_type.rb#14 + def initialize(types = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/complex_type.rb#63 + def [](index); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#89 + def all?(&block); end + + # source://solargraph//lib/solargraph/complex_type.rb#123 + def all_params; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#93 + def any?(&block); end + + # @return [Array] + # @yieldparam [UniqueType] + # + # source://solargraph//lib/solargraph/complex_type.rb#45 + def each(&block); end + + # @return [Enumerator<UniqueType>] + # @yieldparam [UniqueType] + # + # source://solargraph//lib/solargraph/complex_type.rb#51 + def each_unique_type(&block); end + + # source://solargraph//lib/solargraph/complex_type.rb#29 + def first; end + + # source://solargraph//lib/solargraph/complex_type.rb#59 + def length; end + + # source://solargraph//lib/solargraph/complex_type.rb#39 + def map(&block); end + + # source://solargraph//lib/solargraph/complex_type.rb#75 + def method_missing(name, *args, &block); end + + # source://solargraph//lib/solargraph/complex_type.rb#70 + def namespace; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#119 + def nullable?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#101 + def parameterized?; end + + # @param api_map [ApiMap] + # @param context [String] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/complex_type.rb#21 + def qualify(api_map, context = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/complex_type.rb#105 + def resolve_parameters(definitions, context); end + + # source://solargraph//lib/solargraph/complex_type.rb#67 + def select(&block); end + + # @param dst [String] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/complex_type.rb#112 + def self_to(dst); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#97 + def selfy?; end + + # source://solargraph//lib/solargraph/complex_type.rb#33 + def to_rbs; end + + # source://solargraph//lib/solargraph/complex_type.rb#85 + def to_s; end + + private + + # @param dst [String] + # @return [String] + # @todo This is a quick and dirty hack that forces `self` keywords + # to reference an instance of their class and never the class itself. + # This behavior may change depending on which result is expected + # from YARD conventions. See https://github.com/lsegal/yard/issues/1257 + # + # source://solargraph//lib/solargraph/complex_type.rb#135 + def reduce_class(dst); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#81 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # Parse type strings into a ComplexType. + # + # @example + # ComplexType.parse 'String', 'Foo', 'nil' #=> [String, Foo, nil] + # @note The `partial` parameter is used to indicate that the method is + # receiving a string that will be used inside another ComplexType. + # It returns arrays of ComplexTypes instead of a single cohesive one. + # Consumers should not need to use this parameter; it should only be + # used internally. + # @param *strings [Array<String>] The type definitions to parse + # @param partial [Boolean] True if the string is part of a another type + # @return [ComplexType, Array, nil] + # + # source://solargraph//lib/solargraph/complex_type.rb#158 + def parse(*strings, partial: T.unsafe(nil)); end + + # @param strings [Array<String>] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/complex_type.rb#238 + def try_parse(*strings); end + end +end + +# source://solargraph//lib/solargraph/complex_type.rb#252 +Solargraph::ComplexType::BOOLEAN = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#250 +Solargraph::ComplexType::NIL = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#249 +Solargraph::ComplexType::ROOT = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#251 +Solargraph::ComplexType::SELF = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#248 +Solargraph::ComplexType::SYMBOL = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# Methods for accessing type data. +# +# source://solargraph//lib/solargraph/complex_type/type_methods.rb#7 +module Solargraph::ComplexType::TypeMethods + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#89 + def ==(other); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#40 + def defined?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#21 + def duck_type?; end + + # @return [Enumerator<UniqueType>] + # @yieldparam [UniqueType] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#128 + def each_unique_type(&block); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#54 + def fixed_parameters?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#59 + def hash_parameters?; end + + # @return [Array<ComplexType>] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#69 + def key_types; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#49 + def list_parameters?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#9 + def name; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#74 + def namespace; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#26 + def nil_type?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#32 + def parameters?; end + + # Generate a ComplexType that fully qualifies this type's namespaces. + # + # @param api_map [ApiMap] The ApiMap that performs qualification + # @param context [String] The namespace from which to resolve names + # @return [ComplexType] The generated ComplexType + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#103 + def qualify(api_map, context = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#94 + def rooted?; end + + # @return [Symbol] :class or :instance + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#84 + def scope; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#12 + def substring; end + + # @return [Array<ComplexType>] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#18 + def subtypes; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#15 + def tag; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#44 + def undefined?; end + + # @return [Array<ComplexType>] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#64 + def value_types; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#36 + def void?; end +end + +# source://solargraph//lib/solargraph/complex_type.rb#247 +Solargraph::ComplexType::UNDEFINED = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# An individual type signature. A complex type can consist of multiple +# unique types. +# +# source://solargraph//lib/solargraph/complex_type/unique_type.rb#8 +class Solargraph::ComplexType::UniqueType + include ::Solargraph::ComplexType::TypeMethods + + # Create a UniqueType with the specified name and an optional substring. + # The substring is the parameter section of a parametrized type, e.g., + # for the type `Array<String>`, the name is `Array` and the substring is + # `<String>`. + # + # @param name [String] The name of the type + # @param substring [String] The substring of the type + # @return [UniqueType] a new instance of UniqueType + # + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#20 + def initialize(name, substring = T.unsafe(nil)); end + + # Returns the value of attribute all_params. + # + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#11 + def all_params; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#58 + def parameterized?; end + + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#62 + def resolve_parameters(definitions, context); end + + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#106 + def self_to(dst); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#124 + def selfy?; end + + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#54 + def to_rbs; end + + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#50 + def to_s; end +end + +# source://solargraph//lib/solargraph/complex_type/unique_type.rb#129 +Solargraph::ComplexType::UniqueType::BOOLEAN = T.let(T.unsafe(nil), Solargraph::ComplexType::UniqueType) + +# source://solargraph//lib/solargraph/complex_type/unique_type.rb#128 +Solargraph::ComplexType::UniqueType::UNDEFINED = T.let(T.unsafe(nil), Solargraph::ComplexType::UniqueType) + +# source://solargraph//lib/solargraph/complex_type.rb#246 +Solargraph::ComplexType::VOID = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph.rb#15 +class Solargraph::ComplexTypeError < ::StandardError; end + +# Conventions provide a way to modify an ApiMap based on expectations about +# one of its sources. +# +# source://solargraph//lib/solargraph/convention.rb#9 +module Solargraph::Convention + class << self + # @param yard_map [YardMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention.rb#36 + def for_global(yard_map); end + + # @param source_map [SourceMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention.rb#26 + def for_local(source_map); end + + # @param convention [Class<Convention::Base>] + # @return [void] + # + # source://solargraph//lib/solargraph/convention.rb#20 + def register(convention); end + end +end + +# The base class for Conventions. +# +# A Convention provides Environs that customize ApiMaps with additional +# pins and other information. Subclasses should implement the `local` and +# `global` methods as necessary. +# +# source://solargraph//lib/solargraph/convention/base.rb#11 +class Solargraph::Convention::Base + # The Environ for a YARD map. + # Subclasses can override this method. + # + # @param yard_map [YardMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention/base.rb#28 + def global(yard_map); end + + # The Environ for a source map. + # Subclasses can override this method. + # + # @param source_map [SourceMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention/base.rb#19 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/base.rb#12 +Solargraph::Convention::Base::EMPTY_ENVIRON = T.let(T.unsafe(nil), Solargraph::Environ) + +# source://solargraph//lib/solargraph/convention/gemfile.rb#5 +class Solargraph::Convention::Gemfile < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/gemfile.rb#6 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/gemspec.rb#5 +class Solargraph::Convention::Gemspec < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/gemspec.rb#6 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/rakefile.rb#5 +class Solargraph::Convention::Rakefile < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/rakefile.rb#6 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/rspec.rb#5 +class Solargraph::Convention::Rspec < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/rspec.rb#6 + def local(source_map); end + + private + + # source://solargraph//lib/solargraph/convention/rspec.rb#22 + def extras; end +end + +# The Diagnostics library provides reporters for analyzing problems in code +# and providing the results to language server clients. +# +# source://solargraph//lib/solargraph/diagnostics.rb#7 +module Solargraph::Diagnostics + class << self + # Add a reporter with a name to identify it in .solargraph.yml files. + # + # @param name [String] The name + # @param klass [Class<Solargraph::Diagnostics::Base>] The class implementation + # @return [void] + # + # source://solargraph//lib/solargraph/diagnostics.rb#22 + def register(name, klass); end + + # Find a reporter by name. + # + # @param name [String] The name with which the reporter was registered + # @return [Class<Solargraph::Diagnostics::Base>] + # + # source://solargraph//lib/solargraph/diagnostics.rb#37 + def reporter(name); end + + # Get an array of reporter names. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/diagnostics.rb#29 + def reporters; end + + private + + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics.rb#44 + def reporter_hash; end + end +end + +# The base class for diagnostics reporters. +# +# source://solargraph//lib/solargraph/diagnostics/base.rb#7 +class Solargraph::Diagnostics::Base + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/diagnostics/base.rb#11 + def initialize(*args); end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/diagnostics/base.rb#9 + def args; end + + # Perform a diagnosis on a Source within the context of an ApiMap. + # The result is an array of hash objects that conform to the LSP's + # Diagnostic specification. + # + # Subclasses should override this method. + # + # @param source [Solargraph::Source] + # @param api_map [Solargraph::ApiMap] + # @return [Array<Hash>] + # + # source://solargraph//lib/solargraph/diagnostics/base.rb#24 + def diagnose(source, api_map); end +end + +# RequireNotFound reports required paths that could not be resolved to +# either a file in the workspace or a gem. +# +# source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#8 +class Solargraph::Diagnostics::RequireNotFound < ::Solargraph::Diagnostics::Base + # source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#9 + def diagnose(source, api_map); end + + private + + # @param path [String] + # @param location [Location] + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#31 + def docs_error(path, location); end + + # @param path [String] + # @param location [Location] + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#43 + def require_error(path, location); end +end + +# This reporter provides linting through RuboCop. +# +# source://solargraph//lib/solargraph/diagnostics/rubocop.rb#9 +class Solargraph::Diagnostics::Rubocop < ::Solargraph::Diagnostics::Base + include ::Solargraph::Diagnostics::RubocopHelpers + + # @param source [Solargraph::Source] + # @param _api_map [Solargraph::ApiMap] + # @return [Array<Hash>] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#25 + def diagnose(source, _api_map); end + + private + + # @param resp [Hash] + # @return [Array<Hash>] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#53 + def make_array(resp); end + + # @param off [Hash] + # @return [Position] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#92 + def offense_ending_position(off); end + + # @param off [Hash] + # @return [Range] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#80 + def offense_range(off); end + + # @param off [Hash] + # @return [Position] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#86 + def offense_start_position(off); end + + # Convert a RuboCop offense to an LSP diagnostic + # + # @param off [Hash] Offense received from Rubocop + # @return [Hash] LSP diagnostic + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#67 + def offense_to_diagnostic(off); end + + # Extracts the rubocop version from _args_ + # + # @return [String] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#47 + def rubocop_version; end +end + +# Conversion of RuboCop severity names to LSP constants +# +# source://solargraph//lib/solargraph/diagnostics/rubocop.rb#13 +Solargraph::Diagnostics::Rubocop::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Utility methods for the RuboCop diagnostics reporter. +# +# source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#7 +module Solargraph::Diagnostics::RubocopHelpers + private + + # RuboCop internally uses capitalized drive letters for Windows paths, + # so we need to convert the paths provided to the command. + # + # @param path [String] + # @return [String] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#48 + def fix_drive_letter(path); end + + # Generate command-line options for the specified filename and code. + # + # @param filename [String] + # @param code [String] + # @return [Array(Array<String>, Array<String>)] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#35 + def generate_options(filename, code); end + + # @return [String] + # @todo This is a smelly way to redirect output, but the RuboCop specs do + # the same thing. + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#56 + def redirect_stdout; end + + # Requires a specific version of rubocop, or the latest installed version + # if _version_ is `nil`. + # + # @param version [String, nil] + # @raise [InvalidRubocopVersionError] if _version_ is not installed + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#15 + def require_rubocop(version = T.unsafe(nil)); end + + class << self + # RuboCop internally uses capitalized drive letters for Windows paths, + # so we need to convert the paths provided to the command. + # + # @param path [String] + # @return [String] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#48 + def fix_drive_letter(path); end + + # Generate command-line options for the specified filename and code. + # + # @param filename [String] + # @param code [String] + # @return [Array(Array<String>, Array<String>)] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#35 + def generate_options(filename, code); end + + # @return [String] + # @todo This is a smelly way to redirect output, but the RuboCop specs do + # the same thing. + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#56 + def redirect_stdout; end + + # Requires a specific version of rubocop, or the latest installed version + # if _version_ is `nil`. + # + # @param version [String, nil] + # @raise [InvalidRubocopVersionError] if _version_ is not installed + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#15 + def require_rubocop(version = T.unsafe(nil)); end + end +end + +# These severity constants match the DiagnosticSeverity constants in the +# language server protocol. +# +# source://solargraph//lib/solargraph/diagnostics/severities.rb#8 +module Solargraph::Diagnostics::Severities; end + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#9 +Solargraph::Diagnostics::Severities::ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#12 +Solargraph::Diagnostics::Severities::HINT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#11 +Solargraph::Diagnostics::Severities::INFORMATION = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#10 +Solargraph::Diagnostics::Severities::WARNING = T.let(T.unsafe(nil), Integer) + +# TypeCheck reports methods with undefined return types, untagged +# parameters, and invalid param tags. +# +# source://solargraph//lib/solargraph/diagnostics/type_check.rb#8 +class Solargraph::Diagnostics::TypeCheck < ::Solargraph::Diagnostics::Base + # source://solargraph//lib/solargraph/diagnostics/type_check.rb#9 + def diagnose(source, api_map); end + + private + + # @param location [Location] + # @param source [Source] + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics/type_check.rb#31 + def extract_first_line(location, source); end + + # @param position [Solargraph::Position] + # @param source [Solargraph::Source] + # @return [Integer] + # + # source://solargraph//lib/solargraph/diagnostics/type_check.rb#48 + def last_character(position, source); end +end + +# source://solargraph//lib/solargraph/diagnostics/update_errors.rb#5 +class Solargraph::Diagnostics::UpdateErrors < ::Solargraph::Diagnostics::Base + # source://solargraph//lib/solargraph/diagnostics/update_errors.rb#6 + def diagnose(source, api_map); end + + private + + # Combine an array of ranges by their starting lines. + # + # @param code [String] + # @param ranges [Array<Range>] + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/diagnostics/update_errors.rb#26 + def combine_ranges(code, ranges); end +end + +# source://solargraph//lib/solargraph.rb#12 +class Solargraph::DiagnosticsError < ::RuntimeError; end + +# source://solargraph//lib/solargraph/documentor.rb#11 +class Solargraph::Documentor + # @return [Documentor] a new instance of Documentor + # + # source://solargraph//lib/solargraph/documentor.rb#17 + def initialize(directory, rebuild: T.unsafe(nil), out: T.unsafe(nil)); end + + # @return [Boolean] True if all specs were found and documented. + # + # source://solargraph//lib/solargraph/documentor.rb#24 + def document; end + + class << self + # @param directory [String] + # @return [Hash] + # + # source://solargraph//lib/solargraph/documentor.rb#60 + def specs_from_bundle(directory); end + end +end + +# source://solargraph//lib/solargraph/documentor.rb#12 +Solargraph::Documentor::RDOC_GEMS = T.let(T.unsafe(nil), Array) + +# A placeholder for the @!domain directive. It doesn't need to do anything +# for yardocs. It's only used for Solargraph API maps. +# +# source://solargraph//lib/yard-solargraph.rb#11 +class Solargraph::DomainDirective < ::YARD::Tags::Directive + # source://solargraph//lib/yard-solargraph.rb#12 + def call; end +end + +# A collection of additional data, such as map pins and required paths, that +# can be added to an ApiMap. +# +# Conventions are used to add Environs. +# +# source://solargraph//lib/solargraph/environ.rb#9 +class Solargraph::Environ + # @param requires [Array<String>] + # @param domains [Array<String>] + # @param pins [Array<Pin::Base>] + # @return [Environ] a new instance of Environ + # + # source://solargraph//lib/solargraph/environ.rb#22 + def initialize(requires: T.unsafe(nil), domains: T.unsafe(nil), pins: T.unsafe(nil)); end + + # @return [self] + # + # source://solargraph//lib/solargraph/environ.rb#29 + def clear; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/environ.rb#14 + def domains; end + + # @param other [Environ] + # @return [self] + # + # source://solargraph//lib/solargraph/environ.rb#38 + def merge(other); end + + # @return [Array<Pin::Reference::Override>] + # + # source://solargraph//lib/solargraph/environ.rb#17 + def pins; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/environ.rb#11 + def requires; end +end + +# source://solargraph//lib/solargraph.rb#13 +class Solargraph::FileNotFoundError < ::RuntimeError; end + +# source://solargraph//lib/solargraph.rb#11 +class Solargraph::InvalidOffsetError < ::RangeError; end + +# source://solargraph//lib/solargraph.rb#18 +class Solargraph::InvalidRubocopVersionError < ::RuntimeError; end + +# The LanguageServer namespace contains the classes and modules that compose +# concrete implementations of language servers. +# +# source://solargraph//lib/solargraph/language_server/error_codes.rb#4 +module Solargraph::LanguageServer; end + +# The CompletionItemKind constants for the language server protocol. +# +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#7 +module Solargraph::LanguageServer::CompletionItemKinds; end + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#14 +Solargraph::LanguageServer::CompletionItemKinds::CLASS = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#23 +Solargraph::LanguageServer::CompletionItemKinds::COLOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#28 +Solargraph::LanguageServer::CompletionItemKinds::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#11 +Solargraph::LanguageServer::CompletionItemKinds::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#20 +Solargraph::LanguageServer::CompletionItemKinds::ENUM = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#27 +Solargraph::LanguageServer::CompletionItemKinds::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#30 +Solargraph::LanguageServer::CompletionItemKinds::EVENT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#12 +Solargraph::LanguageServer::CompletionItemKinds::FIELD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#24 +Solargraph::LanguageServer::CompletionItemKinds::FILE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#26 +Solargraph::LanguageServer::CompletionItemKinds::FOLDER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#10 +Solargraph::LanguageServer::CompletionItemKinds::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#15 +Solargraph::LanguageServer::CompletionItemKinds::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#21 +Solargraph::LanguageServer::CompletionItemKinds::KEYWORD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#9 +Solargraph::LanguageServer::CompletionItemKinds::METHOD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#16 +Solargraph::LanguageServer::CompletionItemKinds::MODULE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#31 +Solargraph::LanguageServer::CompletionItemKinds::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#17 +Solargraph::LanguageServer::CompletionItemKinds::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#25 +Solargraph::LanguageServer::CompletionItemKinds::REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#22 +Solargraph::LanguageServer::CompletionItemKinds::SNIPPET = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#29 +Solargraph::LanguageServer::CompletionItemKinds::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#8 +Solargraph::LanguageServer::CompletionItemKinds::TEXT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#32 +Solargraph::LanguageServer::CompletionItemKinds::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#18 +Solargraph::LanguageServer::CompletionItemKinds::UNIT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#19 +Solargraph::LanguageServer::CompletionItemKinds::VALUE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#13 +Solargraph::LanguageServer::CompletionItemKinds::VARIABLE = T.let(T.unsafe(nil), Integer) + +# The ErrorCode constants for the language server protocol. +# +# source://solargraph//lib/solargraph/language_server/error_codes.rb#7 +module Solargraph::LanguageServer::ErrorCodes; end + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#12 +Solargraph::LanguageServer::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#11 +Solargraph::LanguageServer::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#9 +Solargraph::LanguageServer::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#10 +Solargraph::LanguageServer::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#8 +Solargraph::LanguageServer::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#17 +Solargraph::LanguageServer::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#14 +Solargraph::LanguageServer::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#13 +Solargraph::LanguageServer::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#15 +Solargraph::LanguageServer::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#16 +Solargraph::LanguageServer::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) + +# The language server protocol's data provider. Hosts are responsible for +# querying the library and processing messages. They also provide thread +# safety for multi-threaded transports. +# +# source://solargraph//lib/solargraph/language_server/host.rb#14 +class Solargraph::LanguageServer::Host + include ::Solargraph::LanguageServer::UriHelpers + include ::Solargraph::Logging + include ::Solargraph::LanguageServer::Host::Dispatch + include ::Observable + + # @return [Host] a new instance of Host + # + # source://solargraph//lib/solargraph/language_server/host.rb#28 + def initialize; end + + # Flag a method as available for dynamic registration. + # + # @param method [String] The method name, e.g., 'textDocument/completion' + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#431 + def allow_registration(method); end + + # True if the specified LSP method can be dynamically registered. + # + # @param method [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#439 + def can_register?(method); end + + # Cancel the method with the specified ID. + # + # @param id [Integer] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#71 + def cancel(id); end + + # True if the host received a request to cancel the method with the + # specified ID. + # + # @param id [Integer] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#80 + def cancel?(id); end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#651 + def catalog; end + + # Update a document from the parameters of a textDocument/didChange + # method. + # + # @param params [Hash] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#254 + def change(params); end + + # Delete the specified ID from the list of cancelled IDs if it exists. + # + # @param id [Integer] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#90 + def clear(id); end + + # source://solargraph//lib/solargraph/language_server/host.rb#656 + def client_capabilities; end + + # Sets the attribute client_capabilities + # + # @param value the value to set the attribute client_capabilities to. + # + # source://solargraph//lib/solargraph/language_server/host.rb#26 + def client_capabilities=(_arg0); end + + # Close the file specified by the URI. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#201 + def close(uri); end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @return [Solargraph::SourceMap::Completion] + # + # source://solargraph//lib/solargraph/language_server/host.rb#517 + def completions_at(uri, line, column); end + + # Update the configuration options with the provided hash. + # + # @param update [Hash] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#56 + def configure(update); end + + # Respond to a notification that files were created in the workspace. + # The libraries will determine whether the files should be merged; see + # Solargraph::Library#create_from_disk. + # + # @param uris [Array<String>] The URIs of the files. + # @return [Boolean] True if at least one library accepted at least one file. + # + # source://solargraph//lib/solargraph/language_server/host.rb#139 + def create(*uris); end + + # @return [Hash{String => Object}] + # + # source://solargraph//lib/solargraph/language_server/host.rb#627 + def default_configuration; end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#531 + def definitions_at(uri, line, column); end + + # Delete the specified files from the library. + # + # @param uris [Array<String>] The file uris. + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#155 + def delete(*uris); end + + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#209 + def diagnose(uri); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#574 + def document(query); end + + # @param uri [String] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#582 + def document_symbols(uri); end + + # Clear the message buffer and return the most recent data. + # + # @return [String] The most recent data or an empty string. + # + # source://solargraph//lib/solargraph/language_server/host.rb#273 + def flush; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#339 + def folders; end + + # @param uri [String] + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#646 + def folding_ranges(uri); end + + # source://solargraph//lib/solargraph/language_server/host.rb#508 + def formatter_config(uri); end + + # @return [Bool] if has pending completion request + # + # source://solargraph//lib/solargraph/language_server/host.rb#523 + def has_pending_completions?; end + + # Locate multiple pins that match a completion item. The first match is + # based on the corresponding location in a library source if available. + # Subsequent matches are based on path. + # + # @param params [Hash] A hash representation of a completion item + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#477 + def locate_pins(params); end + + # Open the specified file in the library. + # + # @param uri [String] The file uri. + # @param text [String] The contents of the file. + # @param version [Integer] A version number. + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#174 + def open(uri, text, version); end + + # True if the specified file is currently open in the library. + # + # @param uri [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#193 + def open?(uri); end + + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#184 + def open_from_disk(uri); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host.rb#63 + def options; end + + # Get a list of IDs for server requests that are waiting for responses + # from the client. + # + # @return [Array<Integer>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#622 + def pending_requests; end + + # Prepare a library for the specified directory. + # + # @param directory [String] + # @param name [String, nil] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#287 + def prepare(directory, name = T.unsafe(nil)); end + + # Prepare multiple folders. + # + # @param array [Array<Hash{String => String}>] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#310 + def prepare_folders(array); end + + # Called by adapter, to handle the request + # + # @param request [Hash] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#97 + def process(request); end + + # @param query [String] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#558 + def query_symbols(query); end + + # Queue a message to be sent to the client. + # + # @param message [String] The message to send. + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#264 + def queue(message); end + + # @param uri [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/host.rb#502 + def read_text(uri); end + + # Start processing a request from the client. After the message is + # processed, caller is responsible for sending the response. + # + # @param request [Hash] The contents of the message. + # @return [Solargraph::LanguageServer::Message::Base] The message handler. + # + # source://solargraph//lib/solargraph/language_server/host.rb#106 + def receive(request); end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @param strip [Boolean] Strip special characters from variable names + # @param only [Boolean] If true, search current file only + # @return [Array<Solargraph::Range>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#551 + def references_from(uri, line, column, strip: T.unsafe(nil), only: T.unsafe(nil)); end + + # Register the methods as capabilities with the client. + # This method will avoid duplicating registrations and ignore methods + # that were not flagged for dynamic registration by the client. + # + # @param methods [Array<String>] The methods to register + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#394 + def register_capabilities(methods); end + + # True if the specified method has been registered. + # + # @param method [String] The method name, e.g., 'textDocument/completion' + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#447 + def registered?(method); end + + # Remove a directory. + # + # @param directory [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#321 + def remove(directory); end + + # @param array [Array<Hash>] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#332 + def remove_folders(array); end + + # @param query [String] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#566 + def search(query); end + + # Send a notification to the client. + # + # @param method [String] The message method + # @param params [Hash] The method parameters + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#348 + def send_notification(method, params); end + + # Send a request to the client and execute the provided block to process + # the response. If an ID is not provided, the host will use an auto- + # incrementing integer. + # + # @param method [String] The message method + # @param params [Hash] The method parameters + # @param block [Proc] The block that processes the response + # @return [void] + # @yieldparam The [Hash] result sent by the client + # + # source://solargraph//lib/solargraph/language_server/host.rb#370 + def send_request(method, params, &block); end + + # Send a notification to the client. + # + # @param text [String] + # @param type [Integer] A MessageType constant + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#595 + def show_message(text, type = T.unsafe(nil)); end + + # Send a notification with optional responses. + # + # @param text [String] + # @param type [Integer] A MessageType constant + # @param actions [Array<String>] Response options for the client + # @param block The block that processes the response + # @return [void] + # @yieldparam The [String] action received from the client + # + # source://solargraph//lib/solargraph/language_server/host.rb#610 + def show_message_request(text, type, actions, &block); end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/language_server/host.rb#540 + def signatures_at(uri, line, column); end + + # Start asynchronous process handling. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#43 + def start; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#456 + def stop; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#467 + def stopped?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#451 + def synchronizing?; end + + # Unregister the methods with the client. + # This method will avoid duplicating unregistrations and ignore methods + # that were not flagged for dynamic registration by the client. + # + # @param methods [Array<String>] The methods to unregister + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#414 + def unregister_capabilities(methods); end + + private + + # @param library [Library] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#809 + def async_library_map(library); end + + # @return [Cataloger] + # + # source://solargraph//lib/solargraph/language_server/host.rb#673 + def cataloger; end + + # @param uri [String] + # @param change [Hash] + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host.rb#716 + def check_diff(uri, change); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#803 + def client_supports_progress?; end + + # @return [Diagnoser] + # + # source://solargraph//lib/solargraph/language_server/host.rb#668 + def diagnoser; end + + # source://solargraph//lib/solargraph/language_server/host.rb#825 + def do_async_library_map(library, uuid = T.unsafe(nil)); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host.rb#744 + def dynamic_capability_options; end + + # @param params [Hash] + # @return [Source::Updater] + # + # source://solargraph//lib/solargraph/language_server/host.rb#694 + def generate_updater(params); end + + # @return [MessageWorker] + # + # source://solargraph//lib/solargraph/language_server/host.rb#663 + def message_worker; end + + # @param path [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/host.rb#687 + def normalize_separators(path); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#799 + def prepare_rename?; end + + # A hash of client requests by ID. The host uses this to keep track of + # pending responses. + # + # @return [Hash{Integer => Hash}] + # + # source://solargraph//lib/solargraph/language_server/host.rb#681 + def requests; end +end + +# An asynchronous library cataloging handler. +# +# source://solargraph//lib/solargraph/language_server/host/cataloger.rb#8 +class Solargraph::LanguageServer::Host::Cataloger + # @return [Cataloger] a new instance of Cataloger + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#9 + def initialize(host); end + + # Start the catalog thread. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#31 + def start; end + + # Stop the catalog thread. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#17 + def stop; end + + # True if the cataloger is stopped. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#24 + def stopped?; end + + # Perform cataloging. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#45 + def tick; end + + private + + # @return [Host] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#52 + def host; end +end + +# An asynchronous diagnosis reporter. +# +# source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#8 +class Solargraph::LanguageServer::Host::Diagnoser + # @param host [Host] + # @return [Diagnoser] a new instance of Diagnoser + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#10 + def initialize(host); end + + # Schedule a file to be diagnosed. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#21 + def schedule(uri); end + + # Start the diagnosis thread. + # + # @return [self] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#42 + def start; end + + # Stop the diagnosis thread. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#28 + def stop; end + + # True is the diagnoser is stopped. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#35 + def stopped?; end + + # Perform diagnoses. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#57 + def tick; end + + private + + # @return [Host] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#79 + def host; end + + # @return [Mutex] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#82 + def mutex; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#85 + def queue; end +end + +# Methods for associating sources with libraries via URIs. +# +# source://solargraph//lib/solargraph/language_server/host/dispatch.rb#8 +module Solargraph::LanguageServer::Host::Dispatch + # Find an explicit library match for the given URI. An explicit match + # means the libary's workspace includes the file. + # + # If a matching library is found, the source corresponding to the URI + # gets attached to it. + # + # @param uri [String] + # @raise [FileNotFoundError] if the source could not be attached. + # @return [Library, nil] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#59 + def explicit_library_for(uri); end + + # @return [Library] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#105 + def generic_library; end + + # Get a generic library for the given URI and attach the corresponding + # source. + # + # @param uri [String] + # @raise [FileNotFoundError] if the source could not be attached. + # @return [Library] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#99 + def generic_library_for(uri); end + + # Find an implicit library match for the given URI. An implicit match + # means the file is located inside the library's workspace directory, + # regardless of whether the workspace is configured to include it. + # + # If a matching library is found, the source corresponding to the URI + # gets attached to it. + # + # @param uri [String] + # @raise [FileNotFoundError] if the source could not be attached. + # @return [Library, nil] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#81 + def implicit_library_for(uri); end + + # @return [Array<Library>] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#19 + def libraries; end + + # Find the best libary match for the given URI. + # + # @param uri [String] + # @return [Library] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#40 + def library_for(uri); end + + # @return [Sources] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#10 + def sources; end + + # The Sources observer callback that merges a source into the host's + # libraries when it gets updated. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#28 + def update_libraries(uri); end +end + +# A serial worker Thread to handle message. +# +# this make check pending message possible, and maybe cancelled to speedup process +# +# source://solargraph//lib/solargraph/language_server/host/message_worker.rb#9 +class Solargraph::LanguageServer::Host::MessageWorker + # @param host [Host] + # @return [MessageWorker] a new instance of MessageWorker + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#11 + def initialize(host); end + + # pending handle messages + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#19 + def messages; end + + # @param message [Hash] The message should be handle. will pass back to Host#receive + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#33 + def queue(message); end + + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#40 + def start; end + + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#27 + def stop; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#23 + def stopped?; end + + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#48 + def tick; end +end + +# A Host class for managing sources. +# +# source://solargraph//lib/solargraph/language_server/host/sources.rb#10 +class Solargraph::LanguageServer::Host::Sources + include ::Observable + include ::Solargraph::LanguageServer::UriHelpers + + # @return [Sources] a new instance of Sources + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#14 + def initialize; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#47 + def add_uri(uri); end + + # @param uri [String] + # @param updater [Source::Updater] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#97 + def async_update(uri, updater); end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#133 + def clear; end + + # Close the source with the given URI. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#121 + def close(uri); end + + # Find the source with the given URI. + # + # @param uri [String] + # @raise [FileNotFoundError] if the URI does not match an open source. + # @return [Source] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#113 + def find(uri); end + + # True if a source with given URI is currently open. + # + # @param uri [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#128 + def include?(uri); end + + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#53 + def next_uri; end + + # Open a source. + # + # @param uri [String] + # @param text [String] + # @param version [Integer] + # @return [Source] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#69 + def open(uri, text, version); end + + # source://solargraph//lib/solargraph/language_server/host/sources.rb#75 + def open_from_disk(uri); end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#25 + def start; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#59 + def stop; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#20 + def stopped?; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#34 + def tick; end + + # Update an existing source. + # + # @param uri [String] + # @param updater [Source::Updater] + # @raise [FileNotFoundError] if the URI does not match an open source. + # @return [Source] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#87 + def update(uri, updater); end + + private + + # @return [Mutex] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#145 + def mutex; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#140 + def open_source_hash; end + + # An array of source URIs that are waiting to finish synchronizing. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#150 + def queue; end +end + +# The Message namespace contains classes that implement language server +# protocol methods. +# +# source://solargraph//lib/solargraph/language_server/message.rb#10 +module Solargraph::LanguageServer::Message + class << self + # Register a method name and message for handling by the language + # server. + # + # @example + # Message.register 'initialize', Solargraph::Message::Initialize + # @param path [String] The method name + # @param message_class [Class<Message::Base>] The message class + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message.rb#34 + def register(path, message_class); end + + # @param path [String] + # @return [Class<Solargraph::LanguageServer::Message::Base>] + # + # source://solargraph//lib/solargraph/language_server/message.rb#40 + def select(path); end + + private + + # @return [Hash{String => Class<Message::Base>}] + # + # source://solargraph//lib/solargraph/language_server/message.rb#53 + def method_map; end + end +end + +# source://solargraph//lib/solargraph/language_server/message/base.rb#6 +class Solargraph::LanguageServer::Message::Base + # @param host [Solargraph::LanguageServer::Host] + # @param request [Hash] + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#30 + def initialize(host, request); end + + # @return [Hash, nil] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#26 + def error; end + + # @return [Solargraph::LanguageServer::Host] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#8 + def host; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#11 + def id; end + + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#17 + def method; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#20 + def params; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#40 + def post_initialize; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#43 + def process; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#14 + def request; end + + # @return [Hash, Array, nil] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#23 + def result; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#62 + def send_response; end + + # @param code [Integer] See Solargraph::LanguageServer::ErrorCodes + # @param message [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#54 + def set_error(code, message); end + + # @param data [Hash, Array, nil] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#47 + def set_result(data); end +end + +# source://solargraph//lib/solargraph/language_server/message/cancel_request.rb#6 +class Solargraph::LanguageServer::Message::CancelRequest < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/cancel_request.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/completion_item.rb#6 +module Solargraph::LanguageServer::Message::CompletionItem; end + +# completionItem/resolve message handler +# +# source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#9 +class Solargraph::LanguageServer::Message::CompletionItem::Resolve < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#10 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#41 + def join_docs(pins); end + + # @param text [String] + # @return [Hash{Symbol => String}] + # + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#33 + def markup_content(text); end + + # @param pins [Array<Pin::Base>] + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#19 + def merge(pins); end +end + +# source://solargraph//lib/solargraph/language_server/message/exit_notification.rb#6 +class Solargraph::LanguageServer::Message::ExitNotification < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/exit_notification.rb#7 + def process; end +end + +# Messages in the Extended module are custom to the Solargraph +# implementation of the language server. In the protocol, the method +# names should start with "$/" so clients that don't recognize them can +# ignore them, as per the LSP specification. +# +# source://solargraph//lib/solargraph/language_server/message/extended.rb#11 +module Solargraph::LanguageServer::Message::Extended; end + +# Check if a more recent version of the Solargraph gem is available. +# Notify the client when an update exists. If the `verbose` parameter +# is true, notify the client when the gem is up to date. +# +# source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#13 +class Solargraph::LanguageServer::Message::Extended::CheckGemVersion < ::Solargraph::LanguageServer::Message::Base + # @return [CheckGemVersion] a new instance of CheckGemVersion + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#24 + def initialize(host, request, current: T.unsafe(nil), available: T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#30 + def process; end + + private + + # @return [Gem::Version] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#69 + def available; end + + # @return [Gem::Version] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#66 + def current; end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#95 + def error; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#90 + def fetched?; end + + class << self + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#14 + def fetcher; end + + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#18 + def fetcher=(obj); end + end +end + +# source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#22 +Solargraph::LanguageServer::Message::Extended::CheckGemVersion::GEM_ZERO = T.let(T.unsafe(nil), Gem::Version) + +# source://solargraph//lib/solargraph/language_server/message/extended/document.rb#7 +class Solargraph::LanguageServer::Message::Extended::Document < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/document.rb#8 + def process; end +end + +# Update YARD documentation for installed gems. If the `rebuild` +# parameter is true, rebuild existing yardocs. +# +# source://solargraph//lib/solargraph/language_server/message/extended/document_gems.rb#12 +class Solargraph::LanguageServer::Message::Extended::DocumentGems < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/document_gems.rb#13 + def process; end +end + +# Update core Ruby documentation. +# +# source://solargraph//lib/solargraph/language_server/message/extended/download_core.rb#11 +class Solargraph::LanguageServer::Message::Extended::DownloadCore < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/download_core.rb#12 + def process; end +end + +# Update YARD documentation for installed gems. If the `rebuild` +# parameter is true, rebuild existing yardocs. +# +# source://solargraph//lib/solargraph/language_server/message/extended/environment.rb#10 +class Solargraph::LanguageServer::Message::Extended::Environment < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/environment.rb#11 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/extended/search.rb#7 +class Solargraph::LanguageServer::Message::Extended::Search < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/search.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/initialize.rb#6 +class Solargraph::LanguageServer::Message::Initialize < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#7 + def process; end + + private + + # @param section [String] + # @param capability [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#153 + def dynamic_registration_for?(section, capability); end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#66 + def static_code_action; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#56 + def static_completion; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#117 + def static_definitions; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#97 + def static_document_formatting; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#104 + def static_document_symbols; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#137 + def static_folding_range; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#144 + def static_highlights; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#90 + def static_hover; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#81 + def static_on_type_formatting; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#130 + def static_references; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#124 + def static_rename; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#73 + def static_signature_help; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#111 + def static_workspace_symbols; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#49 + def support_workspace_folders?; end +end + +# source://solargraph//lib/solargraph/language_server/message/initialized.rb#6 +class Solargraph::LanguageServer::Message::Initialized < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/initialized.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/method_not_found.rb#6 +class Solargraph::LanguageServer::Message::MethodNotFound < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/method_not_found.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/method_not_implemented.rb#6 +class Solargraph::LanguageServer::Message::MethodNotImplemented < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/method_not_implemented.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/shutdown.rb#6 +class Solargraph::LanguageServer::Message::Shutdown < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/shutdown.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document.rb#6 +module Solargraph::LanguageServer::Message::TextDocument; end + +# source://solargraph//lib/solargraph/language_server/message/text_document/base.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::Base < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # Returns the value of attribute filename. + # + # source://solargraph//lib/solargraph/language_server/message/text_document/base.rb#10 + def filename; end + + # source://solargraph//lib/solargraph/language_server/message/text_document/base.rb#12 + def post_initialize; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/completion.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::Completion < ::Solargraph::LanguageServer::Message::TextDocument::Base + # @param incomplete [Boolean] + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/text_document/completion.rb#49 + def empty_result(incomplete = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/completion.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::Definition < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#5 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#13 + def code_location; end + + # source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#24 + def require_location; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_change.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidChange < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_change.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_close.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidClose < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_close.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_open.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidOpen < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_open.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_save.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidSave < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_save.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/document_highlight.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::DocumentHighlight < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/document_highlight.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/document_symbol.rb#3 +class Solargraph::LanguageServer::Message::TextDocument::DocumentSymbol < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # source://solargraph//lib/solargraph/language_server/message/text_document/document_symbol.rb#6 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/folding_range.rb#9 +class Solargraph::LanguageServer::Message::TextDocument::FoldingRange < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/folding_range.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#10 +class Solargraph::LanguageServer::Message::TextDocument::Formatting < ::Solargraph::LanguageServer::Message::TextDocument::Base + include ::Solargraph::Diagnostics::RubocopHelpers + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#13 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#54 + def cli_args(file_uri, config); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#47 + def config_for(file_uri); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#81 + def cop_list(value); end + + # @param original [String] + # @param result [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#90 + def format(original, result); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#71 + def formatter_class(config); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#36 + def log_corrections(corrections); end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/hover.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::Hover < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/hover.rb#8 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/text_document/hover.rb#40 + def contents_or_nil(contents); end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/on_type_formatting.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::OnTypeFormatting < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/on_type_formatting.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/prepare_rename.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::PrepareRename < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/prepare_rename.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/references.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::References < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/references.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/rename.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::Rename < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/rename.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/signature_help.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::SignatureHelp < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/signature_help.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace.rb#6 +module Solargraph::LanguageServer::Message::Workspace; end + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_configuration.rb#4 +class Solargraph::LanguageServer::Message::Workspace::DidChangeConfiguration < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_configuration.rb#5 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_configuration.rb#14 + def register_from_options; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#4 +class Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#11 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#6 +Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles::CHANGED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#5 +Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles::CREATED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#7 +Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles::DELETED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#4 +class Solargraph::LanguageServer::Message::Workspace::DidChangeWorkspaceFolders < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#5 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#12 + def add_folders; end + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#17 + def remove_folders; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace/workspace_symbol.rb#3 +class Solargraph::LanguageServer::Message::Workspace::WorkspaceSymbol < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # source://solargraph//lib/solargraph/language_server/message/workspace/workspace_symbol.rb#6 + def process; end +end + +# The MessageType constants from the language server specification. +# +# source://solargraph//lib/solargraph/language_server/message_types.rb#7 +module Solargraph::LanguageServer::MessageTypes; end + +# source://solargraph//lib/solargraph/language_server/message_types.rb#8 +Solargraph::LanguageServer::MessageTypes::ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message_types.rb#10 +Solargraph::LanguageServer::MessageTypes::INFO = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message_types.rb#11 +Solargraph::LanguageServer::MessageTypes::LOG = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message_types.rb#9 +Solargraph::LanguageServer::MessageTypes::WARNING = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/request.rb#5 +class Solargraph::LanguageServer::Request + # @param id [Integer] + # @param &block The block that processes the client's response + # @return [Request] a new instance of Request + # + # source://solargraph//lib/solargraph/language_server/request.rb#8 + def initialize(id, &block); end + + # @param result [Object] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/request.rb#15 + def process(result); end + + # source://solargraph//lib/solargraph/language_server/request.rb#19 + def send_response; end +end + +# The SymbolKind constants for the language server protocol. +# +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#7 +module Solargraph::LanguageServer::SymbolKinds; end + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#25 +Solargraph::LanguageServer::SymbolKinds::ARRAY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#24 +Solargraph::LanguageServer::SymbolKinds::BOOLEAN = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#12 +Solargraph::LanguageServer::SymbolKinds::CLASS = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#21 +Solargraph::LanguageServer::SymbolKinds::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#16 +Solargraph::LanguageServer::SymbolKinds::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#17 +Solargraph::LanguageServer::SymbolKinds::ENUM = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#29 +Solargraph::LanguageServer::SymbolKinds::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#31 +Solargraph::LanguageServer::SymbolKinds::EVENT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#15 +Solargraph::LanguageServer::SymbolKinds::FIELD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#8 +Solargraph::LanguageServer::SymbolKinds::FILE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#19 +Solargraph::LanguageServer::SymbolKinds::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#18 +Solargraph::LanguageServer::SymbolKinds::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#27 +Solargraph::LanguageServer::SymbolKinds::KEY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#13 +Solargraph::LanguageServer::SymbolKinds::METHOD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#9 +Solargraph::LanguageServer::SymbolKinds::MODULE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#10 +Solargraph::LanguageServer::SymbolKinds::NAMESPACE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#28 +Solargraph::LanguageServer::SymbolKinds::NULL = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#23 +Solargraph::LanguageServer::SymbolKinds::NUMBER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#26 +Solargraph::LanguageServer::SymbolKinds::OBJECT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#32 +Solargraph::LanguageServer::SymbolKinds::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#11 +Solargraph::LanguageServer::SymbolKinds::PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#14 +Solargraph::LanguageServer::SymbolKinds::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#22 +Solargraph::LanguageServer::SymbolKinds::STRING = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#30 +Solargraph::LanguageServer::SymbolKinds::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#33 +Solargraph::LanguageServer::SymbolKinds::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#20 +Solargraph::LanguageServer::SymbolKinds::VARIABLE = T.let(T.unsafe(nil), Integer) + +# The Transport namespace contains concrete implementations of +# communication protocols for language servers. +# +# source://solargraph//lib/solargraph/language_server/transport.rb#8 +module Solargraph::LanguageServer::Transport; end + +# A common module for running language servers in Backport. +# +# source://solargraph//lib/solargraph/language_server/transport/adapter.rb#10 +module Solargraph::LanguageServer::Transport::Adapter + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#21 + def closing; end + + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#11 + def opening; end + + # @param data [String] + # + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#26 + def receiving(data); end + + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#30 + def update; end + + private + + # @param request [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#43 + def process(request); end + + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#47 + def shutdown; end +end + +# source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#8 +class Solargraph::LanguageServer::Transport::DataReader + # @return [DataReader] a new instance of DataReader + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#9 + def initialize; end + + # Process raw data received from the client. The data will be parsed + # into messages based on the JSON-RPC protocol. Each message will be + # passed to the block declared via set_message_handler. Incomplete data + # will be buffered and subsequent data will be appended to the buffer. + # + # @param data [String] + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#29 + def receive(data); end + + # Declare a block to be executed for each message received from the + # client. + # + # @yieldparam The [Hash] message received from the client + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#19 + def set_message_handler(&block); end + + private + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#56 + def parse_message_from_buffer; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#43 + def prepare_to_parse_message; end +end + +# Methods to handle conversions between file URIs and paths. +# +# source://solargraph//lib/solargraph/language_server/uri_helpers.rb#9 +module Solargraph::LanguageServer::UriHelpers + private + + # Decode text from a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#44 + def decode(text); end + + # Encode text to be used as a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#32 + def encode(text); end + + # Convert a file path to a URI. + # + # @param file [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#24 + def file_to_uri(file); end + + # Convert a file URI to a path. + # + # @param uri [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#16 + def uri_to_file(uri); end + + class << self + # Decode text from a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#44 + def decode(text); end + + # Encode text to be used as a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#32 + def encode(text); end + + # Convert a file path to a URI. + # + # @param file [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#24 + def file_to_uri(file); end + + # Convert a file URI to a path. + # + # @param uri [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#16 + def uri_to_file(uri); end + end +end + +# A Library handles coordination between a Workspace and an ApiMap. +# +# source://solargraph//lib/solargraph/library.rb#8 +class Solargraph::Library + include ::Solargraph::Logging + + # @param workspace [Solargraph::Workspace] + # @param name [String, nil] + # @return [Library] a new instance of Library + # + # source://solargraph//lib/solargraph/library.rb#22 + def initialize(workspace = T.unsafe(nil), name = T.unsafe(nil)); end + + # Attach a source to the library. + # + # The attached source does not need to be a part of the workspace. The + # library will include it in the ApiMap while it's attached. Only one + # source can be attached to the library at a time. + # + # @param source [Source, nil] + # @return [void] + # + # source://solargraph//lib/solargraph/library.rb#49 + def attach(source); end + + # True if the specified file is currently attached. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#67 + def attached?(filename); end + + # source://solargraph//lib/solargraph/library.rb#386 + def bench; end + + # Update the ApiMap from the library's workspace and open files. + # + # @return [void] + # + # source://solargraph//lib/solargraph/library.rb#372 + def catalog; end + + # Close a file in the library. Closing a file will make it unavailable for + # checkout although it may still exist in the workspace. + # + # @param filename [String] + # @return [void] + # + # source://solargraph//lib/solargraph/library.rb#149 + def close(filename); end + + # Get completion suggestions at the specified file and location. + # + # @param filename [String] The file to analyze + # @param line [Integer] The zero-based line number + # @param column [Integer] The zero-based column number + # @return [SourceMap::Completion] + # @todo Take a Location instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#164 + def completions_at(filename, line, column); end + + # True if the specified file is included in the workspace (but not + # necessarily open). + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#87 + def contain?(filename); end + + # Create a source to be added to the workspace. The file is ignored if it is + # neither open in the library nor included in the workspace. + # + # @param filename [String] + # @param text [String] The contents of the file + # @return [Boolean] True if the file was added to the workspace. + # + # source://solargraph//lib/solargraph/library.rb#97 + def create(filename, text); end + + # Create file sources from files on disk. A file is ignored if it is + # neither open in the library nor included in the workspace. + # + # @param filenames [Array<String>] + # @return [Boolean] True if at least one file was added to the workspace. + # + # source://solargraph//lib/solargraph/library.rb#114 + def create_from_disk(*filenames); end + + # @return [Source, nil] + # + # source://solargraph//lib/solargraph/library.rb#18 + def current; end + + # Get definition suggestions for the expression at the specified file and + # location. + # + # @param filename [String] The file to analyze + # @param line [Integer] The zero-based line number + # @param column [Integer] The zero-based column number + # @return [Array<Solargraph::Pin::Base>] + # @todo Take filename/position instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#180 + def definitions_at(filename, line, column); end + + # Delete files from the library. Deleting a file will make it unavailable + # for checkout and optionally remove it from the workspace unless the + # workspace configuration determines that it should still exist. + # + # @param filenames [Array<String>] + # @return [Boolean] True if any file was deleted + # + # source://solargraph//lib/solargraph/library.rb#132 + def delete(*filenames); end + + # Detach the specified file if it is currently attached to the library. + # + # @param filename [String] + # @return [Boolean] True if the specified file was detached + # + # source://solargraph//lib/solargraph/library.rb#76 + def detach(filename); end + + # Get diagnostics about a file. + # + # @param filename [String] + # @return [Array<Hash>] + # + # source://solargraph//lib/solargraph/library.rb#339 + def diagnose(filename); end + + # @param query [String] + # @return [Array<YARD::CodeObjects::Base>] + # + # source://solargraph//lib/solargraph/library.rb#286 + def document(query); end + + # Get an array of document symbols. + # + # Document symbols are composed of namespace, method, and constant pins. + # The results of this query are appropriate for building the response to a + # textDocument/documentSymbol message in the language server protocol. + # + # @param filename [String] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/library.rb#312 + def document_symbols(filename); end + + # source://solargraph//lib/solargraph/library.rb#466 + def external_requires; end + + # Get an array of foldable ranges for the specified file. + # + # @deprecated The library should not need to handle folding ranges. The + # source itself has all the information it needs. + # @param filename [String] + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/library.rb#401 + def folding_ranges(filename); end + + # Get an array of pins that match a path. + # + # @param path [String] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/library.rb#280 + def get_path_pins(path); end + + # source://solargraph//lib/solargraph/library.rb#28 + def inspect; end + + # Get the pins at the specified location or nil if the pin does not exist. + # + # @param location [Location] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/library.rb#257 + def locate_pins(location); end + + # source://solargraph//lib/solargraph/library.rb#261 + def locate_ref(location); end + + # source://solargraph//lib/solargraph/library.rb#454 + def map!; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#434 + def mapped?; end + + # Try to merge a source into the library's workspace. If the workspace is + # not configured to include the source, it gets ignored. + # + # @param source [Source] + # @return [Boolean] True if the source was merged into the workspace. + # + # source://solargraph//lib/solargraph/library.rb#419 + def merge(source); end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/library.rb#15 + def name; end + + # source://solargraph//lib/solargraph/library.rb#438 + def next_map; end + + # True if the specified file is currently attached. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#67 + def open?(filename); end + + # @param path [String] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/library.rb#318 + def path_pins(path); end + + # source://solargraph//lib/solargraph/library.rb#462 + def pins; end + + # Get an array of all symbols in the workspace that match the query. + # + # @param query [String] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/library.rb#300 + def query_symbols(query); end + + # Get the current text of a file in the library. + # + # @param filename [String] + # @return [String] + # + # source://solargraph//lib/solargraph/library.rb#330 + def read_text(filename); end + + # @param filename [String] + # @param line [Integer] + # @param column [Integer] + # @param strip [Boolean] Strip special characters from variable names + # @param only [Boolean] Search for references in the current file only + # @return [Array<Solargraph::Range>] + # @todo Take a Location instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#223 + def references_from(filename, line, column, strip: T.unsafe(nil), only: T.unsafe(nil)); end + + # @param query [String] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/library.rb#292 + def search(query); end + + # Get signature suggestions for the method at the specified file and + # location. + # + # @param filename [String] The file to analyze + # @param line [Integer] The zero-based line number + # @param column [Integer] The zero-based column number + # @return [Array<Solargraph::Pin::Base>] + # @todo Take filename/position instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#210 + def signatures_at(filename, line, column); end + + # source://solargraph//lib/solargraph/library.rb#430 + def source_map_hash; end + + # source://solargraph//lib/solargraph/library.rb#322 + def source_maps; end + + # True if the ApiMap is up to date with the library's workspace and open + # files. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#37 + def synchronized?; end + + # @return [Solargraph::Workspace] + # + # source://solargraph//lib/solargraph/library.rb#12 + def workspace; end + + private + + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/library.rb#495 + def api_map; end + + # source://solargraph//lib/solargraph/library.rb#378 + def catalog_inlock; end + + # @param source_map [SourceMap] + # + # source://solargraph//lib/solargraph/library.rb#477 + def find_external_requires(source_map); end + + # source://solargraph//lib/solargraph/library.rb#513 + def handle_file_not_found(filename, error); end + + # source://solargraph//lib/solargraph/library.rb#522 + def maybe_map(source); end + + # @return [Mutex] + # + # source://solargraph//lib/solargraph/library.rb#490 + def mutex; end + + # Get the source for an open file or create a new source if the file + # exists on disk. Sources created from disk are not added to the open + # workspace files, i.e., the version on disk remains the authoritative + # version. + # + # @param filename [String] + # @raise [FileNotFoundError] if the file does not exist + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/library.rb#507 + def read(filename); end + + # source://solargraph//lib/solargraph/library.rb#472 + def source_map_external_require_hash; end + + class << self + # Create a library from a directory. + # + # @param directory [String] The path to be used for the workspace + # @param name [String, nil] + # @return [Solargraph::Library] + # + # source://solargraph//lib/solargraph/library.rb#410 + def load(directory = T.unsafe(nil), name = T.unsafe(nil)); end + end +end + +# A section of text identified by its filename and range. +# +# source://solargraph//lib/solargraph/location.rb#6 +class Solargraph::Location + # @param filename [String] + # @param range [Solargraph::Range] + # @return [Location] a new instance of Location + # + # source://solargraph//lib/solargraph/location.rb#15 + def initialize(filename, range); end + + # source://solargraph//lib/solargraph/location.rb#28 + def ==(other); end + + # @return [String] + # + # source://solargraph//lib/solargraph/location.rb#8 + def filename; end + + # source://solargraph//lib/solargraph/location.rb#33 + def inspect; end + + # @return [Solargraph::Range] + # + # source://solargraph//lib/solargraph/location.rb#11 + def range; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/location.rb#21 + def to_hash; end +end + +# source://solargraph//lib/solargraph/logging.rb#6 +module Solargraph::Logging + private + + # @return [Logger] + # + # source://solargraph//lib/solargraph/logging.rb#23 + def logger; end + + class << self + # @return [Logger] + # + # source://solargraph//lib/solargraph/logging.rb#23 + def logger; end + end +end + +# source://solargraph//lib/solargraph/logging.rb#7 +Solargraph::Logging::DEFAULT_LOG_LEVEL = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/logging.rb#9 +Solargraph::Logging::LOG_LEVELS = T.let(T.unsafe(nil), Hash) + +# source://solargraph//lib/solargraph/page.rb#9 +class Solargraph::Page + # @param directory [String] + # @return [Page] a new instance of Page + # + # source://solargraph//lib/solargraph/page.rb#44 + def initialize(directory = T.unsafe(nil)); end + + # @param template [String] + # @param layout [Boolean] + # @param locals [Hash] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#68 + def render(template, layout: T.unsafe(nil), locals: T.unsafe(nil)); end + + class << self + # @param directories [Array<String>] + # @param name [String] + # @raise [FileNotFoundError] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#75 + def select_template(directories, name); end + end +end + +# source://solargraph//lib/solargraph/page.rb#12 +class Solargraph::Page::Binder < ::OpenStruct + # @param locals [Hash] + # @param render_method [Proc] + # @return [Binder] a new instance of Binder + # + # source://solargraph//lib/solargraph/page.rb#13 + def initialize(locals, render_method); end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#31 + def escape(text); end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#25 + def htmlify(text); end + + # @param code [String] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#37 + def ruby_to_html(code); end +end + +# source://solargraph//lib/solargraph/parser.rb#2 +module Solargraph::Parser + extend ::Solargraph::Parser::Rubyvm::ClassMethods + + class << self + # True if the parser can use RubyVM. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser.rb#15 + def rubyvm?; end + end +end + +# source://solargraph//lib/solargraph/parser/comment_ripper.rb#5 +class Solargraph::Parser::CommentRipper < ::Ripper::SexpBuilderPP + # @return [CommentRipper] a new instance of CommentRipper + # + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#6 + def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#12 + def on_comment(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#31 + def on_embdoc(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#24 + def on_embdoc_beg(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#38 + def on_embdoc_end(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#45 + def parse; end +end + +# source://solargraph//lib/solargraph/parser/legacy.rb#3 +module Solargraph::Parser::Legacy; end + +# source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#6 +module Solargraph::Parser::Legacy::ClassMethods + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#83 + def chain(*args); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#87 + def chain_string(*args); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#95 + def infer_literal_node_type(node); end + + # @param name [String] + # @param top [AST::Node] + # @return [Array<AST::Node>] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#74 + def inner_node_references(name, top); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#103 + def is_ast_node?(node); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#42 + def map(source); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#107 + def node_range(node); end + + # @param code [String] + # @param filename [String, nil] + # @param line [Integer] + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#24 + def parse(code, filename = T.unsafe(nil), line = T.unsafe(nil)); end + + # @param code [String] + # @param filename [String] + # @return [Array(Parser::AST::Node, Array<Parser::Source::Comment>)] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#10 + def parse_with_comments(code, filename = T.unsafe(nil)); end + + # @return [Parser::Base] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#33 + def parser; end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#91 + def process_node(*args); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#50 + def references(source, name); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#46 + def returns_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#113 + def string_ranges(node); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#99 + def version; end +end + +# A custom builder for source parsers that ignores character encoding +# issues in literal strings. +# +# source://solargraph//lib/solargraph/parser/legacy/flawed_builder.rb#9 +class Solargraph::Parser::Legacy::FlawedBuilder < ::Parser::Builders::Default + # source://solargraph//lib/solargraph/parser/legacy/flawed_builder.rb#10 + def string_value(token); end +end + +# A factory for generating chains from nodes. +# +# source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#8 +class Solargraph::Parser::Legacy::NodeChainer + include ::Solargraph::Parser::Legacy::NodeMethods + + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [NodeChainer] a new instance of NodeChainer + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#14 + def initialize(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#21 + def chain; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#142 + def block_passed?(node); end + + # @param n [Parser::AST::Node] + # @return [Array<Chain::Link>] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#48 + def generate_links(n); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#135 + def hash_is_splatted?(node); end + + class << self + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#30 + def chain(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @param code [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#36 + def load_string(code); end + end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#10 +Solargraph::Parser::Legacy::NodeChainer::Chain = Solargraph::Source::Chain + +# source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#8 +module Solargraph::Parser::Legacy::NodeMethods + private + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#133 + def any_splatted_call?(nodes); end + + # @todo Temporarily here for testing. Move to Solargraph::Parser. + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#138 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#113 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#99 + def convert_hash(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#78 + def drill_signature(node, signature); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#180 + def find_recipient_node(cursor); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#74 + def get_node_end_position(node); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#68 + def get_node_start_position(node); end + + # @param node [Parser::AST::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#39 + def infer_literal_node_type(node); end + + # @param node [Parser::AST::Node] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#19 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#214 + def repaired_find_recipient_node(cursor); end + + # Find all the nodes within the provided node that potentially return a + # value. + # + # The node parameter typically represents a method's logic, e.g., the + # second child (after the :args node) of a :def node. A simple one-line + # method would typically return itself, while a node with conditions + # would return the resulting node from each conditional branch. Nodes + # that follow a :return node are assumed to be unreachable. Nil values + # are converted to nil node types. + # + # @param node [Parser::AST::Node] + # @return [Array<Parser::AST::Node>] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#175 + def returns_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#128 + def splatted_call?(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#124 + def splatted_hash?(node); end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#13 + def unpack_name(node); end + + class << self + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#133 + def any_splatted_call?(nodes); end + + # @todo Temporarily here for testing. Move to Solargraph::Parser. + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#138 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#113 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#99 + def convert_hash(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#78 + def drill_signature(node, signature); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#180 + def find_recipient_node(cursor); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#74 + def get_node_end_position(node); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#68 + def get_node_start_position(node); end + + # @param node [Parser::AST::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#39 + def infer_literal_node_type(node); end + + # @param node [Parser::AST::Node] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#19 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#214 + def repaired_find_recipient_node(cursor); end + + # Find all the nodes within the provided node that potentially return a + # value. + # + # The node parameter typically represents a method's logic, e.g., the + # second child (after the :args node) of a :def node. A simple one-line + # method would typically return itself, while a node with conditions + # would return the resulting node from each conditional branch. Nodes + # that follow a :return node are assumed to be unreachable. Nil values + # are converted to nil node types. + # + # @param node [Parser::AST::Node] + # @return [Array<Parser::AST::Node>] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#175 + def returns_from(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#128 + def splatted_call?(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#124 + def splatted_hash?(node); end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#13 + def unpack_name(node); end + end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#220 +module Solargraph::Parser::Legacy::NodeMethods::DeepInference + class << self + # @param node [Parser::AST::Node] + # @return [Array<Parser::AST::Node>] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#228 + def get_return_nodes(node); end + + private + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#260 + def get_return_nodes_from_children(parent); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#281 + def get_return_nodes_only(parent); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#299 + def reduce_to_value_nodes(nodes); end + end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#111 +Solargraph::Parser::Legacy::NodeMethods::NIL_NODE = T.let(T.unsafe(nil), Parser::AST::Node) + +# source://solargraph//lib/solargraph/parser/legacy/node_processors.rb#8 +module Solargraph::Parser::Legacy::NodeProcessors; end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/alias_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::AliasNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/alias_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/args_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::ArgsNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/args_node.rb#8 + def process; end + + private + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/args_node.rb#28 + def get_decl(node); end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/begin_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::BeginNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/begin_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/block_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::BlockNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/block_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/block_node.rb#33 + def other_class_eval?; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/casgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::CasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/casgn_node.rb#10 + def process; end + + private + + # @return [String] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/casgn_node.rb#24 + def const_name; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::CvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/def_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::DefNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/def_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/defs_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::DefsNode < ::Solargraph::Parser::Legacy::NodeProcessors::DefNode + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/defs_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::GvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::IvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/lvasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::LvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/lvasgn_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/namespace_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::NamespaceNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/namespace_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/orasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::OrasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/orasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/resbody_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::ResbodyNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/resbody_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/sclass_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::SclassNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/sclass_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::SendNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#10 + def process; end + + private + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#230 + def process_alias_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#66 + def process_attribute; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#157 + def process_autoload; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#129 + def process_extend; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#101 + def process_include; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#165 + def process_module_function; end + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#115 + def process_prepend; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#242 + def process_private_class_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#220 + def process_private_constant; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#149 + def process_require; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#45 + def process_visibility; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/sym_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::SymNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/sym_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser.rb#24 +Solargraph::Parser::NodeMethods = Solargraph::Parser::Rubyvm::NodeMethods + +# The processor classes used by SourceMap::Mapper to generate pins from +# parser nodes. +# +# source://solargraph//lib/solargraph/parser/node_processor.rb#8 +module Solargraph::Parser::NodeProcessor + class << self + # @param node [Parser::AST::Node] + # @param region [Region] + # @param pins [Array<Pin::Base>] + # @return [Array(Array<Pin::Base>, Array<Pin::Base>)] + # + # source://solargraph//lib/solargraph/parser/node_processor.rb#28 + def process(node, region = T.unsafe(nil), pins = T.unsafe(nil), locals = T.unsafe(nil)); end + + # Register a processor for a node type. + # + # @param type [Symbol] + # @param cls [Class<NodeProcessor::Base>] + # @return [Class<NodeProcessor::Base>] + # + # source://solargraph//lib/solargraph/parser/node_processor.rb#19 + def register(type, cls); end + end +end + +# source://solargraph//lib/solargraph/parser/node_processor/base.rb#6 +class Solargraph::Parser::NodeProcessor::Base + # @param node [Parser::AST::Node] + # @param region [Region] + # @param pins [Array<Pin::Base>] + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#22 + def initialize(node, region, pins, locals); end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#17 + def locals; end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#8 + def node; end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#14 + def pins; end + + # Subclasses should override this method to generate new pins. + # + # @return [void] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#33 + def process; end + + # @return [Region] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#11 + def region; end + + private + + # @todo Candidate for deprecation + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#66 + def block_pin(position); end + + # @todo Candidate for deprecation + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#71 + def closure_pin(position); end + + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#57 + def comments_for(node); end + + # @param node [Parser::AST::Node] + # @return [Solargraph::Location] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#52 + def get_node_location(node); end + + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#61 + def named_path_pin(position); end + + # @param subregion [Region] + # @return [void] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#41 + def process_children(subregion = T.unsafe(nil)); end +end + +# Data used by the parser to track context at various locations in a +# source. +# +# source://solargraph//lib/solargraph/parser/region.rb#8 +class Solargraph::Parser::Region + # @param source [Source] + # @param namespace [String] + # @param scope [Symbol] + # @param visibility [Symbol] + # @return [Region] a new instance of Region + # + # source://solargraph//lib/solargraph/parser/region.rb#28 + def initialize(source: T.unsafe(nil), closure: T.unsafe(nil), scope: T.unsafe(nil), visibility: T.unsafe(nil), lvars: T.unsafe(nil)); end + + # @return [Pin::Closure] + # + # source://solargraph//lib/solargraph/parser/region.rb#10 + def closure; end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/region.rb#61 + def code_for(node); end + + # @return [String] + # + # source://solargraph//lib/solargraph/parser/region.rb#39 + def filename; end + + # @return [Array<Symbol>] + # + # source://solargraph//lib/solargraph/parser/region.rb#22 + def lvars; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/parser/region.rb#13 + def scope; end + + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/parser/region.rb#19 + def source; end + + # Generate a new Region with the provided attribute changes. + # + # @param closure [Pin::Closure, nil] + # @param scope [Symbol, nil] + # @param visibility [Symbol, nil] + # @return [Region] + # + # source://solargraph//lib/solargraph/parser/region.rb#49 + def update(closure: T.unsafe(nil), scope: T.unsafe(nil), visibility: T.unsafe(nil), lvars: T.unsafe(nil)); end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/parser/region.rb#16 + def visibility; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm.rb#3 +module Solargraph::Parser::Rubyvm; end + +# source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#7 +module Solargraph::Parser::Rubyvm::ClassMethods + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#82 + def chain(*args); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#86 + def chain_string(*args); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#94 + def infer_literal_node_type(node); end + + # @param name [String] + # @param top [AST::Node] + # @return [Array<AST::Node>] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#61 + def inner_node_references(name, top); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#102 + def is_ast_node?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#33 + def map(source); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#77 + def match_rubyvm_node_to_ref(top, name); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#110 + def node_range(node); end + + # @sg-ignore + # + # @param code [String] + # @param filename [String, nil] + # @param line [Integer] + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#26 + def parse(code, filename = T.unsafe(nil), line = T.unsafe(nil)); end + + # @sg-ignore + # + # @param code [String] + # @param filename [String] + # @return [Array(Parser::AST::Node, Array<Parser::Source::Comment>)] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#12 + def parse_with_comments(code, filename = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#90 + def process_node(*args); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#116 + def recipient_node(tree); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#37 + def references(source, name); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#123 + def string_ranges(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#98 + def version; end +end + +# A factory for generating chains from nodes. +# +# source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#8 +class Solargraph::Parser::Rubyvm::NodeChainer + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [NodeChainer] a new instance of NodeChainer + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#15 + def initialize(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#22 + def chain; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#130 + def block_passed?(node); end + + # @param n [Parser::AST::Node] + # @return [Array<Chain::Link>] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#49 + def generate_links(n); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#123 + def hash_is_splatted?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#134 + def node_to_argchains(node); end + + class << self + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#31 + def chain(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @param code [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#37 + def load_string(code); end + end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#11 +Solargraph::Parser::Rubyvm::NodeChainer::Chain = Solargraph::Source::Chain + +# source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#4 +module Solargraph::Parser::Rubyvm::NodeMethods + private + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#124 + def any_splatted_call?(nodes); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#73 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#62 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#92 + def convert_hash(node); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#133 + def find_recipient_node(cursor); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#32 + def infer_literal_node_type(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#128 + def node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#15 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#52 + def returns_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#119 + def splatted_call?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#108 + def splatted_hash?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#112 + def splatted_node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#9 + def unpack_name(node); end + + class << self + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#124 + def any_splatted_call?(nodes); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#73 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#62 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#92 + def convert_hash(node); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#133 + def find_recipient_node(cursor); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#32 + def infer_literal_node_type(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#128 + def node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#15 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#52 + def returns_from(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#119 + def splatted_call?(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#108 + def splatted_hash?(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#112 + def splatted_node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#9 + def unpack_name(node); end + + protected + + # @param cursor [Source::Cursor] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#173 + def maybe_adjust_cursor(cursor); end + + # @param cursor [Source::Cursor] + # @return [RubyVM::AbstractSyntaxTree::Node, nil] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#146 + def synchronized_find_recipient_node(cursor); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#178 + def unsynchronized_find_recipient_node(cursor); end + end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#205 +module Solargraph::Parser::Rubyvm::NodeMethods::DeepInference + class << self + # @param node [Parser::AST::Node] + # @return [Array<Parser::AST::Node>] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#213 + def get_return_nodes(node); end + + private + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#242 + def get_return_nodes_from_children(parent); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#265 + def get_return_nodes_only(parent); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#283 + def reduce_to_value_nodes(nodes); end + end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors.rb#8 +module Solargraph::Parser::Rubyvm::NodeProcessors; end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/alias_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::AliasNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/alias_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/args_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::ArgsNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/args_node.rb#8 + def process; end + + private + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/args_node.rb#74 + def extract_name(var); end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/begin_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::BeginNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/begin_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/block_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::BlockNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/block_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/block_node.rb#33 + def other_class_eval?; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::CasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb#8 + def process; end + + private + + # @return [String] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb#22 + def const_name; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::CvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/def_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::DefNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/def_node.rb#8 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/def_node.rb#68 + def node_has_anon_splat?; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/defs_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::DefsNode < ::Solargraph::Parser::Rubyvm::NodeProcessors::DefNode + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/defs_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/defs_node.rb#61 + def node_has_anon_splat?; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::GvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::IvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::KwArgNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb#8 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb#30 + def require_keyword?(node); end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lit_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::LitNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lit_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::LvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::NamespaceNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::OptArgNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::OrasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::ResbodyNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb#36 + def exception_variable?; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::SclassNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/scope_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::ScopeNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/scope_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::SendNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#10 + def process; end + + private + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#243 + def process_alias_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#64 + def process_attribute; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#161 + def process_autoload; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#128 + def process_extend; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#101 + def process_include; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#170 + def process_module_function; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#115 + def process_prepend; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#260 + def process_private_class_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#228 + def process_private_constant; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#150 + def process_require; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#42 + def process_visibility; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sym_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::SymNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sym_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/snippet.rb#3 +class Solargraph::Parser::Snippet + # @return [Snippet] a new instance of Snippet + # + # source://solargraph//lib/solargraph/parser/snippet.rb#7 + def initialize(range, text); end + + # Returns the value of attribute range. + # + # source://solargraph//lib/solargraph/parser/snippet.rb#4 + def range; end + + # Returns the value of attribute text. + # + # source://solargraph//lib/solargraph/parser/snippet.rb#5 + def text; end +end + +# source://solargraph//lib/solargraph/parser.rb#10 +class Solargraph::Parser::SyntaxError < ::StandardError; end + +# The namespace for pins used in maps. +# +# source://solargraph//lib/solargraph/pin.rb#8 +module Solargraph::Pin; end + +# The base class for map pins. +# +# source://solargraph//lib/solargraph/pin/base.rb#7 +class Solargraph::Pin::Base + include ::Solargraph::Pin::Common + include ::Solargraph::Pin::Conversions + include ::Solargraph::Pin::Documenting + + # @param location [Solargraph::Location, nil] + # @param kind [Integer] + # @param closure [Solargraph::Pin::Closure, nil] + # @param name [String] + # @param comments [String] + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/pin/base.rb#32 + def initialize(location: T.unsafe(nil), closure: T.unsafe(nil), name: T.unsafe(nil), comments: T.unsafe(nil)); end + + # Pin equality is determined using the #nearly? method and also + # requiring both pins to have the same location. + # + # source://solargraph//lib/solargraph/pin/base.rb#72 + def ==(other); end + + # @return [YARD::CodeObjects::Base] + # + # source://solargraph//lib/solargraph/pin/base.rb#13 + def code_object; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/base.rb#40 + def comments; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/base.rb#51 + def completion_item_kind; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#131 + def deprecated?; end + + # @return [Array<YARD::Tags::Directive>] + # + # source://solargraph//lib/solargraph/pin/base.rb#107 + def directives; end + + # @return [YARD::Docstring] + # + # source://solargraph//lib/solargraph/pin/base.rb#101 + def docstring; end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/pin/base.rb#45 + def filename; end + + # source://solargraph//lib/solargraph/pin/base.rb#219 + def identity; end + + # @deprecated Use #typify and/or #probe instead + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#158 + def infer(api_map); end + + # source://solargraph//lib/solargraph/pin/base.rb#223 + def inspect; end + + # @return [Solargraph::Location] + # + # source://solargraph//lib/solargraph/pin/base.rb#16 + def location; end + + # @return [Array<YARD::Tags::MacroDirective>] + # + # source://solargraph//lib/solargraph/pin/base.rb#113 + def macros; end + + # Perform a quick check to see if this pin possibly includes YARD + # directives. This method does not require parsing the comments. + # + # After the comments have been parsed, this method will return false if + # no directives were found, regardless of whether it previously appeared + # possible. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#125 + def maybe_directives?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/base.rb#19 + def name; end + + # True if the specified pin is a near match to this one. A near match + # indicates that the pins contain mostly the same data. Any differences + # between them should not have an impact on the API surface. + # + # @param other [Solargraph::Pin::Base, Object] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#83 + def nearly?(other); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/base.rb#22 + def path; end + + # Infer the pin's return type via static code analysis. + # + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#151 + def probe(api_map); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#189 + def probed?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#185 + def proxied?; end + + # Return a proxy for this pin with the specified return type. Other than + # the return type and the #proxied? setting, the proxy should be a clone + # of the original. + # + # @param return_type [ComplexType] + # @return [self] + # + # source://solargraph//lib/solargraph/pin/base.rb#212 + def proxy(return_type); end + + # @param api_map [ApiMap] + # @return [self] + # + # source://solargraph//lib/solargraph/pin/base.rb#195 + def realize(api_map); end + + # The pin's return type. + # + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#96 + def return_type; end + + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/pin/base.rb#25 + def source; end + + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/pin/base.rb#25 + def source=(_arg0); end + + # @return [Integer, nil] + # + # source://solargraph//lib/solargraph/pin/base.rb#56 + def symbol_kind; end + + # source://solargraph//lib/solargraph/pin/base.rb#60 + def to_s; end + + # Try to merge data from another pin. Merges are only possible if the + # pins are near matches (see the #nearly? method). The changes should + # not have any side effects on the API surface. + # + # @param pin [Pin::Base] The pin to merge into this one + # @return [Boolean] True if the pins were merged + # + # source://solargraph//lib/solargraph/pin/base.rb#171 + def try_merge!(pin); end + + # Get a fully qualified type from the pin's return type. + # + # The relative type is determined from YARD documentation (@return, + # @param, @type, etc.) and its namespaces are fully qualified using the + # provided ApiMap. + # + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#143 + def typify(api_map); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#65 + def variable?; end + + protected + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#230 + def probed=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#233 + def proxied=(_arg0); end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#236 + def return_type=(_arg0); end + + private + + # @return [Array<YARD::Tags::Handlers::Directive>] + # + # source://solargraph//lib/solargraph/pin/base.rb#292 + def collect_macros; end + + # @param dir1 [Array<YARD::Tags::Directive>] + # @param dir2 [Array<YARD::Tags::Directive>] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#272 + def compare_directives(dir1, dir2); end + + # True if two docstrings have the same tags, regardless of any other + # differences. + # + # @param d1 [YARD::Docstring] + # @param d2 [YARD::Docstring] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#261 + def compare_docstring_tags(d1, d2); end + + # @param tag1 [YARD::Tags::Tag] + # @param tag2 [YARD::Tags::Tag] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#283 + def compare_tags(tag1, tag2); end + + # @return [void] + # + # source://solargraph//lib/solargraph/pin/base.rb#241 + def parse_comments; end +end + +# source://solargraph//lib/solargraph/pin/base_variable.rb#5 +class Solargraph::Pin::BaseVariable < ::Solargraph::Pin::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param assignment [Parser::AST::Node, nil] + # @return [BaseVariable] a new instance of BaseVariable + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#13 + def initialize(assignment: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#62 + def ==(other); end + + # @return [Parser::AST::Node, nil] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#10 + def assignment; end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#18 + def completion_item_kind; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#31 + def nil_assignment?; end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#39 + def probe(api_map); end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#27 + def return_type; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#23 + def symbol_kind; end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#67 + def try_merge!(pin); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#35 + def variable?; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#77 + def generate_complex_type; end +end + +# source://solargraph//lib/solargraph/pin/block.rb#8 +class Solargraph::Pin::Block < ::Solargraph::Pin::Closure + # @param args [Array<Parameter>] + # @return [Block] a new instance of Block + # + # source://solargraph//lib/solargraph/pin/block.rb#12 + def initialize(receiver: T.unsafe(nil), args: T.unsafe(nil), context: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/block.rb#25 + def binder; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/pin/block.rb#35 + def parameter_names; end + + # @return [Array<Parameter>] + # + # source://solargraph//lib/solargraph/pin/block.rb#30 + def parameters; end + + # @param api_map [ApiMap] + # @return [void] + # + # source://solargraph//lib/solargraph/pin/block.rb#21 + def rebind(api_map); end + + # The signature of the method that receives this block. + # + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/pin/block.rb#9 + def receiver; end + + private + + # @param api_map [ApiMap] + # @return [ComplexType, nil] + # + # source://solargraph//lib/solargraph/pin/block.rb#43 + def binder_or_nil(api_map); end +end + +# source://solargraph//lib/solargraph/pin/class_variable.rb#5 +class Solargraph::Pin::ClassVariable < ::Solargraph::Pin::BaseVariable; end + +# source://solargraph//lib/solargraph/pin/closure.rb#6 +class Solargraph::Pin::Closure < ::Solargraph::Pin::Base + # @return [Closure] a new instance of Closure + # + # source://solargraph//lib/solargraph/pin/closure.rb#9 + def initialize(scope: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/closure.rb#25 + def binder; end + + # source://solargraph//lib/solargraph/pin/closure.rb#14 + def context; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/pin/closure.rb#30 + def gates; end + + # @return [::Symbol] :class or :instance + # + # source://solargraph//lib/solargraph/pin/closure.rb#7 + def scope; end +end + +# source://solargraph//lib/solargraph/pin/common.rb#5 +module Solargraph::Pin::Common + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#35 + def binder; end + + # @return [Pin::Base, nil] + # + # source://solargraph//lib/solargraph/pin/common.rb#10 + def closure; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#40 + def comments; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#23 + def context; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#23 + def full_context; end + + # @return [Location] + # + # source://solargraph//lib/solargraph/pin/common.rb#7 + def location; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#13 + def name; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#30 + def namespace; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#45 + def path; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#18 + def return_type; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#52 + def find_context; end +end + +# source://solargraph//lib/solargraph/pin/constant.rb#5 +class Solargraph::Pin::Constant < ::Solargraph::Pin::BaseVariable + # @return [Constant] a new instance of Constant + # + # source://solargraph//lib/solargraph/pin/constant.rb#8 + def initialize(visibility: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/constant.rb#17 + def completion_item_kind; end + + # source://solargraph//lib/solargraph/pin/constant.rb#26 + def path; end + + # source://solargraph//lib/solargraph/pin/constant.rb#13 + def return_type; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/constant.rb#22 + def symbol_kind; end + + # Returns the value of attribute visibility. + # + # source://solargraph//lib/solargraph/pin/constant.rb#6 + def visibility; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/constant.rb#33 + def generate_complex_type; end +end + +# @todo Move this stuff. It should be the responsibility of the language server. +# +# source://solargraph//lib/solargraph/pin/conversions.rb#8 +module Solargraph::Pin::Conversions + # @return [Hash] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#10 + def completion_item; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#43 + def detail; end + + # Get a markdown-flavored link to a documentation page. + # + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#56 + def link_documentation; end + + # source://solargraph//lib/solargraph/pin/conversions.rb#66 + def reset_conversions; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#25 + def resolve_completion_item; end + + # @return [Array<Hash>] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#38 + def signature_help; end + + # source://solargraph//lib/solargraph/pin/conversions.rb#60 + def text_documentation; end + + private + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#86 + def escape_brackets(text); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#77 + def generate_link; end +end + +# A module to add the Pin::Base#documentation method. +# +# source://solargraph//lib/solargraph/pin/documenting.rb#16 +module Solargraph::Pin::Documenting + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#62 + def documentation; end + + private + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#91 + def normalize_indentation(text); end + + # @param line [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#97 + def remove_odd_spaces(line); end +end + +# A documentation formatter that either performs Markdown conversion for +# text, or applies backticks for code blocks. +# +# source://solargraph//lib/solargraph/pin/documenting.rb#20 +class Solargraph::Pin::Documenting::DocSection + # @param code [Boolean] True if this section is a code block + # @return [DocSection] a new instance of DocSection + # + # source://solargraph//lib/solargraph/pin/documenting.rb#25 + def initialize(code); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#30 + def code?; end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#36 + def concat(text); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#22 + def plaintext; end + + # source://solargraph//lib/solargraph/pin/documenting.rb#40 + def to_s; end + + private + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#49 + def escape_brackets(text); end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#56 + def unescape_brackets(text); end +end + +# DuckMethod pins are used to add completion items for type tags that +# use duck typing, e.g., `@param file [#read]`. +# +# source://solargraph//lib/solargraph/pin/duck_method.rb#13 +class Solargraph::Pin::DuckMethod < ::Solargraph::Pin::Method; end + +# source://solargraph//lib/solargraph/pin/global_variable.rb#5 +class Solargraph::Pin::GlobalVariable < ::Solargraph::Pin::BaseVariable; end + +# source://solargraph//lib/solargraph/pin/instance_variable.rb#5 +class Solargraph::Pin::InstanceVariable < ::Solargraph::Pin::BaseVariable + # source://solargraph//lib/solargraph/pin/instance_variable.rb#6 + def binder; end + + # source://solargraph//lib/solargraph/pin/instance_variable.rb#14 + def context; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/instance_variable.rb#25 + def nearly?(other); end + + # source://solargraph//lib/solargraph/pin/instance_variable.rb#10 + def scope; end +end + +# source://solargraph//lib/solargraph/pin/keyword.rb#5 +class Solargraph::Pin::Keyword < ::Solargraph::Pin::Base + # @return [Keyword] a new instance of Keyword + # + # source://solargraph//lib/solargraph/pin/keyword.rb#6 + def initialize(name); end + + # source://solargraph//lib/solargraph/pin/keyword.rb#10 + def name; end +end + +# source://solargraph//lib/solargraph/pin/keyword_param.rb#5 +class Solargraph::Pin::KeywordParam < ::Solargraph::Pin::Symbol; end + +# source://solargraph//lib/solargraph/pin/local_variable.rb#6 +class Solargraph::Pin::LocalVariable < ::Solargraph::Pin::BaseVariable + # @return [LocalVariable] a new instance of LocalVariable + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#9 + def initialize(assignment: T.unsafe(nil), presence: T.unsafe(nil), **splat); end + + # @return [Range] + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#7 + def presence; end + + # source://solargraph//lib/solargraph/pin/local_variable.rb#15 + def try_merge!(pin); end + + # @param other_closure [Pin::Closure] + # @param other_loc [Location] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#23 + def visible_at?(other_closure, other_loc); end + + private + + # source://solargraph//lib/solargraph/pin/local_variable.rb#43 + def match_named_closure(needle, haystack); end + + # @param tag1 [String] + # @param tag2 [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#34 + def match_tags(tag1, tag2); end +end + +# The base class for method and attribute pins. +# +# source://solargraph//lib/solargraph/pin/method.rb#7 +class Solargraph::Pin::Method < ::Solargraph::Pin::Closure + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param visibility [::Symbol] :public, :protected, or :private + # @param explicit [Boolean] + # @param parameters [Array<Pin::Parameter>] + # @param node [Parser::AST::Node, RubyVM::AbstractSyntaxTree::Node] + # @param attribute [Boolean] + # @return [Method] a new instance of Method + # + # source://solargraph//lib/solargraph/pin/method.rb#24 + def initialize(visibility: T.unsafe(nil), explicit: T.unsafe(nil), parameters: T.unsafe(nil), node: T.unsafe(nil), attribute: T.unsafe(nil), signatures: T.unsafe(nil), anon_splat: T.unsafe(nil), **splat); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#184 + def anon_splat?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#141 + def attribute?; end + + # source://solargraph//lib/solargraph/pin/method.rb#40 + def completion_item_kind; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/method.rb#65 + def detail; end + + # source://solargraph//lib/solargraph/pin/method.rb#102 + def documentation; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#137 + def explicit?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#145 + def nearly?(other); end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/pin/method.rb#17 + def node; end + + # @return [Array<Pin::Method>] + # + # source://solargraph//lib/solargraph/pin/method.rb#163 + def overloads; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/pin/method.rb#36 + def parameter_names; end + + # @return [Array<Pin::Parameter>] + # + # source://solargraph//lib/solargraph/pin/method.rb#11 + def parameters; end + + # source://solargraph//lib/solargraph/pin/method.rb#90 + def path; end + + # source://solargraph//lib/solargraph/pin/method.rb#152 + def probe(api_map); end + + # source://solargraph//lib/solargraph/pin/method.rb#48 + def return_type; end + + # @return [Array<Hash>] + # + # source://solargraph//lib/solargraph/pin/method.rb#81 + def signature_help; end + + # @return [Array<Signature>] + # + # source://solargraph//lib/solargraph/pin/method.rb#53 + def signatures; end + + # source://solargraph//lib/solargraph/pin/method.rb#44 + def symbol_kind; end + + # source://solargraph//lib/solargraph/pin/method.rb#156 + def try_merge!(pin); end + + # source://solargraph//lib/solargraph/pin/method.rb#94 + def typify(api_map); end + + # @return [::Symbol] :public, :private, or :protected + # + # source://solargraph//lib/solargraph/pin/method.rb#14 + def visibility; end + + private + + # source://solargraph//lib/solargraph/pin/method.rb#208 + def clean_param(name); end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/method.rb#220 + def generate_complex_type; end + + # source://solargraph//lib/solargraph/pin/method.rb#307 + def infer_from_iv(api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/method.rb#282 + def infer_from_return_nodes(api_map); end + + # @return [Parser::AST::Node, nil] + # + # source://solargraph//lib/solargraph/pin/method.rb#271 + def method_body_node; end + + # @param tag [YARD::Tags::OverloadTag] + # + # source://solargraph//lib/solargraph/pin/method.rb#213 + def param_type_from_name(tag, name); end + + # When YARD parses an overload tag, it includes rest modifiers in the parameters names. + # + # @param arg [String] + # @return [Array(String, Symbol)] + # + # source://solargraph//lib/solargraph/pin/method.rb#324 + def parse_overload_param(name); end + + # @param ref [String] + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/method.rb#253 + def resolve_reference(ref, api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType, nil] + # + # source://solargraph//lib/solargraph/pin/method.rb#228 + def see_reference(api_map); end + + # source://solargraph//lib/solargraph/pin/method.rb#190 + def select_decl(name, asgn); end + + # @param api_map [ApiMap] + # @return [ComplexType, nil] + # + # source://solargraph//lib/solargraph/pin/method.rb#241 + def typify_from_super(api_map); end +end + +# Use this class to track method aliases for later remapping. Common +# examples that defer mapping are aliases for superclass methods or +# methods from included modules. +# +# source://solargraph//lib/solargraph/pin/method_alias.rb#10 +class Solargraph::Pin::MethodAlias < ::Solargraph::Pin::Method + # @return [MethodAlias] a new instance of MethodAlias + # + # source://solargraph//lib/solargraph/pin/method_alias.rb#16 + def initialize(scope: T.unsafe(nil), original: T.unsafe(nil), **splat); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/method_alias.rb#14 + def original; end + + # source://solargraph//lib/solargraph/pin/method_alias.rb#26 + def path; end + + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/pin/method_alias.rb#11 + def scope; end + + # source://solargraph//lib/solargraph/pin/method_alias.rb#22 + def visibility; end +end + +# source://solargraph//lib/solargraph/pin/namespace.rb#6 +class Solargraph::Pin::Namespace < ::Solargraph::Pin::Closure + # @param type [::Symbol] :class or :module + # @param visibility [::Symbol] :public or :private + # @param gates [Array<String>] + # @return [Namespace] a new instance of Namespace + # + # source://solargraph//lib/solargraph/pin/namespace.rb#17 + def initialize(type: T.unsafe(nil), visibility: T.unsafe(nil), gates: T.unsafe(nil), parameters: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/namespace.rb#52 + def binder; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#60 + def completion_item_kind; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#77 + def domains; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#48 + def full_context; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#85 + def gates; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#44 + def namespace; end + + # Returns the value of attribute parameters. + # + # source://solargraph//lib/solargraph/pin/namespace.rb#12 + def parameters; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#69 + def path; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#73 + def return_type; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#56 + def scope; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/namespace.rb#65 + def symbol_kind; end + + # @return [::Symbol] :class or :module + # + # source://solargraph//lib/solargraph/pin/namespace.rb#10 + def type; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#81 + def typify(api_map); end + + # @return [::Symbol] :public or :private + # + # source://solargraph//lib/solargraph/pin/namespace.rb#7 + def visibility; end +end + +# source://solargraph//lib/solargraph/pin/parameter.rb#6 +class Solargraph::Pin::Parameter < ::Solargraph::Pin::LocalVariable + # @return [Parameter] a new instance of Parameter + # + # source://solargraph//lib/solargraph/pin/parameter.rb#12 + def initialize(decl: T.unsafe(nil), asgn_code: T.unsafe(nil), return_type: T.unsafe(nil), **splat); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#10 + def asgn_code; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#35 + def block?; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#7 + def decl; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#90 + def documentation; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#39 + def full; end + + # The parameter's zero-based location in the block's signature. + # + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#80 + def index; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#19 + def keyword?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#23 + def kwrestarg?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#31 + def rest?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#27 + def restarg?; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#58 + def return_type; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#96 + def try_merge!(pin); end + + # @param api_map [ApiMap] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#85 + def typify(api_map); end + + private + + # @return [YARD::Tags::Tag] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#104 + def param_tag; end + + # @param ref [String] + # @param api_map [ApiMap] + # @param skip [Array] + # @return [Array<YARD::Tags::Tag>, nil] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#182 + def resolve_reference(ref, api_map, skip); end + + # @param heredoc [YARD::Docstring] + # @param api_map [ApiMap] + # @param skip [Array] + # @return [Array<YARD::Tags::Tag>] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#169 + def see_reference(heredoc, api_map, skip = T.unsafe(nil)); end + + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#120 + def typify_block_param(api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#146 + def typify_method_param(api_map); end +end + +# source://solargraph//lib/solargraph/pin/proxy_type.rb#6 +class Solargraph::Pin::ProxyType < ::Solargraph::Pin::Base + # @param return_type [ComplexType] + # @return [ProxyType] a new instance of ProxyType + # + # source://solargraph//lib/solargraph/pin/proxy_type.rb#7 + def initialize(return_type: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/proxy_type.rb#12 + def context; end + + class << self + # @param return_type [ComplexType] + # @return [ProxyType] + # + # source://solargraph//lib/solargraph/pin/proxy_type.rb#18 + def anonymous(return_type); end + end +end + +# source://solargraph//lib/solargraph/pin.rb#36 +Solargraph::Pin::ROOT_PIN = T.let(T.unsafe(nil), Solargraph::Pin::Namespace) + +# source://solargraph//lib/solargraph/pin/reference.rb#5 +class Solargraph::Pin::Reference < ::Solargraph::Pin::Base; end + +# source://solargraph//lib/solargraph/pin/reference/extend.rb#6 +class Solargraph::Pin::Reference::Extend < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/reference/include.rb#6 +class Solargraph::Pin::Reference::Include < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/reference/override.rb#7 +class Solargraph::Pin::Reference::Override < ::Solargraph::Pin::Reference + # @return [Override] a new instance of Override + # + # source://solargraph//lib/solargraph/pin/reference/override.rb#13 + def initialize(location, name, tags, delete = T.unsafe(nil)); end + + # @return [Array<Symbol>] + # + # source://solargraph//lib/solargraph/pin/reference/override.rb#11 + def delete; end + + # @return [Array<YARD::Tags::Tag>] + # + # source://solargraph//lib/solargraph/pin/reference/override.rb#8 + def tags; end + + class << self + # source://solargraph//lib/solargraph/pin/reference/override.rb#23 + def from_comment(name, comment); end + + # source://solargraph//lib/solargraph/pin/reference/override.rb#19 + def method_return(name, *tags, delete: T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/pin/reference/prepend.rb#6 +class Solargraph::Pin::Reference::Prepend < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/reference/require.rb#6 +class Solargraph::Pin::Reference::Require < ::Solargraph::Pin::Reference + # @return [Require] a new instance of Require + # + # source://solargraph//lib/solargraph/pin/reference/require.rb#7 + def initialize(location, name); end +end + +# source://solargraph//lib/solargraph/pin/reference/superclass.rb#6 +class Solargraph::Pin::Reference::Superclass < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/search.rb#7 +class Solargraph::Pin::Search + # @param pins [Array<Pin::Base>] + # @param query [String] + # @return [Search] a new instance of Search + # + # source://solargraph//lib/solargraph/pin/search.rb#23 + def initialize(pins, query); end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/pin/search.rb#29 + def results; end + + private + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/pin/search.rb#36 + def do_query; end + + # @param str1 [String] + # @param str2 [String] + # @return [Float] + # + # source://solargraph//lib/solargraph/pin/search.rb#50 + def fuzzy_string_match(str1, str2); end +end + +# source://solargraph//lib/solargraph/pin/search.rb#8 +class Solargraph::Pin::Search::Result + # @return [Result] a new instance of Result + # + # source://solargraph//lib/solargraph/pin/search.rb#15 + def initialize(match, pin); end + + # @return [Float] + # + # source://solargraph//lib/solargraph/pin/search.rb#10 + def match; end + + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/pin/search.rb#13 + def pin; end +end + +# source://solargraph//lib/solargraph/pin/signature.rb#3 +class Solargraph::Pin::Signature + # @return [Signature] a new instance of Signature + # + # source://solargraph//lib/solargraph/pin/signature.rb#12 + def initialize(parameters, return_type, block = T.unsafe(nil)); end + + # Returns the value of attribute block. + # + # source://solargraph//lib/solargraph/pin/signature.rb#10 + def block; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/signature.rb#18 + def block?; end + + # @return [Array<Parameter>] + # + # source://solargraph//lib/solargraph/pin/signature.rb#5 + def parameters; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/signature.rb#8 + def return_type; end +end + +# source://solargraph//lib/solargraph/pin/singleton.rb#5 +class Solargraph::Pin::Singleton < ::Solargraph::Pin::Closure + # @return [Singleton] a new instance of Singleton + # + # source://solargraph//lib/solargraph/pin/singleton.rb#6 + def initialize(name: T.unsafe(nil), location: T.unsafe(nil), closure: T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/pin/symbol.rb#7 +class Solargraph::Pin::Symbol < ::Solargraph::Pin::Base + # @param location [Solargraph::Location] + # @param name [String] + # @return [Symbol] a new instance of Symbol + # + # source://solargraph//lib/solargraph/pin/symbol.rb#8 + def initialize(location, name); end + + # source://solargraph//lib/solargraph/pin/symbol.rb#26 + def comments; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#22 + def completion_item_kind; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/symbol.rb#42 + def deprecated?; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#34 + def directives; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#14 + def namespace; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#18 + def path; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#30 + def return_type; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#38 + def visibility; end +end + +# The zero-based line and column numbers of a position in a string. +# +# source://solargraph//lib/solargraph/position.rb#6 +class Solargraph::Position + # @param line [Integer] + # @param character [Integer] + # @return [Position] a new instance of Position + # + # source://solargraph//lib/solargraph/position.rb#17 + def initialize(line, character); end + + # source://solargraph//lib/solargraph/position.rb#95 + def ==(other); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#11 + def character; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#11 + def column; end + + # source://solargraph//lib/solargraph/position.rb#33 + def inspect; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#8 + def line; end + + # Get a hash of the position. This representation is suitable for use in + # the language server protocol. + # + # @return [Hash] + # + # source://solargraph//lib/solargraph/position.rb#26 + def to_hash; end + + class << self + # Get a position for the specified text and offset. + # + # @param text [String] + # @param offset [Integer] + # @raise [InvalidOffsetError] + # @return [Position] + # + # source://solargraph//lib/solargraph/position.rb#63 + def from_offset(text, offset); end + + # Get a numeric offset for the specified text and a position identified + # by its line and character. + # + # @param text [String] + # @param line [Integer] + # @param character [Integer] + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#54 + def line_char_to_offset(text, line, character); end + + # A helper method for generating positions from arrays of integers. The + # original parameter is returned if it is already a position. + # + # @param object [Position, Array(Integer, Integer)] + # @raise [ArgumentError] if the object cannot be converted to a position. + # @return [Position] + # + # source://solargraph//lib/solargraph/position.rb#89 + def normalize(object); end + + # Get a numeric offset for the specified text and position. + # + # @param text [String] + # @param position [Position] + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#42 + def to_offset(text, position); end + end +end + +# A pair of positions that compose a section of text. +# +# source://solargraph//lib/solargraph/range.rb#6 +class Solargraph::Range + # @param start [Position] + # @param ending [Position] + # @return [Range] a new instance of Range + # + # source://solargraph//lib/solargraph/range.rb#15 + def initialize(start, ending); end + + # source://solargraph//lib/solargraph/range.rb#86 + def ==(other); end + + # True if the specified position is inside the range. + # + # @param position [Position, Array(Integer, Integer)] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/range.rb#35 + def contain?(position); end + + # @return [Position] + # + # source://solargraph//lib/solargraph/range.rb#11 + def ending; end + + # True if the range contains the specified position and the position does not precede it. + # + # @param position [Position, Array(Integer, Integer)] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/range.rb#47 + def include?(position); end + + # source://solargraph//lib/solargraph/range.rb#91 + def inspect; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/range.rb#8 + def start; end + + # Get a hash of the range. This representation is suitable for use in + # the language server protocol. + # + # @return [Hash<Symbol, Position>] + # + # source://solargraph//lib/solargraph/range.rb#24 + def to_hash; end + + class << self + # Get a range from a Parser range, usually found in + # Parser::AST::Node#location#expression. + # + # @param expr [Parser::Source::Range] + # @return [Range] + # + # source://solargraph//lib/solargraph/range.rb#82 + def from_expr(expr); end + + # Get a range from a node. + # + # @param node [RubyVM::AbstractSyntaxTree::Node, Parser::AST::Node] + # @return [Range] + # + # source://solargraph//lib/solargraph/range.rb#67 + def from_node(node); end + + # Create a range from a pair of lines and characters. + # + # @param l1 [Integer] Starting line + # @param c1 [Integer] Starting character + # @param l2 [Integer] Ending line + # @param c2 [Integer] Ending character + # @return [Range] + # + # source://solargraph//lib/solargraph/range.rb#59 + def from_to(l1, c1, l2, c2); end + end +end + +# source://solargraph//lib/solargraph/rbs_map.rb#7 +class Solargraph::RbsMap + include ::Solargraph::RbsMap::Conversions + + # @param library [String] + # @return [RbsMap] a new instance of RbsMap + # + # source://solargraph//lib/solargraph/rbs_map.rb#22 + def initialize(library); end + + # Returns the value of attribute library. + # + # source://solargraph//lib/solargraph/rbs_map.rb#19 + def library; end + + # source://solargraph//lib/solargraph/rbs_map.rb#31 + def path_pin(path); end + + # source://solargraph//lib/solargraph/rbs_map.rb#35 + def path_pins(path); end + + # source://solargraph//lib/solargraph/rbs_map.rb#49 + def repository; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/rbs_map.rb#39 + def resolved?; end + + private + + # @param loader [RBS::EnvironmentLoader] + # @param library [String] + # @return [Boolean] true if adding the library succeeded + # + # source://solargraph//lib/solargraph/rbs_map.rb#58 + def add_library(loader, library); end + + # source://solargraph//lib/solargraph/rbs_map.rb#69 + def short_name; end + + class << self + # @param library [String] + # @return [RbsMap] + # + # source://solargraph//lib/solargraph/rbs_map.rb#45 + def load(library); end + end +end + +# Functions for converting RBS declarations to Solargraph pins +# +# source://solargraph//lib/solargraph/rbs_map/conversions.rb#7 +module Solargraph::RbsMap::Conversions + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#22 + def pins; end + + private + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#330 + def alias_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#294 + def attr_accessor_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#270 + def attr_reader_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#282 + def attr_writer_to_pin(decl, closure); end + + # @param decl [RBS::AST::Declarations::Class] + # @return [void] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#103 + def class_decl_to_pin(decl); end + + # @param decl [RBS::AST::Declarations::Constant] + # @return [void] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#153 + def constant_decl_to_pin(decl); end + + # @param decl [RBS::AST::Declarations::Base] + # @param closure [Pin::Closure] + # @return [void] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#35 + def convert_decl_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#69 + def convert_member_to_pin(member, closure, context); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#64 + def convert_members_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#323 + def extend_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#309 + def include_to_pin(decl, closure); end + + # @param decl [RBS::AST::Declarations::Interface] + # @return [void] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#123 + def interface_decl_to_pin(decl); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#299 + def ivar_to_pin(decl, closure); end + + # @param decl [RBS::AST::Members::MethodDefinition] + # @param closure [Pin::Closure] + # @return [void] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#176 + def method_def_to_pin(decl, closure); end + + # @param decl [RBS::AST::Members::MethodDefinition] + # @param pin [Pin::Method] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#224 + def method_def_to_sigs(decl, pin); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#346 + def method_type_to_tag(type); end + + # @param decl [RBS::AST::Declarations::Module] + # @return [void] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#140 + def module_decl_to_pin(decl); end + + # @return [String] + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#355 + def other_type_to_tag(type); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#235 + def parts_of_function(type, pin); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#316 + def prepend_to_pin(decl, closure); end + + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#28 + def type_aliases; end +end + +# A container for tracking the current context of the RBS conversion +# process, e.g., what visibility is declared for methods in the current +# scope +# +# source://solargraph//lib/solargraph/rbs_map/conversions.rb#12 +class Solargraph::RbsMap::Conversions::Context + # @param visibility [Symbol] + # @return [Context] a new instance of Context + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#16 + def initialize(visibility = T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://solargraph//lib/solargraph/rbs_map/conversions.rb#13 + def visibility; end +end + +# source://solargraph//lib/solargraph/rbs_map/conversions.rb#338 +Solargraph::RbsMap::Conversions::RBS_TO_YARD_TYPE = T.let(T.unsafe(nil), Hash) + +# Override pins to fill gaps in RbsMap::CoreMap coverage +# +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#7 +module Solargraph::RbsMap::CoreFills; end + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#58 +Solargraph::RbsMap::CoreFills::ALL = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#42 +Solargraph::RbsMap::CoreFills::CLASS_RETURN_TYPES = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#56 +Solargraph::RbsMap::CoreFills::ERRNOS = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#10 +Solargraph::RbsMap::CoreFills::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#8 +Solargraph::RbsMap::CoreFills::Override = Solargraph::Pin::Reference::Override + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#18 +Solargraph::RbsMap::CoreFills::YIELDPARAMS = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/rbs_map/core_fills.rb#36 +Solargraph::RbsMap::CoreFills::YIELDPARAM_SINGLE_PARAMETERS = T.let(T.unsafe(nil), Array) + +# Ruby core pins +# +# source://solargraph//lib/solargraph/rbs_map/core_map.rb#7 +class Solargraph::RbsMap::CoreMap + include ::Solargraph::RbsMap::Conversions + + # @return [CoreMap] a new instance of CoreMap + # + # source://solargraph//lib/solargraph/rbs_map/core_map.rb#10 + def initialize; end + + # source://solargraph//lib/solargraph/rbs_map/core_map.rb#26 + def method_def_to_sigs(decl, pin); end +end + +# source://solargraph//lib/solargraph/rbs_map/core_signs.rb#3 +module Solargraph::RbsMap::CoreSigns + class << self + # @param path [String] + # @return [Array<Stub>] + # + # source://solargraph//lib/solargraph/rbs_map/core_signs.rb#28 + def sign(path); end + end +end + +# source://solargraph//lib/solargraph/rbs_map/core_signs.rb#4 +Solargraph::RbsMap::CoreSigns::Override = Solargraph::Pin::Reference::Override + +# source://solargraph//lib/solargraph/rbs_map/core_signs.rb#17 +Solargraph::RbsMap::CoreSigns::SIGNATURE_MAP = T.let(T.unsafe(nil), Hash) + +# source://solargraph//lib/solargraph/rbs_map/core_signs.rb#6 +class Solargraph::RbsMap::CoreSigns::Stub + # @return [Stub] a new instance of Stub + # + # source://solargraph//lib/solargraph/rbs_map/core_signs.rb#11 + def initialize(parameters, return_type); end + + # Returns the value of attribute parameters. + # + # source://solargraph//lib/solargraph/rbs_map/core_signs.rb#7 + def parameters; end + + # Returns the value of attribute return_type. + # + # source://solargraph//lib/solargraph/rbs_map/core_signs.rb#9 + def return_type; end +end + +# Ruby stdlib pins +# +# source://solargraph//lib/solargraph/rbs_map/stdlib_map.rb#11 +class Solargraph::RbsMap::StdlibMap < ::Solargraph::RbsMap + # @param library [String] + # @return [StdlibMap] a new instance of StdlibMap + # + # source://solargraph//lib/solargraph/rbs_map/stdlib_map.rb#15 + def initialize(library); end + + # source://solargraph//lib/solargraph/rbs_map/stdlib_map.rb#31 + def repository; end + + class << self + # @param library [String] + # @return [StdlibMap] + # + # source://solargraph//lib/solargraph/rbs_map/stdlib_map.rb#27 + def load(library); end + end +end + +# source://solargraph//lib/solargraph/server_methods.rb#6 +module Solargraph::ServerMethods + # @return [Integer] + # + # source://solargraph//lib/solargraph/server_methods.rb#8 + def available_port; end +end + +# source://solargraph//lib/solargraph/shell.rb#6 +class Solargraph::Shell < ::Thor + include ::Solargraph::ServerMethods + + # @deprecated + # + # source://solargraph//lib/solargraph/shell.rb#102 + def available_cores; end + + # source://solargraph//lib/solargraph/shell.rb#204 + def bundle; end + + # @deprecated + # + # source://solargraph//lib/solargraph/shell.rb#112 + def clear; end + + # source://solargraph//lib/solargraph/shell.rb#52 + def config(directory = T.unsafe(nil)); end + + # @deprecated + # + # source://solargraph//lib/solargraph/shell.rb#80 + def download_core(_version = T.unsafe(nil)); end + + # @deprecated + # + # source://solargraph//lib/solargraph/shell.rb#91 + def list_cores; end + + # source://solargraph//lib/solargraph/shell.rb#212 + def rdoc(_gem, _version = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/shell.rb#131 + def reporters; end + + # source://solargraph//lib/solargraph/shell.rb#176 + def scan; end + + # source://solargraph//lib/solargraph/shell.rb#19 + def socket; end + + # source://solargraph//lib/solargraph/shell.rb#36 + def stdio; end + + # source://solargraph//lib/solargraph/shell.rb#144 + def typecheck(*files); end + + # @raise [ArgumentError] + # + # source://solargraph//lib/solargraph/shell.rb#120 + def uncache(*gems); end + + # source://solargraph//lib/solargraph/shell.rb#12 + def version; end + + private + + # @param pin [Solargraph::Pin::Base] + # @return [String] + # + # source://solargraph//lib/solargraph/shell.rb#220 + def pin_description(pin); end +end + +# A Ruby file that has been parsed into an AST. +# +# source://solargraph//lib/solargraph/source.rb#8 +class Solargraph::Source + include ::Solargraph::Source::EncodingFixes + + # @param code [String] + # @param filename [String] + # @param version [Integer] + # @return [Source] a new instance of Source + # + # source://solargraph//lib/solargraph/source.rb#38 + def initialize(code, filename = T.unsafe(nil), version = T.unsafe(nil)); end + + # Get a hash of comments grouped by the line numbers of the associated code. + # + # @return [Hash{Integer => Array<Parser::Source::Comment>}] + # + # source://solargraph//lib/solargraph/source.rb#305 + def associated_comments; end + + # @param range [Solargraph::Range] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#58 + def at(range); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#23 + def code; end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#244 + def code_for(node); end + + # @param position [Position] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#222 + def comment_at?(position); end + + # @return [Hash{Integer => Array<String>}] + # + # source://solargraph//lib/solargraph/source.rb#29 + def comments; end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#254 + def comments_for(node); end + + # @param position [Position, Array(Integer, Integer)] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/source.rb#167 + def cursor_at(position); end + + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/source.rb#238 + def error_ranges; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#20 + def filename; end + + # Finish synchronizing a source that was updated via #start_synchronize. + # This method returns self if the source is already synchronized. Otherwise + # it parses the AST and returns a new synchronized Source. + # + # @return [Source] + # + # source://solargraph//lib/solargraph/source.rb#125 + def finish_synchronize; end + + # Get an array of ranges that can be folded, e.g., the range of a class + # definition or an if condition. + # + # See FOLDING_NODE_TYPES for the list of node types that can be folded. + # + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/source.rb#288 + def folding_ranges; end + + # @param l1 [Integer] + # @param c1 [Integer] + # @param l2 [Integer] + # @param c2 [Integer] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#67 + def from_to(l1, c1, l2, c2); end + + # A location representing the file in its entirety. + # + # @return [Location] + # + # source://solargraph//lib/solargraph/source.rb#265 + def location; end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/source.rb#26 + def node; end + + # Get the nearest node that contains the specified index. + # + # @param line [Integer] + # @param column [Integer] + # @return [AST::Node] + # + # source://solargraph//lib/solargraph/source.rb#78 + def node_at(line, column); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#172 + def parsed?; end + + # @param name [String] + # @return [Array<Location>] + # + # source://solargraph//lib/solargraph/source.rb#233 + def references(name); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#176 + def repaired?; end + + # Start synchronizing the source. This method updates the code without + # parsing a new AST. The resulting Source object will be marked not + # synchronized (#synchronized? == false). + # + # @param updater [Source::Updater] + # @return [Source] + # + # source://solargraph//lib/solargraph/source.rb#102 + def start_synchronize(updater); end + + # @param position [Position] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#182 + def string_at?(position); end + + # source://solargraph//lib/solargraph/source.rb#216 + def string_ranges; end + + # Synchronize the Source with an update. This method applies changes to the + # code, parses the new code's AST, and returns the resulting Source object. + # + # @param updater [Source::Updater] + # @return [Source] + # + # source://solargraph//lib/solargraph/source.rb#145 + def synchronize(updater); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#297 + def synchronized?; end + + # Get an array of nodes containing the specified index, starting with the + # nearest node and ending with the root. + # + # @param line [Integer] + # @param column [Integer] + # @return [Array<AST::Node>] + # + # source://solargraph//lib/solargraph/source.rb#88 + def tree_at(line, column); end + + # @return [Integer] + # @todo Deprecate? + # + # source://solargraph//lib/solargraph/source.rb#33 + def version; end + + protected + + # @param val [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#462 + def code=(val); end + + # @return [Array<Parser::Source::Comment>] + # + # source://solargraph//lib/solargraph/source.rb#480 + def comments=(_arg0); end + + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/source.rb#471 + def error_ranges=(_arg0); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#455 + def filename=(_arg0); end + + # @return [Source::Updater] + # + # source://solargraph//lib/solargraph/source.rb#486 + def last_updater; end + + # @return [Source::Updater] + # + # source://solargraph//lib/solargraph/source.rb#486 + def last_updater=(_arg0); end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/source.rb#468 + def node=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#477 + def parsed=(_arg0); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#474 + def repaired; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#474 + def repaired=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#483 + def synchronized=(_arg0); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source.rb#458 + def version=(_arg0); end + + private + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/source.rb#491 + def code_lines; end + + # source://solargraph//lib/solargraph/source.rb#445 + def colonized(range, position, node); end + + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/source.rb#390 + def comment_ranges; end + + # source://solargraph//lib/solargraph/source.rb#326 + def first_not_empty_from(line); end + + # Get an array of foldable comment block ranges. Blocks are excluded if + # they are less than 3 lines long. + # + # @return [Array<Range>] + # + # source://solargraph//lib/solargraph/source.rb#398 + def foldable_comment_block_ranges; end + + # @param top [Parser::AST::Node] + # @param result [Array<Range>] + # @param parent [Symbol] + # @return [void] + # + # source://solargraph//lib/solargraph/source.rb#337 + def inner_folding_ranges(top, result = T.unsafe(nil), parent = T.unsafe(nil)); end + + # @param node [Parser::AST::Node] + # @param position [Position] + # @param stack [Array<Parser::AST::Node>] + # @return [void] + # + # source://solargraph//lib/solargraph/source.rb#432 + def inner_tree_at(node, position, stack); end + + # @return [Array<Parser::AST::Node>] + # + # source://solargraph//lib/solargraph/source.rb#385 + def string_nodes; end + + # @param n [Parser::AST::Node] + # @return [Array<Parser::AST::Node>] + # + # source://solargraph//lib/solargraph/source.rb#416 + def string_nodes_in(n); end + + # A hash of line numbers and their associated comments. + # + # @return [Hash{Integer => Array<String>}] + # + # source://solargraph//lib/solargraph/source.rb#380 + def stringified_comments; end + + # Get a string representation of an array of comments. + # + # @param comments [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#357 + def stringify_comment_array(comments); end + + class << self + # @param filename [String] + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/source.rb#498 + def load(filename); end + + # @param code [String] + # @param filename [String] + # @param version [Integer] + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/source.rb#509 + def load_string(code, filename = T.unsafe(nil), version = T.unsafe(nil)); end + + # @param comments [String] + # @return [YARD::DocstringParser] + # + # source://solargraph//lib/solargraph/source.rb#515 + def parse_docstring(comments); end + end +end + +# A chain of constants, variables, and method calls for inferring types of +# values. +# +# source://solargraph//lib/solargraph/source/chain/link.rb#5 +class Solargraph::Source::Chain + # @param links [Array<Chain::Link>] + # @return [Chain] a new instance of Chain + # + # source://solargraph//lib/solargraph/source/chain.rb#39 + def initialize(links, node = T.unsafe(nil), splat = T.unsafe(nil)); end + + # @return [Chain] + # + # source://solargraph//lib/solargraph/source/chain.rb#53 + def base; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#102 + def constant?; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array<Pin::Base>] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source/chain.rb#61 + def define(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#97 + def defined?; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array<Pin::Base>] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain.rb#78 + def infer(api_map, name_pin, locals); end + + # @return [Array<Source::Chain::Link>] + # + # source://solargraph//lib/solargraph/source/chain.rb#34 + def links; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#89 + def literal?; end + + # Returns the value of attribute node. + # + # source://solargraph//lib/solargraph/source/chain.rb#36 + def node; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#110 + def nullable?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#106 + def splat?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#93 + def undefined?; end + + private + + # @param pins [Array<Pin::Base>] + # @param context [Pin::Base] + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain.rb#120 + def infer_first_defined(pins, context, api_map, locals); end + + # @param type [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain.rb#172 + def maybe_nil(type); end +end + +# source://solargraph//lib/solargraph/source/chain/block_variable.rb#6 +class Solargraph::Source::Chain::BlockVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/block_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/call.rb#7 +class Solargraph::Source::Chain::Call < ::Solargraph::Source::Chain::Link + # @param word [String] + # @param arguments [Array<Chain>] + # @param with_block [Boolean] True if the chain is inside a block + # @param head [Boolean] True if the call is the start of its chain + # @return [Call] a new instance of Call + # + # source://solargraph//lib/solargraph/source/chain/call.rb#17 + def initialize(word, arguments = T.unsafe(nil), with_block = T.unsafe(nil)); end + + # @return [Array<Chain>] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#11 + def arguments; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#30 + def resolve(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#23 + def with_block?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#8 + def word; end + + private + + # @param arguments [Array<Chain>] + # @param signature [Pin::Signature] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#188 + def arguments_match(arguments, signature); end + + # @param docstring [YARD::Docstring] + # @param context [ComplexType] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#176 + def extra_return_type(docstring, context); end + + # @param pins [Array<Pin::Base>] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Pin::LocalVariable] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#53 + def inferred_pins(pins, api_map, context, locals); end + + # @param pin [Pin] + # @param macro [YARD::Tags::MacroDirective] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Array<Pin::Base>] + # @return [Pin::ProxyType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#153 + def inner_process_macro(pin, macro, api_map, context, locals); end + + # @param pin [Pin::Method] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Pin::Base] + # @return [Pin::ProxyType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#137 + def process_directive(pin, api_map, context, locals); end + + # @param pin [Pin::Method] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Pin::Base] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#124 + def process_macro(pin, api_map, context, locals); end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#201 + def super_pins(api_map, name_pin); end + + # @param type [ComplexType] + # @param context [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#208 + def with_params(type, context); end +end + +# source://solargraph//lib/solargraph/source/chain/class_variable.rb#6 +class Solargraph::Source::Chain::ClassVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/class_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/constant.rb#6 +class Solargraph::Source::Chain::Constant < ::Solargraph::Source::Chain::Link + # @return [Constant] a new instance of Constant + # + # source://solargraph//lib/solargraph/source/chain/constant.rb#7 + def initialize(word); end + + # source://solargraph//lib/solargraph/source/chain/constant.rb#11 + def resolve(api_map, name_pin, locals); end + + private + + # source://solargraph//lib/solargraph/source/chain/constant.rb#38 + def crawl_gates(pin); end + + # source://solargraph//lib/solargraph/source/chain/constant.rb#62 + def deep_constant_type(gate, api_map); end + + # source://solargraph//lib/solargraph/source/chain/constant.rb#51 + def first_pin_type(pins, api_map); end +end + +# source://solargraph//lib/solargraph/source/chain/global_variable.rb#6 +class Solargraph::Source::Chain::GlobalVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/global_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/hash.rb#8 +class Solargraph::Source::Chain::Hash < ::Solargraph::Source::Chain::Literal + # @param type [String] + # @param splatted [Boolean] + # @return [Hash] a new instance of Hash + # + # source://solargraph//lib/solargraph/source/chain/hash.rb#9 + def initialize(type, splatted = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/source/chain/hash.rb#18 + def resolve(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/hash.rb#22 + def splatted?; end + + # source://solargraph//lib/solargraph/source/chain/hash.rb#14 + def word; end +end + +# Chain::Head is a link for ambiguous words, e.g.; `String` can refer to +# either a class (`String`) or a function (`Kernel#String`). +# +# @note Chain::Head is only intended to handle `self` and `super`. +# +# source://solargraph//lib/solargraph/source/chain/head.rb#10 +class Solargraph::Source::Chain::Head < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/head.rb#11 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/instance_variable.rb#6 +class Solargraph::Source::Chain::InstanceVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/instance_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/link.rb#6 +class Solargraph::Source::Chain::Link + # @return [Link] a new instance of Link + # + # source://solargraph//lib/solargraph/source/chain/link.rb#12 + def initialize(word = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/source/chain/link.rb#36 + def ==(other); end + + # Make a copy of this link unmarked as the head of a chain + # + # @return [self] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#50 + def clone_body; end + + # Make a copy of this link marked as the head of a chain + # + # @return [self] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#43 + def clone_head; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#20 + def constant?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#32 + def head?; end + + # Returns the value of attribute last_context. + # + # source://solargraph//lib/solargraph/source/chain/link.rb#10 + def last_context; end + + # Sets the attribute last_context + # + # @param value the value to set the attribute last_context to. + # + # source://solargraph//lib/solargraph/source/chain/link.rb#10 + def last_context=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#54 + def nullable?; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array<Pin::Base>] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#28 + def resolve(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#16 + def undefined?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#8 + def word; end + + protected + + # Mark whether this link is the head of a chain + # + # @param bool [Boolean] + # @return [self] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#64 + def mark_head(bool); end +end + +# source://solargraph//lib/solargraph/source/chain/literal.rb#6 +class Solargraph::Source::Chain::Literal < ::Solargraph::Source::Chain::Link + # @param type [String] + # @return [Literal] a new instance of Literal + # + # source://solargraph//lib/solargraph/source/chain/literal.rb#12 + def initialize(type); end + + # source://solargraph//lib/solargraph/source/chain/literal.rb#17 + def resolve(api_map, name_pin, locals); end + + # source://solargraph//lib/solargraph/source/chain/literal.rb#7 + def word; end +end + +# source://solargraph//lib/solargraph/source/chain/or.rb#6 +class Solargraph::Source::Chain::Or < ::Solargraph::Source::Chain::Link + # @param type [String] + # @return [Or] a new instance of Or + # + # source://solargraph//lib/solargraph/source/chain/or.rb#12 + def initialize(links); end + + # source://solargraph//lib/solargraph/source/chain/or.rb#16 + def resolve(api_map, name_pin, locals); end + + # source://solargraph//lib/solargraph/source/chain/or.rb#7 + def word; end +end + +# source://solargraph//lib/solargraph/source/chain/q_call.rb#4 +class Solargraph::Source::Chain::QCall < ::Solargraph::Source::Chain::Call + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/q_call.rb#5 + def nullable?; end +end + +# source://solargraph//lib/solargraph/source/chain.rb#30 +Solargraph::Source::Chain::UNDEFINED_CALL = T.let(T.unsafe(nil), Solargraph::Source::Chain::Call) + +# source://solargraph//lib/solargraph/source/chain.rb#31 +Solargraph::Source::Chain::UNDEFINED_CONSTANT = T.let(T.unsafe(nil), Solargraph::Source::Chain::Constant) + +# source://solargraph//lib/solargraph/source/chain/variable.rb#6 +class Solargraph::Source::Chain::Variable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/z_super.rb#7 +class Solargraph::Source::Chain::ZSuper < ::Solargraph::Source::Chain::Call + # @param word [String] + # @param arguments [Array<Chain>] + # @param with_block [Boolean] True if the chain is inside a block + # @param head [Boolean] True if the call is the start of its chain + # @return [ZSuper] a new instance of ZSuper + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#17 + def initialize(word, with_block = T.unsafe(nil)); end + + # @return [Array<Chain>] + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#11 + def arguments; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#24 + def resolve(api_map, name_pin, locals); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#8 + def word; end +end + +# A change to be applied to text. +# +# source://solargraph//lib/solargraph/source/change.rb#7 +class Solargraph::Source::Change + include ::Solargraph::Source::EncodingFixes + + # @param range [Range] The starting and ending positions of the change. + # If nil, the original text will be overwritten. + # @param new_text [String] The text to be changed. + # @return [Change] a new instance of Change + # + # source://solargraph//lib/solargraph/source/change.rb#19 + def initialize(range, new_text); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/change.rb#14 + def new_text; end + + # @return [Range] + # + # source://solargraph//lib/solargraph/source/change.rb#11 + def range; end + + # Repair an update by replacing the new text with similarly formatted + # whitespace. + # + # @param text [String] The text to be changed. + # @return [String] The updated text. + # + # source://solargraph//lib/solargraph/source/change.rb#55 + def repair(text); end + + # Write the change to the specified text. + # + # @param text [String] The text to be changed. + # @param nullable [Boolean] If true, minor changes that could generate + # syntax errors will be repaired. + # @return [String] The updated text. + # + # source://solargraph//lib/solargraph/source/change.rb#30 + def write(text, nullable = T.unsafe(nil)); end + + private + + # source://solargraph//lib/solargraph/source/change.rb#72 + def commit(text, insert); end +end + +# Information about a position in a source, including the word located +# there. +# +# source://solargraph//lib/solargraph/source/cursor.rb#8 +class Solargraph::Source::Cursor + # @param source [Source] + # @param position [Position, Array(Integer, Integer)] + # @return [Cursor] a new instance of Cursor + # + # source://solargraph//lib/solargraph/source/cursor.rb#17 + def initialize(source, position); end + + # True if the statement at the cursor is an argument to a previous + # method. + # + # Given the code `process(foo)`, a cursor pointing at `foo` would + # identify it as an argument being passed to the `process` method. + # + # If #argument? is true, the #recipient method will return a cursor that + # points to the method receiving the argument. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#91 + def argument?; end + + # @return [Chain] + # + # source://solargraph//lib/solargraph/source/cursor.rb#77 + def chain; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#97 + def comment?; end + + # The part of the word after the current position. Given the text + # `foo.bar`, the end_of_word at position (0,6) is `r`. + # + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#53 + def end_of_word; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#23 + def filename; end + + # source://solargraph//lib/solargraph/source/cursor.rb#118 + def node; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/cursor.rb#123 + def node_position; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/cursor.rb#143 + def offset; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/cursor.rb#10 + def position; end + + # The range of the word at the current position. + # + # @return [Range] + # + # source://solargraph//lib/solargraph/source/cursor.rb#68 + def range; end + + # Get a cursor pointing to the method that receives the current statement + # as an argument. + # + # @return [Cursor, nil] + # + # source://solargraph//lib/solargraph/source/cursor.rb#110 + def receiver; end + + # Get a cursor pointing to the method that receives the current statement + # as an argument. + # + # @return [Cursor, nil] + # + # source://solargraph//lib/solargraph/source/cursor.rb#110 + def recipient; end + + # source://solargraph//lib/solargraph/source/cursor.rb#138 + def recipient_node; end + + # @return [Source] + # + # source://solargraph//lib/solargraph/source/cursor.rb#13 + def source; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#61 + def start_of_constant?; end + + # The part of the word before the current position. Given the text + # `foo.bar`, the start_of_word at position(0, 6) is `ba`. + # + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#39 + def start_of_word; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#102 + def string?; end + + # The whole word at the current position. Given the text `foo.bar`, the + # word at position(0,6) is `bar`. + # + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#31 + def word; end + + private + + # A regular expression to find the end of a word from an offset. + # + # @return [Regexp] + # + # source://solargraph//lib/solargraph/source/cursor.rb#159 + def end_word_pattern; end + + # A regular expression to find the start of a word from an offset. + # + # @return [Regexp] + # + # source://solargraph//lib/solargraph/source/cursor.rb#152 + def start_word_pattern; end +end + +# source://solargraph//lib/solargraph/source/encoding_fixes.rb#5 +module Solargraph::Source::EncodingFixes + private + + # Convert strings to normalized UTF-8. + # + # @param string [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source/encoding_fixes.rb#12 + def normalize(string); end + + class << self + # Convert strings to normalized UTF-8. + # + # @param string [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source/encoding_fixes.rb#12 + def normalize(string); end + end +end + +# source://solargraph//lib/solargraph/source.rb#272 +Solargraph::Source::FOLDING_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# Information about a location in a source, including the location's word +# and signature, literal values at the base of signatures, and whether the +# location is inside a string or comment. ApiMaps use Fragments to provide +# results for completion and definition queries. +# +# source://solargraph//lib/solargraph/source/source_chainer.rb#10 +class Solargraph::Source::SourceChainer + # @param source [Source] + # @param position [Position] + # @return [SourceChainer] a new instance of SourceChainer + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#26 + def initialize(source, position); end + + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#33 + def chain; end + + private + + # @return [String] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#98 + def end_of_phrase; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#88 + def fixed_phrase; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#93 + def fixed_position; end + + # @param line [Integer] + # @param column [Integer] + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#125 + def get_offset(line, column); end + + # source://solargraph//lib/solargraph/source/source_chainer.rb#133 + def get_signature_data_at(index); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#118 + def offset; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#83 + def phrase; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#77 + def position; end + + # source://solargraph//lib/solargraph/source/source_chainer.rb#129 + def signature_data; end + + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#80 + def source; end + + # True if the current offset is inside a string. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#112 + def string?; end + + class << self + # @param source [Source] + # @param position [Position] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#19 + def chain(source, position); end + + private + + def new(*_arg0); end + end +end + +# Updaters contain changes to be applied to a source. The source applies +# the update via the Source#synchronize method. +# +# source://solargraph//lib/solargraph/source/updater.rb#8 +class Solargraph::Source::Updater + # @param filename [String] The file to update. + # @param version [Integer] A version number associated with this update. + # @param changes [Array<Solargraph::Source::Change>] The changes. + # @return [Updater] a new instance of Updater + # + # source://solargraph//lib/solargraph/source/updater.rb#21 + def initialize(filename, version, changes); end + + # @return [Array<Change>] + # + # source://solargraph//lib/solargraph/source/updater.rb#16 + def changes; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/updater.rb#10 + def filename; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/updater.rb#46 + def repair(text); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/updater.rb#13 + def version; end + + # @param text [String] + # @param nullable [Boolean] + # @return [String] + # + # source://solargraph//lib/solargraph/source/updater.rb#33 + def write(text, nullable = T.unsafe(nil)); end +end + +# An index of pins and other ApiMap-related data for a Source. +# +# source://solargraph//lib/solargraph/source_map.rb#10 +class Solargraph::SourceMap + # @param source [Source] + # @param pins [Array<Pin::Base>] + # @param locals [Array<Pin::Base>] + # @return [SourceMap] a new instance of SourceMap + # + # source://solargraph//lib/solargraph/source_map.rb#27 + def initialize(source, pins, locals); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source_map.rb#54 + def code; end + + # @param position [Position] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/source_map.rb#83 + def cursor_at(position); end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map.rb#69 + def document_symbols; end + + # @return [Environ] + # + # source://solargraph//lib/solargraph/source_map.rb#64 + def environ; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source_map.rb#49 + def filename; end + + # @param path [String] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source_map.rb#89 + def first_pin(path); end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map.rb#22 + def locals; end + + # @param location [Location] + # @return [Array<Pin::LocalVariable>] + # + # source://solargraph//lib/solargraph/source_map.rb#130 + def locals_at(location); end + + # source://solargraph//lib/solargraph/source_map.rb#104 + def locate_block_pin(line, character); end + + # source://solargraph//lib/solargraph/source_map.rb#100 + def locate_named_path_pin(line, character); end + + # @param location [Solargraph::Location] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map.rb#95 + def locate_pins(location); end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map.rb#19 + def pins; end + + # source://solargraph//lib/solargraph/source_map.rb#37 + def pins_by_class(klass); end + + # @param query [String] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map.rb#77 + def query_symbols(query); end + + # source://solargraph//lib/solargraph/source_map.rb#41 + def rebindable_method_names; end + + # @param name [String] + # @return [Array<Location>] + # + # source://solargraph//lib/solargraph/source_map.rb#124 + def references(name); end + + # @return [Array<Pin::Reference::Require>] + # + # source://solargraph//lib/solargraph/source_map.rb#59 + def requires; end + + # @return [Source] + # + # source://solargraph//lib/solargraph/source_map.rb#16 + def source; end + + # @param other_map [SourceMap] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source_map.rb#110 + def try_merge!(other_map); end + + private + + # @param line [Integer] + # @param character [Integer] + # @param klasses [Array<Class>] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source_map.rb#166 + def _locate_pin(line, character, *klasses); end + + class << self + # @param filename [String] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map.rb#139 + def load(filename); end + + # @param code [String] + # @param filename [String, nil] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map.rb#147 + def load_string(code, filename = T.unsafe(nil)); end + + # @param source [Source] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map.rb#154 + def map(source); end + end +end + +# A static analysis tool for obtaining definitions, completions, +# signatures, and type inferences from a cursor. +# +# source://solargraph//lib/solargraph/source_map/clip.rb#8 +class Solargraph::SourceMap::Clip + # @param api_map [ApiMap] + # @param cursor [Source::Cursor] + # @return [Clip] a new instance of Clip + # + # source://solargraph//lib/solargraph/source_map/clip.rb#11 + def initialize(api_map, cursor); end + + # @return [Completion] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#25 + def complete; end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#17 + def define; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#64 + def gates; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#68 + def in_block?; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#44 + def infer; end + + # Get an array of all the locals that are visible from the cursors's + # position. Locals can be local variables, method parameters, or block + # parameters. The array starts with the nearest local pin. + # + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#60 + def locals; end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#37 + def signify; end + + # @param phrase [String] + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#78 + def translate(phrase); end + + private + + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#86 + def api_map; end + + # @return [Solargraph::Pin::Base] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#101 + def block; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#180 + def code_complete; end + + # @return [Array<Pin::KeywordParam]] Array<Pin::KeywordParam] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#128 + def complete_keyword_parameters; end + + # The context at the current position. + # + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#108 + def context_pin; end + + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#89 + def cursor; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#96 + def location; end + + # @param result [Array<Pin::Base>] + # @return [Completion] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#153 + def package_completions(result); end + + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#92 + def source_map; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#162 + def tag_complete; end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#113 + def yielded_self_pins; end +end + +# The result of a completion request containing the pins that describe +# completion options and the range to be replaced. +# +# source://solargraph//lib/solargraph/source_map/completion.rb#8 +class Solargraph::SourceMap::Completion + # @param pins [Array<Solargraph::Pin::Base>] + # @param range [Solargraph::Range] + # @return [Completion] a new instance of Completion + # + # source://solargraph//lib/solargraph/source_map/completion.rb#17 + def initialize(pins, range); end + + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/completion.rb#10 + def pins; end + + # @return [Solargraph::Range] + # + # source://solargraph//lib/solargraph/source_map/completion.rb#13 + def range; end +end + +# The Mapper generates pins and other data for SourceMaps. +# +# This class is used internally by the SourceMap class. Users should not +# normally need to call it directly. +# +# source://solargraph//lib/solargraph/source_map/mapper.rb#10 +class Solargraph::SourceMap::Mapper + # @param position [Solargraph::Position] + # @return [Solargraph::Pin::Closure] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#63 + def closure_at(position); end + + # @param comment [String] + # @return [Integer] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#83 + def find_directive_line_number(comment, tag, start); end + + # Generate the data. + # + # @param source [Source] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#21 + def map(source); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#204 + def no_empty_lines?(line1, line2); end + + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#57 + def pins; end + + # source://solargraph//lib/solargraph/source_map/mapper.rb#67 + def process_comment(source_position, comment_position, comment); end + + # @return [void] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#228 + def process_comment_directives; end + + # @param source_position [Position] + # @param comment_position [Position] + # @param directive [YARD::Tags::Directive] + # @return [void] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#98 + def process_directive(source_position, comment_position, directive); end + + # source://solargraph//lib/solargraph/source_map/mapper.rb#208 + def remove_inline_comment_hashes(comment); end + + # @param filename [String] + # @param code [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#40 + def unmap(filename, code); end + + class << self + # @param source [Source] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#50 + def map(source); end + + private + + def new(*_arg0); end + end +end + +# source://solargraph//lib/solargraph/source_map/mapper.rb#15 +Solargraph::SourceMap::Mapper::MACRO_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://solargraph//lib/solargraph.rb#14 +class Solargraph::SourceNotAvailableError < ::StandardError; end + +# A static analysis tool for validating data types. +# +# source://solargraph//lib/solargraph/type_checker.rb#6 +class Solargraph::TypeChecker + include ::Solargraph::TypeChecker::Checks + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param filename [String] + # @param api_map [ApiMap] + # @param level [Symbol] + # @return [TypeChecker] a new instance of TypeChecker + # + # source://solargraph//lib/solargraph/type_checker.rb#27 + def initialize(filename, api_map: T.unsafe(nil), level: T.unsafe(nil)); end + + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/type_checker.rb#22 + def api_map; end + + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker.rb#16 + def filename; end + + # @return [Array<Problem>] + # + # source://solargraph//lib/solargraph/type_checker.rb#41 + def problems; end + + # @return [Rules] + # + # source://solargraph//lib/solargraph/type_checker.rb#19 + def rules; end + + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/type_checker.rb#36 + def source_map; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#517 + def abstract?(pin); end + + # @return [Array<Pin::BaseVariable>] + # + # source://solargraph//lib/solargraph/type_checker.rb#201 + def all_variables; end + + # source://solargraph//lib/solargraph/type_checker.rb#257 + def argument_problems_for(chain, api_map, block_pin, locals, location); end + + # source://solargraph//lib/solargraph/type_checker.rb#432 + def arity_problems_for(pin, arguments, location); end + + # source://solargraph//lib/solargraph/type_checker.rb#223 + def call_problems; end + + # source://solargraph//lib/solargraph/type_checker.rb#205 + def const_problems; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#405 + def declared_externally?(pin); end + + # @param pin [Pin::Base] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#401 + def external?(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#522 + def fake_args_for(pin); end + + # @param [Array<Pin::Method>] + # @return [Hash] + # + # source://solargraph//lib/solargraph/type_checker.rb#380 + def first_param_hash(pins); end + + # source://solargraph//lib/solargraph/type_checker.rb#158 + def ignored_pins; end + + # @param pin [Pin::Base] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#389 + def internal?(pin); end + + # True if the pin is either internal (part of the workspace) or from the core/stdlib + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#395 + def internal_or_core?(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#320 + def kwarg_problems_for(argchain, api_map, block_pin, locals, location, pin, params, first); end + + # source://solargraph//lib/solargraph/type_checker.rb#349 + def kwrestarg_problems_for(api_map, block_pin, locals, location, pin, params, kwargs); end + + # @param pin [Pin::Method] + # @return [Array<Problem>] + # + # source://solargraph//lib/solargraph/type_checker.rb#135 + def method_param_type_problems_for(pin); end + + # @param pin [Pin::Method] + # @return [Array<Problem>] + # + # source://solargraph//lib/solargraph/type_checker.rb#88 + def method_return_type_problems_for(pin); end + + # @return [Array<Problem>] + # + # source://solargraph//lib/solargraph/type_checker.rb#76 + def method_tag_problems; end + + # @param pin [Pin::Method] + # + # source://solargraph//lib/solargraph/type_checker.rb#513 + def optional_param_count(parameters); end + + # @param [Pin::Method] + # @return [Hash] + # + # source://solargraph//lib/solargraph/type_checker.rb#364 + def param_hash(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#441 + def parameterized_arity_problems_for(pin, parameters, arguments, location); end + + # source://solargraph//lib/solargraph/type_checker.rb#508 + def required_param_count(parameters); end + + # @param pin [Pin::Base] + # @return [Boolean] + # @todo This is not optimal. A better solution would probably be to mix + # namespace alias into types at the ApiMap level. + # + # source://solargraph//lib/solargraph/type_checker.rb#122 + def resolved_constant?(pin); end + + # @return [Array<Problem>] + # + # source://solargraph//lib/solargraph/type_checker.rb#163 + def variable_type_tag_problems; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#129 + def virtual_pin?(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#542 + def without_ignored(problems); end + + class << self + # @param filename [String] + # @return [self] + # + # source://solargraph//lib/solargraph/type_checker.rb#55 + def load(filename, level = T.unsafe(nil)); end + + # @param code [String] + # @param filename [String, nil] + # @return [self] + # + # source://solargraph//lib/solargraph/type_checker.rb#65 + def load_string(code, filename = T.unsafe(nil), level = T.unsafe(nil)); end + end +end + +# Helper methods for performing type checks +# +# source://solargraph//lib/solargraph/type_checker/checks.rb#7 +module Solargraph::TypeChecker::Checks + private + + # @param api_map [ApiMap] + # @param inferred [ComplexType] + # @param expected [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#68 + def all_types_match?(api_map, inferred, expected); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#52 + def any_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#81 + def duck_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param cls1 [ComplexType::UniqueType] + # @param cls2 [ComplexType::UniqueType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#105 + def either_way?(api_map, cls1, cls2); end + + # @param type [ComplexType::UniqueType] + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#93 + def fuzz(type); end + + # Compare an expected type with an inferred type. Common usage is to + # check if the type declared in a method's @return tag matches the type + # inferred from static analysis of the code. + # + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#18 + def types_match?(api_map, expected, inferred); end + + class << self + # @param api_map [ApiMap] + # @param inferred [ComplexType] + # @param expected [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#68 + def all_types_match?(api_map, inferred, expected); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#52 + def any_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @raise [ArgumentError] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#81 + def duck_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param cls1 [ComplexType::UniqueType] + # @param cls2 [ComplexType::UniqueType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#105 + def either_way?(api_map, cls1, cls2); end + + # @param type [ComplexType::UniqueType] + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#93 + def fuzz(type); end + + # Compare an expected type with an inferred type. Common usage is to + # check if the type declared in a method's @return tag matches the type + # inferred from static analysis of the code. + # + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#18 + def types_match?(api_map, expected, inferred); end + end +end + +# Data about a method parameter definition. This is the information from +# the args list in the def call, not the `@param` tags. +# +# source://solargraph//lib/solargraph/type_checker/param_def.rb#8 +class Solargraph::TypeChecker::ParamDef + # @return [ParamDef] a new instance of ParamDef + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#15 + def initialize(name, type); end + + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#10 + def name; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#13 + def type; end + + class << self + # Get an array of ParamDefs from a method pin. + # + # @param pin [Solargraph::Pin::Method] + # @return [Array<ParamDef>] + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#25 + def from(pin); end + end +end + +# A problem reported by TypeChecker. +# +# source://solargraph//lib/solargraph/type_checker/problem.rb#7 +class Solargraph::TypeChecker::Problem + # @param location [Solargraph::Location] + # @param message [String] + # @param pin [Solargraph::Pin::Base, nil] + # @param suggestion [String, nil] + # @return [Problem] a new instance of Problem + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#24 + def initialize(location, message, pin: T.unsafe(nil), suggestion: T.unsafe(nil)); end + + # @return [Solargraph::Location] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#9 + def location; end + + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#12 + def message; end + + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#15 + def pin; end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#18 + def suggestion; end +end + +# Definitions of type checking rules to be performed at various levels +# +# source://solargraph//lib/solargraph/type_checker/rules.rb#7 +class Solargraph::TypeChecker::Rules + # @param level [Symbol] + # @return [Rules] a new instance of Rules + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#22 + def initialize(level); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#32 + def ignore_all_undefined?; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#16 + def level; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#48 + def must_tag_or_infer?; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#19 + def rank; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#44 + def require_type_tags?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#40 + def validate_calls?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#36 + def validate_consts?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#52 + def validate_tags?; end +end + +# source://solargraph//lib/solargraph/type_checker/rules.rb#8 +Solargraph::TypeChecker::Rules::LEVELS = T.let(T.unsafe(nil), Hash) + +# source://solargraph//lib/solargraph/version.rb#4 +Solargraph::VERSION = T.let(T.unsafe(nil), String) + +# source://solargraph//lib/solargraph.rb#48 +Solargraph::VIEWS_PATH = T.let(T.unsafe(nil), String) + +# A workspace consists of the files in a project's directory and the +# project's configuration. It provides a Source for each file to be used +# in an associated Library or ApiMap. +# +# source://solargraph//lib/solargraph/workspace.rb#12 +class Solargraph::Workspace + # @param directory [String] + # @param config [Config, nil] + # @return [Workspace] a new instance of Workspace + # + # source://solargraph//lib/solargraph/workspace.rb#29 + def initialize(directory = T.unsafe(nil), config = T.unsafe(nil)); end + + # @return [Solargraph::Workspace::Config] + # + # source://solargraph//lib/solargraph/workspace.rb#39 + def config; end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace.rb#16 + def directory; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#78 + def filenames; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#24 + def gemnames; end + + # True if the workspace contains at least one gemspec file. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#115 + def gemspec?; end + + # Get an array of all gemspec files in the workspace. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#122 + def gemspecs; end + + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#89 + def has_file?(filename); end + + # Merge the source. A merge will update the existing source for the file + # or add it to the sources if the workspace is configured to include it. + # The source is ignored if the configuration excludes it. + # + # @param source [Solargraph::Source] + # @return [Boolean] True if the source was added to the workspace + # + # source://solargraph//lib/solargraph/workspace.rb#49 + def merge(*sources); end + + # Remove a source from the workspace. The source will not be removed if + # its file exists and the workspace is configured to include it. + # + # @param filename [String] + # @return [Boolean] True if the source was removed from the workspace + # + # source://solargraph//lib/solargraph/workspace.rb#71 + def remove(filename); end + + # The require paths associated with the workspace. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#21 + def require_paths; end + + # Get a source by its filename. + # + # @param filename [String] + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/workspace.rb#97 + def source(filename); end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#24 + def source_gems; end + + # @return [Array<Solargraph::Source>] + # + # source://solargraph//lib/solargraph/workspace.rb#83 + def sources; end + + # Synchronize the workspace from the provided updater. + # + # @param updater [Source::Updater] + # @return [void] + # + # source://solargraph//lib/solargraph/workspace.rb#133 + def synchronize!(updater); end + + # True if the path resolves to a file in the workspace's require paths. + # + # @param path [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#105 + def would_require?(path); end + + private + + # Get additional require paths defined in the configuration. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#196 + def configured_require_paths; end + + # Generate require paths from gemspecs if they exist or assume the default + # lib directory. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace.rb#164 + def generate_require_paths; end + + # @return [void] + # + # source://solargraph//lib/solargraph/workspace.rb#145 + def load_sources; end + + # source://solargraph//lib/solargraph/workspace.rb#202 + def require_plugins; end + + # @return [Hash{String => Solargraph::Source}] + # + # source://solargraph//lib/solargraph/workspace.rb#140 + def source_hash; end +end + +# Configuration data for a workspace. +# +# source://solargraph//lib/solargraph/workspace/config.rb#9 +class Solargraph::Workspace::Config + # @param directory [String] + # @return [Config] a new instance of Config + # + # source://solargraph//lib/solargraph/workspace/config.rb#21 + def initialize(directory = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace/config.rb#44 + def allow?(filename); end + + # The calculated array of (included - excluded) files in the workspace. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#53 + def calculated; end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#15 + def directory; end + + # An array of domains configured for the workspace. + # A domain is a namespace that the ApiMap should include in the global + # namespace. It's typically used to identify available DSLs. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#63 + def domains; end + + # An array of files excluded from the workspace. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#39 + def excluded; end + + # A hash of options supported by the formatter + # + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#91 + def formatter; end + + # An array of files included in the workspace (before calculating excluded files). + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#31 + def included; end + + # The maximum number of files to parse from the workspace. + # + # @return [Integer] + # + # source://solargraph//lib/solargraph/workspace/config.rb#105 + def max_files; end + + # An array of plugins to require. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#98 + def plugins; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#18 + def raw_data; end + + # An array of reporters to use for diagnostics. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#84 + def reporters; end + + # An array of load paths for required paths. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#77 + def require_paths; end + + # An array of required paths to add to the workspace. + # + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#70 + def required; end + + private + + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#124 + def config_data; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#147 + def default_config; end + + # source://solargraph//lib/solargraph/workspace/config.rb#224 + def excluded_directories; end + + # True if the glob translates to a whole directory. + # + # @example + # glob_is_directory?('path/to/dir') # => true + # glob_is_directory?('path/to/dir/**/*) # => true + # glob_is_directory?('path/to/file.txt') # => false + # glob_is_directory?('path/to/*.txt') # => false + # @param glob [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace/config.rb#209 + def glob_is_directory?(glob); end + + # Translate a glob to a base directory if applicable + # + # @example + # glob_to_directory('path/to/dir/**/*') # => 'path/to/dir' + # @param glob [String] + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#220 + def glob_to_directory(glob); end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#112 + def global_config_path; end + + # Modify the included files based on excluded directories and get an + # array of additional files to exclude. + # + # @param globs [Array<String>] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#186 + def process_exclusions(globs); end + + # Get an array of files from the provided globs. + # + # @param globs [Array<String>] + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/workspace/config.rb#172 + def process_globs(globs); end + + # Read a .solargraph yaml config + # + # @param directory [String] + # @return [Hash, nil] + # + # source://solargraph//lib/solargraph/workspace/config.rb#140 + def read_config(config_path = T.unsafe(nil)); end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#118 + def workspace_config_path; end +end + +# The maximum number of files that can be added to a workspace. +# The workspace's .solargraph.yml can override this value. +# +# source://solargraph//lib/solargraph/workspace/config.rb#12 +Solargraph::Workspace::Config::MAX_FILES = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph.rb#16 +class Solargraph::WorkspaceTooLargeError < ::RuntimeError; end + +# source://solargraph//lib/solargraph.rb#47 +Solargraph::YARD_EXTENSION_FILE = T.let(T.unsafe(nil), String) + +# The YardMap provides access to YARD documentation for the Ruby core, the +# stdlib, and gems. +# +# source://solargraph//lib/solargraph/yard_map.rb#12 +class Solargraph::YardMap + include ::Solargraph::ApiMap::BundlerMethods + + # @param required [Array<String>, Set<String>] + # @param directory [String] + # @param source_gems [Array<String>, Set<String>] + # @param with_dependencies [Boolean] + # @return [YardMap] a new instance of YardMap + # + # source://solargraph//lib/solargraph/yard_map.rb#30 + def initialize(required: T.unsafe(nil), directory: T.unsafe(nil), source_gems: T.unsafe(nil), with_dependencies: T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/yard_map.rb#132 + def base_required; end + + # @param new_requires [Set<String>] Required paths to use for loading gems + # @param new_directory [String] The workspace directory + # @param new_source_gems [Set<String>] Gems under local development (i.e., part of the workspace) + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map.rb#49 + def change(new_requires, new_directory, new_source_gems); end + + # source://solargraph//lib/solargraph/yard_map.rb#136 + def directory; end + + # @param y [String] + # @return [YARD::Registry] + # + # source://solargraph//lib/solargraph/yard_map.rb#97 + def load_yardoc(y); end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/yard_map.rb#91 + def missing_docs; end + + # @param path [String] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/yard_map.rb#111 + def path_pin(path); end + + # @return [Array<Solargraph::Pin::Base>] + # + # source://solargraph//lib/solargraph/yard_map.rb#36 + def pins; end + + # @return [Set<String>] + # + # source://solargraph//lib/solargraph/yard_map.rb#67 + def rebindable_method_names; end + + # Get the location of a file referenced by a require path. + # + # @param path [String] + # @return [Location] + # + # source://solargraph//lib/solargraph/yard_map.rb#119 + def require_reference(path); end + + # @return [Set<String>] + # + # source://solargraph//lib/solargraph/yard_map.rb#81 + def required; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/yard_map.rb#86 + def unresolved_requires; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map.rb#24 + def with_dependencies=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map.rb#40 + def with_dependencies?; end + + # @return [Array<String>] + # + # source://solargraph//lib/solargraph/yard_map.rb#76 + def yardocs; end + + private + + # @return [YardMap::Cache] + # + # source://solargraph//lib/solargraph/yard_map.rb#143 + def cache; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/yard_map.rb#148 + def pin_class_hash; end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/yard_map.rb#153 + def pins_by_class(klass); end + + # @param r [String] + # + # source://solargraph//lib/solargraph/yard_map.rb#219 + def pins_for_require(r, already_errored); end + + # source://solargraph//lib/solargraph/yard_map.rb#202 + def process_error(req, result, already_errored, yd = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/yard_map.rb#213 + def process_gemsets; end + + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map.rb#169 + def process_requires; end + + # @param y [String, nil] + # @param spec [Gem::Specification, nil] + # @raise [NoYardocError] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/yard_map.rb#253 + def process_yardoc(y, spec = T.unsafe(nil)); end + + # @param ns [YARD::CodeObjects::NamespaceObject] + # @return [Array<YARD::CodeObjects::Base>] + # + # source://solargraph//lib/solargraph/yard_map.rb#159 + def recurse_namespace_object(ns); end + + # @param path [String] + # @return [Gem::Specification] + # + # source://solargraph//lib/solargraph/yard_map.rb#284 + def spec_for_require(path); end + + # @param spec [Gem::Specification] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map.rb#278 + def yardoc_file_for_spec(spec); end +end + +# source://solargraph//lib/solargraph/yard_map/cache.rb#5 +class Solargraph::YardMap::Cache + # @return [Cache] a new instance of Cache + # + # source://solargraph//lib/solargraph/yard_map/cache.rb#6 + def initialize; end + + # source://solargraph//lib/solargraph/yard_map/cache.rb#14 + def get_path_pins(path); end + + # source://solargraph//lib/solargraph/yard_map/cache.rb#10 + def set_path_pins(path, pins); end +end + +# source://solargraph//lib/solargraph/yard_map/helpers.rb#3 +module Solargraph::YardMap::Helpers + private + + # @param code_object [YARD::CodeObjects::Base] + # @param spec [Gem::Specification] + # @return [Solargraph::Location, nil] + # + # source://solargraph//lib/solargraph/yard_map/helpers.rb#9 + def object_location(code_object, spec); end + + class << self + # @param code_object [YARD::CodeObjects::Base] + # @param spec [Gem::Specification] + # @return [Solargraph::Location, nil] + # + # source://solargraph//lib/solargraph/yard_map/helpers.rb#9 + def object_location(code_object, spec); end + end +end + +# source://solargraph//lib/solargraph/yard_map/mapper.rb#5 +class Solargraph::YardMap::Mapper + # @param code_objects [Array<YARD::CodeObjects::Base>] + # @param spec [Gem::Specification] + # @return [Mapper] a new instance of Mapper + # + # source://solargraph//lib/solargraph/yard_map/mapper.rb#12 + def initialize(code_objects, spec = T.unsafe(nil)); end + + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/yard_map/mapper.rb#20 + def map; end + + private + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array<Pin::Base>] + # + # source://solargraph//lib/solargraph/yard_map/mapper.rb#34 + def generate_pins(code_object); end +end + +# source://solargraph//lib/solargraph/yard_map/mapper/to_constant.rb#6 +module Solargraph::YardMap::Mapper::ToConstant + extend ::Solargraph::YardMap::Helpers + + class << self + # source://solargraph//lib/solargraph/yard_map/mapper/to_constant.rb#9 + def make(code_object, closure = T.unsafe(nil), spec = T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#6 +module Solargraph::YardMap::Mapper::ToMethod + extend ::Solargraph::YardMap::Helpers + + class << self + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#9 + def make(code_object, name = T.unsafe(nil), scope = T.unsafe(nil), visibility = T.unsafe(nil), closure = T.unsafe(nil), spec = T.unsafe(nil)); end + + private + + # @param a [Array] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#56 + def arg_name(a); end + + # @param a [Array] + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#62 + def arg_type(a); end + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array<Solargraph::Pin::Parameter>] + # + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#36 + def get_parameters(code_object, location, comments, pin); end + end +end + +# source://solargraph//lib/solargraph/yard_map/mapper/to_namespace.rb#6 +module Solargraph::YardMap::Mapper::ToNamespace + extend ::Solargraph::YardMap::Helpers + + class << self + # source://solargraph//lib/solargraph/yard_map/mapper/to_namespace.rb#9 + def make(code_object, spec, closure = T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/yard_map.rb#13 +class Solargraph::YardMap::NoYardocError < ::StandardError; end + +# source://solargraph//lib/solargraph/yard_map/to_method.rb#5 +class Solargraph::YardMap::ToMethod + extend ::Solargraph::YardMap::Helpers + + # source://solargraph//lib/solargraph/yard_map/to_method.rb#59 + def make(code_object, name = T.unsafe(nil), scope = T.unsafe(nil), visibility = T.unsafe(nil), closure = T.unsafe(nil), spec = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/yard_map/to_method.rb#6 +module Solargraph::YardMap::ToMethod::InnerMethods + private + + # @param a [Array] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#31 + def arg_name(a); end + + # @param a [Array] + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#37 + def arg_type(a); end + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array<Solargraph::Pin::Parameter>] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#11 + def get_parameters(code_object, location, comments); end + + class << self + # @param a [Array] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#31 + def arg_name(a); end + + # @param a [Array] + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#37 + def arg_type(a); end + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array<Solargraph::Pin::Parameter>] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#11 + def get_parameters(code_object, location, comments); end + end +end diff --git a/sorbet/rbi/gems/spoom@1.2.3.rbi b/sorbet/rbi/gems/spoom@1.2.3.rbi new file mode 100644 index 0000000000..2eb8da7de7 --- /dev/null +++ b/sorbet/rbi/gems/spoom@1.2.3.rbi @@ -0,0 +1,3203 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `spoom` gem. +# Please instead update this file by running `bin/tapioca gem spoom`. + +# source://spoom//lib/spoom.rb#7 +module Spoom; end + +# source://spoom//lib/spoom/cli/helper.rb#9 +module Spoom::Cli; end + +# source://spoom//lib/spoom/cli/bump.rb#9 +class Spoom::Cli::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/bump.rb#49 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/bump.rb#170 + def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/bump.rb#192 + def undo_changes(files, from_strictness); end +end + +# source://spoom//lib/spoom/cli/config.rb#9 +class Spoom::Cli::Config < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/config.rb#15 + def show; end +end + +# source://spoom//lib/spoom/cli/coverage.rb#9 +class Spoom::Cli::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/coverage.rb#198 + def bundle_install(path, sha); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/coverage.rb#210 + def message_no_data(file); end + + # source://spoom//lib/spoom/cli/coverage.rb#173 + def open(file = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/coverage.rb#189 + def parse_time(string, option); end + + # source://spoom//lib/spoom/cli/coverage.rb#142 + def report; end + + # source://spoom//lib/spoom/cli/coverage.rb#20 + def snapshot; end + + # source://spoom//lib/spoom/cli/coverage.rb#42 + def timeline; end +end + +# source://spoom//lib/spoom/cli/coverage.rb#12 +Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/helper.rb#10 +module Spoom::Cli::Helper + include ::Spoom::Colorize + + requires_ancestor { Thor } + + # source://spoom//lib/spoom/cli/helper.rb#119 + sig { params(string: ::String).returns(::String) } + def blue(string); end + + # Is the `--color` option true? + # + # source://spoom//lib/spoom/cli/helper.rb#83 + sig { returns(T::Boolean) } + def color?; end + + # Colorize a string if `color?` + # + # source://spoom//lib/spoom/cli/helper.rb#112 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Returns the context at `--path` (by default the current working directory) + # + # source://spoom//lib/spoom/cli/helper.rb#51 + sig { returns(::Spoom::Context) } + def context; end + + # Raise if `spoom` is not ran inside a context with a `sorbet/config` file + # + # source://spoom//lib/spoom/cli/helper.rb#57 + sig { returns(::Spoom::Context) } + def context_requiring_sorbet!; end + + # source://spoom//lib/spoom/cli/helper.rb#124 + sig { params(string: ::String).returns(::String) } + def cyan(string); end + + # Return the path specified through `--path` + # + # source://spoom//lib/spoom/cli/helper.rb#72 + sig { returns(::String) } + def exec_path; end + + # source://spoom//lib/spoom/cli/helper.rb#129 + sig { params(string: ::String).returns(::String) } + def gray(string); end + + # source://spoom//lib/spoom/cli/helper.rb#134 + sig { params(string: ::String).returns(::String) } + def green(string); end + + # source://spoom//lib/spoom/cli/helper.rb#88 + sig { params(string: ::String).returns(::String) } + def highlight(string); end + + # source://spoom//lib/spoom/cli/helper.rb#139 + sig { params(string: ::String).returns(::String) } + def red(string); end + + # Print `message` on `$stdout` + # + # source://spoom//lib/spoom/cli/helper.rb#20 + sig { params(message: ::String).void } + def say(message); end + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Error`). + # + # source://spoom//lib/spoom/cli/helper.rb#39 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/helper.rb#144 + sig { params(string: ::String).returns(::String) } + def yellow(string); end +end + +# source://spoom//lib/spoom/cli/lsp.rb#10 +class Spoom::Cli::LSP < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#55 + def defs(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#65 + def find(query); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#41 + def hover(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#26 + def list; end + + # source://spoom//lib/spoom/cli/lsp.rb#114 + def lsp_client; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#85 + def refs(file, line, col); end + + # source://spoom//lib/spoom/cli/lsp.rb#137 + def run(&block); end + + # source://spoom//lib/spoom/cli/lsp.rb#16 + def show; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#95 + def sigs(file, line, col); end + + # source://spoom//lib/spoom/cli/lsp.rb#129 + def symbol_printer; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#75 + def symbols(file); end + + # source://spoom//lib/spoom/cli/lsp.rb#162 + def to_uri(path); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/lsp.rb#105 + def types(file, line, col); end +end + +# source://spoom//lib/spoom/cli.rb#16 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli.rb#61 + def __print_version; end + + # source://thor/1.2.2/lib/thor.rb#239 + def bump(*args); end + + # source://thor/1.2.2/lib/thor.rb#239 + def config(*args); end + + # source://thor/1.2.2/lib/thor.rb#239 + def coverage(*args); end + + # source://spoom//lib/spoom/cli.rb#43 + def files; end + + # source://thor/1.2.2/lib/thor.rb#239 + def lsp(*args); end + + # source://thor/1.2.2/lib/thor.rb#239 + def tc(*args); end + + class << self + # @return [Boolean] + # + # source://spoom//lib/spoom/cli.rb#68 + def exit_on_failure?; end + end +end + +# source://spoom//lib/spoom/cli/run.rb#6 +class Spoom::Cli::Run < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/run.rb#131 + def colorize_message(message); end + + # source://spoom//lib/spoom/cli/run.rb#122 + def format_error(error, format); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/run.rb#26 + def tc(*paths_to_select); end +end + +# source://spoom//lib/spoom/cli/run.rb#15 +Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/run.rb#11 +Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/run.rb#13 +Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli/run.rb#12 +Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/colors.rb#5 +class Spoom::Color < ::T::Enum + enums do + CLEAR = new + BOLD = new + BLACK = new + RED = new + GREEN = new + YELLOW = new + BLUE = new + MAGENTA = new + CYAN = new + WHITE = new + LIGHT_BLACK = new + LIGHT_RED = new + LIGHT_GREEN = new + LIGHT_YELLOW = new + LIGHT_BLUE = new + LIGHT_MAGENTA = new + LIGHT_CYAN = new + LIGHT_WHITE = new + end + + # source://spoom//lib/spoom/colors.rb#32 + sig { returns(::String) } + def ansi_code; end +end + +# source://spoom//lib/spoom/colors.rb#37 +module Spoom::Colorize + # source://spoom//lib/spoom/colors.rb#41 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def set_color(string, *color); end +end + +# An abstraction to a Ruby project context +# +# A context maps to a directory in the file system. +# It is used to manipulate files and run commands in the context of this directory. +# +# source://spoom//lib/spoom/context/bundle.rb#5 +class Spoom::Context + include ::Spoom::Context::Bundle + include ::Spoom::Context::Exec + include ::Spoom::Context::FileSystem + include ::Spoom::Context::Git + include ::Spoom::Context::Sorbet + + # Create a new context about `absolute_path` + # + # The directory will not be created if it doesn't exist. + # Call `#make!` to create it. + # + # source://spoom//lib/spoom/context.rb#51 + sig { params(absolute_path: ::String).void } + def initialize(absolute_path); end + + # The absolute path to the directory this context is about + # + # source://spoom//lib/spoom/context.rb#44 + sig { returns(::String) } + def absolute_path; end + + class << self + # Create a new context in the system's temporary directory + # + # `name` is used as prefix to the temporary directory name. + # The directory will be created if it doesn't exist. + # + # source://spoom//lib/spoom/context.rb#37 + sig { params(name: T.nilable(::String)).returns(T.attached_class) } + def mktmp!(name = T.unsafe(nil)); end + end +end + +# Bundle features for a context +# +# source://spoom//lib/spoom/context/bundle.rb#7 +module Spoom::Context::Bundle + requires_ancestor { Spoom::Context } + + # Run a command with `bundle` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#33 + sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Run a command `bundle exec` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#46 + sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Run `bundle install` in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#40 + sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Get `gem` version from the `Gemfile.lock` content + # + # Returns `nil` if `gem` cannot be found in the Gemfile. + # + # source://spoom//lib/spoom/context/bundle.rb#62 + sig { params(gem: ::String).returns(T.nilable(::String)) } + def gem_version_from_gemfile_lock(gem); end + + # source://spoom//lib/spoom/context/bundle.rb#51 + sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) } + def gemfile_lock_specs; end + + # Read the contents of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#15 + sig { returns(T.nilable(::String)) } + def read_gemfile; end + + # Read the contents of the Gemfile.lock in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#21 + sig { returns(T.nilable(::String)) } + def read_gemfile_lock; end + + # Set the `contents` of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#27 + sig { params(contents: ::String, append: T::Boolean).void } + def write_gemfile!(contents, append: T.unsafe(nil)); end +end + +# Execution features for a context +# +# source://spoom//lib/spoom/context/exec.rb#27 +module Spoom::Context::Exec + requires_ancestor { Spoom::Context } + + # Run a command in this context directory + # + # source://spoom//lib/spoom/context/exec.rb#35 + sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def exec(command, capture_err: T.unsafe(nil)); end +end + +# File System features for a context +# +# source://spoom//lib/spoom/context/file_system.rb#7 +module Spoom::Context::FileSystem + requires_ancestor { Spoom::Context } + + # Returns the absolute path to `relative_path` in the context's directory + # + # source://spoom//lib/spoom/context/file_system.rb#15 + sig { params(relative_path: ::String).returns(::String) } + def absolute_path_to(relative_path); end + + # source://spoom//lib/spoom/context/file_system.rb#53 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).returns(T::Array[::String]) + end + def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # Delete this context and its content + # + # Warning: it will `rm -rf` the context directory on the file system. + # + # source://spoom//lib/spoom/context/file_system.rb#105 + sig { void } + def destroy!; end + + # Does the context directory at `absolute_path` exist and is a directory? + # + # source://spoom//lib/spoom/context/file_system.rb#21 + sig { returns(T::Boolean) } + def exist?; end + + # Does `relative_path` point to an existing file in this context directory? + # + # source://spoom//lib/spoom/context/file_system.rb#65 + sig { params(relative_path: ::String).returns(T::Boolean) } + def file?(relative_path); end + + # List all files in this context matching `pattern` + # + # source://spoom//lib/spoom/context/file_system.rb#34 + sig { params(pattern: ::String).returns(T::Array[::String]) } + def glob(pattern = T.unsafe(nil)); end + + # List all files at the top level of this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#42 + sig { returns(T::Array[::String]) } + def list; end + + # Create the context directory at `absolute_path` + # + # source://spoom//lib/spoom/context/file_system.rb#27 + sig { void } + def mkdir!; end + + # Move the file or directory from `from_relative_path` to `to_relative_path` + # + # source://spoom//lib/spoom/context/file_system.rb#95 + sig { params(from_relative_path: ::String, to_relative_path: ::String).void } + def move!(from_relative_path, to_relative_path); end + + # Return the contents of the file at `relative_path` in this context directory + # + # Will raise if the file doesn't exist. + # + # source://spoom//lib/spoom/context/file_system.rb#73 + sig { params(relative_path: ::String).returns(::String) } + def read(relative_path); end + + # Remove the path at `relative_path` (recursive + force) in this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#89 + sig { params(relative_path: ::String).void } + def remove!(relative_path); end + + # Write `contents` in the file at `relative_path` in this context directory + # + # Append to the file if `append` is true. + # + # source://spoom//lib/spoom/context/file_system.rb#81 + sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } + def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end +end + +# Git features for a context +# +# source://spoom//lib/spoom/context/git.rb#35 +module Spoom::Context::Git + requires_ancestor { Spoom::Context } + + # Run a command prefixed by `git` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#43 + sig { params(command: ::String).returns(::Spoom::ExecResult) } + def git(command); end + + # Run `git checkout` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#62 + sig { params(ref: ::String).returns(::Spoom::ExecResult) } + def git_checkout!(ref: T.unsafe(nil)); end + + # Run `git checkout -b <branch-name> <ref>` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#68 + sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end + + # Run `git add . && git commit` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#78 + sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) } + def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end + + # Get the current git branch in this context directory + # + # source://spoom//lib/spoom/context/git.rb#89 + sig { returns(T.nilable(::String)) } + def git_current_branch; end + + # Run `git diff` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#98 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_diff(*arg); end + + # Run `git init` in this context directory + # + # Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+. + # In older versions, use `git_init!` followed by `git("checkout -b <branch>")`. + # + # source://spoom//lib/spoom/context/git.rb#52 + sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_init!(branch: T.unsafe(nil)); end + + # Get the last commit in the currently checked out branch + # + # source://spoom//lib/spoom/context/git.rb#104 + sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } + def git_last_commit(short_sha: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#115 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_log(*arg); end + + # Run `git push <remote> <ref>` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#121 + sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } + def git_push!(remote, ref, force: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#126 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_show(*arg); end + + # Is there uncommited changes in this context directory? + # + # source://spoom//lib/spoom/context/git.rb#132 + sig { params(path: ::String).returns(T::Boolean) } + def git_workdir_clean?(path: T.unsafe(nil)); end +end + +# Sorbet features for a context +# +# source://spoom//lib/spoom/context/sorbet.rb#7 +module Spoom::Context::Sorbet + requires_ancestor { Spoom::Context } + + # Does this context has a `sorbet/config` file? + # + # source://spoom//lib/spoom/context/sorbet.rb#119 + sig { returns(T::Boolean) } + def has_sorbet_config?; end + + # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) + # + # source://spoom//lib/spoom/context/sorbet.rb#142 + sig { params(relative_path: ::String).returns(T.nilable(::String)) } + def read_file_strictness(relative_path); end + + # Read the contents of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#130 + sig { returns(::String) } + def read_sorbet_config; end + + # source://spoom//lib/spoom/context/sorbet.rb#124 + sig { returns(::Spoom::Sorbet::Config) } + def sorbet_config; end + + # Get the commit introducing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#148 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_intro_commit; end + + # Get the commit removing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#160 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_removal_commit; end + + # Run `bundle exec srb` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#15 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` + # + # source://spoom//lib/spoom/context/sorbet.rb#65 + sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) } + def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` that matches `strictness` + # + # source://spoom//lib/spoom/context/sorbet.rb#104 + sig do + params( + strictness: ::String, + with_config: T.nilable(::Spoom::Sorbet::Config), + include_rbis: T::Boolean + ).returns(T::Array[::String]) + end + def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#45 + sig do + params( + arg: ::String, + sorbet_bin: T.nilable(::String), + capture_err: T::Boolean + ).returns(T.nilable(T::Hash[::String, ::Integer])) + end + def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#33 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#110 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) } + def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Set the `contents` of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#136 + sig { params(contents: ::String, append: T::Boolean).void } + def write_sorbet_config!(contents, append: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#5 +module Spoom::Coverage + class << self + # source://spoom//lib/spoom/coverage.rb#103 + sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) } + def file_tree(context); end + + # source://spoom//lib/spoom/coverage.rb#83 + sig do + params( + context: ::Spoom::Context, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + palette: ::Spoom::Coverage::D3::ColorPalette + ).returns(::Spoom::Coverage::Report) + end + def report(context, snapshots, palette:); end + + # source://spoom//lib/spoom/coverage.rb#16 + sig do + params( + context: ::Spoom::Context, + rbi: T::Boolean, + sorbet_bin: T.nilable(::String) + ).returns(::Spoom::Coverage::Snapshot) + end + def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/coverage/report.rb#88 +module Spoom::Coverage::Cards; end + +# source://spoom//lib/spoom/coverage/report.rb#89 +class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template + # source://spoom//lib/spoom/coverage/report.rb#98 + sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void } + def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end + + # @return [String, nil] + # + # source://spoom//lib/spoom/coverage/report.rb#95 + def body; end + + # source://spoom//lib/spoom/coverage/report.rb#95 + sig { returns(T.nilable(::String)) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#92 +Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#105 +class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#112 + sig { void } + def initialize; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#120 + sig { abstract.returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#115 + sig { override.returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/coverage/report.rb#153 +class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#164 + sig do + params( + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + title: ::String + ).void + end + def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#123 +class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#132 + sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } + def initialize(snapshot:, title: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#143 + sig { returns(::Spoom::Coverage::D3::Pie::Calls) } + def pie_calls; end + + # source://spoom//lib/spoom/coverage/report.rb#138 + sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } + def pie_sigils; end + + # source://spoom//lib/spoom/coverage/report.rb#148 + sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } + def pie_sigs; end + + # source://spoom//lib/spoom/coverage/report.rb#129 + sig { returns(::Spoom::Coverage::Snapshot) } + def snapshot; end +end + +# source://spoom//lib/spoom/coverage/report.rb#126 +Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#240 +class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb + # source://spoom//lib/spoom/coverage/report.rb#244 + sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } + def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#250 + sig { override.returns(::String) } + def erb; end +end + +# source://spoom//lib/spoom/coverage/report.rb#177 +class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#181 + sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } + def initialize(title:, timeline:); end +end + +# source://spoom//lib/spoom/coverage/report.rb#194 +class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#198 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#212 +class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#216 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#230 +class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#234 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#185 +class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#189 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#203 +class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#207 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#221 +class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#225 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/d3/base.rb#6 +module Spoom::Coverage::D3 + class << self + # source://spoom//lib/spoom/coverage/d3.rb#61 + sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } + def header_script(palette); end + + # source://spoom//lib/spoom/coverage/d3.rb#21 + sig { returns(::String) } + def header_style; end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/base.rb#7 +class Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/base.rb#17 + sig { params(id: ::String, data: T.untyped).void } + def initialize(id, data); end + + # source://spoom//lib/spoom/coverage/d3/base.rb#37 + sig { returns(::String) } + def html; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#14 + sig { returns(::String) } + def id; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/base.rb#50 + sig { abstract.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#45 + sig { returns(::String) } + def tooltip; end + + class << self + # source://spoom//lib/spoom/coverage/d3/base.rb#31 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#26 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3.rb#12 +Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#11 +Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#14 +Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#15 +Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#13 +Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9 +class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148 +class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159 + sig do + params( + id: ::String, + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float] + ).void + end + def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166 + sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } + def tree_node_to_json(node); end +end + +# source://spoom//lib/spoom/coverage/d3.rb#103 +class Spoom::Coverage::D3::ColorPalette < ::T::Struct + prop :ignore, ::String + prop :false, ::String + prop :true, ::String + prop :strict, ::String + prop :strong, ::String + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/pie.rb#9 +class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/pie.rb#16 + sig { params(id: ::String, title: ::String, data: T.untyped).void } + def initialize(id, title, data); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#56 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/pie.rb#43 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#25 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#141 +class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#145 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#150 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#123 +class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#127 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#132 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/pie.rb#159 +class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie + # source://spoom//lib/spoom/coverage/d3/pie.rb#163 + sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } + def initialize(id, title, snapshot); end + + # source://spoom//lib/spoom/coverage/d3/pie.rb#172 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/timeline.rb#9 +class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#16 + sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void } + def initialize(id, data, keys); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#187 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#203 + sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/timeline.rb#126 + sig { abstract.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#217 + sig { params(y: ::String).returns(::String) } + def points(y:); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#101 + sig { override.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#129 + sig { returns(::String) } + def x_scale; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#145 + sig { returns(::String) } + def x_ticks; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#158 + sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) } + def y_scale(min:, max:, ticks:); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#174 + sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) } + def y_ticks(ticks:, format:, padding:); end + + class << self + # source://spoom//lib/spoom/coverage/d3/timeline.rb#79 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#25 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#448 +class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#452 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#466 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#505 +class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#509 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#577 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#617 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#537 + sig { override.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#523 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#282 +class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline + # source://spoom//lib/spoom/coverage/d3/timeline.rb#286 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#311 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#298 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#421 +class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#425 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#439 + sig { override.returns(::String) } + def tooltip; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#475 +class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked + # source://spoom//lib/spoom/coverage/d3/timeline.rb#479 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#496 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/timeline.rb#329 +class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline + abstract! + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#388 + sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } + def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#377 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#336 + sig { override.returns(::String) } + def script; end +end + +# source://spoom//lib/spoom/coverage/d3/timeline.rb#232 +class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline + # source://spoom//lib/spoom/coverage/d3/timeline.rb#236 + sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } + def initialize(id, snapshots); end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#263 + sig { override.returns(::String) } + def plot; end + + # source://spoom//lib/spoom/coverage/d3/timeline.rb#249 + sig { override.returns(::String) } + def tooltip; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#38 +class Spoom::Coverage::Page < ::Spoom::Coverage::Template + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#53 + sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void } + def initialize(title:, palette:, template: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#75 + sig { returns(::String) } + def body_html; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#80 + sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # source://spoom//lib/spoom/coverage/report.rb#83 + sig { returns(::String) } + def footer_html; end + + # source://spoom//lib/spoom/coverage/report.rb#70 + sig { returns(::String) } + def header_html; end + + # source://spoom//lib/spoom/coverage/report.rb#65 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/report.rb#60 + sig { returns(::String) } + def header_style; end + + # source://spoom//lib/spoom/coverage/report.rb#50 + sig { returns(::Spoom::Coverage::D3::ColorPalette) } + def palette; end + + # source://spoom//lib/spoom/coverage/report.rb#47 + sig { returns(::String) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#44 +Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#261 +class Spoom::Coverage::Report < ::Spoom::Coverage::Page + # source://spoom//lib/spoom/coverage/report.rb#276 + sig do + params( + project_name: ::String, + palette: ::Spoom::Coverage::D3::ColorPalette, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + sorbet_intro_commit: T.nilable(::String), + sorbet_intro_date: T.nilable(::Time) + ).void + end + def initialize(project_name:, palette:, snapshots:, file_tree:, nodes_strictnesses:, nodes_strictness_scores:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#308 + sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } + def cards; end + + # source://spoom//lib/spoom/coverage/report.rb#297 + sig { override.returns(::String) } + def header_html; end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#6 +class Spoom::Coverage::Snapshot < ::T::Struct + prop :timestamp, ::Integer, default: T.unsafe(nil) + prop :version_static, T.nilable(::String), default: T.unsafe(nil) + prop :version_runtime, T.nilable(::String), default: T.unsafe(nil) + prop :duration, ::Integer, default: T.unsafe(nil) + prop :commit_sha, T.nilable(::String), default: T.unsafe(nil) + prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil) + prop :files, ::Integer, default: T.unsafe(nil) + prop :rbi_files, ::Integer, default: T.unsafe(nil) + prop :modules, ::Integer, default: T.unsafe(nil) + prop :classes, ::Integer, default: T.unsafe(nil) + prop :singleton_classes, ::Integer, default: T.unsafe(nil) + prop :methods_without_sig, ::Integer, default: T.unsafe(nil) + prop :methods_with_sig, ::Integer, default: T.unsafe(nil) + prop :calls_untyped, ::Integer, default: T.unsafe(nil) + prop :calls_typed, ::Integer, default: T.unsafe(nil) + prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil) + prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) + prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) + prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil) + + # source://spoom//lib/spoom/coverage/snapshot.rb#33 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#39 + sig { params(arg: T.untyped).returns(::String) } + def to_json(*arg); end + + class << self + # source://spoom//lib/spoom/coverage/snapshot.rb#47 + sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } + def from_json(json); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#52 + sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } + def from_obj(obj); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# The strictness name as found in the Sorbet metrics file +# +# source://spoom//lib/spoom/coverage/snapshot.rb#30 +Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/coverage/snapshot.rb#95 +class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/coverage/snapshot.rb#99 + sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } + def print_snapshot(snapshot); end + + private + + # source://spoom//lib/spoom/coverage/snapshot.rb#158 + sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } + def percent(value, total); end + + # source://spoom//lib/spoom/coverage/snapshot.rb#147 + sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } + def print_map(hash, total); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#10 +class Spoom::Coverage::Template + abstract! + + # Create a new template from an Erb file path + # + # source://spoom//lib/spoom/coverage/report.rb#18 + sig { params(template: ::String).void } + def initialize(template:); end + + # source://spoom//lib/spoom/coverage/report.rb#23 + sig { returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#33 + sig { returns(::Binding) } + def get_binding; end + + # source://spoom//lib/spoom/coverage/report.rb#28 + sig { returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#27 +module Spoom::Deadcode + class << self + # source://spoom//lib/spoom/deadcode.rb#50 + sig do + params( + index: ::Spoom::Deadcode::Index, + erb: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#39 + sig do + params( + index: ::Spoom::Deadcode::Index, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end + end +end + +# A definition is a class, module, method, constant, etc. being defined in the code +# +# source://spoom//lib/spoom/deadcode/definition.rb#7 +class Spoom::Deadcode::Definition < ::T::Struct + const :kind, ::Spoom::Deadcode::Definition::Kind + const :name, ::String + const :full_name, ::String + const :location, ::Spoom::Deadcode::Location + const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/definition.rb#78 + sig { void } + def alive!; end + + # Status + # + # source://spoom//lib/spoom/deadcode/definition.rb#73 + sig { returns(T::Boolean) } + def alive?; end + + # Kind + # + # source://spoom//lib/spoom/deadcode/definition.rb#41 + sig { returns(T::Boolean) } + def attr_reader?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#46 + sig { returns(T::Boolean) } + def attr_writer?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#51 + sig { returns(T::Boolean) } + def class?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#56 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#83 + sig { returns(T::Boolean) } + def dead?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#93 + sig { void } + def ignored!; end + + # source://spoom//lib/spoom/deadcode/definition.rb#88 + sig { returns(T::Boolean) } + def ignored?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#61 + sig { returns(T::Boolean) } + def method?; end + + # source://spoom//lib/spoom/deadcode/definition.rb#66 + sig { returns(T::Boolean) } + def module?; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#10 +class Spoom::Deadcode::Definition::Kind < ::T::Enum + enums do + AttrReader = new + AttrWriter = new + Class = new + Constant = new + Method = new + Module = new + end +end + +# source://spoom//lib/spoom/deadcode/definition.rb#21 +class Spoom::Deadcode::Definition::Status < ::T::Enum + enums do + ALIVE = new + DEAD = new + IGNORED = new + end +end + +# Custom engine to handle ERB templates as used by Rails +# +# source://spoom//lib/spoom/deadcode/erb.rb#29 +class Spoom::Deadcode::ERB < ::Erubi::Engine + # source://spoom//lib/spoom/deadcode/erb.rb#33 + sig { params(input: T.untyped, properties: T.untyped).void } + def initialize(input, properties = T.unsafe(nil)); end + + private + + # source://spoom//lib/spoom/deadcode/erb.rb#83 + sig { params(code: T.untyped).void } + def add_code(code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#66 + sig { params(indicator: T.untyped, code: T.untyped).void } + def add_expression(indicator, code); end + + # source://spoom//lib/spoom/deadcode/erb.rb#89 + sig { params(_: T.untyped).void } + def add_postamble(_); end + + # source://spoom//lib/spoom/deadcode/erb.rb#48 + sig { params(text: T.untyped).void } + def add_text(text); end + + # source://spoom//lib/spoom/deadcode/erb.rb#95 + sig { params(src: T.untyped).void } + def flush_newline_if_pending(src); end +end + +# source://spoom//lib/spoom/deadcode/erb.rb#63 +Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode.rb#19 +class Spoom::Deadcode::Error < ::Spoom::Error + abstract! + + # source://spoom//lib/spoom/deadcode.rb#26 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + +# source://spoom//lib/spoom/deadcode/index.rb#6 +class Spoom::Deadcode::Index + # source://spoom//lib/spoom/deadcode/index.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/deadcode/index.rb#51 + sig { returns(T::Array[::Spoom::Deadcode::Definition]) } + def all_definitions; end + + # source://spoom//lib/spoom/deadcode/index.rb#56 + sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + def all_references; end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#24 + sig { params(definition: ::Spoom::Deadcode::Definition).void } + def define(definition); end + + # source://spoom//lib/spoom/deadcode/index.rb#10 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } + def definitions; end + + # Utils + # + # source://spoom//lib/spoom/deadcode/index.rb#46 + sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } + def definitions_for_name(name); end + + # Mark all definitions having a reference of the same name as `alive` + # + # To be called once all the files have been indexed and all the definitions and references discovered. + # + # source://spoom//lib/spoom/deadcode/index.rb#37 + sig { void } + def finalize!; end + + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(reference: ::Spoom::Deadcode::Reference).void } + def reference(reference); end + + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + def references; end +end + +# source://spoom//lib/spoom/deadcode/indexer.rb#6 +class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor + # source://spoom//lib/spoom/deadcode/indexer.rb#16 + sig do + params( + path: ::String, + source: ::String, + index: ::Spoom::Deadcode::Index, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def initialize(path, source, index, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#391 + sig do + params( + node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) + ).returns(T::Array[::SyntaxTree::Node]) + end + def call_args(node); end + + # Definition indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#281 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_reader(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#293 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_attr_writer(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#305 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_class(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#317 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_constant(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#329 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_method(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#341 + sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + def define_module(name, full_name, node); end + + # @return [String] + # + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + def file_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#377 + sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } + def node_location(node); end + + # Node utils + # + # source://spoom//lib/spoom/deadcode/indexer.rb#367 + sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } + def node_string(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + sig { returns(::String) } + def path; end + + # Reference indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#355 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#360 + sig { params(name: ::String, node: ::SyntaxTree::Node).void } + def reference_method(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#382 + sig { params(node: ::SyntaxTree::Node).returns(::String) } + def symbol_string(node); end + + # Visit + # + # source://spoom//lib/spoom/deadcode/indexer.rb#35 + sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } + def visit(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#45 + sig { override.params(node: ::SyntaxTree::AliasNode).void } + def visit_alias(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#50 + sig { override.params(node: ::SyntaxTree::ARef).void } + def visit_aref(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#57 + sig { override.params(node: ::SyntaxTree::ARefField).void } + def visit_aref_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#64 + sig { override.params(node: ::SyntaxTree::ArgBlock).void } + def visit_arg_block(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#78 + sig { override.params(node: ::SyntaxTree::Binary).void } + def visit_binary(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#94 + sig { override.params(node: ::SyntaxTree::CallNode).void } + def visit_call(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#106 + sig { override.params(node: ::SyntaxTree::ClassDeclaration).void } + def visit_class(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#119 + sig { override.params(node: ::SyntaxTree::Command).void } + def visit_command(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#131 + sig { override.params(node: ::SyntaxTree::CommandCall).void } + def visit_command_call(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#144 + sig { override.params(node: ::SyntaxTree::Const).void } + def visit_const(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#149 + sig { override.params(node: ::SyntaxTree::ConstPathField).void } + def visit_const_path_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#159 + sig { override.params(node: ::SyntaxTree::DefNode).void } + def visit_def(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#167 + sig { override.params(node: ::SyntaxTree::Field).void } + def visit_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#183 + sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void } + def visit_module(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#195 + sig { override.params(node: ::SyntaxTree::OpAssign).void } + def visit_opassign(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#204 + sig { params(send: ::Spoom::Deadcode::Send).void } + def visit_send(send); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#243 + sig { override.params(node: ::SyntaxTree::SymbolLiteral).void } + def visit_symbol_literal(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#252 + sig { override.params(node: ::SyntaxTree::TopConstField).void } + def visit_top_const_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#257 + sig { override.params(node: ::SyntaxTree::VarField).void } + def visit_var_field(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#274 + sig { override.params(node: ::SyntaxTree::VCall).void } + def visit_vcall(node); end +end + +# source://spoom//lib/spoom/deadcode.rb#33 +class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end + +# source://spoom//lib/spoom/deadcode/location.rb#6 +class Spoom::Deadcode::Location + include ::Comparable + + # source://spoom//lib/spoom/deadcode/location.rb#37 + sig do + params( + file: ::String, + start_line: ::Integer, + start_column: ::Integer, + end_line: ::Integer, + end_column: ::Integer + ).void + end + def initialize(file, start_line, start_column, end_line, end_column); end + + # source://spoom//lib/spoom/deadcode/location.rb#46 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#26 + def end_column; end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#26 + def end_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#23 + sig { returns(::String) } + def file; end + + # @return [Integer] + # + # source://spoom//lib/spoom/deadcode/location.rb#26 + def start_column; end + + # source://spoom//lib/spoom/deadcode/location.rb#26 + sig { returns(::Integer) } + def start_line; end + + # source://spoom//lib/spoom/deadcode/location.rb#53 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/deadcode/location.rb#17 + sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) } + def from_syntax_tree(file, location); end + end +end + +# source://spoom//lib/spoom/deadcode/location.rb#11 +class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/deadcode.rb#32 +class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end + +# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 +module Spoom::Deadcode::Plugins; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 +class Spoom::Deadcode::Plugins::Base + abstract! + + # Called when an accessor is defined. + # + # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_accessor(indexer, definition) + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#72 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_accessor(indexer, definition); end + + # Called when a class is defined. + # + # Will be called when the indexer processes a `class` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_class(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#90 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_class(indexer, definition); end + + # Called when a constant is defined. + # + # Will be called when the indexer processes a `CONST =` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_constant(indexer, definition) + # definition.ignored! if definition.name == "FOO" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#108 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_constant(indexer, definition); end + + # Called when a method is defined. + # + # Will be called when the indexer processes a `def` or `defs` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_method(indexer, definition) + # super # So the `ignore_method_names` DSL is still applied + # + # definition.ignored! if definition.name == "foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#128 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); end + + # Called when a module is defined. + # + # Will be called when the indexer processes a `module` node. + # Note that when this method is called, the definition for the node has already been added to the index. + # It is still possible to ignore it from the plugin: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_define_module(indexer, definition) + # definition.ignored! if definition.name == "Foo" + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#146 + sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_module(indexer, definition); end + + # Called when a send is being processed + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # def on_send(indexer, send) + # return unless send.name == "dsl_method" + # return if send.args.empty? + # + # method_name = indexer.node_string(send.args.first).delete_prefix(":") + # indexer.reference_method(method_name, send.node) + # end + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#164 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#171 + sig { params(name: ::String).returns(T::Boolean) } + def ignored_method_name?(name); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#181 + sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } + def ignored_name?(name, names_variable, patterns_variable); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#176 + sig { params(const: ::Symbol).returns(T::Set[::String]) } + def names(const); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#186 + sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } + def patterns(const); end + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#191 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def reference_send_first_symbol_as_method(indexer, send); end + + class << self + # Mark methods matching `names` as ignored. + # + # Names can be either strings or regexps: + # + # ~~~rb + # class MyPlugin < Spoom::Deadcode::Plugins::Base + # ignore_method_names( + # "foo", + # "bar", + # /baz.*/, + # ) + # end + # ~~~ + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#34 + sig { params(names: T.any(::Regexp, ::String)).void } + def ignore_method_names(*names); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/base.rb#41 + sig do + params( + names: T::Array[T.any(::Regexp, ::String)], + names_variable: ::Symbol, + patterns_variable: ::Symbol + ).void + end + def save_names_and_patterns(names, names_variable, patterns_variable); end + end +end + +# source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7 +class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24 + sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } + def on_send(indexer, send); end + + private + + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#49 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void } + def reference_symbol_as_constant(indexer, send, node); end +end + +# A reference is a call to a method or a constant +# +# source://spoom//lib/spoom/deadcode/reference.rb#7 +class Spoom::Deadcode::Reference < ::T::Struct + const :kind, ::Spoom::Deadcode::Reference::Kind + const :name, ::String + const :location, ::Spoom::Deadcode::Location + + # Kind + # + # source://spoom//lib/spoom/deadcode/reference.rb#24 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/deadcode/reference.rb#29 + sig { returns(T::Boolean) } + def method?; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/reference.rb#10 +class Spoom::Deadcode::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and +# SyntaxTree::VCall nodes. +# +# source://spoom//lib/spoom/deadcode/send.rb#8 +class Spoom::Deadcode::Send < ::T::Struct + const :node, ::SyntaxTree::Node + const :name, ::String + const :recv, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil) + const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom.rb#12 +class Spoom::Error < ::StandardError; end + +# source://spoom//lib/spoom/context/exec.rb#5 +class Spoom::ExecResult < ::T::Struct + const :out, ::String + const :err, T.nilable(::String) + const :status, T::Boolean + const :exit_code, ::Integer + + # source://spoom//lib/spoom/context/exec.rb#14 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/file_collector.rb#5 +class Spoom::FileCollector + # Initialize a new file collector + # + # If `allow_extensions` is empty, all files are collected. + # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. + # + # If `allow_mime_types` is empty, all files are collected. + # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in + # the list. + # + # source://spoom//lib/spoom/file_collector.rb#26 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).void + end + def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_collector.rb#9 + sig { returns(T::Array[::String]) } + def files; end + + # source://spoom//lib/spoom/file_collector.rb#39 + sig { params(path: ::String).void } + def visit_path(path); end + + # source://spoom//lib/spoom/file_collector.rb#34 + sig { params(paths: T::Array[::String]).void } + def visit_paths(paths); end + + private + + # source://spoom//lib/spoom/file_collector.rb#56 + sig { params(path: ::String).returns(::String) } + def clean_path(path); end + + # source://spoom//lib/spoom/file_collector.rb#73 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_file?(path); end + + # source://spoom//lib/spoom/file_collector.rb#88 + sig { params(path: ::String).returns(T::Boolean) } + def excluded_path?(path); end + + # source://spoom//lib/spoom/file_collector.rb#97 + sig { params(path: ::String).returns(T.nilable(::String)) } + def mime_type_for(path); end + + # source://spoom//lib/spoom/file_collector.rb#68 + sig { params(path: ::String).void } + def visit_directory(path); end + + # source://spoom//lib/spoom/file_collector.rb#61 + sig { params(path: ::String).void } + def visit_file(path); end +end + +# Build a file hierarchy from a set of file paths. +# +# source://spoom//lib/spoom/file_tree.rb#6 +class Spoom::FileTree + # source://spoom//lib/spoom/file_tree.rb#10 + sig { params(paths: T::Enumerable[::String]).void } + def initialize(paths = T.unsafe(nil)); end + + # Add a `path` to the tree + # + # This will create all nodes until the root of `path`. + # + # source://spoom//lib/spoom/file_tree.rb#25 + sig { params(path: ::String).returns(::Spoom::FileTree::Node) } + def add_path(path); end + + # Add all `paths` to the tree + # + # source://spoom//lib/spoom/file_tree.rb#17 + sig { params(paths: T::Enumerable[::String]).void } + def add_paths(paths); end + + # All the nodes in this tree + # + # source://spoom//lib/spoom/file_tree.rb#45 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # Return a map of typing scores for each node in the tree + # + # source://spoom//lib/spoom/file_tree.rb#67 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def nodes_strictness_scores(context); end + + # Return a map of strictnesses for each node in the tree + # + # source://spoom//lib/spoom/file_tree.rb#59 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def nodes_strictnesses(context); end + + # All the paths in this tree + # + # source://spoom//lib/spoom/file_tree.rb#53 + sig { returns(T::Array[::String]) } + def paths; end + + # Return a map of typing scores for each path in the tree + # + # source://spoom//lib/spoom/file_tree.rb#75 + sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } + def paths_strictness_scores(context); end + + # source://spoom//lib/spoom/file_tree.rb#80 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_tree.rb#86 + sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # All root nodes + # + # source://spoom//lib/spoom/file_tree.rb#39 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def roots; end +end + +# A visitor that collects all the nodes in a tree +# +# source://spoom//lib/spoom/file_tree.rb#140 +class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#147 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/file_tree.rb#144 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # source://spoom//lib/spoom/file_tree.rb#153 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end + +# A visitor that collects the typing score of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#183 +class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses + # source://spoom//lib/spoom/file_tree.rb#190 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#187 + sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def scores; end + + # source://spoom//lib/spoom/file_tree.rb#197 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#206 + sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } + def node_score(node); end + + # source://spoom//lib/spoom/file_tree.rb#215 + sig { params(strictness: T.nilable(::String)).returns(::Float) } + def strictness_score(strictness); end +end + +# A visitor that collects the strictness of each node in a tree +# +# source://spoom//lib/spoom/file_tree.rb#160 +class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#167 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#164 + sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def strictnesses; end + + # source://spoom//lib/spoom/file_tree.rb#174 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end +end + +# A node representing either a file or a directory inside a FileTree +# +# source://spoom//lib/spoom/file_tree.rb#94 +class Spoom::FileTree::Node < ::T::Struct + const :parent, T.nilable(::Spoom::FileTree::Node) + const :name, ::String + const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) + + # Full path to this node from root + # + # source://spoom//lib/spoom/file_tree.rb#108 + sig { returns(::String) } + def path; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# An internal class used to print a FileTree +# +# See `FileTree#print` +# +# source://spoom//lib/spoom/file_tree.rb#228 +class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#238 + sig do + params( + strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + out: T.any(::IO, ::StringIO), + colors: T::Boolean + ).void + end + def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end + + # source://spoom//lib/spoom/file_tree.rb#246 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#271 + sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } + def strictness_color(strictness); end +end + +# An abstract visitor for FileTree +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/file_tree.rb#117 +class Spoom::FileTree::Visitor + abstract! + + # source://spoom//lib/spoom/file_tree.rb#129 + sig { params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + # source://spoom//lib/spoom/file_tree.rb#134 + sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } + def visit_nodes(nodes); end + + # source://spoom//lib/spoom/file_tree.rb#124 + sig { params(tree: ::Spoom::FileTree).void } + def visit_tree(tree); end +end + +# source://spoom//lib/spoom/context/git.rb#5 +module Spoom::Git; end + +# source://spoom//lib/spoom/context/git.rb#6 +class Spoom::Git::Commit < ::T::Struct + const :sha, ::String + const :time, ::Time + + # source://spoom//lib/spoom/context/git.rb#27 + sig { returns(::Integer) } + def timestamp; end + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + + # Parse a line formated as `%h %at` into a `Commit` + # + # source://spoom//lib/spoom/context/git.rb#14 + sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } + def parse_line(string); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 +module Spoom::LSP; end + +# source://spoom//lib/spoom/sorbet/lsp.rb#13 +class Spoom::LSP::Client + # source://spoom//lib/spoom/sorbet/lsp.rb#17 + sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } + def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#229 + sig { void } + def close; end + + # source://spoom//lib/spoom/sorbet/lsp.rb#131 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def definitions(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#212 + sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def document_symbols(uri); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#89 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } + def hover(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#27 + sig { returns(::Integer) } + def next_id; end + + # LSP requests + # + # @raise [Error::AlreadyOpen] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#72 + sig { params(workspace_path: ::String).void } + def open(workspace_path); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#54 + sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def read; end + + # @raise [Error::BadHeaders] + # + # source://spoom//lib/spoom/sorbet/lsp.rb#43 + sig { returns(T.nilable(::String)) } + def read_raw; end + + # source://spoom//lib/spoom/sorbet/lsp.rb#173 + sig do + params( + uri: ::String, + line: ::Integer, + column: ::Integer, + include_decl: T::Boolean + ).returns(T::Array[::Spoom::LSP::Location]) + end + def references(uri, line, column, include_decl = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#37 + sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } + def send(message); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#32 + sig { params(json_string: ::String).void } + def send_raw(json_string); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#110 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } + def signatures(uri, line, column); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#197 + sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } + def symbols(query); end + + # source://spoom//lib/spoom/sorbet/lsp.rb#152 + sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } + def type_definitions(uri, line, column); end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 +class Spoom::LSP::Diagnostic < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :range, ::Spoom::LSP::Range + const :code, ::Integer + const :message, ::String + const :informations, ::Object + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 +class Spoom::LSP::DocumentSymbol < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :name, ::String + const :detail, T.nilable(::String) + const :kind, ::Integer + const :location, T.nilable(::Spoom::LSP::Location) + const :range, T.nilable(::Spoom::LSP::Range) + const :children, T::Array[::Spoom::LSP::DocumentSymbol] + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 + sig { returns(::String) } + def kind_string; end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 +Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 +class Spoom::LSP::Error < ::StandardError; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 +class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 +class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 +class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 + sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } + def initialize(uri, diagnostics); end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 + sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } + def diagnostics; end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 + sig { returns(::String) } + def uri; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } + def from_json(json); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 +class Spoom::LSP::Hover < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :contents, ::String + const :range, T.nilable(T::Range[T.untyped]) + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 +class Spoom::LSP::Location < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :uri, ::String + const :range, ::Spoom::LSP::Range + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# A general message as defined by JSON-RPC. +# +# The language server protocol always uses `"2.0"` as the `jsonrpc` version. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 +class Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#21 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def as_json; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#29 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end +end + +# A notification message. +# +# A processed notification message must not send a response back. They work like events. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#58 +class Spoom::LSP::Notification < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 + sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(method, params); end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#62 + sig { returns(::String) } + def method; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#65 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 +class Spoom::LSP::Position < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :line, ::Integer + const :char, ::Integer + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 +module Spoom::LSP::PrintableSymbol + interface! + + # @abstract + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 + sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 +class Spoom::LSP::Range < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :start, ::Spoom::LSP::Position + const :end, ::Spoom::LSP::Position + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# A request message to describe a request between the client and the server. +# +# Every processed request must send a response back to the sender of the request. +# +# source://spoom//lib/spoom/sorbet/lsp/base.rb#37 +class Spoom::LSP::Request < ::Spoom::LSP::Message + # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 + sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } + def initialize(id, method, params); end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#41 + sig { returns(::Integer) } + def id; end + + # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def params; end +end + +# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 +class Spoom::LSP::ResponseError < ::Spoom::LSP::Error + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 + sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } + def initialize(code, message, data); end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 + sig { returns(::Integer) } + def code; end + + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def data; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } + def from_json(json); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 +class Spoom::LSP::SignatureHelp < ::T::Struct + include ::Spoom::LSP::PrintableSymbol + + const :label, T.nilable(::String) + const :doc, ::Object + const :params, T::Array[T.untyped] + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 + sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } + def accept_printer(printer); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 + sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } + def from_json(json); end + + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309 +class Spoom::LSP::SymbolPrinter < ::Spoom::Printer + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326 + sig do + params( + out: T.any(::IO, ::StringIO), + colors: T::Boolean, + indent_level: ::Integer, + prefix: T.nilable(::String) + ).void + end + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348 + sig { params(uri: ::String).returns(::String) } + def clean_uri(uri); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + sig { returns(T.nilable(::String)) } + def prefix; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 + def prefix=(_arg0); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_list(objects); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336 + sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } + def print_object(object); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343 + sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } + def print_objects(objects); end + + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 + sig { returns(T::Set[::Integer]) } + def seen; end +end + +# source://spoom//lib/spoom/printer.rb#7 +class Spoom::Printer + include ::Spoom::Colorize + + # source://spoom//lib/spoom/printer.rb#17 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # Colorize `string` with color if `@colors` + # + # source://spoom//lib/spoom/printer.rb#78 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Decrease indent level + # + # source://spoom//lib/spoom/printer.rb#31 + sig { void } + def dedent; end + + # Increase indent level + # + # source://spoom//lib/spoom/printer.rb#25 + sig { void } + def indent; end + + # source://spoom//lib/spoom/printer.rb#14 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # @return [IO, StringIO] + # + # source://spoom//lib/spoom/printer.rb#14 + def out=(_arg0); end + + # Print `string` into `out` + # + # source://spoom//lib/spoom/printer.rb#37 + sig { params(string: T.nilable(::String)).void } + def print(string); end + + # Print `string` colored with `color` into `out` + # + # Does not use colors unless `@colors`. + # + # source://spoom//lib/spoom/printer.rb#47 + sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } + def print_colored(string, *color); end + + # Print `string` with indent and newline + # + # source://spoom//lib/spoom/printer.rb#62 + sig { params(string: T.nilable(::String)).void } + def printl(string); end + + # Print a new line into `out` + # + # source://spoom//lib/spoom/printer.rb#56 + sig { void } + def printn; end + + # Print an indent space into `out` + # + # source://spoom//lib/spoom/printer.rb#72 + sig { void } + def printt; end +end + +# source://spoom//lib/spoom.rb#10 +Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/config.rb#5 +module Spoom::Sorbet; end + +# source://spoom//lib/spoom/sorbet.rb#39 +Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#36 +Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) + +# Parse Sorbet config files +# +# Parses a Sorbet config file: +# +# ```ruby +# config = Spoom::Sorbet::Config.parse_file("sorbet/config") +# puts config.paths # "." +# ``` +# +# Parses a Sorbet config string: +# +# ```ruby +# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG) +# a +# --file=b +# --ignore=c +# CONFIG +# puts config.paths # "a", "b" +# puts config.ignore # "c" +# ``` +# +# source://spoom//lib/spoom/sorbet/config.rb#26 +class Spoom::Sorbet::Config + # source://spoom//lib/spoom/sorbet/config.rb#38 + sig { void } + def initialize; end + + # @return [Array<String>] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions; end + + # @return [Array<String>] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#46 + sig { returns(::Spoom::Sorbet::Config) } + def copy; end + + # @return [Array<String>] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore; end + + # @return [Array<String>] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#35 + sig { returns(T::Boolean) } + def no_stdlib; end + + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/config.rb#35 + def no_stdlib=(_arg0); end + + # Returns self as a string of options that can be passed to Sorbet + # + # Example: + # ~~~rb + # config = Sorbet::Config.new + # config.paths << "/foo" + # config.paths << "/bar" + # config.ignore << "/baz" + # config.allowed_extensions << ".rb" + # + # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" + # ~~~ + # + # source://spoom//lib/spoom/sorbet/config.rb#68 + sig { returns(::String) } + def options_string; end + + # source://spoom//lib/spoom/sorbet/config.rb#32 + sig { returns(T::Array[::String]) } + def paths; end + + # @return [Array<String>] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def paths=(_arg0); end + + class << self + # source://spoom//lib/spoom/sorbet/config.rb#81 + sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } + def parse_file(sorbet_config_path); end + + # source://spoom//lib/spoom/sorbet/config.rb#86 + sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } + def parse_string(sorbet_config); end + + private + + # source://spoom//lib/spoom/sorbet/config.rb#150 + sig { params(line: ::String).returns(::String) } + def parse_option(line); end + end +end + +# source://spoom//lib/spoom/sorbet/config.rb#29 +Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#14 +class Spoom::Sorbet::Error < ::StandardError + # source://spoom//lib/spoom/sorbet.rb#29 + sig { params(message: ::String, result: ::Spoom::ExecResult).void } + def initialize(message, result); end + + # source://spoom//lib/spoom/sorbet.rb#21 + sig { returns(::Spoom::ExecResult) } + def result; end +end + +# source://spoom//lib/spoom/sorbet.rb#17 +class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end + +# source://spoom//lib/spoom/sorbet.rb#18 +class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end + +# source://spoom//lib/spoom/sorbet/errors.rb#6 +module Spoom::Sorbet::Errors + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#13 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def sort_errors_by_code(errors); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#7 +Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/errors.rb#125 +class Spoom::Sorbet::Errors::Error + include ::Comparable + + # source://spoom//lib/spoom/sorbet/errors.rb#151 + sig do + params( + file: T.nilable(::String), + line: T.nilable(::Integer), + message: T.nilable(::String), + code: T.nilable(::Integer), + more: T::Array[::String] + ).void + end + def initialize(file, line, message, code, more = T.unsafe(nil)); end + + # By default errors are sorted by location + # + # source://spoom//lib/spoom/sorbet/errors.rb#162 + sig { params(other: T.untyped).returns(::Integer) } + def <=>(other); end + + # @return [Integer, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#133 + def code; end + + # source://spoom//lib/spoom/sorbet/errors.rb#130 + sig { returns(T.nilable(::String)) } + def file; end + + # Other files associated with the error + # + # source://spoom//lib/spoom/sorbet/errors.rb#140 + sig { returns(T::Set[::String]) } + def files_from_error_sections; end + + # source://spoom//lib/spoom/sorbet/errors.rb#133 + sig { returns(T.nilable(::Integer)) } + def line; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/sorbet/errors.rb#130 + def message; end + + # source://spoom//lib/spoom/sorbet/errors.rb#136 + sig { returns(T::Array[::String]) } + def more; end + + # source://spoom//lib/spoom/sorbet/errors.rb#169 + sig { returns(::String) } + def to_s; end +end + +# Parse errors from Sorbet output +# +# source://spoom//lib/spoom/sorbet/errors.rb#18 +class Spoom::Sorbet::Errors::Parser + # source://spoom//lib/spoom/sorbet/errors.rb#43 + sig { params(error_url_base: ::String).void } + def initialize(error_url_base: T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/errors.rb#50 + sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse(output); end + + private + + # source://spoom//lib/spoom/sorbet/errors.rb#114 + sig { params(line: ::String).void } + def append_error(line); end + + # source://spoom//lib/spoom/sorbet/errors.rb#106 + sig { void } + def close_error; end + + # source://spoom//lib/spoom/sorbet/errors.rb#73 + sig { params(error_url_base: ::String).returns(::Regexp) } + def error_line_match_regexp(error_url_base); end + + # source://spoom//lib/spoom/sorbet/errors.rb#90 + sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } + def match_error_line(line); end + + # source://spoom//lib/spoom/sorbet/errors.rb#99 + sig { params(error: ::Spoom::Sorbet::Errors::Error).void } + def open_error(error); end + + class << self + # source://spoom//lib/spoom/sorbet/errors.rb#36 + sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } + def parse_string(output, error_url_base: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/errors.rb#21 +Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#37 +Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#38 +Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#41 +Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/metrics.rb#8 +module Spoom::Sorbet::MetricsParser + class << self + # source://spoom//lib/spoom/sorbet/metrics.rb#15 + sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_file(path, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#25 + sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_hash(obj, prefix = T.unsafe(nil)); end + + # source://spoom//lib/spoom/sorbet/metrics.rb#20 + sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } + def parse_string(string, prefix = T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/sorbet/metrics.rb#9 +Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet.rb#42 +Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) + +# source://spoom//lib/spoom/sorbet/sigils.rb#9 +module Spoom::Sorbet::Sigils + class << self + # changes the sigil in the file at the passed path to the specified new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#72 + sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } + def change_sigil_in_file(path, new_strictness); end + + # changes the sigil to have a new strictness in a list of files + # + # source://spoom//lib/spoom/sorbet/sigils.rb#83 + sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } + def change_sigil_in_files(path_list, new_strictness); end + + # returns a string containing the strictness of a sigil in a file at the passed path + # * returns nil if no sigil + # + # source://spoom//lib/spoom/sorbet/sigils.rb#63 + sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } + def file_strictness(path); end + + # returns the full sigil comment string for the passed strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#38 + sig { params(strictness: ::String).returns(::String) } + def sigil_string(strictness); end + + # returns the strictness of a sigil in the passed file content string (nil if no sigil) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#50 + sig { params(content: ::String).returns(T.nilable(::String)) } + def strictness_in_content(content); end + + # returns a string which is the passed content but with the sigil updated to a new strictness + # + # source://spoom//lib/spoom/sorbet/sigils.rb#56 + sig { params(content: ::String, new_strictness: ::String).returns(::String) } + def update_sigil(content, new_strictness); end + + # returns true if the passed string is a valid strictness (else false) + # + # source://spoom//lib/spoom/sorbet/sigils.rb#44 + sig { params(strictness: ::String).returns(T::Boolean) } + def valid_strictness?(strictness); end + end +end + +# source://spoom//lib/spoom/sorbet/sigils.rb#31 +Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://spoom//lib/spoom/sorbet/sigils.rb#13 +Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#12 +Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#17 +Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#15 +Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#16 +Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#14 +Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/sorbet/sigils.rb#19 +Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/timeline.rb#5 +class Spoom::Timeline + # source://spoom//lib/spoom/timeline.rb#9 + sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } + def initialize(context, from, to); end + + # Return one commit for each date in `dates` + # + # source://spoom//lib/spoom/timeline.rb#36 + sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } + def commits_for_dates(dates); end + + # Return all months between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#23 + sig { returns(T::Array[::Time]) } + def months; end + + # Return one commit for each month between `from` and `to` + # + # source://spoom//lib/spoom/timeline.rb#17 + sig { returns(T::Array[::Spoom::Git::Commit]) } + def ticks; end +end + +# source://spoom//lib/spoom/version.rb#5 +Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/stackprof@0.2.25.rbi b/sorbet/rbi/gems/stackprof@0.2.25.rbi new file mode 100644 index 0000000000..eb8c92fe0d --- /dev/null +++ b/sorbet/rbi/gems/stackprof@0.2.25.rbi @@ -0,0 +1,241 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `stackprof` gem. +# Please instead update this file by running `bin/tapioca gem stackprof`. + +# source://stackprof//lib/stackprof.rb#16 +module StackProf + class << self + def results(*_arg0); end + def run(*_arg0); end + + # @return [Boolean] + def running?; end + + def sample; end + def start(*_arg0); end + def stop; end + def use_postponed_job!; end + end +end + +# source://stackprof//lib/stackprof/middleware.rb#4 +class StackProf::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://stackprof//lib/stackprof/middleware.rb#5 + def initialize(app, options = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/middleware.rb#20 + def call(env); end + + class << self + # Returns the value of attribute enabled. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def enabled=(_arg0); end + + # @return [Boolean] + # + # source://stackprof//lib/stackprof/middleware.rb#42 + def enabled?(env); end + + # Returns the value of attribute interval. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def interval; end + + # Sets the attribute interval + # + # @param value the value to set the attribute interval to. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def interval=(_arg0); end + + # Returns the value of attribute metadata. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def metadata; end + + # Sets the attribute metadata + # + # @param value the value to set the attribute metadata to. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def metadata=(_arg0); end + + # Returns the value of attribute mode. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def mode; end + + # Sets the attribute mode + # + # @param value the value to set the attribute mode to. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def mode=(_arg0); end + + # Returns the value of attribute path. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def path=(_arg0); end + + # Returns the value of attribute raw. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def raw; end + + # Sets the attribute raw + # + # @param value the value to set the attribute raw to. + # + # source://stackprof//lib/stackprof/middleware.rb#40 + def raw=(_arg0); end + + # source://stackprof//lib/stackprof/middleware.rb#50 + def save; end + end +end + +# source://stackprof//lib/stackprof/report.rb#8 +class StackProf::Report + # @return [Report] a new instance of Report + # + # source://stackprof//lib/stackprof/report.rb#42 + def initialize(data); end + + # @raise [ArgumentError] + # + # source://stackprof//lib/stackprof/report.rb#618 + def +(other); end + + # source://stackprof//lib/stackprof/report.rb#92 + def add_lines(a, b); end + + # source://stackprof//lib/stackprof/report.rb#212 + def convert_to_d3_flame_graph_format(name, stacks, depth); end + + # Returns the value of attribute data. + # + # source://stackprof//lib/stackprof/report.rb#45 + def data; end + + # source://stackprof//lib/stackprof/report.rb#80 + def files; end + + # source://stackprof//lib/stackprof/report.rb#205 + def flamegraph_row(f, x, y, weight, addr); end + + # source://stackprof//lib/stackprof/report.rb#187 + def flamegraph_stacks(raw); end + + # source://stackprof//lib/stackprof/report.rb#47 + def frames(sort_by_total = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#76 + def max_samples; end + + # source://stackprof//lib/stackprof/report.rb#68 + def modeline; end + + # source://stackprof//lib/stackprof/report.rb#52 + def normalized_frames; end + + # source://stackprof//lib/stackprof/report.rb#72 + def overall_samples; end + + # source://stackprof//lib/stackprof/report.rb#128 + def print_alphabetical_flamegraph(f = T.unsafe(nil), skip_common = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#495 + def print_callgrind(f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#242 + def print_d3_flamegraph(f = T.unsafe(nil), skip_common = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#99 + def print_debug; end + + # source://stackprof//lib/stackprof/report.rb#103 + def print_dump(f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#610 + def print_file(filter, f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#600 + def print_files(sort_by_total = T.unsafe(nil), limit = T.unsafe(nil), f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#132 + def print_flamegraph(f, skip_common, alphabetical = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#414 + def print_graphviz(options = T.unsafe(nil), f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#107 + def print_json(f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#526 + def print_method(name, f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#112 + def print_stackcollapse; end + + # source://stackprof//lib/stackprof/report.rb#476 + def print_text(sort_by_total = T.unsafe(nil), limit = T.unsafe(nil), select_files = T.unsafe(nil), reject_files = T.unsafe(nil), select_names = T.unsafe(nil), reject_names = T.unsafe(nil), f = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#124 + def print_timeline_flamegraph(f = T.unsafe(nil), skip_common = T.unsafe(nil)); end + + # source://stackprof//lib/stackprof/report.rb#64 + def version; end + + # Walk up and down the stack from a given starting point (name). Loops + # until `:exit` is selected + # + # source://stackprof//lib/stackprof/report.rb#561 + def walk_method(name); end + + private + + # source://stackprof//lib/stackprof/report.rb#669 + def callers_for(addr); end + + # source://stackprof//lib/stackprof/report.rb#665 + def root_frames; end + + # source://stackprof//lib/stackprof/report.rb#674 + def source_display(f, file, lines, range = T.unsafe(nil)); end + + class << self + # source://stackprof//lib/stackprof/report.rb#12 + def from_file(file); end + + # source://stackprof//lib/stackprof/report.rb#20 + def from_json(json); end + + # source://stackprof//lib/stackprof/report.rb#24 + def parse_json(json); end + end +end + +# source://stackprof//lib/stackprof/report.rb#9 +StackProf::Report::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://stackprof//lib/stackprof.rb#17 +StackProf::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/stringio@3.0.8.rbi b/sorbet/rbi/gems/stringio@3.0.8.rbi new file mode 100644 index 0000000000..01a26ea58c --- /dev/null +++ b/sorbet/rbi/gems/stringio@3.0.8.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `stringio` gem. +# Please instead update this file by running `bin/tapioca gem stringio`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/syntax_tree@6.1.1.rbi b/sorbet/rbi/gems/syntax_tree@6.1.1.rbi new file mode 100644 index 0000000000..bee55d0ea6 --- /dev/null +++ b/sorbet/rbi/gems/syntax_tree@6.1.1.rbi @@ -0,0 +1,22855 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `syntax_tree` gem. +# Please instead update this file by running `bin/tapioca gem syntax_tree`. + +# Syntax Tree is a suite of tools built on top of the internal CRuby parser. It +# provides the ability to generate a syntax tree from source, as well as the +# tools necessary to inspect and manipulate that syntax tree. It can be used to +# build formatters, linters, language servers, and more. +# +# source://syntax_tree//lib/syntax_tree/node.rb#3 +module SyntaxTree + class << self + # Parses the given source and returns the formatted source. + # + # source://syntax_tree//lib/syntax_tree.rb#59 + def format(source, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end + + # Parses the given file and returns the formatted source. + # + # source://syntax_tree//lib/syntax_tree.rb#75 + def format_file(filepath, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end + + # Accepts a node in the tree and returns the formatted source. + # + # source://syntax_tree//lib/syntax_tree.rb#85 + def format_node(source, node, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end + + # Indexes the given source code to return a list of all class, module, and + # method definitions. Used to quickly provide indexing capability for IDEs or + # documentation generation. + # + # source://syntax_tree//lib/syntax_tree.rb#102 + def index(source); end + + # Indexes the given file to return a list of all class, module, and method + # definitions. Used to quickly provide indexing capability for IDEs or + # documentation generation. + # + # source://syntax_tree//lib/syntax_tree.rb#109 + def index_file(filepath); end + + # A convenience method for creating a new mutation visitor. + # + # @yield [visitor] + # + # source://syntax_tree//lib/syntax_tree.rb#114 + def mutation; end + + # Parses the given source and returns the syntax tree. + # + # source://syntax_tree//lib/syntax_tree.rb#121 + def parse(source); end + + # Parses the given file and returns the syntax tree. + # + # source://syntax_tree//lib/syntax_tree.rb#128 + def parse_file(filepath); end + + # Returns the source from the given filepath taking into account any potential + # magic encoding comments. + # + # source://syntax_tree//lib/syntax_tree.rb#134 + def read(filepath); end + + # This is a hook provided so that plugins can register themselves as the + # handler for a particular file type. + # + # source://syntax_tree//lib/syntax_tree.rb#149 + def register_handler(extension, handler); end + + # Searches through the given source using the given pattern and yields each + # node in the tree that matches the pattern to the given block. + # + # source://syntax_tree//lib/syntax_tree.rb#155 + def search(source, query, &block); end + + # Searches through the given file using the given pattern and yields each + # node in the tree that matches the pattern to the given block. + # + # source://syntax_tree//lib/syntax_tree.rb#164 + def search_file(filepath, query, &block); end + end +end + +# ARef represents when you're pulling a value out of a collection at a +# specific index. Put another way, it's any time you're calling the method +# #[]. +# +# collection[index] +# +# The nodes usually contains two children, the collection and the index. In +# some cases, you don't necessarily have the second child node, because you +# can call procs with a pretty esoteric syntax. In the following example, you +# wouldn't have a second child node: +# +# collection[] +# +# source://syntax_tree//lib/syntax_tree/node.rb#568 +class SyntaxTree::ARef < ::SyntaxTree::Node + # @return [ARef] a new instance of ARef + # + # source://syntax_tree//lib/syntax_tree/node.rb#577 + def initialize(collection:, index:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#632 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#584 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#588 + def child_nodes; end + + # [Node] the value being indexed + # + # source://syntax_tree//lib/syntax_tree/node.rb#569 + def collection; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#575 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#592 + def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#588 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#606 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#615 + def format(q); end + + # [nil | Args] the value being passed within the brackets + # + # source://syntax_tree//lib/syntax_tree/node.rb#572 + def index; end +end + +# ARefField represents assigning values into collections at specific indices. +# Put another way, it's any time you're calling the method #[]=. The +# ARefField node itself is just the left side of the assignment, and they're +# always wrapped in assign nodes. +# +# collection[index] = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#646 +class SyntaxTree::ARefField < ::SyntaxTree::Node + # @return [ARefField] a new instance of ARefField + # + # source://syntax_tree//lib/syntax_tree/node.rb#655 + def initialize(collection:, index:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#710 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#662 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#666 + def child_nodes; end + + # [Node] the value being indexed + # + # source://syntax_tree//lib/syntax_tree/node.rb#647 + def collection; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#653 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#670 + def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#666 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#684 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#693 + def format(q); end + + # [nil | Args] the value being passed within the brackets + # + # source://syntax_tree//lib/syntax_tree/node.rb#650 + def index; end +end + +# Alias represents the use of the +alias+ keyword with regular arguments (not +# global variables). The +alias+ keyword is used to make a method respond to +# another name as well as the current one. +# +# alias aliased_name name +# +# For the example above, in the current context you can now call aliased_name +# and it will execute the name method. When you're aliasing two methods, you +# can either provide bare words (like the example above) or you can provide +# symbols (note that this includes dynamic symbols like +# :"left-#{middle}-right"). +# +# source://syntax_tree//lib/syntax_tree/node.rb#460 +class SyntaxTree::AliasNode < ::SyntaxTree::Node + # @return [AliasNode] a new instance of AliasNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#496 + def initialize(left:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#545 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#503 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#507 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#494 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#511 + def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#507 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#525 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#529 + def format(q); end + + # [DynaSymbol | GVar | SymbolLiteral] the new name of the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#488 + def left; end + + # [Backref | DynaSymbol | GVar | SymbolLiteral] the old name of the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#491 + def right; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#549 + def var_alias?; end +end + +# Formats an argument to the alias keyword. For symbol literals it uses the +# value of the symbol directly to look like bare words. +# +# source://syntax_tree//lib/syntax_tree/node.rb#461 +class SyntaxTree::AliasNode::AliasArgumentFormatter + # @return [AliasArgumentFormatter] a new instance of AliasArgumentFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#466 + def initialize(argument); end + + # [Backref | DynaSymbol | GVar | SymbolLiteral] the argument being passed + # to alias + # + # source://syntax_tree//lib/syntax_tree/node.rb#464 + def argument; end + + # source://syntax_tree//lib/syntax_tree/node.rb#470 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#478 + def format(q); end +end + +# ArgBlock represents using a block operator on an expression. +# +# method(&expression) +# +# source://syntax_tree//lib/syntax_tree/node.rb#888 +class SyntaxTree::ArgBlock < ::SyntaxTree::Node + # @return [ArgBlock] a new instance of ArgBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#894 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#930 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#900 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#904 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#892 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#908 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#904 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#921 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#925 + def format(q); end + + # [nil | Node] the expression being turned into a block + # + # source://syntax_tree//lib/syntax_tree/node.rb#889 + def value; end +end + +# ArgParen represents wrapping arguments to a method inside a set of +# parentheses. +# +# method(argument) +# +# In the example above, there would be an ArgParen node around the Args node +# that represents the set of arguments being sent to the method method. The +# argument child node can be +nil+ if no arguments were passed, as in: +# +# method() +# +# source://syntax_tree//lib/syntax_tree/node.rb#729 +class SyntaxTree::ArgParen < ::SyntaxTree::Node + # @return [ArgParen] a new instance of ArgParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#735 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#784 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#741 + def accept(visitor); end + + # [nil | Args | ArgsForward] the arguments inside the + # parentheses + # + # source://syntax_tree//lib/syntax_tree/node.rb#730 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#788 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#745 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#733 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#749 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#745 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#762 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#766 + def format(q); end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#794 + def trailing_comma?; end +end + +# Star represents using a splat operator on an expression. +# +# method(*arguments) +# +# source://syntax_tree//lib/syntax_tree/node.rb#940 +class SyntaxTree::ArgStar < ::SyntaxTree::Node + # @return [ArgStar] a new instance of ArgStar + # + # source://syntax_tree//lib/syntax_tree/node.rb#946 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#982 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#952 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#956 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#944 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#960 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#956 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#973 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#977 + def format(q); end + + # [nil | Node] the expression being splatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#941 + def value; end +end + +# Args represents a list of arguments being passed to a method call or array +# literal. +# +# method(first, second, third) +# +# source://syntax_tree//lib/syntax_tree/node.rb#822 +class SyntaxTree::Args < ::SyntaxTree::Node + # @return [Args] a new instance of Args + # + # source://syntax_tree//lib/syntax_tree/node.rb#828 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#863 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#834 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#867 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#838 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#826 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#842 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#838 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#855 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#859 + def format(q); end + + # [Array[ Node ]] the arguments that this node wraps + # + # source://syntax_tree//lib/syntax_tree/node.rb#823 + def parts; end +end + +# ArgsForward represents forwarding all kinds of arguments onto another method +# call. +# +# def request(method, path, **headers, &block); end +# +# def get(...) +# request(:GET, ...) +# end +# +# def post(...) +# request(:POST, ...) +# end +# +# In the example above, both the get and post methods are forwarding all of +# their arguments (positional, keyword, and block) on to the request method. +# The ArgsForward node appears in both the caller (the request method calls) +# and the callee (the get and post definitions). +# +# source://syntax_tree//lib/syntax_tree/node.rb#1005 +class SyntaxTree::ArgsForward < ::SyntaxTree::Node + # @return [ArgsForward] a new instance of ArgsForward + # + # source://syntax_tree//lib/syntax_tree/node.rb#1008 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1038 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1013 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1042 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1017 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1006 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1021 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1017 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1030 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1034 + def format(q); end +end + +# ArrayLiteral represents an array literal, which can optionally contain +# elements. +# +# [] +# [one, two, three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#1056 +class SyntaxTree::ArrayLiteral < ::SyntaxTree::Node + # @return [ArrayLiteral] a new instance of ArrayLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#1153 + def initialize(lbracket:, contents:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1229 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1160 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1164 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1151 + def comments; end + + # [nil | Args] the contents of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1148 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1168 + def copy(lbracket: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1164 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1182 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1191 + def format(q); end + + # [nil | LBracket | QSymbolsBeg | QWordsBeg | SymbolsBeg | WordsBeg] the + # bracket that opens this array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1145 + def lbracket; end + + private + + # If we have an empty array that contains only comments, then we're going + # to do some special printing to ensure they get indented correctly. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1259 + def empty_with_comments?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1251 + def qsymbols?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1236 + def qwords?; end +end + +# source://syntax_tree//lib/syntax_tree/node.rb#1063 +SyntaxTree::ArrayLiteral::BREAKABLE_SPACE_SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::ArrayLiteral::BreakableSpaceSeparator) + +# It's very common to use seplist with ->(q) { q.breakable_space }. We wrap +# that pattern into an object to cut down on having to create a bunch of +# lambdas all over the place. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1057 +class SyntaxTree::ArrayLiteral::BreakableSpaceSeparator + # source://syntax_tree//lib/syntax_tree/node.rb#1058 + def call(q); end +end + +# This is a special formatter used if the array literal contains no values +# but _does_ contain comments. In this case we do some special formatting to +# make sure the comments gets indented properly. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1120 +class SyntaxTree::ArrayLiteral::EmptyWithCommentsFormatter + # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1124 + def initialize(lbracket); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1128 + def format(q); end + + # [LBracket] the opening bracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#1122 + def lbracket; end +end + +# Formats an array of multiple simple symbol literals into the %i syntax. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1094 +class SyntaxTree::ArrayLiteral::QSymbolsFormatter + # @return [QSymbolsFormatter] a new instance of QSymbolsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1098 + def initialize(contents); end + + # [Args] the contents of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1096 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1102 + def format(q); end +end + +# Formats an array of multiple simple string literals into the %w syntax. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1066 +class SyntaxTree::ArrayLiteral::QWordsFormatter + # @return [QWordsFormatter] a new instance of QWordsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1070 + def initialize(contents); end + + # [Args] the contents of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#1068 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1074 + def format(q); end +end + +# When we're implementing the === operator for a node, we oftentimes need to +# compare two arrays. We want to skip over the === definition of array and use +# our own here, so we do that using this module. +# +# source://syntax_tree//lib/syntax_tree/node.rb#157 +module SyntaxTree::ArrayMatch + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#158 + def call(left, right); end + end +end + +# AryPtn represents matching against an array pattern using the Ruby 2.7+ +# pattern matching syntax. It’s one of the more complicated nodes, because +# the four parameters that it accepts can almost all be nil. +# +# case [1, 2, 3] +# in [Integer, Integer] +# "matched" +# in Container[Integer, Integer] +# "matched" +# in [Integer, *, Integer] +# "matched" +# end +# +# An AryPtn node is created with four parameters: an optional constant +# wrapper, an array of positional matches, an optional splat with identifier, +# and an optional array of positional matches that occur after the splat. +# All of the in clauses above would create an AryPtn node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1283 +class SyntaxTree::AryPtn < ::SyntaxTree::Node + # @return [AryPtn] a new instance of AryPtn + # + # source://syntax_tree//lib/syntax_tree/node.rb#1320 + def initialize(constant:, requireds:, rest:, posts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1388 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1329 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1333 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1318 + def comments; end + + # [nil | VarRef] the optional constant wrapper + # + # source://syntax_tree//lib/syntax_tree/node.rb#1303 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1337 + def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1333 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1359 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1370 + def format(q); end + + # [Array[ Node ]] the list of positional arguments occurring after the + # optional star if there is one + # + # source://syntax_tree//lib/syntax_tree/node.rb#1315 + def posts; end + + # [Array[ Node ]] the regular positional arguments that this array + # pattern is matching against + # + # source://syntax_tree//lib/syntax_tree/node.rb#1307 + def requireds; end + + # [nil | VarField] the optional starred identifier that grabs up a list of + # positional arguments + # + # source://syntax_tree//lib/syntax_tree/node.rb#1311 + def rest; end +end + +# Formats the optional splat of an array pattern. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1284 +class SyntaxTree::AryPtn::RestFormatter + # @return [RestFormatter] a new instance of RestFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#1288 + def initialize(value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1292 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1296 + def format(q); end + + # [VarField] the identifier that represents the remaining positionals + # + # source://syntax_tree//lib/syntax_tree/node.rb#1286 + def value; end +end + +# Assign represents assigning something to a variable or constant. Generally, +# the left side of the assignment is going to be any node that ends with the +# name "Field". +# +# variable = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#1420 +class SyntaxTree::Assign < ::SyntaxTree::Node + # @return [Assign] a new instance of Assign + # + # source://syntax_tree//lib/syntax_tree/node.rb#1429 + def initialize(target:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1479 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1436 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1440 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1427 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1444 + def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1440 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1458 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1462 + def format(q); end + + # [ARefField | ConstPathField | Field | TopConstField | VarField] the target + # to assign the result of the expression to + # + # source://syntax_tree//lib/syntax_tree/node.rb#1421 + def target; end + + # [Node] the expression to be assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#1424 + def value; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1485 + def skip_indent?; end +end + +# Determins if the following value should be indented or not. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1396 +module SyntaxTree::AssignFormatting + class << self + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1397 + def skip_indent?(value); end + end +end + +# Assoc represents a key-value pair within a hash. It is a child node of +# either an AssocListFromArgs or a BareAssocHash. +# +# { key1: value1, key2: value2 } +# +# In the above example, the would be two Assoc nodes. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1498 +class SyntaxTree::Assoc < ::SyntaxTree::Node + # @return [Assoc] a new instance of Assoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#1507 + def initialize(key:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1548 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1514 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1518 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1505 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1522 + def copy(key: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1518 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1536 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1540 + def format(q); end + + # [Node] the key of this pair + # + # source://syntax_tree//lib/syntax_tree/node.rb#1499 + def key; end + + # [nil | Node] the value of this pair + # + # source://syntax_tree//lib/syntax_tree/node.rb#1502 + def value; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#1554 + def format_contents(q); end +end + +# AssocSplat represents double-splatting a value into a hash (either a hash +# literal or a bare hash in a method call). +# +# { **pairs } +# +# source://syntax_tree//lib/syntax_tree/node.rb#1576 +class SyntaxTree::AssocSplat < ::SyntaxTree::Node + # @return [AssocSplat] a new instance of AssocSplat + # + # source://syntax_tree//lib/syntax_tree/node.rb#1582 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1618 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1588 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1592 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1580 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1596 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1592 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1609 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1613 + def format(q); end + + # [nil | Node] the expression that is being splatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#1577 + def value; end +end + +# BEGINBlock represents the use of the +BEGIN+ keyword, which hooks into the +# lifecycle of the interpreter. Whatever is inside the block will get executed +# when the program starts. +# +# BEGIN { +# } +# +# Interestingly, the BEGIN keyword doesn't allow the do and end keywords for +# the block. Only braces are permitted. +# +# source://syntax_tree//lib/syntax_tree/node.rb#176 +class SyntaxTree::BEGINBlock < ::SyntaxTree::Node + # @return [BEGINBlock] a new instance of BEGINBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#185 + def initialize(lbrace:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#236 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#192 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#196 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#183 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#200 + def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#196 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#214 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#223 + def format(q); end + + # [LBrace] the left brace that is seen after the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#177 + def lbrace; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#180 + def statements; end +end + +# Backref represents a global variable referencing a matched value. It comes +# in the form of a $ followed by a positive integer. +# +# $1 +# +# source://syntax_tree//lib/syntax_tree/node.rb#1629 +class SyntaxTree::Backref < ::SyntaxTree::Node + # @return [Backref] a new instance of Backref + # + # source://syntax_tree//lib/syntax_tree/node.rb#1635 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1670 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1641 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1645 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1633 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1649 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1645 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1662 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1666 + def format(q); end + + # [String] the name of the global backreference variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#1630 + def value; end +end + +# Backtick represents the use of the ` operator. It's usually found being used +# for an XStringLiteral, but could also be found as the name of a method being +# defined. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1679 +class SyntaxTree::Backtick < ::SyntaxTree::Node + # @return [Backtick] a new instance of Backtick + # + # source://syntax_tree//lib/syntax_tree/node.rb#1685 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1720 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1691 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1695 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1683 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1699 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1695 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1712 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1716 + def format(q); end + + # [String] the backtick in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#1680 + def value; end +end + +# BareAssocHash represents a hash of contents being passed as a method +# argument (and therefore has omitted braces). It's very similar to an +# AssocListFromArgs node. +# +# method(key1: value1, key2: value2) +# +# source://syntax_tree//lib/syntax_tree/node.rb#1835 +class SyntaxTree::BareAssocHash < ::SyntaxTree::Node + # @return [BareAssocHash] a new instance of BareAssocHash + # + # source://syntax_tree//lib/syntax_tree/node.rb#1841 + def initialize(assocs:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1876 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1847 + def accept(visitor); end + + # [Array[ Assoc | AssocSplat ]] + # + # source://syntax_tree//lib/syntax_tree/node.rb#1836 + def assocs; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1851 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1839 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1855 + def copy(assocs: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1851 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1868 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1872 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1880 + def format_key(q, key); end +end + +# BasicVisitor is the parent class of the Visitor class that provides the +# ability to walk down the tree. It does not define any handlers, so you +# should extend this class if you want your visitor to raise an error if you +# attempt to visit a node that you don't handle. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#8 +class SyntaxTree::BasicVisitor + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#105 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#109 + def visit_all(nodes); end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_child_nodes(node); end + + class << self + # This is the list of all of the valid visit methods. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#72 + def valid_visit_methods; end + + # This method is here to help folks write visitors. + # + # It's not always easy to ensure you're writing the correct method name in + # the visitor since it's perfectly valid to define methods that don't + # override these parent methods. + # + # If you use this method, you can ensure you're writing the correct method + # name. It will raise an error if the visit method you're defining isn't + # actually a method on the parent visitor. + # + # @raise [VisitMethodError] + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#86 + def visit_method(method_name); end + + # This method is here to help folks write visitors. + # + # Within the given block, every method that is defined will be checked to + # ensure it's a valid visit method using the BasicVisitor::visit_method + # method defined above. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#97 + def visit_methods; end + end +end + +# This class is used by DidYouMean to offer corrections to invalid visit +# method names. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#22 +class SyntaxTree::BasicVisitor::VisitMethodChecker + # @return [VisitMethodChecker] a new instance of VisitMethodChecker + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#25 + def initialize(error); end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#29 + def corrections; end + + # Returns the value of attribute visit_method. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#23 + def visit_method; end +end + +# This is raised when you use the Visitor.visit_method method and it fails. +# It is correctable to through DidYouMean. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#11 +class SyntaxTree::BasicVisitor::VisitMethodError < ::StandardError + include ::DidYouMean::Correctable + + # @return [VisitMethodError] a new instance of VisitMethodError + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#14 + def initialize(visit_method); end + + # Returns the value of attribute visit_method. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#12 + def visit_method; end +end + +# This module is responsible for checking all of the methods defined within +# a given block to ensure that they are valid visit methods. +# +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#45 +class SyntaxTree::BasicVisitor::VisitMethodsChecker < ::Module + # @return [VisitMethodsChecker] a new instance of VisitMethodsChecker + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#53 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#65 + def disable!; end + + # This is the status of the checker. It's used to determine whether or not + # we should be checking the methods that are defined. It is kept as an + # instance variable so that it can be disabled later. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#51 + def status; end +end + +# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#46 +class SyntaxTree::BasicVisitor::VisitMethodsChecker::Status < ::Struct + # Returns the value of attribute checking + # + # @return [Object] the current value of checking + def checking; end + + # Sets the attribute checking + # + # @param value [Object] the value to set the attribute checking to. + # @return [Object] the newly set value + def checking=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Begin represents a begin..end chain. +# +# begin +# value +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#1900 +class SyntaxTree::Begin < ::SyntaxTree::Node + # @return [Begin] a new instance of Begin + # + # source://syntax_tree//lib/syntax_tree/node.rb#1906 + def initialize(bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1951 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1912 + def accept(visitor); end + + # [BodyStmt] the bodystmt that contains the contents of this begin block + # + # source://syntax_tree//lib/syntax_tree/node.rb#1901 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1916 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1904 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1920 + def copy(bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1916 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1933 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1937 + def format(q); end +end + +# Binary represents any expression that involves two sub-expressions with an +# operator in between. This can be something that looks like a mathematical +# operation: +# +# 1 + 1 +# +# but can also be something like pushing a value onto an array: +# +# array << value +# +# source://syntax_tree//lib/syntax_tree/node.rb#2033 +class SyntaxTree::Binary < ::SyntaxTree::Node + # @return [Binary] a new instance of Binary + # + # source://syntax_tree//lib/syntax_tree/node.rb#2056 + def initialize(left:, operator:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2128 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2064 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2068 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2054 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2072 + def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2068 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2087 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2097 + def format(q); end + + # [Node] the left-hand side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#2045 + def left; end + + # [Symbol] the operator used between the two expressions + # + # source://syntax_tree//lib/syntax_tree/node.rb#2048 + def operator; end + + # [Node] the right-hand side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#2051 + def right; end +end + +# BlockArg represents declaring a block parameter on a method definition. +# +# def method(&block); end +# +# source://syntax_tree//lib/syntax_tree/node.rb#2228 +class SyntaxTree::BlockArg < ::SyntaxTree::Node + # @return [BlockArg] a new instance of BlockArg + # + # source://syntax_tree//lib/syntax_tree/node.rb#2234 + def initialize(name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2270 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2240 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2244 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2232 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2248 + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2244 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2261 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2265 + def format(q); end + + # [nil | Ident] the name of the block argument + # + # source://syntax_tree//lib/syntax_tree/node.rb#2229 + def name; end +end + +# Block represents passing a block to a method call using the +do+ and +end+ +# keywords or the +{+ and +}+ operators. +# +# method do |value| +# end +# +# method { |value| } +# +# source://syntax_tree//lib/syntax_tree/node.rb#4310 +class SyntaxTree::BlockNode < ::SyntaxTree::Node + # @return [BlockNode] a new instance of BlockNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#4344 + def initialize(opening:, block_var:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4417 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4352 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4426 + def arity; end + + # [nil | BlockVar] the optional variable declaration within this block + # + # source://syntax_tree//lib/syntax_tree/node.rb#4336 + def block_var; end + + # [BodyStmt | Statements] the expressions to be executed within this block + # + # source://syntax_tree//lib/syntax_tree/node.rb#4339 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4356 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4342 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4360 + def copy(opening: T.unsafe(nil), block_var: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4356 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4375 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4385 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4422 + def keywords?; end + + # [LBrace | Kw] the left brace or the do keyword that opens this block + # + # source://syntax_tree//lib/syntax_tree/node.rb#4333 + def opening; end + + private + + # If we're the predicate of a loop or conditional, then we're going to have + # to go with the {..} bounds. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4468 + def forced_brace_bounds?(q); end + + # If we're a sibling of a control-flow keyword, then we're going to have to + # use the do..end bounds. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4457 + def forced_do_end_bounds?(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4484 + def format_break(q, break_opening, break_closing); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4504 + def format_flat(q, flat_opening, flat_closing); end + + # If this is nested anywhere inside certain nodes, then we can't change + # which operators/keywords we're using for the bounds of the block. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4439 + def unchangeable_bounds?(q); end +end + +# Formats the opening brace or keyword of a block. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4311 +class SyntaxTree::BlockNode::BlockOpenFormatter + # @return [BlockOpenFormatter] a new instance of BlockOpenFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#4318 + def initialize(text, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4323 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4327 + def format(q); end + + # [LBrace | Keyword] the node that is being represented + # + # source://syntax_tree//lib/syntax_tree/node.rb#4316 + def node; end + + # [String] the actual output that should be printed + # + # source://syntax_tree//lib/syntax_tree/node.rb#4313 + def text; end +end + +# BlockVar represents the parameters being declared for a block. Effectively +# this node is everything contained within the pipes. This includes all of the +# various parameter types, as well as block-local variable declarations. +# +# method do |positional, optional = value, keyword:, █ local| +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#2142 +class SyntaxTree::BlockVar < ::SyntaxTree::Node + # @return [BlockVar] a new instance of BlockVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#2151 + def initialize(params:, locals:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2209 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2158 + def accept(visitor); end + + # When a single required parameter is declared for a block, it gets + # automatically expanded if the values being yielded into it are an array. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2216 + def arg0?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2162 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2149 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2166 + def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2162 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2180 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2196 + def format(q); end + + # [Array[ Ident ]] the list of block-local variable declarations + # + # source://syntax_tree//lib/syntax_tree/node.rb#2146 + def locals; end + + # [Params] the parameters being declared with the block + # + # source://syntax_tree//lib/syntax_tree/node.rb#2143 + def params; end +end + +# We'll keep a single instance of this separator around for all block vars +# to cut down on allocations. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2194 +SyntaxTree::BlockVar::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::BlockVar::Separator) + +# Within the pipes of the block declaration, we don't want any spaces. So +# we'll separate the parameters with a comma and space but no breakables. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2186 +class SyntaxTree::BlockVar::Separator + # source://syntax_tree//lib/syntax_tree/node.rb#2187 + def call(q); end +end + +# bodystmt can't actually determine its bounds appropriately because it +# doesn't necessarily know where it started. So the parent node needs to +# report back down into this one where it goes. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2279 +class SyntaxTree::BodyStmt < ::SyntaxTree::Node + # @return [BodyStmt] a new instance of BodyStmt + # + # source://syntax_tree//lib/syntax_tree/node.rb#2297 + def initialize(statements:, rescue_clause:, else_keyword:, else_clause:, ensure_clause:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2428 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2352 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2314 + def bind(parser, start_char, start_column, end_char, end_column); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2356 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2295 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2360 + def copy(statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_keyword: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2356 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2384 + def deconstruct_keys(_keys); end + + # [nil | Statements] the optional set of statements inside the else clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2289 + def else_clause; end + + # [nil | Kw] the optional else keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#2286 + def else_keyword; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2348 + def empty?; end + + # [nil | Ensure] the optional ensure clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2292 + def ensure_clause; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2396 + def format(q); end + + # [nil | Rescue] the optional rescue chain attached to the begin clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2283 + def rescue_clause; end + + # [Statements] the list of statements inside the begin clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#2280 + def statements; end +end + +# Break represents using the +break+ keyword. +# +# break +# +# It can also optionally accept arguments, as in: +# +# break 1 +# +# source://syntax_tree//lib/syntax_tree/node.rb#2635 +class SyntaxTree::Break < ::SyntaxTree::Node + # @return [Break] a new instance of Break + # + # source://syntax_tree//lib/syntax_tree/node.rb#2641 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2676 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2647 + def accept(visitor); end + + # [Args] the arguments being sent to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#2636 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2651 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2639 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2655 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2651 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2668 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2672 + def format(q); end +end + +# CHAR irepresents a single codepoint in the script encoding. +# +# ?a +# +# In the example above, the CHAR node represents the string literal "a". You +# can use control characters with this as well, as in ?\C-a. +# +# source://syntax_tree//lib/syntax_tree/node.rb#249 +class SyntaxTree::CHAR < ::SyntaxTree::Node + # @return [CHAR] a new instance of CHAR + # + # source://syntax_tree//lib/syntax_tree/node.rb#255 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#296 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#261 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#265 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#253 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#269 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#265 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#282 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#286 + def format(q); end + + # [String] the value of the character literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#250 + def value; end +end + +# CVar represents the use of a class variable. +# +# @@variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#4044 +class SyntaxTree::CVar < ::SyntaxTree::Node + # @return [CVar] a new instance of CVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#4050 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4085 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4056 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4060 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4048 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4064 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4060 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4077 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4081 + def format(q); end + + # [String] the name of the class variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#4045 + def value; end +end + +# This is probably the most complicated formatter in this file. It's +# responsible for formatting chains of method calls, with or without arguments +# or blocks. In general, we want to go from something like +# +# foo.bar.baz +# +# to +# +# foo +# .bar +# .baz +# +# Of course there are a lot of caveats to that, including trailing operators +# when necessary, where comments are places, how blocks are aligned, etc. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2721 +class SyntaxTree::CallChainFormatter + # @return [CallChainFormatter] a new instance of CallChainFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#2725 + def initialize(node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2729 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2795 + def format_chain(q, children); end + + # [CallNode | MethodAddBlock] the top of the call chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#2723 + def node; end + + private + + # For certain nodes, we want to attach directly to the end and don't + # want to indent the first call. So we'll pop off the first children and + # format it separately here. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2895 + def attach_directly?(node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2905 + def format_child(q, child, skip_comments: T.unsafe(nil), skip_operator: T.unsafe(nil), skip_attached: T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2876 + def chained?(node); end + end +end + +# CallNode represents a method call. +# +# receiver.message +# +# source://syntax_tree//lib/syntax_tree/node.rb#2944 +class SyntaxTree::CallNode < ::SyntaxTree::Node + # @return [CallNode] a new instance of CallNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#2959 + def initialize(receiver:, operator:, message:, arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3054 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2968 + def accept(visitor); end + + # [nil | ArgParen | Args] the arguments to the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#2954 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3100 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2972 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#2957 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2981 + def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2972 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3003 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3014 + def format(q); end + + # Print out the arguments to this call. If there are no arguments, then do + # nothing. + # + # source://syntax_tree//lib/syntax_tree/node.rb#3062 + def format_arguments(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3072 + def format_contents(q); end + + # [:call | Backtick | Const | Ident | Op] the message being sent + # + # source://syntax_tree//lib/syntax_tree/node.rb#2951 + def message; end + + # [nil | :"::" | Op | Period] the operator being used to send the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#2948 + def operator; end + + # [nil | Node] the receiver of the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#2945 + def receiver; end +end + +# Wraps a call operator (which can be a string literal :: or an Op node or a +# Period node) and formats it when called. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2683 +class SyntaxTree::CallOperatorFormatter + # @return [CallOperatorFormatter] a new instance of CallOperatorFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#2687 + def initialize(operator); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2691 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#2695 + def format(q); end + + # [:"::" | Op | Period] the operator being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#2685 + def operator; end +end + +# Case represents the beginning of a case chain. +# +# case value +# when 1 +# "one" +# when 2 +# "two" +# else +# "number" +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#3117 +class SyntaxTree::Case < ::SyntaxTree::Node + # @return [Case] a new instance of Case + # + # source://syntax_tree//lib/syntax_tree/node.rb#3129 + def initialize(keyword:, value:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3187 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3137 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3141 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3127 + def comments; end + + # [In | When] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#3124 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3145 + def copy(keyword: T.unsafe(nil), value: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3141 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3160 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3170 + def format(q); end + + # [Kw] the keyword that opens this expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#3118 + def keyword; end + + # [nil | Node] optional value being switched on + # + # source://syntax_tree//lib/syntax_tree/node.rb#3121 + def value; end +end + +# Class represents defining a class using the +class+ keyword. +# +# class Container +# end +# +# Classes can have path names as their class name in case it's being nested +# under a namespace, as in: +# +# class Namespace::Container +# end +# +# Classes can also be defined as a top-level path, in the case that it's +# already in a namespace but you want to define it at the top-level instead, +# as in: +# +# module OtherNamespace +# class ::Namespace::Container +# end +# end +# +# All of these declarations can also have an optional superclass reference, as +# in: +# +# class Child < Parent +# end +# +# That superclass can actually be any Ruby expression, it doesn't necessarily +# need to be a constant, as in: +# +# class Child < method +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#3314 +class SyntaxTree::ClassDeclaration < ::SyntaxTree::Node + # @return [ClassDeclaration] a new instance of ClassDeclaration + # + # source://syntax_tree//lib/syntax_tree/node.rb#3326 + def initialize(constant:, superclass:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3389 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3334 + def accept(visitor); end + + # [BodyStmt] the expressions to execute within the context of the class + # + # source://syntax_tree//lib/syntax_tree/node.rb#3321 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3338 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3324 + def comments; end + + # [ConstPathRef | ConstRef | TopConstRef] the name of the class being + # defined + # + # source://syntax_tree//lib/syntax_tree/node.rb#3315 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3342 + def copy(constant: T.unsafe(nil), superclass: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3338 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3357 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3367 + def format(q); end + + # [nil | Node] the optional superclass declaration + # + # source://syntax_tree//lib/syntax_tree/node.rb#3318 + def superclass; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#3396 + def format_declaration(q); end +end + +# Comma represents the use of the , operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#3411 +class SyntaxTree::Comma < ::SyntaxTree::Node + # @return [Comma] a new instance of Comma + # + # source://syntax_tree//lib/syntax_tree/node.rb#3414 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3437 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3419 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3423 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3427 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3423 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3433 + def deconstruct_keys(_keys); end + + # [String] the comma in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#3412 + def value; end +end + +# Command represents a method call with arguments and no parentheses. Note +# that Command nodes only happen when there is no explicit receiver for this +# method. +# +# method argument +# +# source://syntax_tree//lib/syntax_tree/node.rb#3449 +class SyntaxTree::Command < ::SyntaxTree::Node + # @return [Command] a new instance of Command + # + # source://syntax_tree//lib/syntax_tree/node.rb#3461 + def initialize(message:, arguments:, block:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3511 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3469 + def accept(visitor); end + + # [Args] the arguments being sent with the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3453 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3516 + def arity; end + + # [nil | BlockNode] the optional block being passed to the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#3456 + def block; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3473 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3459 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3477 + def copy(message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3473 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3492 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3502 + def format(q); end + + # [Const | Ident] the message being sent to the implicit receiver + # + # source://syntax_tree//lib/syntax_tree/node.rb#3450 + def message; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#3522 + def align(q, node, &block); end +end + +# CommandCall represents a method call on an object with arguments and no +# parentheses. +# +# object.method argument +# +# source://syntax_tree//lib/syntax_tree/node.rb#3561 +class SyntaxTree::CommandCall < ::SyntaxTree::Node + # @return [CommandCall] a new instance of CommandCall + # + # source://syntax_tree//lib/syntax_tree/node.rb#3579 + def initialize(receiver:, operator:, message:, arguments:, block:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3683 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3596 + def accept(visitor); end + + # [nil | Args | ArgParen] the arguments going along with the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3571 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3689 + def arity; end + + # [nil | BlockNode] the block associated with this method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#3574 + def block; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3600 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3577 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3604 + def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3600 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3628 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3640 + def format(q); end + + # [:call | Const | Ident | Op] the message being send + # + # source://syntax_tree//lib/syntax_tree/node.rb#3568 + def message; end + + # [nil | :"::" | Op | Period] the operator used to send the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3565 + def operator; end + + # [nil | Node] the receiver of the message + # + # source://syntax_tree//lib/syntax_tree/node.rb#3562 + def receiver; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#3695 + def argument_alignment(q, doc); end +end + +# Comment represents a comment in the source. +# +# # comment +# +# source://syntax_tree//lib/syntax_tree/node.rb#3723 +class SyntaxTree::Comment < ::SyntaxTree::Node + # @return [Comment] a new instance of Comment + # + # source://syntax_tree//lib/syntax_tree/node.rb#3731 + def initialize(value:, inline:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3790 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3764 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3768 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3760 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3772 + def copy(value: T.unsafe(nil), inline: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3768 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3782 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3786 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#3756 + def ignore?; end + + # [boolean] whether or not there is code on the same line as this comment. + # If there is, then inline will be true. + # + # source://syntax_tree//lib/syntax_tree/node.rb#3728 + def inline; end + + # [boolean] whether or not there is code on the same line as this comment. + # If there is, then inline will be true. + # + # source://syntax_tree//lib/syntax_tree/node.rb#3728 + def inline?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3740 + def leading!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#3744 + def leading?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3748 + def trailing!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#3752 + def trailing?; end + + # [String] the contents of the comment + # + # source://syntax_tree//lib/syntax_tree/node.rb#3724 + def value; end +end + +# Formats an If or Unless node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6314 +class SyntaxTree::ConditionalFormatter + # @return [ConditionalFormatter] a new instance of ConditionalFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6321 + def initialize(keyword, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6326 + def format(q); end + + # [String] the keyword associated with this conditional + # + # source://syntax_tree//lib/syntax_tree/node.rb#6316 + def keyword; end + + # [If | Unless] the node that is being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#6319 + def node; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#6450 + def contains_conditional?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6385 + def format_break(q, force:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6377 + def format_flat(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6405 + def format_ternary(q); end +end + +# Const represents a literal value that _looks_ like a constant. This could +# actually be a reference to a constant: +# +# Constant +# +# It could also be something that looks like a constant in another context, as +# in a method call to a capitalized method: +# +# object.Constant +# +# or a symbol that starts with a capital letter: +# +# :Constant +# +# source://syntax_tree//lib/syntax_tree/node.rb#3810 +class SyntaxTree::Const < ::SyntaxTree::Node + # @return [Const] a new instance of Const + # + # source://syntax_tree//lib/syntax_tree/node.rb#3816 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3851 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3822 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3826 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3814 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3830 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3826 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3843 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3847 + def format(q); end + + # [String] the name of the constant + # + # source://syntax_tree//lib/syntax_tree/node.rb#3811 + def value; end +end + +# ConstPathField represents the child node of some kind of assignment. It +# represents when you're assigning to a constant that is being referenced as +# a child of another variable. +# +# object::Const = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#3863 +class SyntaxTree::ConstPathField < ::SyntaxTree::Node + # @return [ConstPathField] a new instance of ConstPathField + # + # source://syntax_tree//lib/syntax_tree/node.rb#3872 + def initialize(parent:, constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3916 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3879 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3883 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3870 + def comments; end + + # [Const] the constant itself + # + # source://syntax_tree//lib/syntax_tree/node.rb#3867 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3887 + def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3883 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3901 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3910 + def format(q); end + + # [Node] the source of the constant + # + # source://syntax_tree//lib/syntax_tree/node.rb#3864 + def parent; end +end + +# ConstPathRef represents referencing a constant by a path. +# +# object::Const +# +# source://syntax_tree//lib/syntax_tree/node.rb#3927 +class SyntaxTree::ConstPathRef < ::SyntaxTree::Node + # @return [ConstPathRef] a new instance of ConstPathRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#3936 + def initialize(parent:, constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3980 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3943 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3947 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3934 + def comments; end + + # [Const] the constant itself + # + # source://syntax_tree//lib/syntax_tree/node.rb#3931 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3951 + def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3947 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3965 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3974 + def format(q); end + + # [Node] the source of the constant + # + # source://syntax_tree//lib/syntax_tree/node.rb#3928 + def parent; end +end + +# ConstRef represents the name of the constant being used in a class or module +# declaration. +# +# class Container +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#3993 +class SyntaxTree::ConstRef < ::SyntaxTree::Node + # @return [ConstRef] a new instance of ConstRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#3999 + def initialize(constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4034 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4005 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4009 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3997 + def comments; end + + # [Const] the constant itself + # + # source://syntax_tree//lib/syntax_tree/node.rb#3994 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4013 + def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4009 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4026 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4030 + def format(q); end +end + +# If the predicate of a conditional or loop contains an assignment (in which +# case we can't know for certain that that assignment doesn't impact the +# statements inside the conditional) then we can't use the modifier form +# and we must use the block form. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6229 +module SyntaxTree::ContainsAssignment + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#6230 + def call(parent); end + end +end + +# The default indentation level for formatting. We allow changing this so +# that Syntax Tree can format arbitrary parts of a document. +# +# source://syntax_tree//lib/syntax_tree.rb#56 +SyntaxTree::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) + +# This is the default print width when formatting. It can be overridden in the +# CLI by passing the --print-width option or here in the API by passing the +# optional second argument to ::format. +# +# source://syntax_tree//lib/syntax_tree.rb#48 +SyntaxTree::DEFAULT_PRINT_WIDTH = T.let(T.unsafe(nil), Integer) + +# This is the default ruby version that we're going to target for formatting. +# It shouldn't really be changed except in very niche circumstances. +# +# source://syntax_tree//lib/syntax_tree.rb#52 +SyntaxTree::DEFAULT_RUBY_VERSION = T.let(T.unsafe(nil), SyntaxTree::Formatter::SemanticVersion) + +# This module provides shortcuts for creating AST nodes. +# +# source://syntax_tree//lib/syntax_tree/dsl.rb#5 +module SyntaxTree::DSL + # Create a new ARef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#40 + def ARef(collection, index); end + + # Create a new ARefField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#45 + def ARefField(collection, index); end + + # Create a new AliasNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#35 + def AliasNode(left, right); end + + # Create a new ArgBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#64 + def ArgBlock(value); end + + # Create a new ArgParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#54 + def ArgParen(arguments); end + + # Create a new ArgStar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#69 + def ArgStar(value); end + + # Create a new Args node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#59 + def Args(parts); end + + # Create a new ArgsForward node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#74 + def ArgsForward; end + + # Create a new ArrayLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#79 + def ArrayLiteral(lbracket, contents); end + + # Create a new AryPtn node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#88 + def AryPtn(constant, requireds, rest, posts); end + + # Create a new Assign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#99 + def Assign(target, value); end + + # Create a new Assoc node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#104 + def Assoc(key, value); end + + # Create a new AssocSplat node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#109 + def AssocSplat(value); end + + # Create a new BEGINBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#7 + def BEGINBlock(lbrace, statements); end + + # Create a new Backref node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#114 + def Backref(value); end + + # Create a new Backtick node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#119 + def Backtick(value); end + + # Create a new BareAssocHash node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#124 + def BareAssocHash(assocs); end + + # Create a new Begin node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#129 + def Begin(bodystmt); end + + # Create a new Binary node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#139 + def Binary(left, operator, right); end + + # Create a new BlockArg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#154 + def BlockArg(name); end + + # Create a new BlockNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#317 + def BlockNode(opening, block_var, bodystmt); end + + # Create a new BlockVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#149 + def BlockVar(params, locals); end + + # Create a new BodyStmt node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#159 + def BodyStmt(statements, rescue_clause, else_keyword, else_clause, ensure_clause); end + + # Create a new Break node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#177 + def Break(arguments); end + + # Create a new CHAR node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#16 + def CHAR(value); end + + # Create a new CVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#288 + def CVar(value); end + + # Create a new CallNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#182 + def CallNode(receiver, operator, message, arguments); end + + # Create a new Case node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#193 + def Case(keyword, value, consequent); end + + # Create a new ClassDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#213 + def ClassDeclaration(constant, superclass, bodystmt, location = T.unsafe(nil)); end + + # Create a new Comma node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#228 + def Comma(value); end + + # Create a new Command node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#233 + def Command(message, arguments, block, location = T.unsafe(nil)); end + + # Create a new CommandCall node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#243 + def CommandCall(receiver, operator, message, arguments, block); end + + # Create a new Comment node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#255 + def Comment(value, inline, location = T.unsafe(nil)); end + + # Create a new Const node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#260 + def Const(value); end + + # Create a new ConstPathField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#265 + def ConstPathField(parent, constant); end + + # Create a new ConstPathRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#274 + def ConstPathRef(parent, constant); end + + # Create a new ConstRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#283 + def ConstRef(constant); end + + # Create a new DefNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#293 + def DefNode(target, operator, name, params, bodystmt, location = T.unsafe(nil)); end + + # Create a new Defined node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#312 + def Defined(value); end + + # Create a new DynaSymbol node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#337 + def DynaSymbol(parts, quote); end + + # Create a new ENDBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#21 + def ENDBlock(lbrace, statements); end + + # Create a new Else node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#342 + def Else(keyword, statements); end + + # Create a new Elsif node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#351 + def Elsif(predicate, statements, consequent); end + + # Create a new EmbDoc node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#361 + def EmbDoc(value); end + + # Create a new EmbExprBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#366 + def EmbExprBeg(value); end + + # Create a new EmbExprEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#371 + def EmbExprEnd(value); end + + # Create a new EmbVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#376 + def EmbVar(value); end + + # Create a new EndContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#30 + def EndContent(value); end + + # Create a new Ensure node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#381 + def Ensure(keyword, statements); end + + # Create a new ExcessedComma node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#390 + def ExcessedComma(value); end + + # Create a new Field node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#395 + def Field(parent, operator, name); end + + # Create a new FloatLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#405 + def FloatLiteral(value); end + + # Create a new FndPtn node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#410 + def FndPtn(constant, left, values, right); end + + # Create a new For node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#421 + def For(index, collection, statements); end + + # Create a new GVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#431 + def GVar(value); end + + # Create a new HashLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#436 + def HashLiteral(lbrace, assocs); end + + # Create a new Heredoc node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#445 + def Heredoc(beginning, ending, dedent, parts); end + + # Create a new HeredocBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#456 + def HeredocBeg(value); end + + # Create a new HeredocEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#461 + def HeredocEnd(value); end + + # Create a new HshPtn node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#466 + def HshPtn(constant, keywords, keyword_rest); end + + # Create a new IVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#521 + def IVar(value); end + + # Create a new Ident node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#476 + def Ident(value); end + + # Create a new IfNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#481 + def IfNode(predicate, statements, consequent); end + + # Create a new IfOp node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#491 + def IfOp(predicate, truthy, falsy); end + + # Create a new Imaginary node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#501 + def Imaginary(value); end + + # Create a new In node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#506 + def In(pattern, statements, consequent); end + + # Create a new Int node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#516 + def Int(value); end + + # Create a new Kw node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#526 + def Kw(value); end + + # Create a new KwRestParam node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#531 + def KwRestParam(name); end + + # Create a new LBrace node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#560 + def LBrace(value); end + + # Create a new LBracket node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#565 + def LBracket(value); end + + # Create a new LParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#570 + def LParen(value); end + + # Create a new Label node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#536 + def Label(value); end + + # Create a new LabelEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#541 + def LabelEnd(value); end + + # Create a new Lambda node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#546 + def Lambda(params, statements); end + + # Create a new LambdaVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#555 + def LambdaVar(params, locals); end + + # Create a new MAssign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#575 + def MAssign(target, value); end + + # Create a new MLHS node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#585 + def MLHS(parts, comma); end + + # Create a new MLHSParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#590 + def MLHSParen(contents, comma); end + + # Create a new MRHS node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#608 + def MRHS(parts); end + + # Create a new MethodAddBlock node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#580 + def MethodAddBlock(call, block, location = T.unsafe(nil)); end + + # Create a new ModuleDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#599 + def ModuleDeclaration(constant, bodystmt); end + + # Create a new Next node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#613 + def Next(arguments); end + + # Create a new Not node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#892 + def Not(statement, parentheses); end + + # Create a new Op node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#618 + def Op(value); end + + # Create a new OpAssign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#623 + def OpAssign(target, operator, value); end + + # Create a new Params node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#633 + def Params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # Create a new Paren node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#647 + def Paren(lparen, contents); end + + # Create a new Period node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#652 + def Period(value); end + + # Create a new PinnedBegin node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#134 + def PinnedBegin(statement); end + + # Create a new PinnedVarRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#944 + def PinnedVarRef(value); end + + # Create a new Program node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#657 + def Program(statements); end + + # Create a new QSymbols node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#662 + def QSymbols(beginning, elements); end + + # Create a new QSymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#671 + def QSymbolsBeg(value); end + + # Create a new QWords node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#676 + def QWords(beginning, elements); end + + # Create a new QWordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#685 + def QWordsBeg(value); end + + # Create a new RAssign node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#203 + def RAssign(value, operator, pattern); end + + # Create a new RBrace node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#695 + def RBrace(value); end + + # Create a new RBracket node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#700 + def RBracket(value); end + + # Create a new RParen node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#783 + def RParen(value); end + + # Create a new RangeNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#327 + def RangeNode(left, operator, right); end + + # Create a new RationalLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#690 + def RationalLiteral(value); end + + # Create a new Redo node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#705 + def Redo; end + + # Create a new RegexpBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#719 + def RegexpBeg(value); end + + # Create a new RegexpContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#710 + def RegexpContent(beginning, parts); end + + # Create a new RegexpEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#724 + def RegexpEnd(value); end + + # Create a new RegexpLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#729 + def RegexpLiteral(beginning, ending, parts); end + + # Create a new Rescue node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#748 + def Rescue(keyword, exception, statements, consequent); end + + # Create a new RescueEx node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#739 + def RescueEx(exceptions, variable); end + + # Create a new RescueMod node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#759 + def RescueMod(statement, value); end + + # Create a new RestParam node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#768 + def RestParam(name); end + + # Create a new Retry node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#773 + def Retry; end + + # Create a new ReturnNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#778 + def ReturnNode(arguments); end + + # Create a new SClass node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#788 + def SClass(target, bodystmt); end + + # Create a new Statements node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#793 + def Statements(body); end + + # Create a new StringConcat node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#803 + def StringConcat(left, right); end + + # Create a new StringContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#798 + def StringContent(parts); end + + # Create a new StringDVar node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#808 + def StringDVar(variable); end + + # Create a new StringEmbExpr node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#813 + def StringEmbExpr(statements); end + + # Create a new StringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#818 + def StringLiteral(parts, quote); end + + # Create a new Super node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#823 + def Super(arguments); end + + # Create a new SymBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#828 + def SymBeg(value); end + + # Create a new SymbolContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#833 + def SymbolContent(value); end + + # Create a new SymbolLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#838 + def SymbolLiteral(value); end + + # Create a new Symbols node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#843 + def Symbols(beginning, elements); end + + # Create a new SymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#852 + def SymbolsBeg(value); end + + # Create a new TLamBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#862 + def TLamBeg(value); end + + # Create a new TLambda node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#857 + def TLambda(value); end + + # Create a new TStringBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#877 + def TStringBeg(value); end + + # Create a new TStringContent node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#882 + def TStringContent(value); end + + # Create a new TStringEnd node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#887 + def TStringEnd(value); end + + # Create a new TopConstField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#867 + def TopConstField(constant); end + + # Create a new TopConstRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#872 + def TopConstRef(constant); end + + # Create a new Unary node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#901 + def Unary(operator, statement); end + + # Create a new Undef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#910 + def Undef(symbols); end + + # Create a new UnlessNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#915 + def UnlessNode(predicate, statements, consequent); end + + # Create a new UntilNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#925 + def UntilNode(predicate, statements); end + + # Create a new VCall node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#949 + def VCall(value); end + + # Create a new VarField node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#934 + def VarField(value); end + + # Create a new VarRef node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#939 + def VarRef(value); end + + # Create a new VoidStmt node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#954 + def VoidStmt; end + + # Create a new When node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#959 + def When(arguments, statements, consequent); end + + # Create a new WhileNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#969 + def WhileNode(predicate, statements); end + + # Create a new Word node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#978 + def Word(parts); end + + # Create a new Words node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#983 + def Words(beginning, elements); end + + # Create a new WordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#992 + def WordsBeg(value); end + + # Create a new XString node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#997 + def XString(parts); end + + # Create a new XStringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#1002 + def XStringLiteral(parts); end + + # Create a new YieldNode node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#1007 + def YieldNode(arguments); end + + # Create a new ZSuper node. + # + # source://syntax_tree//lib/syntax_tree/dsl.rb#1012 + def ZSuper; end +end + +# Def represents defining a regular method on the current self object. +# +# def method(param) result end +# def object.method(param) result end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4096 +class SyntaxTree::DefNode < ::SyntaxTree::Node + # @return [DefNode] a new instance of DefNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#4114 + def initialize(target:, operator:, name:, params:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4214 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4124 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4227 + def arity; end + + # [BodyStmt | Node] the expressions to be executed by the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4109 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4128 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4112 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4132 + def copy(target: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), params: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4128 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4156 + def deconstruct_keys(_keys); end + + # Returns true if the method was found in the source in the "endless" form, + # i.e. where the method body is defined using the `=` operator after the + # method name and parameters. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4223 + def endless?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4168 + def format(q); end + + # [Backtick | Const | Ident | Kw | Op] the name of the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4103 + def name; end + + # [nil | Op | Period] the operator being used to declare the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4100 + def operator; end + + # [nil | Params | Paren] the parameter declaration for the method + # + # source://syntax_tree//lib/syntax_tree/node.rb#4106 + def params; end + + # [nil | Node] the target where the method is being defined + # + # source://syntax_tree//lib/syntax_tree/node.rb#4097 + def target; end +end + +# Defined represents the use of the +defined?+ operator. It can be used with +# and without parentheses. +# +# defined?(variable) +# +# source://syntax_tree//lib/syntax_tree/node.rb#4247 +class SyntaxTree::Defined < ::SyntaxTree::Node + # @return [Defined] a new instance of Defined + # + # source://syntax_tree//lib/syntax_tree/node.rb#4253 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4296 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4259 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4263 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4251 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4267 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4263 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4280 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4284 + def format(q); end + + # [Node] the value being sent to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#4248 + def value; end +end + +# DynaSymbol represents a symbol literal that uses quotes to dynamically +# define its value. +# +# :"#{variable}" +# +# They can also be used as a special kind of dynamic hash key, as in: +# +# { "#{key}": value } +# +# source://syntax_tree//lib/syntax_tree/node.rb#4662 +class SyntaxTree::DynaSymbol < ::SyntaxTree::Node + # @return [DynaSymbol] a new instance of DynaSymbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#4671 + def initialize(parts:, quote:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4733 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4678 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4682 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4669 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4686 + def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4682 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4700 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4704 + def format(q); end + + # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the + # dynamic symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#4663 + def parts; end + + # [nil | String] the quote used to delimit the dynamic symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#4666 + def quote; end + + private + + # Here we determine the quotes to use for a dynamic symbol. It's bound by a + # lot of rules because it could be in many different contexts with many + # different kinds of escaping. + # + # source://syntax_tree//lib/syntax_tree/node.rb#4743 + def quotes(q); end +end + +# ENDBlock represents the use of the +END+ keyword, which hooks into the +# lifecycle of the interpreter. Whatever is inside the block will get executed +# when the program ends. +# +# END { +# } +# +# Interestingly, the END keyword doesn't allow the do and end keywords for the +# block. Only braces are permitted. +# +# source://syntax_tree//lib/syntax_tree/node.rb#311 +class SyntaxTree::ENDBlock < ::SyntaxTree::Node + # @return [ENDBlock] a new instance of ENDBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#320 + def initialize(lbrace:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#371 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#327 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#331 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#318 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#335 + def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#331 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#349 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#358 + def format(q); end + + # [LBrace] the left brace that is seen after the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#312 + def lbrace; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#315 + def statements; end +end + +# Else represents the end of an +if+, +unless+, or +case+ chain. +# +# if variable +# else +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4790 +class SyntaxTree::Else < ::SyntaxTree::Node + # @return [Else] a new instance of Else + # + # source://syntax_tree//lib/syntax_tree/node.rb#4799 + def initialize(keyword:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4850 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4806 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4810 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4797 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4814 + def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4810 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4828 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4837 + def format(q); end + + # [Kw] the else keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#4791 + def keyword; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#4794 + def statements; end +end + +# Elsif represents another clause in an +if+ or +unless+ chain. +# +# if variable +# elsif other_variable +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4863 +class SyntaxTree::Elsif < ::SyntaxTree::Node + # @return [Elsif] a new instance of Elsif + # + # source://syntax_tree//lib/syntax_tree/node.rb#4875 + def initialize(predicate:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4939 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4883 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4887 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4873 + def comments; end + + # [nil | Elsif | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#4870 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4891 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4887 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4906 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4916 + def format(q); end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#4864 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#4867 + def statements; end +end + +# EmbDoc represents a multi-line comment. +# +# =begin +# first line +# second line +# =end +# +# source://syntax_tree//lib/syntax_tree/node.rb#4953 +class SyntaxTree::EmbDoc < ::SyntaxTree::Node + # @return [EmbDoc] a new instance of EmbDoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#4956 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5024 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4992 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4996 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4988 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5000 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4996 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5009 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5013 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4984 + def ignore?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4980 + def inline?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4964 + def leading!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4968 + def leading?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4972 + def trailing!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4976 + def trailing?; end + + # [String] the contents of the comment + # + # source://syntax_tree//lib/syntax_tree/node.rb#4954 + def value; end +end + +# EmbExprBeg represents the beginning token for using interpolation inside of +# a parent node that accepts string content (like a string or regular +# expression). +# +# "Hello, #{person}!" +# +# source://syntax_tree//lib/syntax_tree/node.rb#5036 +class SyntaxTree::EmbExprBeg < ::SyntaxTree::Node + # @return [EmbExprBeg] a new instance of EmbExprBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#5039 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5065 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5044 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5048 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5052 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5048 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5061 + def deconstruct_keys(_keys); end + + # [String] the #{ used in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#5037 + def value; end +end + +# EmbExprEnd represents the ending token for using interpolation inside of a +# parent node that accepts string content (like a string or regular +# expression). +# +# "Hello, #{person}!" +# +# source://syntax_tree//lib/syntax_tree/node.rb#5077 +class SyntaxTree::EmbExprEnd < ::SyntaxTree::Node + # @return [EmbExprEnd] a new instance of EmbExprEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#5080 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5106 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5085 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5089 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5093 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5089 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5102 + def deconstruct_keys(_keys); end + + # [String] the } used in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#5078 + def value; end +end + +# EmbVar represents the use of shorthand interpolation for an instance, class, +# or global variable into a parent node that accepts string content (like a +# string or regular expression). +# +# "#@variable" +# +# In the example above, an EmbVar node represents the # because it forces +# +# source://syntax_tree//lib/syntax_tree/node.rb#5120 +class SyntaxTree::EmbVar < ::SyntaxTree::Node + # @return [EmbVar] a new instance of EmbVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#5123 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5149 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5128 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5132 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5136 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5132 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5145 + def deconstruct_keys(_keys); end + + # [String] the # used in the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#5121 + def value; end +end + +# EndContent represents the use of __END__ syntax, which allows individual +# scripts to keep content after the main ruby code that can be read through +# the DATA constant. +# +# puts DATA.read +# +# __END__ +# some other content that is not executed by the program +# +# source://syntax_tree//lib/syntax_tree/node.rb#387 +class SyntaxTree::EndContent < ::SyntaxTree::Node + # @return [EndContent] a new instance of EndContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#393 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#442 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#399 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#403 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#391 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#407 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#403 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#420 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#424 + def format(q); end + + # [String] the content after the script + # + # source://syntax_tree//lib/syntax_tree/node.rb#388 + def value; end +end + +# Ensure represents the use of the +ensure+ keyword and its subsequent +# statements. +# +# begin +# ensure +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5162 +class SyntaxTree::Ensure < ::SyntaxTree::Node + # @return [Ensure] a new instance of Ensure + # + # source://syntax_tree//lib/syntax_tree/node.rb#5171 + def initialize(keyword:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5220 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5178 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5182 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5169 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5186 + def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5182 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5200 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5209 + def format(q); end + + # [Kw] the ensure keyword that began this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5163 + def keyword; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#5166 + def statements; end +end + +# ExcessedComma represents a trailing comma in a list of block parameters. It +# changes the block parameters such that they will destructure. +# +# [[1, 2, 3], [2, 3, 4]].each do |first, second,| +# end +# +# In the above example, an ExcessedComma node would appear in the third +# position of the Params node that is used to declare that block. The third +# position typically represents a rest-type parameter, but in this case is +# used to indicate that a trailing comma was used. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5237 +class SyntaxTree::ExcessedComma < ::SyntaxTree::Node + # @return [ExcessedComma] a new instance of ExcessedComma + # + # source://syntax_tree//lib/syntax_tree/node.rb#5243 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5278 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5249 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5253 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5241 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5257 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5253 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5270 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5274 + def format(q); end + + # [String] the comma + # + # source://syntax_tree//lib/syntax_tree/node.rb#5238 + def value; end +end + +# Field is always the child of an assignment. It represents assigning to a +# “field” on an object. +# +# object.variable = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#5289 +class SyntaxTree::Field < ::SyntaxTree::Node + # @return [Field] a new instance of Field + # + # source://syntax_tree//lib/syntax_tree/node.rb#5301 + def initialize(parent:, operator:, name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5351 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5309 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5313 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5299 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5318 + def copy(parent: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5313 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5333 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5343 + def format(q); end + + # [Const | Ident] the name of the field being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#5296 + def name; end + + # [:"::" | Op | Period] the operator being used for the assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#5293 + def operator; end + + # [Node] the parent object that owns the field being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#5290 + def parent; end +end + +# This is the parent class of a lot of built-in visitors for Syntax Tree. It +# reflects visiting each of the fields on every node in turn. It itself does +# not do anything with these fields, it leaves that behavior up to the +# subclass to implement. +# +# In order to properly use this class, you will need to subclass it and +# implement #comments, #field, #list, #node, #pairs, and #text. Those are +# documented here. +# +# == comments(node) +# +# This accepts the node that is being visited and does something depending on +# the comments attached to the node. +# +# == field(name, value) +# +# This accepts the name of the field being visited as a string (like "value") +# and the actual value of that field. The value can be a subclass of Node or +# any other type that can be held within the tree. +# +# == list(name, values) +# +# This accepts the name of the field being visited as well as a list of +# values. This is used, for example, when visiting something like the body of +# a Statements node. +# +# == node(name, node) +# +# This is the parent serialization method for each node. It is called with the +# node itself, as well as the type of the node as a string. The type is an +# internally used value that usually resembles the name of the ripper event +# that generated the node. The method should yield to the given block which +# then calls through to visit each of the fields on the node. +# +# == text(name, value) +# +# This accepts the name of the field being visited as well as a string value +# representing the value of the field. +# +# == pairs(name, values) +# +# This accepts the name of the field being visited as well as a list of pairs +# that represent the value of the field. It is used only in a couple of +# circumstances, like when visiting the list of optional parameters defined on +# a method. +# +# source://syntax_tree//lib/syntax_tree/field_visitor.rb#50 +class SyntaxTree::FieldVisitor < ::SyntaxTree::BasicVisitor + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#163 + def visit_BEGIN(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#245 + def visit_CHAR(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#342 + def visit_END(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1018 + def visit___end__(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#68 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#52 + def visit_aref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#60 + def visit_aref_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#76 + def visit_arg_block(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#83 + def visit_arg_paren(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#90 + def visit_arg_star(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#97 + def visit_args(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#104 + def visit_args_forward(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#108 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#115 + def visit_aryptn(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#125 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#133 + def visit_assoc(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#141 + def visit_assoc_splat(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#148 + def visit_backref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#152 + def visit_backtick(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#156 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#170 + def visit_begin(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#177 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#186 + def visit_block(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#201 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#194 + def visit_blockarg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#209 + def visit_bodystmt(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#219 + def visit_break(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#226 + def visit_call(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#236 + def visit_case(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#249 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#258 + def visit_comma(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#262 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#271 + def visit_command_call(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#282 + def visit_comment(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#286 + def visit_const(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#290 + def visit_const_path_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#298 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#306 + def visit_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#313 + def visit_cvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#317 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#328 + def visit_defined(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#335 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#349 + def visit_else(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#356 + def visit_elsif(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#365 + def visit_embdoc(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#369 + def visit_embexpr_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#373 + def visit_embexpr_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#377 + def visit_embvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#381 + def visit_ensure(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#388 + def visit_excessed_comma(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#392 + def visit_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#401 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#405 + def visit_fndptn(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#415 + def visit_for(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#424 + def visit_gvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#428 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#435 + def visit_heredoc(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#442 + def visit_heredoc_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#446 + def visit_heredoc_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#450 + def visit_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#459 + def visit_ident(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#463 + def visit_if(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#472 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#481 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#485 + def visit_in(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#494 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#498 + def visit_ivar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#502 + def visit_kw(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#506 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#513 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#517 + def visit_label_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#521 + def visit_lambda(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#529 + def visit_lambda_var(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#537 + def visit_lbrace(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#541 + def visit_lbracket(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#545 + def visit_lparen(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#549 + def visit_massign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#557 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#565 + def visit_mlhs(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#572 + def visit_mlhs_paren(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#579 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#587 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#594 + def visit_next(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#601 + def visit_not(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#608 + def visit_op(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#612 + def visit_opassign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#621 + def visit_params(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#634 + def visit_paren(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#641 + def visit_period(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#645 + def visit_pinned_begin(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#652 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#659 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#666 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#673 + def visit_qsymbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#677 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#684 + def visit_qwords_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#688 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#697 + def visit_rassign(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#706 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#710 + def visit_rbrace(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#714 + def visit_rbracket(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#718 + def visit_redo(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#722 + def visit_regexp_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#726 + def visit_regexp_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#730 + def visit_regexp_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#734 + def visit_regexp_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#742 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#751 + def visit_rescue_ex(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#759 + def visit_rescue_mod(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#767 + def visit_rest_param(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#774 + def visit_retry(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#778 + def visit_return(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#785 + def visit_rparen(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#789 + def visit_sclass(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#797 + def visit_statements(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#804 + def visit_string_concat(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#812 + def visit_string_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#816 + def visit_string_dvar(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#823 + def visit_string_embexpr(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#830 + def visit_string_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#837 + def visit_super(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#844 + def visit_symbeg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#848 + def visit_symbol_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#852 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#859 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#866 + def visit_symbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#870 + def visit_tlambda(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#874 + def visit_tlambeg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#878 + def visit_top_const_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#885 + def visit_top_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#892 + def visit_tstring_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#896 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#900 + def visit_tstring_end(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#904 + def visit_unary(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#912 + def visit_undef(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#919 + def visit_unless(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#928 + def visit_until(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#936 + def visit_var_field(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#943 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#950 + def visit_vcall(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#957 + def visit_void_stmt(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#961 + def visit_when(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#970 + def visit_while(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#978 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#985 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#992 + def visit_words_beg(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#996 + def visit_xstring(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1000 + def visit_xstring_literal(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1007 + def visit_yield(node); end + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1014 + def visit_zsuper(node); end + + private + + # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1025 + def visit_token(node, type); end +end + +# FloatLiteral represents a floating point number literal. +# +# 1.0 +# +# source://syntax_tree//lib/syntax_tree/node.rb#5362 +class SyntaxTree::FloatLiteral < ::SyntaxTree::Node + # @return [FloatLiteral] a new instance of FloatLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#5368 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5403 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5374 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5378 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5366 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5382 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5378 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5395 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5399 + def format(q); end + + # [String] the value of the floating point number literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#5363 + def value; end +end + +# Formats either a Break, Next, or Return node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#2438 +class SyntaxTree::FlowControlFormatter + # @return [FlowControlFormatter] a new instance of FlowControlFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#2445 + def initialize(keyword, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2450 + def format(q); end + + # [String] the keyword to print + # + # source://syntax_tree//lib/syntax_tree/node.rb#2440 + def keyword; end + + # [Break | Next | Return] the node being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#2443 + def node; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#2599 + def format_arguments(q, opening, closing); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2589 + def format_array_contents(q, array); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#2609 + def skip_parens?(node); end +end + +# FndPtn represents matching against a pattern where you find a pattern in an +# array using the Ruby 3.0+ pattern matching syntax. +# +# case value +# in [*, 7, *] +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5416 +class SyntaxTree::FndPtn < ::SyntaxTree::Node + # @return [FndPtn] a new instance of FndPtn + # + # source://syntax_tree//lib/syntax_tree/node.rb#5432 + def initialize(constant:, left:, values:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5501 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5441 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5445 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5430 + def comments; end + + # [nil | Node] the optional constant wrapper + # + # source://syntax_tree//lib/syntax_tree/node.rb#5417 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5449 + def copy(constant: T.unsafe(nil), left: T.unsafe(nil), values: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5445 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5465 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5476 + def format(q); end + + # [VarField] the splat on the left-hand side + # + # source://syntax_tree//lib/syntax_tree/node.rb#5420 + def left; end + + # [VarField] the splat on the right-hand side + # + # source://syntax_tree//lib/syntax_tree/node.rb#5427 + def right; end + + # [Array[ Node ]] the list of positional expressions in the pattern that + # are being matched + # + # source://syntax_tree//lib/syntax_tree/node.rb#5424 + def values; end +end + +# For represents using a +for+ loop. +# +# for value in list do +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5515 +class SyntaxTree::For < ::SyntaxTree::Node + # @return [For] a new instance of For + # + # source://syntax_tree//lib/syntax_tree/node.rb#5527 + def initialize(index:, collection:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5587 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5535 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5539 + def child_nodes; end + + # [Node] the object being enumerated in the loop + # + # source://syntax_tree//lib/syntax_tree/node.rb#5519 + def collection; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5525 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5543 + def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5539 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5558 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5568 + def format(q); end + + # [MLHS | VarField] the variable declaration being used to + # pull values out of the object being enumerated + # + # source://syntax_tree//lib/syntax_tree/node.rb#5516 + def index; end + + # [Statements] the statements to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#5522 + def statements; end +end + +# A slightly enhanced PP that knows how to format recursively including +# comments. +# +# source://syntax_tree//lib/syntax_tree/formatter.rb#9 +class SyntaxTree::Formatter < ::PrettierPrint + # @return [Formatter] a new instance of Formatter + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#95 + def initialize(source, *args, options: T.unsafe(nil)); end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def disable_auto_ternary; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def disable_auto_ternary?; end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#115 + def format(node, stackable: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#175 + def format_each(nodes); end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#179 + def grandparent; end + + # This is a simplified version of prettyprint's group. It doesn't provide + # any of the more advanced options because we don't need them and they take + # up expensive computation time. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#194 + def group; end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#183 + def parent; end + + # source://syntax_tree//lib/syntax_tree/formatter.rb#187 + def parents; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def quote; end + + # A similar version to the super, except that it calls back into the + # separator proc with the instance of `self`. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#208 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#83 + def source; end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#83 + def stack; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def target_ruby_version; end + + # This is a much simplified version of prettyprint's text. It avoids + # calculating width by pushing the string directly onto the target. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#224 + def text(string); end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def trailing_comma; end + + # These options are overridden in plugins to we need to make sure they are + # available here. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#87 + def trailing_comma?; end + + class << self + # source://syntax_tree//lib/syntax_tree/formatter.rb#108 + def format(source, node, base_indentation = T.unsafe(nil)); end + end +end + +# source://syntax_tree//lib/syntax_tree/formatter.rb#80 +SyntaxTree::Formatter::COMMENT_PRIORITY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/formatter.rb#81 +SyntaxTree::Formatter::HEREDOC_PRIORITY = T.let(T.unsafe(nil), Integer) + +# We want to minimize as much as possible the number of options that are +# available in syntax tree. For the most part, if users want non-default +# formatting, they should override the format methods on the specific nodes +# themselves. However, because of some history with prettier and the fact +# that folks have become entrenched in their ways, we decided to provide a +# small amount of configurability. +# +# source://syntax_tree//lib/syntax_tree/formatter.rb#23 +class SyntaxTree::Formatter::Options + # @return [Options] a new instance of Options + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#29 + def initialize(quote: T.unsafe(nil), trailing_comma: T.unsafe(nil), disable_auto_ternary: T.unsafe(nil), target_ruby_version: T.unsafe(nil)); end + + # Returns the value of attribute disable_auto_ternary. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def disable_auto_ternary; end + + # Returns the value of attribute quote. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def quote; end + + # Returns the value of attribute target_ruby_version. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def target_ruby_version; end + + # Returns the value of attribute trailing_comma. + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#24 + def trailing_comma; end +end + +# Unfortunately, Gem::Version.new is not ractor-safe because it performs +# global caching using a class variable. This works around that by just +# setting the instance variables directly. +# +# source://syntax_tree//lib/syntax_tree/formatter.rb#10 +class SyntaxTree::Formatter::SemanticVersion < ::Gem::Version + # @return [SemanticVersion] a new instance of SemanticVersion + # + # source://syntax_tree//lib/syntax_tree/formatter.rb#11 + def initialize(version); end +end + +# GVar represents a global variable literal. +# +# $variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#5598 +class SyntaxTree::GVar < ::SyntaxTree::Node + # @return [GVar] a new instance of GVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#5604 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5639 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5610 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5614 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5602 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5618 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5614 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5631 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5635 + def format(q); end + + # [String] the name of the global variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#5599 + def value; end +end + +# This holds references to objects that respond to both #parse and #format +# so that we can use them in the CLI. +# +# source://syntax_tree//lib/syntax_tree.rb#42 +SyntaxTree::HANDLERS = T.let(T.unsafe(nil), Hash) + +# This module is responsible for formatting the assocs contained within a +# hash or bare hash. It first determines if every key in the hash can use +# labels. If it can, it uses labels. Otherwise it uses hash rockets. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1728 +module SyntaxTree::HashKeyFormatter + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#1786 + def for(container); end + end +end + +# When formatting a single assoc node without the context of the parent +# hash, this formatter is used. It uses whatever is present in the node, +# because there is nothing to be consistent with. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1775 +class SyntaxTree::HashKeyFormatter::Identity + # source://syntax_tree//lib/syntax_tree/node.rb#1776 + def format_key(q, key); end +end + +# Formats the keys of a hash literal using labels. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1730 +class SyntaxTree::HashKeyFormatter::Labels + # source://syntax_tree//lib/syntax_tree/node.rb#1733 + def format_key(q, key); end +end + +# source://syntax_tree//lib/syntax_tree/node.rb#1731 +SyntaxTree::HashKeyFormatter::Labels::LABEL = T.let(T.unsafe(nil), Regexp) + +# Formats the keys of a hash literal using hash rockets. +# +# source://syntax_tree//lib/syntax_tree/node.rb#1756 +class SyntaxTree::HashKeyFormatter::Rockets + # source://syntax_tree//lib/syntax_tree/node.rb#1757 + def format_key(q, key); end +end + +# HashLiteral represents a hash literal. +# +# { key => value } +# +# source://syntax_tree//lib/syntax_tree/node.rb#5651 +class SyntaxTree::HashLiteral < ::SyntaxTree::Node + # @return [HashLiteral] a new instance of HashLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#5684 + def initialize(lbrace:, assocs:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5725 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5691 + def accept(visitor); end + + # [Array[ Assoc | AssocSplat ]] the optional contents of the hash + # + # source://syntax_tree//lib/syntax_tree/node.rb#5679 + def assocs; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5695 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5682 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5699 + def copy(lbrace: T.unsafe(nil), assocs: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5695 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5713 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5717 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5730 + def format_key(q, key); end + + # [LBrace] the left brace that opens this hash + # + # source://syntax_tree//lib/syntax_tree/node.rb#5676 + def lbrace; end + + private + + # If we have an empty hash that contains only comments, then we're going + # to do some special printing to ensure they get indented correctly. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#5738 + def empty_with_comments?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5742 + def format_contents(q); end +end + +# This is a special formatter used if the hash literal contains no values +# but _does_ contain comments. In this case we do some special formatting to +# make sure the comments gets indented properly. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5652 +class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter + # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#5656 + def initialize(lbrace); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5660 + def format(q); end + + # [LBrace] the opening brace + # + # source://syntax_tree//lib/syntax_tree/node.rb#5654 + def lbrace; end +end + +# Heredoc represents a heredoc string literal. +# +# <<~DOC +# contents +# DOC +# +# source://syntax_tree//lib/syntax_tree/node.rb#5772 +class SyntaxTree::Heredoc < ::SyntaxTree::Node + # @return [Heredoc] a new instance of Heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5788 + def initialize(beginning:, location:, ending: T.unsafe(nil), dedent: T.unsafe(nil), parts: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5870 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5797 + def accept(visitor); end + + # [HeredocBeg] the opening of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5773 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5801 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5786 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5805 + def copy(beginning: T.unsafe(nil), location: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5801 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5820 + def deconstruct_keys(_keys); end + + # [Integer] how far to dedent the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5779 + def dedent; end + + # [HeredocEnd] the ending of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5776 + def ending; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5835 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # heredoc string literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#5783 + def parts; end +end + +# This is a very specific behavior where you want to force a newline, but +# don't want to force the break parent. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5832 +SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# HeredocBeg represents the beginning declaration of a heredoc. +# +# <<~DOC +# contents +# DOC +# +# In the example above the HeredocBeg node represents <<~DOC. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5884 +class SyntaxTree::HeredocBeg < ::SyntaxTree::Node + # @return [HeredocBeg] a new instance of HeredocBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#5890 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5925 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5896 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5900 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5888 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5904 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5900 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5917 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5921 + def format(q); end + + # [String] the opening declaration of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5885 + def value; end +end + +# HeredocEnd represents the closing declaration of a heredoc. +# +# <<~DOC +# contents +# DOC +# +# In the example above the HeredocEnd node represents the closing DOC. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5938 +class SyntaxTree::HeredocEnd < ::SyntaxTree::Node + # @return [HeredocEnd] a new instance of HeredocEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#5944 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5979 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5950 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5954 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#5942 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5958 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5954 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#5971 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#5975 + def format(q); end + + # [String] the closing declaration of the heredoc + # + # source://syntax_tree//lib/syntax_tree/node.rb#5939 + def value; end +end + +# HshPtn represents matching against a hash pattern using the Ruby 2.7+ +# pattern matching syntax. +# +# case value +# in { key: } +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#5992 +class SyntaxTree::HshPtn < ::SyntaxTree::Node + # @return [HshPtn] a new instance of HshPtn + # + # source://syntax_tree//lib/syntax_tree/node.rb#6051 + def initialize(constant:, keywords:, keyword_rest:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6144 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6059 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6063 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6049 + def comments; end + + # [nil | Node] the optional constant wrapper + # + # source://syntax_tree//lib/syntax_tree/node.rb#6039 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6067 + def copy(constant: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6063 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6082 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6092 + def format(q); end + + # [nil | VarField] an optional parameter to gather up all remaining keywords + # + # source://syntax_tree//lib/syntax_tree/node.rb#6046 + def keyword_rest; end + + # [Array[ [DynaSymbol | Label, nil | Node] ]] the set of tuples + # representing the keywords that should be matched against in the pattern + # + # source://syntax_tree//lib/syntax_tree/node.rb#6043 + def keywords; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#6155 + def format_contents(q, parts, nested); end +end + +# Formats a key-value pair in a hash pattern. The value is optional. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5993 +class SyntaxTree::HshPtn::KeywordFormatter + # @return [KeywordFormatter] a new instance of KeywordFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6000 + def initialize(key, value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6005 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6009 + def format(q); end + + # [Label] the keyword being used + # + # source://syntax_tree//lib/syntax_tree/node.rb#5995 + def key; end + + # [Node] the optional value for the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#5998 + def value; end +end + +# Formats the optional double-splat from the pattern. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6020 +class SyntaxTree::HshPtn::KeywordRestFormatter + # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6024 + def initialize(keyword_rest); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6028 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6032 + def format(q); end + + # [VarField] the parameter that matches the remaining keywords + # + # source://syntax_tree//lib/syntax_tree/node.rb#6022 + def keyword_rest; end +end + +# IVar represents an instance variable literal. +# +# @variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#6876 +class SyntaxTree::IVar < ::SyntaxTree::Node + # @return [IVar] a new instance of IVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#6882 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6917 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6888 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6892 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6880 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6896 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6892 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6909 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6913 + def format(q); end + + # [String] the name of the instance variable + # + # source://syntax_tree//lib/syntax_tree/node.rb#6877 + def value; end +end + +# Ident represents an identifier anywhere in code. It can represent a very +# large number of things, depending on where it is in the syntax tree. +# +# value +# +# source://syntax_tree//lib/syntax_tree/node.rb#6179 +class SyntaxTree::Ident < ::SyntaxTree::Node + # @return [Ident] a new instance of Ident + # + # source://syntax_tree//lib/syntax_tree/node.rb#6185 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6220 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6191 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6195 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6183 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6199 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6195 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6212 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6216 + def format(q); end + + # [String] the value of the identifier + # + # source://syntax_tree//lib/syntax_tree/node.rb#6180 + def value; end +end + +# If represents the first clause in an +if+ chain. +# +# if predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#6469 +class SyntaxTree::IfNode < ::SyntaxTree::Node + # @return [IfNode] a new instance of IfNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#6481 + def initialize(predicate:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6526 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6489 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6493 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6479 + def comments; end + + # [nil | Elsif | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#6476 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6497 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6493 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6512 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6522 + def format(q); end + + # Checks if the node was originally found in the modifier form. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#6532 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#6470 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#6473 + def statements; end +end + +# IfOp represents a ternary clause. +# +# predicate ? truthy : falsy +# +# source://syntax_tree//lib/syntax_tree/node.rb#6542 +class SyntaxTree::IfOp < ::SyntaxTree::Node + # @return [IfOp] a new instance of IfOp + # + # source://syntax_tree//lib/syntax_tree/node.rb#6554 + def initialize(predicate:, truthy:, falsy:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6628 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6562 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6566 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6552 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6570 + def copy(predicate: T.unsafe(nil), truthy: T.unsafe(nil), falsy: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6566 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6585 + def deconstruct_keys(_keys); end + + # [Node] the expression to be executed if the predicate is falsy + # + # source://syntax_tree//lib/syntax_tree/node.rb#6549 + def falsy; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6595 + def format(q); end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#6543 + def predicate; end + + # [Node] the expression to be executed if the predicate is truthy + # + # source://syntax_tree//lib/syntax_tree/node.rb#6546 + def truthy; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#6635 + def format_break(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6658 + def format_flat(q); end +end + +# Imaginary represents an imaginary number literal. +# +# 1i +# +# source://syntax_tree//lib/syntax_tree/node.rb#6678 +class SyntaxTree::Imaginary < ::SyntaxTree::Node + # @return [Imaginary] a new instance of Imaginary + # + # source://syntax_tree//lib/syntax_tree/node.rb#6684 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6719 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6690 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6694 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6682 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6698 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6694 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6711 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6715 + def format(q); end + + # [String] the value of the imaginary number literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#6679 + def value; end +end + +# In represents using the +in+ keyword within the Ruby 2.7+ pattern matching +# syntax. +# +# case value +# in pattern +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#6732 +class SyntaxTree::In < ::SyntaxTree::Node + # @return [In] a new instance of In + # + # source://syntax_tree//lib/syntax_tree/node.rb#6744 + def initialize(pattern:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6809 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6752 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6756 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6742 + def comments; end + + # [nil | In | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#6739 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6760 + def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6756 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6775 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6785 + def format(q); end + + # [Node] the pattern to check against + # + # source://syntax_tree//lib/syntax_tree/node.rb#6733 + def pattern; end + + # [Statements] the expressions to execute if the pattern matched + # + # source://syntax_tree//lib/syntax_tree/node.rb#6736 + def statements; end +end + +# This class can be used to build an index of the structure of Ruby files. We +# define an index as the list of constants and methods defined within a file. +# +# This index strives to be as fast as possible to better support tools like +# IDEs. Because of that, it has different backends depending on what +# functionality is available. +# +# source://syntax_tree//lib/syntax_tree/index.rb#10 +module SyntaxTree::Index + class << self + # This method accepts source code and then indexes it. + # + # source://syntax_tree//lib/syntax_tree/index.rb#674 + def index(source, backend: T.unsafe(nil)); end + + # This method accepts a filepath and then indexes it. + # + # source://syntax_tree//lib/syntax_tree/index.rb#679 + def index_file(filepath, backend: T.unsafe(nil)); end + end +end + +# This entry represents a method definition that was created using the alias +# keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#85 +class SyntaxTree::Index::AliasMethodDefinition + # @return [AliasMethodDefinition] a new instance of AliasMethodDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#88 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#86 + def nesting; end +end + +# This entry represents a class definition using the class keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#22 +class SyntaxTree::Index::ClassDefinition + # @return [ClassDefinition] a new instance of ClassDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#25 + def initialize(nesting, name, superclass, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def nesting; end + + # Returns the value of attribute superclass. + # + # source://syntax_tree//lib/syntax_tree/index.rb#23 + def superclass; end +end + +# This entry represents a constant assignment. +# +# source://syntax_tree//lib/syntax_tree/index.rb#35 +class SyntaxTree::Index::ConstantDefinition + # @return [ConstantDefinition] a new instance of ConstantDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#38 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#36 + def nesting; end +end + +# This class handles parsing comments from Ruby source code in the case that +# we use the instruction sequence backend. Because the instruction sequence +# backend doesn't provide comments (since they are dropped) we provide this +# interface to lazily parse them out. +# +# source://syntax_tree//lib/syntax_tree/index.rb#152 +class SyntaxTree::Index::EntryComments + include ::Enumerable + + # @return [EntryComments] a new instance of EntryComments + # + # source://syntax_tree//lib/syntax_tree/index.rb#156 + def initialize(file_comments, location); end + + # source://syntax_tree//lib/syntax_tree/index.rb#161 + def each(&block); end + + # Returns the value of attribute file_comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#154 + def file_comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#154 + def location; end +end + +# When you're using the instruction sequence backend, this class is used to +# lazily parse comments out of the source code. +# +# source://syntax_tree//lib/syntax_tree/index.rb#98 +class SyntaxTree::Index::FileComments + # @return [FileComments] a new instance of FileComments + # + # source://syntax_tree//lib/syntax_tree/index.rb#139 + def initialize(source); end + + # source://syntax_tree//lib/syntax_tree/index.rb#143 + def comments; end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/index.rb#137 + def source; end +end + +# This represents the Ruby source in the form of a file. When it needs to +# be read we'll read the file. +# +# source://syntax_tree//lib/syntax_tree/index.rb#115 +class SyntaxTree::Index::FileComments::FileSource + # @return [FileSource] a new instance of FileSource + # + # source://syntax_tree//lib/syntax_tree/index.rb#118 + def initialize(filepath); end + + # Returns the value of attribute filepath. + # + # source://syntax_tree//lib/syntax_tree/index.rb#116 + def filepath; end + + # source://syntax_tree//lib/syntax_tree/index.rb#122 + def source; end +end + +# We use the ripper library to pull out source comments. +# +# source://syntax_tree//lib/syntax_tree/index.rb#100 +class SyntaxTree::Index::FileComments::Parser < ::Ripper + # @return [Parser] a new instance of Parser + # + # source://syntax_tree//lib/syntax_tree/index.rb#103 + def initialize(*_arg0); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#101 + def comments; end + + # source://syntax_tree//lib/syntax_tree/index.rb#108 + def on_comment(value); end +end + +# This represents the Ruby source in the form of a string. When it needs +# to be read the string is returned. +# +# source://syntax_tree//lib/syntax_tree/index.rb#129 +class SyntaxTree::Index::FileComments::StringSource + # @return [StringSource] a new instance of StringSource + # + # source://syntax_tree//lib/syntax_tree/index.rb#132 + def initialize(source); end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/index.rb#130 + def source; end +end + +# The class defined here is used to perform the indexing, depending on what +# functionality is available from the runtime. +# +# source://syntax_tree//lib/syntax_tree/index.rb#670 +SyntaxTree::Index::INDEX_BACKEND = SyntaxTree::Index::ISeqBackend + +# This backend creates the index using RubyVM::InstructionSequence, which is +# faster than using the Syntax Tree parser, but is not available on all +# runtimes. +# +# source://syntax_tree//lib/syntax_tree/index.rb#177 +class SyntaxTree::Index::ISeqBackend + # source://syntax_tree//lib/syntax_tree/index.rb#184 + def index(source); end + + # source://syntax_tree//lib/syntax_tree/index.rb#191 + def index_file(filepath); end + + private + + # source://syntax_tree//lib/syntax_tree/index.rb#242 + def find_attr_arguments(insns, index); end + + # source://syntax_tree//lib/syntax_tree/index.rb#205 + def find_constant_path(insns, index); end + + # source://syntax_tree//lib/syntax_tree/index.rb#273 + def index_iseq(iseq, file_comments); end + + # source://syntax_tree//lib/syntax_tree/index.rb#200 + def location_for(iseq); end + + # source://syntax_tree//lib/syntax_tree/index.rb#258 + def method_definition(nesting, name, location, file_comments); end +end + +# source://syntax_tree//lib/syntax_tree/index.rb#182 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#181 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_SCOPED = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#178 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_CLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#180 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_MODULE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/index.rb#179 +SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) + +# This is a location for an index entry. +# +# source://syntax_tree//lib/syntax_tree/index.rb#12 +class SyntaxTree::Index::Location + # @return [Location] a new instance of Location + # + # source://syntax_tree//lib/syntax_tree/index.rb#15 + def initialize(line, column); end + + # Returns the value of attribute column. + # + # source://syntax_tree//lib/syntax_tree/index.rb#13 + def column; end + + # Returns the value of attribute line. + # + # source://syntax_tree//lib/syntax_tree/index.rb#13 + def line; end +end + +# This entry represents a method definition using the def keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#59 +class SyntaxTree::Index::MethodDefinition + # @return [MethodDefinition] a new instance of MethodDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#62 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#60 + def nesting; end +end + +# This entry represents a module definition using the module keyword. +# +# source://syntax_tree//lib/syntax_tree/index.rb#47 +class SyntaxTree::Index::ModuleDefinition + # @return [ModuleDefinition] a new instance of ModuleDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#50 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#48 + def nesting; end +end + +# This backend creates the index using the Syntax Tree parser and a visitor. +# It is not as fast as using the instruction sequences directly, but is +# supported on all runtimes. +# +# source://syntax_tree//lib/syntax_tree/index.rb#452 +class SyntaxTree::Index::ParserBackend + # source://syntax_tree//lib/syntax_tree/index.rb#659 + def index(source); end + + # source://syntax_tree//lib/syntax_tree/index.rb#663 + def index_file(filepath); end +end + +# source://syntax_tree//lib/syntax_tree/index.rb#453 +class SyntaxTree::Index::ParserBackend::ConstantNameVisitor < ::SyntaxTree::Visitor + # source://syntax_tree//lib/syntax_tree/index.rb#458 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#454 + def visit_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#462 + def visit_var_ref(node); end +end + +# source://syntax_tree//lib/syntax_tree/index.rb#467 +class SyntaxTree::Index::ParserBackend::IndexVisitor < ::SyntaxTree::Visitor + # @return [IndexVisitor] a new instance of IndexVisitor + # + # source://syntax_tree//lib/syntax_tree/index.rb#470 + def initialize; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#468 + def nesting; end + + # Returns the value of attribute results. + # + # source://syntax_tree//lib/syntax_tree/index.rb#468 + def results; end + + # Returns the value of attribute statements. + # + # source://syntax_tree//lib/syntax_tree/index.rb#468 + def statements; end + + # source://syntax_tree//lib/syntax_tree/index.rb#477 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#496 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#515 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#547 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#584 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#608 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#626 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/index.rb#631 + def visit_statements(node); end + + private + + # source://syntax_tree//lib/syntax_tree/index.rb#639 + def comments_for(node); end +end + +# This entry represents a singleton method definition using the def keyword +# with a specified target. +# +# source://syntax_tree//lib/syntax_tree/index.rb#72 +class SyntaxTree::Index::SingletonMethodDefinition + # @return [SingletonMethodDefinition] a new instance of SingletonMethodDefinition + # + # source://syntax_tree//lib/syntax_tree/index.rb#75 + def initialize(nesting, name, location, comments); end + + # Returns the value of attribute comments. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def comments; end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def location; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def name; end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/index.rb#73 + def nesting; end +end + +# Int represents an integer number literal. +# +# 1 +# +# source://syntax_tree//lib/syntax_tree/node.rb#6820 +class SyntaxTree::Int < ::SyntaxTree::Node + # @return [Int] a new instance of Int + # + # source://syntax_tree//lib/syntax_tree/node.rb#6826 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6866 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6832 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6836 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6824 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6840 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6836 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6850 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6854 + def format(q); end + + # [String] the value of the integer + # + # source://syntax_tree//lib/syntax_tree/node.rb#6821 + def value; end +end + +# This visitor transforms the AST into a hash that contains only primitives +# that can be easily serialized into JSON. +# +# source://syntax_tree//lib/syntax_tree/json_visitor.rb#8 +class SyntaxTree::JSONVisitor < ::SyntaxTree::FieldVisitor + # @return [JSONVisitor] a new instance of JSONVisitor + # + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#11 + def initialize; end + + # Returns the value of attribute target. + # + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#9 + def target; end + + private + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#17 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#21 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#25 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#29 + def node(node, type); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#38 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#42 + def text(name, value); end + + # source://syntax_tree//lib/syntax_tree/json_visitor.rb#46 + def visit_location(location); end +end + +# Kw represents the use of a keyword. It can be almost anywhere in the syntax +# tree, so you end up seeing it quite a lot. +# +# if value +# end +# +# In the above example, there would be two Kw nodes: one for the if and one +# for the end. Note that anything that matches the list of keywords in Ruby +# will use a Kw, so if you use a keyword in a symbol literal for instance: +# +# :if +# +# then the contents of the symbol node will contain a Kw node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6936 +class SyntaxTree::Kw < ::SyntaxTree::Node + # @return [Kw] a new instance of Kw + # + # source://syntax_tree//lib/syntax_tree/node.rb#6945 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6978 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6952 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6956 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6943 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6960 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6956 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#6970 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#6974 + def format(q); end + + # [Symbol] the symbol version of the value + # + # source://syntax_tree//lib/syntax_tree/node.rb#6940 + def name; end + + # [String] the value of the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#6937 + def value; end +end + +# KwRestParam represents defining a parameter in a method definition that +# accepts all remaining keyword parameters. +# +# def method(**kwargs) end +# +# source://syntax_tree//lib/syntax_tree/node.rb#6989 +class SyntaxTree::KwRestParam < ::SyntaxTree::Node + # @return [KwRestParam] a new instance of KwRestParam + # + # source://syntax_tree//lib/syntax_tree/node.rb#6995 + def initialize(name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7031 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7001 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7005 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#6993 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7009 + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7005 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7022 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7026 + def format(q); end + + # [nil | Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#6990 + def name; end +end + +# LBrace represents the use of a left brace, i.e., {. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7333 +class SyntaxTree::LBrace < ::SyntaxTree::Node + # @return [LBrace] a new instance of LBrace + # + # source://syntax_tree//lib/syntax_tree/node.rb#7339 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7374 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7345 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7349 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7337 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7353 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7349 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7366 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7370 + def format(q); end + + # [String] the left brace + # + # source://syntax_tree//lib/syntax_tree/node.rb#7334 + def value; end + + class << self + # Because some nodes keep around a { token so that comments can be attached + # to it if they occur in the source, oftentimes an LBrace is a child of + # another node. This means it's required at initialization time. To make it + # easier to create LBrace nodes without any specific value, this method + # provides a default node. + # + # source://syntax_tree//lib/syntax_tree/node.rb#7383 + def default; end + end +end + +# LBracket represents the use of a left bracket, i.e., [. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7390 +class SyntaxTree::LBracket < ::SyntaxTree::Node + # @return [LBracket] a new instance of LBracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#7396 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7431 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7402 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7406 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7394 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7410 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7406 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7423 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7427 + def format(q); end + + # [String] the left bracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#7391 + def value; end + + class << self + # Because some nodes keep around a [ token so that comments can be attached + # to it if they occur in the source, oftentimes an LBracket is a child of + # another node. This means it's required at initialization time. To make it + # easier to create LBracket nodes without any specific value, this method + # provides a default node. + # + # source://syntax_tree//lib/syntax_tree/node.rb#7440 + def default; end + end +end + +# LParen represents the use of a left parenthesis, i.e., (. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7447 +class SyntaxTree::LParen < ::SyntaxTree::Node + # @return [LParen] a new instance of LParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#7453 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7488 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7459 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7463 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7451 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7467 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7463 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7480 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7484 + def format(q); end + + # [String] the left parenthesis + # + # source://syntax_tree//lib/syntax_tree/node.rb#7448 + def value; end + + class << self + # Because some nodes keep around a ( token so that comments can be attached + # to it if they occur in the source, oftentimes an LParen is a child of + # another node. This means it's required at initialization time. To make it + # easier to create LParen nodes without any specific value, this method + # provides a default node. + # + # source://syntax_tree//lib/syntax_tree/node.rb#7497 + def default; end + end +end + +# Label represents the use of an identifier to associate with an object. You +# can find it in a hash key, as in: +# +# { key: value } +# +# In this case "key:" would be the body of the label. You can also find it in +# pattern matching, as in: +# +# case value +# in key: +# end +# +# In this case "key:" would be the body of the label. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7050 +class SyntaxTree::Label < ::SyntaxTree::Node + # @return [Label] a new instance of Label + # + # source://syntax_tree//lib/syntax_tree/node.rb#7056 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7091 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7062 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7066 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7054 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7070 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7066 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7083 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7087 + def format(q); end + + # [String] the value of the label + # + # source://syntax_tree//lib/syntax_tree/node.rb#7051 + def value; end +end + +# LabelEnd represents the end of a dynamic symbol. +# +# { "key": value } +# +# In the example above, LabelEnd represents the "\":" token at the end of the +# hash key. This node is important for determining the type of quote being +# used by the label. +# +# source://syntax_tree//lib/syntax_tree/node.rb#7104 +class SyntaxTree::LabelEnd < ::SyntaxTree::Node + # @return [LabelEnd] a new instance of LabelEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#7107 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7133 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7112 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7116 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7120 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7116 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7129 + def deconstruct_keys(_keys); end + + # [String] the end of the label + # + # source://syntax_tree//lib/syntax_tree/node.rb#7105 + def value; end +end + +# Lambda represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# +# source://syntax_tree//lib/syntax_tree/node.rb#7143 +class SyntaxTree::Lambda < ::SyntaxTree::Node + # @return [Lambda] a new instance of Lambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#7152 + def initialize(params:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7255 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7159 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7163 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7150 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7167 + def copy(params: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7163 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7181 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7190 + def format(q); end + + # [LambdaVar | Paren] the parameter declaration for this lambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#7144 + def params; end + + # [BodyStmt | Statements] the expressions to be executed in this lambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#7147 + def statements; end +end + +# LambdaVar represents the parameters being declared for a lambda. Effectively +# this node is everything contained within the parentheses. This includes all +# of the various parameter types, as well as block-local variable +# declarations. +# +# -> (positional, optional = value, keyword:, █ local) do +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#7270 +class SyntaxTree::LambdaVar < ::SyntaxTree::Node + # @return [LambdaVar] a new instance of LambdaVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#7279 + def initialize(params:, locals:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7325 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7286 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7290 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7277 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7294 + def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7290 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7308 + def deconstruct_keys(_keys); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#7312 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7316 + def format(q); end + + # [Array[ Ident ]] the list of block-local variable declarations + # + # source://syntax_tree//lib/syntax_tree/node.rb#7274 + def locals; end + + # [Params] the parameters being declared with the block + # + # source://syntax_tree//lib/syntax_tree/node.rb#7271 + def params; end +end + +# Syntax Tree additionally ships with a language server conforming to the +# language server protocol. It can be invoked through the CLI by running: +# +# stree lsp +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#14 +class SyntaxTree::LanguageServer + # @return [LanguageServer] a new instance of LanguageServer + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#217 + def initialize(input: T.unsafe(nil), output: T.unsafe(nil), print_width: T.unsafe(nil)); end + + # Returns the value of attribute input. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#215 + def input; end + + # Returns the value of attribute output. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#215 + def output; end + + # Returns the value of attribute print_width. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#215 + def print_width; end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#228 + def run; end + + private + + # source://syntax_tree//lib/syntax_tree/language_server.rb#280 + def capabilities; end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#293 + def format(source, extension); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#317 + def inlay_hints(source); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#333 + def log(message); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#327 + def write(value); end +end + +# This class provides inlay hints for the language server. For more +# information, see the spec here: +# https://github.com/microsoft/language-server-protocol/issues/956. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#19 +class SyntaxTree::LanguageServer::InlayHints < ::SyntaxTree::Visitor + # @return [InlayHints] a new instance of InlayHints + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#43 + def initialize; end + + # Returns the value of attribute hints. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#41 + def hints; end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#41 + def stack; end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#48 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#67 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#81 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#102 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#124 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#145 + def visit_unary(node); end + + private + + # source://syntax_tree//lib/syntax_tree/language_server.rb#156 + def parentheses(location); end +end + +# This represents a hint that is going to be displayed in the editor. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#20 +class SyntaxTree::LanguageServer::InlayHints::Hint + # @return [Hint] a new instance of Hint + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#23 + def initialize(line:, character:, label:); end + + # Returns the value of attribute character. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#21 + def character; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#21 + def label; end + + # Returns the value of attribute line. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#21 + def line; end + + # This is the shape that the LSP expects. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#30 + def to_json(*opts); end +end + +# This is a small module that effectively mirrors pattern matching. We're +# using it so that we can support truffleruby without having to ignore the +# language server. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#174 +module SyntaxTree::LanguageServer::Request + class << self + # source://syntax_tree//lib/syntax_tree/language_server.rb#203 + def [](value); end + end +end + +# Represents a hash pattern. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#176 +class SyntaxTree::LanguageServer::Request::Shape + # @return [Shape] a new instance of Shape + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#179 + def initialize(values); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#183 + def ===(other); end + + # Returns the value of attribute values. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#177 + def values; end +end + +# Represents an array pattern. +# +# source://syntax_tree//lib/syntax_tree/language_server.rb#191 +class SyntaxTree::LanguageServer::Request::Tuple + # @return [Tuple] a new instance of Tuple + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#194 + def initialize(values); end + + # source://syntax_tree//lib/syntax_tree/language_server.rb#198 + def ===(other); end + + # Returns the value of attribute values. + # + # source://syntax_tree//lib/syntax_tree/language_server.rb#192 + def values; end +end + +# Represents the location of a node in the tree from the source code. +# +# source://syntax_tree//lib/syntax_tree/node.rb#5 +class SyntaxTree::Location + # @return [Location] a new instance of Location + # + # source://syntax_tree//lib/syntax_tree/node.rb#13 + def initialize(start_line:, start_char:, start_column:, end_line:, end_char:, end_column:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#33 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#50 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#54 + def deconstruct_keys(_keys); end + + # Returns the value of attribute end_char. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def end_char; end + + # Returns the value of attribute end_column. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def end_column; end + + # Returns the value of attribute end_line. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def end_line; end + + # source://syntax_tree//lib/syntax_tree/node.rb#29 + def lines; end + + # Returns the value of attribute start_char. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def start_char; end + + # Returns the value of attribute start_column. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def start_column; end + + # Returns the value of attribute start_line. + # + # source://syntax_tree//lib/syntax_tree/node.rb#6 + def start_line; end + + # source://syntax_tree//lib/syntax_tree/node.rb#39 + def to(other); end + + class << self + # A convenience method that is typically used when you don't care about the + # location of a node, but need to create a Location instance to pass to a + # constructor. + # + # source://syntax_tree//lib/syntax_tree/node.rb#90 + def default; end + + # source://syntax_tree//lib/syntax_tree/node.rb#76 + def fixed(line:, char:, column:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#65 + def token(line:, char:, column:, size:); end + end +end + +# Formats an Until or While node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11394 +class SyntaxTree::LoopFormatter + # @return [LoopFormatter] a new instance of LoopFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#11401 + def initialize(keyword, node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11406 + def format(q); end + + # [String] the name of the keyword used for this loop + # + # source://syntax_tree//lib/syntax_tree/node.rb#11396 + def keyword; end + + # [Until | While] the node that is being formatted + # + # source://syntax_tree//lib/syntax_tree/node.rb#11399 + def node; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#11453 + def format_break(q); end +end + +# MAssign is a parent node of any kind of multiple assignment. This includes +# splitting out variables on the left like: +# +# first, second, third = value +# +# as well as splitting out variables on the right, as in: +# +# value = first, second, third +# +# Both sides support splats, as well as variables following them. There's also +# destructuring behavior that you can achieve with the following: +# +# first, = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#7517 +class SyntaxTree::MAssign < ::SyntaxTree::Node + # @return [MAssign] a new instance of MAssign + # + # source://syntax_tree//lib/syntax_tree/node.rb#7526 + def initialize(target:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7570 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7533 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7537 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7524 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7541 + def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7537 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7555 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7559 + def format(q); end + + # [MLHS | MLHSParen] the target of the multiple assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#7518 + def target; end + + # [Node] the value being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#7521 + def value; end +end + +# MLHS represents a list of values being destructured on the left-hand side +# of a multiple assignment. +# +# first, second, third = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#7660 +class SyntaxTree::MLHS < ::SyntaxTree::Node + # @return [MLHS] a new instance of MLHS + # + # source://syntax_tree//lib/syntax_tree/node.rb#7671 + def initialize(parts:, location:, comma: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7709 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7678 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7682 + def child_nodes; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7666 + def comma; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7666 + def comma=(_arg0); end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7669 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7686 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil), comma: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7682 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7700 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7704 + def format(q); end + + # [ + # Array[ + # ARefField | ArgStar | ConstPathField | Field | Ident | MLHSParen | + # TopConstField | VarField + # ] + # ] the parts of the left-hand side of a multiple assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#7661 + def parts; end +end + +# MLHSParen represents parentheses being used to destruct values in a multiple +# assignment on the left hand side. +# +# (left, right) = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#7721 +class SyntaxTree::MLHSParen < ::SyntaxTree::Node + # @return [MLHSParen] a new instance of MLHSParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#7732 + def initialize(contents:, location:, comma: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7785 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7739 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7743 + def child_nodes; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7727 + def comma; end + + # [boolean] whether or not there is a trailing comma at the end of this + # list, which impacts destructuring. It's an attr_accessor so that while + # the syntax tree is being built it can be set by its parent node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7727 + def comma=(_arg0); end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7730 + def comments; end + + # [MLHS | MLHSParen] the contents inside of the parentheses + # + # source://syntax_tree//lib/syntax_tree/node.rb#7722 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7747 + def copy(contents: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7743 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7760 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7764 + def format(q); end +end + +# MRHS represents the values that are being assigned on the right-hand side of +# a multiple assignment. +# +# values = first, second, third +# +# source://syntax_tree//lib/syntax_tree/node.rb#7886 +class SyntaxTree::MRHS < ::SyntaxTree::Node + # @return [MRHS] a new instance of MRHS + # + # source://syntax_tree//lib/syntax_tree/node.rb#7892 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7927 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7898 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7902 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7890 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7906 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7902 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7919 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7923 + def format(q); end + + # [Array[Node]] the parts that are being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#7887 + def parts; end +end + +# This visitor transforms the AST into a Ruby pattern matching expression that +# would match correctly against the AST. +# +# source://syntax_tree//lib/syntax_tree/match_visitor.rb#6 +class SyntaxTree::MatchVisitor < ::SyntaxTree::FieldVisitor + # @return [MatchVisitor] a new instance of MatchVisitor + # + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#9 + def initialize(q); end + + # Returns the value of attribute q. + # + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#7 + def q; end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#13 + def visit(node); end + + private + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#30 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#44 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#52 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#65 + def node(node, _type); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#86 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/match_visitor.rb#112 + def text(name, value); end +end + +# This module is responsible for rendering mermaid (https://mermaid.js.org/) +# flow charts. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#9 +module SyntaxTree::Mermaid + class << self + # Escape a label to be used in the mermaid syntax. This is used to escape + # HTML entities such that they render properly within the quotes. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#158 + def escape(label); end + + # Create a new flowchart. If a block is given, it will be yielded to and + # the flowchart will be rendered. Otherwise, the flowchart will be + # returned. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#165 + def flowchart; end + end +end + +# This is the main class that handles rendering a flowchart. It keeps track +# of its nodes and links and renders them according to the mermaid syntax. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#12 +class SyntaxTree::Mermaid::FlowChart + # @return [FlowChart] a new instance of FlowChart + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#15 + def initialize; end + + # Retrieve a node that has already been added to the flowchart by its id. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#25 + def fetch(id); end + + # Add a link to the flowchart between two nodes with an optional label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#30 + def link(from, to, label = T.unsafe(nil), type: T.unsafe(nil), color: T.unsafe(nil)); end + + # Returns the value of attribute links. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def links; end + + # Add a node to the flowchart with an optional label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#39 + def node(id, label = T.unsafe(nil), shape: T.unsafe(nil)); end + + # Returns the value of attribute nodes. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def nodes; end + + # Returns the value of attribute output. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def output; end + + # Returns the value of attribute prefix. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 + def prefix; end + + # Return the rendered flowchart. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#64 + def render; end + + # Add a subgraph to the flowchart. Within the given block, all of the + # nodes will be rendered within the subgraph. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#49 + def subgraph(label); end +end + +# This class represents a link between two nodes in a flowchart. It is not +# meant to be interacted with directly, but rather used as a data structure +# by the FlowChart class. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#78 +class SyntaxTree::Mermaid::Link + # @return [Link] a new instance of Link + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#84 + def initialize(from, to, label, type, color); end + + # Returns the value of attribute color. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def color; end + + # Returns the value of attribute from. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def from; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def label; end + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#95 + def render; end + + # Returns the value of attribute to. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def to; end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 + def type; end + + private + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#108 + def sides; end +end + +# source://syntax_tree//lib/syntax_tree/mermaid.rb#80 +SyntaxTree::Mermaid::Link::COLORS = T.let(T.unsafe(nil), Array) + +# source://syntax_tree//lib/syntax_tree/mermaid.rb#79 +SyntaxTree::Mermaid::Link::TYPES = T.let(T.unsafe(nil), Array) + +# This class represents a node in a flowchart. Unlike the Link class, it can +# be used directly. It is the return value of the #node method, and is meant +# to be passed around to #link methods to create links between nodes. +# +# source://syntax_tree//lib/syntax_tree/mermaid.rb#121 +class SyntaxTree::Mermaid::Node + # @return [Node] a new instance of Node + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#126 + def initialize(id, label, shape); end + + # Returns the value of attribute id. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 + def id; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 + def label; end + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#134 + def render; end + + # Returns the value of attribute shape. + # + # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 + def shape; end + + private + + # source://syntax_tree//lib/syntax_tree/mermaid.rb#141 + def bounds; end +end + +# source://syntax_tree//lib/syntax_tree/mermaid.rb#122 +SyntaxTree::Mermaid::Node::SHAPES = T.let(T.unsafe(nil), Array) + +# This visitor transforms the AST into a mermaid flow chart. +# +# source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#5 +class SyntaxTree::MermaidVisitor < ::SyntaxTree::FieldVisitor + # @return [MermaidVisitor] a new instance of MermaidVisitor + # + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#8 + def initialize; end + + # Returns the value of attribute flowchart. + # + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 + def flowchart; end + + # Returns the value of attribute target. + # + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 + def target; end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#13 + def visit_program(node); end + + private + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#20 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#24 + def field(name, value); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#37 + def list(name, values); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#43 + def node(node, type); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#55 + def pairs(name, values); end + + # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#65 + def text(name, value); end +end + +# MethodAddBlock represents a method call with a block argument. +# +# method {} +# +# source://syntax_tree//lib/syntax_tree/node.rb#7580 +class SyntaxTree::MethodAddBlock < ::SyntaxTree::Node + # @return [MethodAddBlock] a new instance of MethodAddBlock + # + # source://syntax_tree//lib/syntax_tree/node.rb#7589 + def initialize(call:, block:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7638 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7596 + def accept(visitor); end + + # [BlockNode] the block being sent with the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#7584 + def block; end + + # [ARef | CallNode | Command | CommandCall | Super | ZSuper] the method call + # + # source://syntax_tree//lib/syntax_tree/node.rb#7581 + def call; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7600 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7587 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7604 + def copy(call: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7600 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7618 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7622 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7643 + def format_contents(q); end +end + +# ModuleDeclaration represents defining a module using the +module+ keyword. +# +# module Namespace +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#7796 +class SyntaxTree::ModuleDeclaration < ::SyntaxTree::Node + # @return [ModuleDeclaration] a new instance of ModuleDeclaration + # + # source://syntax_tree//lib/syntax_tree/node.rb#7805 + def initialize(constant:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7865 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7812 + def accept(visitor); end + + # [BodyStmt] the expressions to be executed in the context of the module + # + # source://syntax_tree//lib/syntax_tree/node.rb#7800 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7816 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7803 + def comments; end + + # [ConstPathRef | ConstRef | TopConstRef] the name of the module + # + # source://syntax_tree//lib/syntax_tree/node.rb#7797 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7820 + def copy(constant: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7816 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7834 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7843 + def format(q); end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#7872 + def format_declaration(q); end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for mutating the tree before it is formatted. +# +# source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#6 +class SyntaxTree::MutationVisitor < ::SyntaxTree::BasicVisitor + # @return [MutationVisitor] a new instance of MutationVisitor + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#9 + def initialize; end + + # Create a new mutation based on the given query that will mutate the node + # using the given block. The block should return a new node that will take + # the place of the given node in the tree. These blocks frequently make use + # of the `copy` method on nodes to create a new node with the same + # properties as the original node. + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#18 + def mutate(query, &block); end + + # Returns the value of attribute mutations. + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#7 + def mutations; end + + # This is the base visit method for each node in the tree. It first creates + # a copy of the node using the visit_* methods defined below. Then it checks + # each mutation in sequence and calls it if it finds a match. + # + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#25 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#38 + def visit_BEGIN(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#46 + def visit_CHAR(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#51 + def visit_END(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#59 + def visit___end__(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#64 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#69 + def visit_aref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#74 + def visit_aref_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#89 + def visit_arg_block(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#79 + def visit_arg_paren(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#94 + def visit_arg_star(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#84 + def visit_args(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#99 + def visit_args_forward(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#104 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#112 + def visit_aryptn(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#122 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#127 + def visit_assoc(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#132 + def visit_assoc_splat(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#137 + def visit_backref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#142 + def visit_backtick(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#147 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#152 + def visit_begin(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#162 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#295 + def visit_block(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#167 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#172 + def visit_blockarg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#177 + def visit_bodystmt(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#187 + def visit_break(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#192 + def visit_call(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#202 + def visit_case(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#216 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#225 + def visit_comma(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#230 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#239 + def visit_command_call(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#249 + def visit_comment(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#254 + def visit_const(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#259 + def visit_const_path_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#264 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#269 + def visit_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#274 + def visit_cvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#279 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#290 + def visit_defined(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#313 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#318 + def visit_else(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#326 + def visit_elsif(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#334 + def visit_embdoc(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#339 + def visit_embexpr_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#344 + def visit_embexpr_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#349 + def visit_embvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#354 + def visit_ensure(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#362 + def visit_excessed_comma(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#367 + def visit_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#375 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#380 + def visit_fndptn(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#390 + def visit_for(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#395 + def visit_gvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#400 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#405 + def visit_heredoc(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#414 + def visit_heredoc_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#419 + def visit_heredoc_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#424 + def visit_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#434 + def visit_ident(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#439 + def visit_if(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#448 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#453 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#458 + def visit_in(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#466 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#471 + def visit_ivar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#476 + def visit_kw(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#481 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#486 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#491 + def visit_label_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#496 + def visit_lambda(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#504 + def visit_lambda_var(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#509 + def visit_lbrace(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#514 + def visit_lbracket(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#519 + def visit_lparen(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#524 + def visit_massign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#529 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#534 + def visit_mlhs(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#539 + def visit_mlhs_paren(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#544 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#552 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#557 + def visit_next(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#812 + def visit_not(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#562 + def visit_op(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#567 + def visit_opassign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#572 + def visit_params(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#588 + def visit_paren(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#593 + def visit_period(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#157 + def visit_pinned_begin(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#854 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#598 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#603 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#611 + def visit_qsymbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#616 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#624 + def visit_qwords_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#304 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#211 + def visit_rassign(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#629 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#634 + def visit_rbrace(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#639 + def visit_rbracket(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#644 + def visit_redo(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#654 + def visit_regexp_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#649 + def visit_regexp_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#659 + def visit_regexp_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#664 + def visit_regexp_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#674 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#669 + def visit_rescue_ex(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#684 + def visit_rescue_mod(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#689 + def visit_rest_param(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#694 + def visit_retry(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#699 + def visit_return(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#704 + def visit_rparen(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#709 + def visit_sclass(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#714 + def visit_statements(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#724 + def visit_string_concat(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#719 + def visit_string_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#729 + def visit_string_dvar(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#734 + def visit_string_embexpr(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#739 + def visit_string_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#744 + def visit_super(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#749 + def visit_symbeg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#754 + def visit_symbol_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#759 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#764 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#772 + def visit_symbols_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#777 + def visit_tlambda(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#782 + def visit_tlambeg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#787 + def visit_top_const_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#792 + def visit_top_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#797 + def visit_tstring_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#802 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#807 + def visit_tstring_end(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#817 + def visit_unary(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#822 + def visit_undef(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#827 + def visit_unless(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#836 + def visit_until(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#844 + def visit_var_field(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#849 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#859 + def visit_vcall(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#864 + def visit_void_stmt(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#869 + def visit_when(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#878 + def visit_while(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#886 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#891 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#899 + def visit_words_beg(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#904 + def visit_xstring(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#909 + def visit_xstring_literal(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#914 + def visit_yield(node); end + + # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#919 + def visit_zsuper(node); end +end + +# Next represents using the +next+ keyword. +# +# next +# +# The +next+ keyword can also optionally be called with an argument: +# +# next value +# +# +next+ can even be called with multiple arguments, but only if parentheses +# are omitted, as in: +# +# next first, second, third +# +# If a single value is being given, parentheses can be used, as in: +# +# next(value) +# +# source://syntax_tree//lib/syntax_tree/node.rb#7950 +class SyntaxTree::Next < ::SyntaxTree::Node + # @return [Next] a new instance of Next + # + # source://syntax_tree//lib/syntax_tree/node.rb#7956 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7991 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7962 + def accept(visitor); end + + # [Args] the arguments passed to the next keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#7951 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7966 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#7954 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7970 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7966 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#7983 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#7987 + def format(q); end +end + +# This is the parent node of all of the syntax tree nodes. It's pretty much +# exclusively here to make it easier to operate with the tree in cases where +# you're trying to monkey-patch or strictly type. +# +# source://syntax_tree//lib/syntax_tree/node.rb#105 +class SyntaxTree::Node + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#109 + def accept(visitor); end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#113 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#149 + def construct_keys; end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#117 + def deconstruct; end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#121 + def deconstruct_keys(keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#133 + def end_char; end + + # @raise [NotImplementedError] + # + # source://syntax_tree//lib/syntax_tree/node.rb#125 + def format(q); end + + # [Location] the location of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#107 + def location; end + + # source://syntax_tree//lib/syntax_tree/node.rb#137 + def pretty_print(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#129 + def start_char; end + + # source://syntax_tree//lib/syntax_tree/node.rb#141 + def to_json(*opts); end + + # source://syntax_tree//lib/syntax_tree/node.rb#145 + def to_mermaid; end +end + +# Not represents the unary +not+ method being called on an expression. +# +# not value +# +# source://syntax_tree//lib/syntax_tree/node.rb#11094 +class SyntaxTree::Not < ::SyntaxTree::Node + # @return [Not] a new instance of Not + # + # source://syntax_tree//lib/syntax_tree/node.rb#11104 + def initialize(statement:, parentheses:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11166 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11111 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11115 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11102 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11119 + def copy(statement: T.unsafe(nil), parentheses: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11115 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11133 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11142 + def format(q); end + + # [boolean] whether or not parentheses were used + # + # source://syntax_tree//lib/syntax_tree/node.rb#11098 + def parentheses; end + + # [boolean] whether or not parentheses were used + # + # source://syntax_tree//lib/syntax_tree/node.rb#11098 + def parentheses?; end + + # [nil | Node] the statement on which to operate + # + # source://syntax_tree//lib/syntax_tree/node.rb#11095 + def statement; end +end + +# Op represents an operator literal in the source. +# +# 1 + 2 +# +# In the example above, the Op node represents the + operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8002 +class SyntaxTree::Op < ::SyntaxTree::Node + # @return [Op] a new instance of Op + # + # source://syntax_tree//lib/syntax_tree/node.rb#8011 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8044 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8018 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8022 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8009 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8026 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8022 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8036 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8040 + def format(q); end + + # [Symbol] the symbol version of the value + # + # source://syntax_tree//lib/syntax_tree/node.rb#8006 + def name; end + + # [String] the operator + # + # source://syntax_tree//lib/syntax_tree/node.rb#8003 + def value; end +end + +# OpAssign represents assigning a value to a variable or constant using an +# operator like += or ||=. +# +# variable += value +# +# source://syntax_tree//lib/syntax_tree/node.rb#8056 +class SyntaxTree::OpAssign < ::SyntaxTree::Node + # @return [OpAssign] a new instance of OpAssign + # + # source://syntax_tree//lib/syntax_tree/node.rb#8068 + def initialize(target:, operator:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8127 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8076 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8080 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8066 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8084 + def copy(target: T.unsafe(nil), operator: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8080 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8099 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8109 + def format(q); end + + # [Op] the operator being used for the assignment + # + # source://syntax_tree//lib/syntax_tree/node.rb#8060 + def operator; end + + # [ARefField | ConstPathField | Field | TopConstField | VarField] the target + # to assign the result of the expression to + # + # source://syntax_tree//lib/syntax_tree/node.rb#8057 + def target; end + + # [Node] the expression to be assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#8063 + def value; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#8134 + def skip_indent?; end +end + +# The list of nodes that represent patterns inside of pattern matching so that +# when a pattern is being printed it knows if it's nested. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6171 +SyntaxTree::PATTERNS = T.let(T.unsafe(nil), Array) + +# Params represents defining parameters on a method or lambda. +# +# def method(param) end +# +# source://syntax_tree//lib/syntax_tree/node.rb#8214 +class SyntaxTree::Params < ::SyntaxTree::Node + # @return [Params] a new instance of Params + # + # source://syntax_tree//lib/syntax_tree/node.rb#8314 + def initialize(location:, requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8444 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8344 + def accept(visitor); end + + # Returns a range representing the possible number of arguments accepted + # by this params node not including the block. For example: + # + # def foo(a, b = 1, c:, d: 2, &block) + # ... + # end + # + # has arity 2..4. + # + # source://syntax_tree//lib/syntax_tree/node.rb#8467 + def arity; end + + # [nil | BlockArg] the optional block parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8309 + def block; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8348 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8312 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8362 + def copy(location: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8348 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8390 + def deconstruct_keys(_keys); end + + # Params nodes are the most complicated in the tree. Occasionally you want + # to know if they are "empty", which means not having any parameters + # declared. This logic accesses every kind of parameter and determines if + # it's missing. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#8339 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8404 + def format(q); end + + # [nil | :nil | ArgsForward | KwRestParam] the optional keyword rest + # parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8306 + def keyword_rest; end + + # [Array[ [ Label, nil | Node ] ]] any keyword parameters and their + # optional default values + # + # source://syntax_tree//lib/syntax_tree/node.rb#8302 + def keywords; end + + # [Array[ [ Ident, Node ] ]] any optional parameters and their default + # values + # + # source://syntax_tree//lib/syntax_tree/node.rb#8290 + def optionals; end + + # [Array[ Ident ]] any positional parameters that exist after a rest + # parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8298 + def posts; end + + # [Array[ Ident | MLHSParen ]] any required parameters + # + # source://syntax_tree//lib/syntax_tree/node.rb#8286 + def requireds; end + + # [nil | ArgsForward | ExcessedComma | RestParam] the optional rest + # parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8294 + def rest; end + + private + + # source://syntax_tree//lib/syntax_tree/node.rb#8483 + def format_contents(q, parts); end +end + +# Formats the keyword position of the parameters. This includes the label, +# as well as an optional default value. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8240 +class SyntaxTree::Params::KeywordFormatter + # @return [KeywordFormatter] a new instance of KeywordFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8247 + def initialize(name, value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8252 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8256 + def format(q); end + + # [Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8242 + def name; end + + # [nil | Node] the value of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8245 + def value; end +end + +# Formats the keyword_rest position of the parameters. This can be the **nil +# syntax, the ... syntax, or the ** syntax. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8268 +class SyntaxTree::Params::KeywordRestFormatter + # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8272 + def initialize(value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8276 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8280 + def format(q); end + + # [:nil | ArgsForward | KwRestParam] the value of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8270 + def value; end +end + +# Formats the optional position of the parameters. This includes the label, +# as well as the default value. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8215 +class SyntaxTree::Params::OptionalFormatter + # @return [OptionalFormatter] a new instance of OptionalFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8222 + def initialize(name, value); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8227 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8231 + def format(q); end + + # [Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8217 + def name; end + + # [Node] the value of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#8220 + def value; end +end + +# Paren represents using balanced parentheses in a couple places in a Ruby +# program. In general parentheses can be used anywhere a Ruby expression can +# be used. +# +# (1 + 2) +# +# source://syntax_tree//lib/syntax_tree/node.rb#8496 +class SyntaxTree::Paren < ::SyntaxTree::Node + # @return [Paren] a new instance of Paren + # + # source://syntax_tree//lib/syntax_tree/node.rb#8505 + def initialize(lparen:, contents:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8561 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8512 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8516 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8503 + def comments; end + + # [nil | Node] the expression inside the parentheses + # + # source://syntax_tree//lib/syntax_tree/node.rb#8500 + def contents; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8520 + def copy(lparen: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8516 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8534 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8543 + def format(q); end + + # [LParen] the left parenthesis that opened this statement + # + # source://syntax_tree//lib/syntax_tree/node.rb#8497 + def lparen; end +end + +# If you have a modifier statement (for instance a modifier if statement or a +# modifier while loop) there are times when you need to wrap the entire +# statement in parentheses. This occurs when you have something like: +# +# foo[:foo] = +# if bar? +# baz +# end +# +# Normally we would shorten this to an inline version, which would result in: +# +# foo[:foo] = baz if bar? +# +# but this actually has different semantic meaning. The first example will +# result in a nil being inserted into the hash for the :foo key, whereas the +# second example will result in an empty hash because the if statement applies +# to the entire assignment. +# +# We can fix this in a couple of ways. We can use the then keyword, as in: +# +# foo[:foo] = if bar? then baz end +# +# But this isn't used very often. We can also just leave it as is with the +# multi-line version, but for a short predicate and short value it looks +# verbose. The last option and the one used here is to add parentheses on +# both sides of the expression, as in: +# +# foo[:foo] = (baz if bar?) +# +# This approach maintains the nice conciseness of the inline version, while +# keeping the correct semantic meaning. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8171 +module SyntaxTree::Parentheses + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#8191 + def break(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8183 + def flat(q); end + end +end + +# source://syntax_tree//lib/syntax_tree/node.rb#8172 +SyntaxTree::Parentheses::NODES = T.let(T.unsafe(nil), Array) + +# Parser is a subclass of the Ripper library that subscribes to the stream of +# tokens and nodes coming from the parser and builds up a syntax tree. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#8 +class SyntaxTree::Parser < ::Ripper + # @return [Parser] a new instance of Parser + # + # source://syntax_tree//lib/syntax_tree/parser.rb#116 + def initialize(source, *_arg1); end + + # [Array[ Comment | EmbDoc ]] the list of comments that have been found + # while parsing the source. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#114 + def comments; end + + # [Array[ SingleByteString | MultiByteString ]] the list of objects that + # represent the start of each line in character offsets + # + # source://syntax_tree//lib/syntax_tree/parser.rb#105 + def line_counts; end + + # [String] the source being parsed + # + # source://syntax_tree//lib/syntax_tree/parser.rb#101 + def source; end + + # [Array[ untyped ]] a running list of tokens that have been found in the + # source. This list changes a lot as certain nodes will "consume" these + # tokens to determine their bounds. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#110 + def tokens; end + + private + + # Attaches comments to the nodes in the tree that most closely correspond to + # the location of the comments. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2911 + def attach_comments(program, comments); end + + # This represents the current place in the source string that we've gotten + # to so far. We have a memoized line_counts object that we can use to get + # the number of characters that we've had to go through to get to the + # beginning of this line, then we add the number of columns into this line + # that we've gone through. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#197 + def char_pos; end + + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#295 + def consume_error(name, location); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#312 + def consume_keyword(name); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#318 + def consume_operator(name); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#300 + def consume_token(type); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#306 + def consume_tstring_end(location); end + + # This represents the current column we're in relative to the beginning of + # the current line. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#203 + def current_column; end + + # A helper function to find a :: operator. We do special handling instead of + # using find_token here because we don't pop off all of the :: operators so + # you could end up getting the wrong information if you have for instance + # ::X::Y::Z. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#328 + def find_colon2_before(const); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#272 + def find_keyword(name); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#277 + def find_keyword_between(name, left, right); end + + # Finds the next position in the source string that begins a statement. This + # is used to bind statements lists and make sure they don't include a + # preceding comment. For example, we want the following comment to be + # attached to the class node and not the statement node: + # + # ... + # end + # + # By finding the next non-space character, we can make sure that the bounds + # of the statement list are correct. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#349 + def find_next_statement_start(position); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#290 + def find_operator(name); end + + # As we build up a list of tokens, we'll periodically need to go backwards + # and find the ones that we've already hit in order to determine the + # location information for nodes that use them. For example, if you have a + # module node then you'll look backward for a kw token to determine your + # start location. + # + # This works with nesting since we're deleting tokens from the list once + # they've been used up. For example if you had nested module declarations + # then the innermost declaration would grab the last kw node that matches + # "module" (which would happen to be the innermost keyword). Then the outer + # one would only be able to grab the first one. In this way all of the + # tokens act as their own stack. + # + # If we're expecting to be able to find a token and consume it, but can't + # actually find it, then we need to raise an error. This is _usually_ caused + # by a syntax error in the source that we're printing. It could also be + # caused by accidentally attempting to consume a token twice by two + # different parser event handlers. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#254 + def find_token(type); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#259 + def find_token_between(type, left, right); end + + # Returns the current location that is being looked at for the parser for + # the purpose of locating the error. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#210 + def find_token_error(location); end + + # Ripper doesn't support capturing lambda local variables until 3.2. To + # mitigate this, we have to parse that code for ourselves. We use the range + # from the parentheses to find where we _should_ be looking. Then we check + # if the resulting tokens match a pattern that we determine means that the + # declaration has block-local variables. Once it does, we parse those out + # and convert them into Ident nodes. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2362 + def lambda_locals(source); end + + # Responsible for finding the nearest nodes to the given comment within the + # context of the given encapsulating node. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2946 + def nearest_nodes(node, comment); end + + # :call-seq: + # on_BEGIN: (Statements statements) -> BEGINBlock + # + # source://syntax_tree//lib/syntax_tree/parser.rb#371 + def on_BEGIN(statements); end + + # :call-seq: + # on_CHAR: (String value) -> CHAR + # + # source://syntax_tree//lib/syntax_tree/parser.rb#395 + def on_CHAR(value); end + + # :call-seq: + # on_END: (Statements statements) -> ENDBlock + # + # source://syntax_tree//lib/syntax_tree/parser.rb#410 + def on_END(statements); end + + # :call-seq: + # on___end__: (String value) -> EndContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#434 + def on___end__(value); end + + # :call-seq: + # on_alias: ( + # (DynaSymbol | SymbolLiteral) left, + # (DynaSymbol | SymbolLiteral) right + # ) -> AliasNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#453 + def on_alias(left, right); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_alias_error(error, *_arg1); end + + # :call-seq: + # on_aref: (untyped collection, (nil | Args) index) -> ARef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#465 + def on_aref(collection, index); end + + # :call-seq: + # on_aref_field: ( + # untyped collection, + # (nil | Args) index + # ) -> ARefField + # + # source://syntax_tree//lib/syntax_tree/parser.rb#481 + def on_aref_field(collection, index); end + + # :call-seq: + # on_arg_paren: ( + # (nil | Args | ArgsForward) arguments + # ) -> ArgParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#500 + def on_arg_paren(arguments); end + + # :call-seq: + # on_args_add: (Args arguments, untyped argument) -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#522 + def on_args_add(arguments, argument); end + + # :call-seq: + # on_args_add_block: ( + # Args arguments, + # (false | untyped) block + # ) -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#543 + def on_args_add_block(arguments, block); end + + # :call-seq: + # on_args_add_star: (Args arguments, untyped star) -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#581 + def on_args_add_star(arguments, argument); end + + # :call-seq: + # on_args_forward: () -> ArgsForward + # + # source://syntax_tree//lib/syntax_tree/parser.rb#603 + def on_args_forward; end + + # :call-seq: + # on_args_new: () -> Args + # + # source://syntax_tree//lib/syntax_tree/parser.rb#611 + def on_args_new; end + + # :call-seq: + # on_array: ((nil | Args) contents) -> + # ArrayLiteral | QSymbols | QWords | Symbols | Words + # + # source://syntax_tree//lib/syntax_tree/parser.rb#622 + def on_array(contents); end + + # :call-seq: + # on_aryptn: ( + # (nil | VarRef) constant, + # (nil | Array[untyped]) requireds, + # (nil | VarField) rest, + # (nil | Array[untyped]) posts + # ) -> AryPtn + # + # source://syntax_tree//lib/syntax_tree/parser.rb#701 + def on_aryptn(constant, requireds, rest, posts); end + + # :call-seq: + # on_assign: ( + # ( + # ARefField | + # ConstPathField | + # Field | + # TopConstField | + # VarField + # ) target, + # untyped value + # ) -> Assign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#756 + def on_assign(target, value); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_assign_error(error, *_arg1); end + + # :call-seq: + # on_assoc_new: (untyped key, untyped value) -> Assoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#766 + def on_assoc_new(key, value); end + + # :call-seq: + # on_assoc_splat: (untyped value) -> AssocSplat + # + # source://syntax_tree//lib/syntax_tree/parser.rb#775 + def on_assoc_splat(value); end + + # :call-seq: + # on_backref: (String value) -> Backref + # + # source://syntax_tree//lib/syntax_tree/parser.rb#790 + def on_backref(value); end + + # :call-seq: + # on_backtick: (String value) -> Backtick + # + # source://syntax_tree//lib/syntax_tree/parser.rb#805 + def on_backtick(value); end + + # :call-seq: + # on_bare_assoc_hash: ( + # Array[AssocNew | AssocSplat] assocs + # ) -> BareAssocHash + # + # source://syntax_tree//lib/syntax_tree/parser.rb#826 + def on_bare_assoc_hash(assocs); end + + # :call-seq: + # on_begin: (untyped bodystmt) -> Begin | PinnedBegin + # + # source://syntax_tree//lib/syntax_tree/parser.rb#835 + def on_begin(bodystmt); end + + # :call-seq: + # on_binary: ( + # untyped left, + # (Op | Symbol) operator, + # untyped right + # ) -> Binary + # + # source://syntax_tree//lib/syntax_tree/parser.rb#874 + def on_binary(left, operator, right); end + + # :call-seq: + # on_block_var: (Params params, (nil | Array[Ident]) locals) -> BlockVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#906 + def on_block_var(params, locals); end + + # :call-seq: + # on_blockarg: (Ident name) -> BlockArg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#946 + def on_blockarg(name); end + + # :call-seq: + # on_bodystmt: ( + # Statements statements, + # (nil | Rescue) rescue_clause, + # (nil | Statements) else_clause, + # (nil | Ensure) ensure_clause + # ) -> BodyStmt + # + # source://syntax_tree//lib/syntax_tree/parser.rb#962 + def on_bodystmt(statements, rescue_clause, else_clause, ensure_clause); end + + # :call-seq: + # on_brace_block: ( + # (nil | BlockVar) block_var, + # Statements statements + # ) -> BlockNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#988 + def on_brace_block(block_var, statements); end + + # :call-seq: + # on_break: (Args arguments) -> Break + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1025 + def on_break(arguments); end + + # :call-seq: + # on_call: ( + # untyped receiver, + # (:"::" | Op | Period) operator, + # (:call | Backtick | Const | Ident | Op) message + # ) -> CallNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1040 + def on_call(receiver, operator, message); end + + # :call-seq: + # on_case: (untyped value, untyped consequent) -> Case | RAssign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1061 + def on_case(value, consequent); end + + # :call-seq: + # on_class: ( + # (ConstPathRef | ConstRef | TopConstRef) constant, + # untyped superclass, + # BodyStmt bodystmt + # ) -> ClassDeclaration + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1096 + def on_class(constant, superclass, bodystmt); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_class_name_error(error, *_arg1); end + + # :call-seq: + # on_comma: (String value) -> Comma + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1120 + def on_comma(value); end + + # :call-seq: + # on_command: ((Const | Ident) message, Args arguments) -> Command + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1139 + def on_command(message, arguments); end + + # :call-seq: + # on_command_call: ( + # untyped receiver, + # (:"::" | Op | Period) operator, + # (Const | Ident | Op) message, + # (nil | Args) arguments + # ) -> CommandCall + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1155 + def on_command_call(receiver, operator, message, arguments); end + + # :call-seq: + # on_comment: (String value) -> Comment + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1170 + def on_comment(value); end + + # :call-seq: + # on_const: (String value) -> Const + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1208 + def on_const(value); end + + # :call-seq: + # on_const_path_field: (untyped parent, Const constant) -> + # ConstPathField | Field + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1224 + def on_const_path_field(parent, constant); end + + # :call-seq: + # on_const_path_ref: (untyped parent, Const constant) -> ConstPathRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1243 + def on_const_path_ref(parent, constant); end + + # :call-seq: + # on_const_ref: (Const constant) -> ConstRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1253 + def on_const_ref(constant); end + + # :call-seq: + # on_cvar: (String value) -> CVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1259 + def on_cvar(value); end + + # :call-seq: + # on_def: ( + # (Backtick | Const | Ident | Kw | Op) name, + # (nil | Params | Paren) params, + # untyped bodystmt + # ) -> DefNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1278 + def on_def(name, params, bodystmt); end + + # :call-seq: + # on_defined: (untyped value) -> Defined + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1346 + def on_defined(value); end + + # :call-seq: + # on_defs: ( + # untyped target, + # (Op | Period) operator, + # (Backtick | Const | Ident | Kw | Op) name, + # (Params | Paren) params, + # BodyStmt bodystmt + # ) -> DefNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1370 + def on_defs(target, operator, name, params, bodystmt); end + + # :call-seq: + # on_do_block: (BlockVar block_var, BodyStmt bodystmt) -> BlockNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1435 + def on_do_block(block_var, bodystmt); end + + # :call-seq: + # on_dot2: ((nil | untyped) left, (nil | untyped) right) -> RangeNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1459 + def on_dot2(left, right); end + + # :call-seq: + # on_dot3: ((nil | untyped) left, (nil | untyped) right) -> RangeNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1475 + def on_dot3(left, right); end + + # :call-seq: + # on_dyna_symbol: (StringContent string_content) -> DynaSymbol + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1491 + def on_dyna_symbol(string_content); end + + # :call-seq: + # on_else: (Statements statements) -> Else + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1517 + def on_else(statements); end + + # :call-seq: + # on_elsif: ( + # untyped predicate, + # Statements statements, + # (nil | Elsif | Else) consequent + # ) -> Elsif + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1558 + def on_elsif(predicate, statements, consequent); end + + # :call-seq: + # on_embdoc: (String value) -> EmbDoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1588 + def on_embdoc(value); end + + # :call-seq: + # on_embdoc_beg: (String value) -> EmbDoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1595 + def on_embdoc_beg(value); end + + # :call-seq: + # on_embdoc_end: (String value) -> EmbDoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1606 + def on_embdoc_end(value); end + + # :call-seq: + # on_embexpr_beg: (String value) -> EmbExprBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1630 + def on_embexpr_beg(value); end + + # :call-seq: + # on_embexpr_end: (String value) -> EmbExprEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1649 + def on_embexpr_end(value); end + + # :call-seq: + # on_embvar: (String value) -> EmbVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1668 + def on_embvar(value); end + + # :call-seq: + # on_ensure: (Statements statements) -> Ensure + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1687 + def on_ensure(statements); end + + # The handler for this event accepts no parameters (though in previous + # versions of Ruby it accepted a string literal with a value of ","). + # + # :call-seq: + # on_excessed_comma: () -> ExcessedComma + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1714 + def on_excessed_comma(*_arg0); end + + # :call-seq: + # on_fcall: ((Const | Ident) value) -> CallNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1722 + def on_fcall(value); end + + # :call-seq: + # on_field: ( + # untyped parent, + # (:"::" | Op | Period) operator + # (Const | Ident) name + # ) -> Field + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1738 + def on_field(parent, operator, name); end + + # :call-seq: + # on_float: (String value) -> FloatLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1749 + def on_float(value); end + + # :call-seq: + # on_fndptn: ( + # (nil | untyped) constant, + # VarField left, + # Array[untyped] values, + # VarField right + # ) -> FndPtn + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1769 + def on_fndptn(constant, left, values, right); end + + # :call-seq: + # on_for: ( + # (MLHS | VarField) value, + # untyped collection, + # Statements statements + # ) -> For + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1821 + def on_for(index, collection, statements); end + + # :call-seq: + # on_gvar: (String value) -> GVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1859 + def on_gvar(value); end + + # :call-seq: + # on_hash: ((nil | Array[AssocNew | AssocSplat]) assocs) -> HashLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1874 + def on_hash(assocs); end + + # :call-seq: + # on_heredoc_beg: (String value) -> HeredocBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1887 + def on_heredoc_beg(value); end + + # :call-seq: + # on_heredoc_dedent: (StringContent string, Integer width) -> Heredoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1906 + def on_heredoc_dedent(string, width); end + + # :call-seq: + # on_heredoc_end: (String value) -> Heredoc + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1920 + def on_heredoc_end(value); end + + # :call-seq: + # on_hshptn: ( + # (nil | untyped) constant, + # Array[[Label | StringContent, untyped]] keywords, + # (nil | VarField) keyword_rest + # ) -> HshPtn + # + # source://syntax_tree//lib/syntax_tree/parser.rb#1956 + def on_hshptn(constant, keywords, keyword_rest); end + + # :call-seq: + # on_ident: (String value) -> Ident + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2026 + def on_ident(value); end + + # :call-seq: + # on_if: ( + # untyped predicate, + # Statements statements, + # (nil | Elsif | Else) consequent + # ) -> IfNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2045 + def on_if(predicate, statements, consequent); end + + # :call-seq: + # on_if_mod: (untyped predicate, untyped statement) -> IfNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2085 + def on_if_mod(predicate, statement); end + + # :call-seq: + # on_ifop: (untyped predicate, untyped truthy, untyped falsy) -> IfOp + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2074 + def on_ifop(predicate, truthy, falsy); end + + # :call-seq: + # on_imaginary: (String value) -> Imaginary + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2107 + def on_imaginary(value); end + + # :call-seq: + # on_in: (RAssign pattern, nil statements, nil consequent) -> RAssign + # | ( + # untyped pattern, + # Statements statements, + # (nil | In | Else) consequent + # ) -> In + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2127 + def on_in(pattern, statements, consequent); end + + # :call-seq: + # on_int: (String value) -> Int + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2172 + def on_int(value); end + + # :call-seq: + # on_ivar: (String value) -> IVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2187 + def on_ivar(value); end + + # :call-seq: + # on_kw: (String value) -> Kw + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2202 + def on_kw(value); end + + # :call-seq: + # on_kwrest_param: ((nil | Ident) name) -> KwRestParam + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2221 + def on_kwrest_param(name); end + + # :call-seq: + # on_label: (String value) -> Label + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2230 + def on_label(value); end + + # :call-seq: + # on_label_end: (String value) -> LabelEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2245 + def on_label_end(value); end + + # :call-seq: + # on_lambda: ( + # (Params | Paren) params, + # (BodyStmt | Statements) statements + # ) -> Lambda + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2267 + def on_lambda(params, statements); end + + # :call-seq: + # on_lambda_var: (Params params, Array[ Ident ] locals) -> LambdaVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2349 + def on_lambda_var(params, locals); end + + # :call-seq: + # on_lbrace: (String value) -> LBrace + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2432 + def on_lbrace(value); end + + # :call-seq: + # on_lbracket: (String value) -> LBracket + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2451 + def on_lbracket(value); end + + # :call-seq: + # on_lparen: (String value) -> LParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2470 + def on_lparen(value); end + + # :call-seq: + # on_massign: ((MLHS | MLHSParen) target, untyped value) -> MAssign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2493 + def on_massign(target, value); end + + # :call-seq: + # on_method_add_arg: ( + # CallNode call, + # (ArgParen | Args) arguments + # ) -> CallNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2509 + def on_method_add_arg(call, arguments); end + + # :call-seq: + # on_method_add_block: ( + # (Break | Call | Command | CommandCall, Next) call, + # Block block + # ) -> Break | MethodAddBlock + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2527 + def on_method_add_block(call, block); end + + # :call-seq: + # on_mlhs_add: ( + # MLHS mlhs, + # (ARefField | Field | Ident | MLHSParen | VarField) part + # ) -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2556 + def on_mlhs_add(mlhs, part); end + + # :call-seq: + # on_mlhs_add_post: (MLHS left, MLHS right) -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2565 + def on_mlhs_add_post(left, right); end + + # :call-seq: + # on_mlhs_add_star: ( + # MLHS mlhs, + # (nil | ARefField | Field | Ident | VarField) part + # ) -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2577 + def on_mlhs_add_star(mlhs, part); end + + # :call-seq: + # on_mlhs_new: () -> MLHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2590 + def on_mlhs_new; end + + # :call-seq: + # on_mlhs_paren: ((MLHS | MLHSParen) contents) -> MLHSParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2600 + def on_mlhs_paren(contents); end + + # :call-seq: + # on_module: ( + # (ConstPathRef | ConstRef | TopConstRef) constant, + # BodyStmt bodystmt + # ) -> ModuleDeclaration + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2618 + def on_module(constant, bodystmt); end + + # :call-seq: + # on_mrhs_add: (MRHS mrhs, untyped part) -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2650 + def on_mrhs_add(mrhs, part); end + + # :call-seq: + # on_mrhs_add_star: (MRHS mrhs, untyped value) -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2659 + def on_mrhs_add_star(mrhs, value); end + + # :call-seq: + # on_mrhs_new: () -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2640 + def on_mrhs_new; end + + # :call-seq: + # on_mrhs_new_from_args: (Args arguments) -> MRHS + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2681 + def on_mrhs_new_from_args(arguments); end + + # :call-seq: + # on_next: (Args arguments) -> Next + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2687 + def on_next(arguments); end + + # :call-seq: + # on_op: (String value) -> Op + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2706 + def on_op(value); end + + # :call-seq: + # on_opassign: ( + # ( + # ARefField | + # ConstPathField | + # Field | + # TopConstField | + # VarField + # ) target, + # Op operator, + # untyped value + # ) -> OpAssign + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2735 + def on_opassign(target, operator, value); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_param_error(error, *_arg1); end + + # :call-seq: + # on_params: ( + # (nil | Array[Ident]) requireds, + # (nil | Array[[Ident, untyped]]) optionals, + # (nil | ArgsForward | ExcessedComma | RestParam) rest, + # (nil | Array[Ident]) posts, + # (nil | Array[[Ident, nil | untyped]]) keywords, + # (nil | :nil | ArgsForward | KwRestParam) keyword_rest, + # (nil | :& | BlockArg) block + # ) -> Params + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2758 + def on_params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # :call-seq: + # on_paren: (untyped contents) -> Paren + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2823 + def on_paren(contents); end + + # If we encounter a parse error, just immediately bail out so that our + # runner can catch it. + # + # @raise [ParseError] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2863 + def on_parse_error(error, *_arg1); end + + # :call-seq: + # on_period: (String value) -> Period + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2873 + def on_period(value); end + + # :call-seq: + # on_program: (Statements statements) -> Program + # + # source://syntax_tree//lib/syntax_tree/parser.rb#2888 + def on_program(statements); end + + # :call-seq: + # on_qsymbols_add: (QSymbols qsymbols, TStringContent element) -> QSymbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3000 + def on_qsymbols_add(qsymbols, element); end + + # :call-seq: + # on_qsymbols_beg: (String value) -> QSymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3010 + def on_qsymbols_beg(value); end + + # :call-seq: + # on_qsymbols_new: () -> QSymbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3029 + def on_qsymbols_new; end + + # :call-seq: + # on_qwords_add: (QWords qwords, TStringContent element) -> QWords + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3041 + def on_qwords_add(qwords, element); end + + # :call-seq: + # on_qwords_beg: (String value) -> QWordsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3051 + def on_qwords_beg(value); end + + # :call-seq: + # on_qwords_new: () -> QWords + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3070 + def on_qwords_new; end + + # :call-seq: + # on_rational: (String value) -> RationalLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3082 + def on_rational(value); end + + # :call-seq: + # on_rbrace: (String value) -> RBrace + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3097 + def on_rbrace(value); end + + # :call-seq: + # on_rbracket: (String value) -> RBracket + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3116 + def on_rbracket(value); end + + # :call-seq: + # on_redo: () -> Redo + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3135 + def on_redo; end + + # :call-seq: + # on_regexp_add: ( + # RegexpContent regexp_content, + # (StringDVar | StringEmbExpr | TStringContent) part + # ) -> RegexpContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3146 + def on_regexp_add(regexp_content, part); end + + # :call-seq: + # on_regexp_beg: (String value) -> RegexpBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3156 + def on_regexp_beg(value); end + + # :call-seq: + # on_regexp_end: (String value) -> RegexpEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3175 + def on_regexp_end(value); end + + # :call-seq: + # on_regexp_literal: ( + # RegexpContent regexp_content, + # (nil | RegexpEnd) ending + # ) -> RegexpLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3193 + def on_regexp_literal(regexp_content, ending); end + + # :call-seq: + # on_regexp_new: () -> RegexpContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3211 + def on_regexp_new; end + + # :call-seq: + # on_rescue: ( + # (nil | [untyped] | MRHS | MRHSAddStar) exceptions, + # (nil | Field | VarField) variable, + # Statements statements, + # (nil | Rescue) consequent + # ) -> Rescue + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3228 + def on_rescue(exceptions, variable, statements, consequent); end + + # :call-seq: + # on_rescue_mod: (untyped statement, untyped value) -> RescueMod + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3281 + def on_rescue_mod(statement, value); end + + # :call-seq: + # on_rest_param: ((nil | Ident) name) -> RestParam + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3293 + def on_rest_param(name); end + + # :call-seq: + # on_retry: () -> Retry + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3302 + def on_retry; end + + # :call-seq: + # on_return: (Args arguments) -> ReturnNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3310 + def on_return(arguments); end + + # :call-seq: + # on_return0: () -> ReturnNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3321 + def on_return0; end + + # :call-seq: + # on_rparen: (String value) -> RParen + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3329 + def on_rparen(value); end + + # :call-seq: + # on_sclass: (untyped target, BodyStmt bodystmt) -> SClass + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3348 + def on_sclass(target, bodystmt); end + + # :call-seq: + # on_semicolon: (String value) -> Semicolon + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3381 + def on_semicolon(value); end + + # stmts_add is a parser event that represents a single statement inside a + # list of statements within any lexical block. It accepts as arguments the + # parent stmts node as well as an stmt which can be any expression in + # Ruby. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3400 + def on_stmts_add(statements, statement); end + + # :call-seq: + # on_stmts_new: () -> Statements + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3413 + def on_stmts_new; end + + # :call-seq: + # on_string_add: ( + # String string, + # (StringEmbExpr | StringDVar | TStringContent) part + # ) -> StringContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3426 + def on_string_add(string, part); end + + # :call-seq: + # on_string_concat: ( + # (StringConcat | StringLiteral) left, + # StringLiteral right + # ) -> StringConcat + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3443 + def on_string_concat(left, right); end + + # :call-seq: + # on_string_content: () -> StringContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3453 + def on_string_content; end + + # :call-seq: + # on_string_dvar: ((Backref | VarRef) variable) -> StringDVar + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3463 + def on_string_dvar(variable); end + + # :call-seq: + # on_string_embexpr: (Statements statements) -> StringEmbExpr + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3474 + def on_string_embexpr(statements); end + + # :call-seq: + # on_string_literal: (String string) -> Heredoc | StringLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3504 + def on_string_literal(string); end + + # :call-seq: + # on_super: ((ArgParen | Args) arguments) -> Super + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3544 + def on_super(arguments); end + + # symbeg is a token that represents the beginning of a symbol literal. In + # most cases it will contain just ":" as in the value, but if its a dynamic + # symbol being defined it will contain ":'" or ":\"". + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3556 + def on_symbeg(value); end + + # :call-seq: + # on_symbol: ( + # (Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op) value + # ) -> SymbolContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3577 + def on_symbol(value); end + + # :call-seq: + # on_symbol_literal: ( + # ( + # Backtick | Const | CVar | GVar | Ident | + # IVar | Kw | Op | SymbolContent + # ) value + # ) -> SymbolLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3590 + def on_symbol_literal(value); end + + # :call-seq: + # on_symbols_add: (Symbols symbols, Word word) -> Symbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3606 + def on_symbols_add(symbols, word); end + + # :call-seq: + # on_symbols_beg: (String value) -> SymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3616 + def on_symbols_beg(value); end + + # :call-seq: + # on_symbols_new: () -> Symbols + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3635 + def on_symbols_new; end + + # :call-seq: + # on_tlambda: (String value) -> TLambda + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3647 + def on_tlambda(value); end + + # :call-seq: + # on_tlambeg: (String value) -> TLamBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3666 + def on_tlambeg(value); end + + # :call-seq: + # on_top_const_field: (Const constant) -> TopConstRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3685 + def on_top_const_field(constant); end + + # :call-seq: + # on_top_const_ref: (Const constant) -> TopConstRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3696 + def on_top_const_ref(constant); end + + # :call-seq: + # on_tstring_beg: (String value) -> TStringBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3707 + def on_tstring_beg(value); end + + # :call-seq: + # on_tstring_content: (String value) -> TStringContent + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3726 + def on_tstring_content(value); end + + # :call-seq: + # on_tstring_end: (String value) -> TStringEnd + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3741 + def on_tstring_end(value); end + + # :call-seq: + # on_unary: (:not operator, untyped statement) -> Not + # | (Symbol operator, untyped statement) -> Unary + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3761 + def on_unary(operator, statement); end + + # :call-seq: + # on_undef: (Array[DynaSymbol | SymbolLiteral] symbols) -> Undef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3804 + def on_undef(symbols); end + + # :call-seq: + # on_unless: ( + # untyped predicate, + # Statements statements, + # ((nil | Elsif | Else) consequent) + # ) -> UnlessNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3819 + def on_unless(predicate, statements, consequent); end + + # :call-seq: + # on_unless_mod: (untyped predicate, untyped statement) -> UnlessNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3848 + def on_unless_mod(predicate, statement); end + + # :call-seq: + # on_until: (untyped predicate, Statements statements) -> UntilNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3862 + def on_until(predicate, statements); end + + # :call-seq: + # on_until_mod: (untyped predicate, untyped statement) -> UntilNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3893 + def on_until_mod(predicate, statement); end + + # :call-seq: + # on_var_alias: (GVar left, (Backref | GVar) right) -> AliasNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3906 + def on_var_alias(left, right); end + + # :call-seq: + # on_var_field: ( + # (nil | Const | CVar | GVar | Ident | IVar) value + # ) -> VarField + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3920 + def on_var_field(value); end + + # :call-seq: + # on_var_ref: ((Const | CVar | GVar | Ident | IVar | Kw) value) -> VarRef + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3935 + def on_var_ref(value); end + + # :call-seq: + # on_vcall: (Ident ident) -> VCall + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3941 + def on_vcall(ident); end + + # :call-seq: + # on_void_stmt: () -> VoidStmt + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3947 + def on_void_stmt; end + + # :call-seq: + # on_when: ( + # Args arguments, + # Statements statements, + # (nil | Else | When) consequent + # ) -> When + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3960 + def on_when(arguments, statements, consequent); end + + # :call-seq: + # on_while: (untyped predicate, Statements statements) -> WhileNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3992 + def on_while(predicate, statements); end + + # :call-seq: + # on_while_mod: (untyped predicate, untyped statement) -> WhileNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4023 + def on_while_mod(predicate, statement); end + + # :call-seq: + # on_word_add: ( + # Word word, + # (StringEmbExpr | StringDVar | TStringContent) part + # ) -> Word + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4039 + def on_word_add(word, part); end + + # :call-seq: + # on_word_new: () -> Word + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4048 + def on_word_new; end + + # :call-seq: + # on_words_add: (Words words, Word word) -> Words + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4058 + def on_words_add(words, word); end + + # :call-seq: + # on_words_beg: (String value) -> WordsBeg + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4068 + def on_words_beg(value); end + + # :call-seq: + # on_words_new: () -> Words + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4087 + def on_words_new; end + + # :call-seq: + # on_xstring_add: ( + # XString xstring, + # (StringEmbExpr | StringDVar | TStringContent) part + # ) -> XString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4106 + def on_xstring_add(xstring, part); end + + # :call-seq: + # on_xstring_literal: (XString xstring) -> Heredoc | XStringLiteral + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4130 + def on_xstring_literal(xstring); end + + # :call-seq: + # on_xstring_new: () -> XString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4115 + def on_xstring_new; end + + # :call-seq: + # on_yield: ((Args | Paren) arguments) -> YieldNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4153 + def on_yield(arguments); end + + # :call-seq: + # on_yield0: () -> YieldNode + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4164 + def on_yield0; end + + # :call-seq: + # on_zsuper: () -> ZSuper + # + # source://syntax_tree//lib/syntax_tree/parser.rb#4172 + def on_zsuper; end +end + +# Represents a line in the source. If this class is being used, it means +# that there are characters in the string that are multi-byte, so we will +# build up an array of indices, such that array[byteindex] will be equal to +# the index of the character within the string. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#38 +class SyntaxTree::Parser::MultiByteString + # @return [MultiByteString] a new instance of MultiByteString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#41 + def initialize(start, line); end + + # Technically it's possible for the column index to be a negative value if + # there's a BOM at the beginning of the file, which is the reason we need + # to compare it to 0 here. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#55 + def [](byteindex); end + + # Returns the value of attribute indices. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#39 + def indices; end + + # Returns the value of attribute start. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#39 + def start; end +end + +# A special parser error so that we can get nice syntax displays on the +# error message when prettier prints out the results. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#9 +class SyntaxTree::Parser::ParseError < ::StandardError + # @return [ParseError] a new instance of ParseError + # + # source://syntax_tree//lib/syntax_tree/parser.rb#12 + def initialize(error, lineno, column); end + + # Returns the value of attribute column. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#10 + def column; end + + # Returns the value of attribute lineno. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#10 + def lineno; end +end + +# Ugh... I really do not like this class. Basically, ripper doesn't provide +# enough information about where pins are located in the tree. It only gives +# events for ^ ops and var_ref nodes. You have to piece it together +# yourself. +# +# Note that there are edge cases here that we straight up do not address, +# because I honestly think it's going to be faster to write a new parser +# than to address them. For example, this will not work properly: +# +# foo in ^((bar = 0; bar; baz)) +# +# If someone actually does something like that, we'll have to find another +# way to make this work. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#656 +class SyntaxTree::Parser::PinVisitor < ::SyntaxTree::Visitor + # @return [PinVisitor] a new instance of PinVisitor + # + # source://syntax_tree//lib/syntax_tree/parser.rb#659 + def initialize(pins); end + + # Returns the value of attribute pins. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#657 + def pins; end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#657 + def stack; end + + # source://syntax_tree//lib/syntax_tree/parser.rb#664 + def visit(node); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#672 + def visit_var_ref(node); end + + class << self + # source://syntax_tree//lib/syntax_tree/parser.rb#677 + def visit(node, tokens); end + end +end + +# Semicolons are tokens that get added to the token list but never get +# attached to the AST. Because of this they only need to track their +# associated location so they can be used for computing bounds. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#3371 +class SyntaxTree::Parser::Semicolon + # @return [Semicolon] a new instance of Semicolon + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3374 + def initialize(location); end + + # Returns the value of attribute location. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#3372 + def location; end +end + +# Represents a line in the source. If this class is being used, it means +# that every character in the string is 1 byte in length, so we can just +# return the start of the line + the index. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#22 +class SyntaxTree::Parser::SingleByteString + # @return [SingleByteString] a new instance of SingleByteString + # + # source://syntax_tree//lib/syntax_tree/parser.rb#25 + def initialize(start); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#29 + def [](byteindex); end + + # Returns the value of attribute start. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#23 + def start; end +end + +# This represents all of the tokens coming back from the lexer. It is +# replacing a simple array because it keeps track of the last deleted token +# from the list for better error messages. +# +# source://syntax_tree//lib/syntax_tree/parser.rb#63 +class SyntaxTree::Parser::TokenList + # @return [TokenList] a new instance of TokenList + # + # source://syntax_tree//lib/syntax_tree/parser.rb#66 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/parser.rb#71 + def <<(token); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#75 + def [](index); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/parser.rb#79 + def any?(&block); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#91 + def delete(value); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#95 + def delete_at(index); end + + # Returns the value of attribute last_deleted. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#64 + def last_deleted; end + + # source://syntax_tree//lib/syntax_tree/parser.rb#83 + def reverse_each(&block); end + + # source://syntax_tree//lib/syntax_tree/parser.rb#87 + def rindex(&block); end + + # Returns the value of attribute tokens. + # + # source://syntax_tree//lib/syntax_tree/parser.rb#64 + def tokens; 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 Const[value: "SyntaxTree"] +# end +# +# the pattern is the `Const[value: "SyntaxTree"]` expression. Within Syntax +# Tree, every node generates these kinds of expressions using the +# #construct_keys method. +# +# The pattern gets compiled into an object that responds to call by running +# the #compile method. This method itself will run back through Syntax Tree 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 = SyntaxTree::Pattern.new("Const[value: 'SyntaxTree']").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 SyntaxTree::Pattern::CompilationError will be +# raised. +# +# source://syntax_tree//lib/syntax_tree/pattern.rb#39 +class SyntaxTree::Pattern + # @return [Pattern] a new instance of Pattern + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#61 + def initialize(query); end + + # source://syntax_tree//lib/syntax_tree/pattern.rb#65 + def compile; end + + # Returns the value of attribute query. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#59 + def query; end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#80 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#86 + def combine_or(left, right); end + + # in [foo, bar, baz] + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#109 + def compile_aryptn(node); end + + # in foo | bar + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#134 + def compile_binary(node); end + + # in Ident + # in String + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#142 + def compile_const(node); end + + # in SyntaxTree::Ident + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#159 + def compile_const_path_ref(node); end + + # in :"" + # in :"foo" + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#172 + def compile_dyna_symbol(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#91 + def compile_error(node); end + + # in Ident[value: String] + # in { value: String } + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#188 + def compile_hshptn(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#260 + def compile_node(node); end + + # in /foo/ + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#214 + def compile_regexp_literal(node); end + + # in "" + # in "foo" + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#226 + def compile_string_literal(node); end + + # in :+ + # in :foo + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#238 + def compile_symbol_literal(node); end + + # in Foo + # in nil + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#246 + def compile_var_ref(node); end + + # There are a couple of nodes (string literals, dynamic symbols, and regexp) + # that contain list of parts. This can include plain string content, + # interpolated expressions, and interpolated variables. We only support + # plain string content, so this method will extract out the plain string + # content if it is the only element in the list. + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#100 + def extract_string(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://syntax_tree//lib/syntax_tree/pattern.rb#42 +class SyntaxTree::Pattern::CompilationError < ::StandardError + # @return [CompilationError] a new instance of CompilationError + # + # source://syntax_tree//lib/syntax_tree/pattern.rb#43 + def initialize(repr); end +end + +# Period represents the use of the +.+ operator. It is usually found in method +# calls. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8570 +class SyntaxTree::Period < ::SyntaxTree::Node + # @return [Period] a new instance of Period + # + # source://syntax_tree//lib/syntax_tree/node.rb#8576 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8611 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8582 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8586 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8574 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8590 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8586 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8603 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8607 + def format(q); end + + # [String] the period + # + # source://syntax_tree//lib/syntax_tree/node.rb#8571 + def value; end +end + +# PinnedBegin represents a pinning a nested statement within pattern matching. +# +# case value +# in ^(statement) +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#1963 +class SyntaxTree::PinnedBegin < ::SyntaxTree::Node + # @return [PinnedBegin] a new instance of PinnedBegin + # + # source://syntax_tree//lib/syntax_tree/node.rb#1969 + def initialize(statement:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2014 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1975 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1979 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#1967 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1983 + def copy(statement: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#1979 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#1996 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#2000 + def format(q); end + + # [Node] the expression being pinned + # + # source://syntax_tree//lib/syntax_tree/node.rb#1964 + def statement; end +end + +# PinnedVarRef represents a pinned variable reference within a pattern +# matching pattern. +# +# case value +# in ^variable +# end +# +# This can be a plain local variable like the example above. It can also be a +# a class variable, a global variable, or an instance variable. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11678 +class SyntaxTree::PinnedVarRef < ::SyntaxTree::Node + # @return [PinnedVarRef] a new instance of PinnedVarRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#11684 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11722 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11690 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11694 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11682 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11698 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11694 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11711 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11715 + def format(q); end + + # [Const | CVar | GVar | Ident | IVar] the value of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11679 + def value; end +end + +# This visitor pretty-prints the AST into an equivalent s-expression. +# +# source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#5 +class SyntaxTree::PrettyPrintVisitor < ::SyntaxTree::FieldVisitor + # @return [PrettyPrintVisitor] a new instance of PrettyPrintVisitor + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#8 + def initialize(q); end + + # Returns the value of attribute q. + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#6 + def q; end + + # This is here because we need to make sure the operator is cast to a string + # before we print it out. + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#14 + def visit_binary(node); end + + # This is here to make it a little nicer to look at labels since they + # typically have their : at the end of the value. + # + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#25 + def visit_label(node); end + + private + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#36 + def comments(node); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#45 + def field(_name, value); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#50 + def list(_name, values); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#55 + def node(_node, type); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#62 + def pairs(_name, values); end + + # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#78 + def text(_name, value); end +end + +# Program represents the overall syntax tree. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8618 +class SyntaxTree::Program < ::SyntaxTree::Node + # @return [Program] a new instance of Program + # + # source://syntax_tree//lib/syntax_tree/node.rb#8624 + def initialize(statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8664 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8630 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8634 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8622 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8638 + def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8634 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8651 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8655 + def format(q); end + + # [Statements] the top-level expressions of the program + # + # source://syntax_tree//lib/syntax_tree/node.rb#8619 + def statements; end +end + +# QSymbols represents a symbol literal array without interpolation. +# +# %i[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#8674 +class SyntaxTree::QSymbols < ::SyntaxTree::Node + # @return [QSymbols] a new instance of QSymbols + # + # source://syntax_tree//lib/syntax_tree/node.rb#8683 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8743 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8690 + def accept(visitor); end + + # [QSymbolsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8675 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8694 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8681 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8698 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8694 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8712 + def deconstruct_keys(_keys); end + + # [Array[ TStringContent ]] the elements of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#8678 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8721 + def format(q); end +end + +# QSymbolsBeg represents the beginning of a symbol literal array. +# +# %i[one two three] +# +# In the snippet above, QSymbolsBeg represents the "%i[" token. Note that +# these kinds of arrays can start with a lot of different delimiter types +# (e.g., %i| or %i<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#8757 +class SyntaxTree::QSymbolsBeg < ::SyntaxTree::Node + # @return [QSymbolsBeg] a new instance of QSymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#8760 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8786 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8765 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8769 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8773 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8769 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8782 + def deconstruct_keys(_keys); end + + # [String] the beginning of the array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8758 + def value; end +end + +# QWords represents a string literal array without interpolation. +# +# %w[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#8796 +class SyntaxTree::QWords < ::SyntaxTree::Node + # @return [QWords] a new instance of QWords + # + # source://syntax_tree//lib/syntax_tree/node.rb#8805 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8861 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8812 + def accept(visitor); end + + # [QWordsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8797 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8816 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8803 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8820 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8816 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8830 + def deconstruct_keys(_keys); end + + # [Array[ TStringContent ]] the elements of the array + # + # source://syntax_tree//lib/syntax_tree/node.rb#8800 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8839 + def format(q); end +end + +# QWordsBeg represents the beginning of a string literal array. +# +# %w[one two three] +# +# In the snippet above, QWordsBeg represents the "%w[" token. Note that these +# kinds of arrays can start with a lot of different delimiter types (e.g., +# %w| or %w<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#8875 +class SyntaxTree::QWordsBeg < ::SyntaxTree::Node + # @return [QWordsBeg] a new instance of QWordsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#8878 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8904 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8883 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8887 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8891 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8887 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8900 + def deconstruct_keys(_keys); end + + # [String] the beginning of the array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8876 + def value; end +end + +# Responsible for providing information about quotes to be used for strings +# and dynamic symbols. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4612 +module SyntaxTree::Quotes + class << self + # If there is some part of this string that matches an escape sequence or + # that contains the interpolation pattern ("#{"), then we are locked into + # whichever quote the user chose. (If they chose single quotes, then double + # quoting would activate the escape sequence, and if they chose double + # quotes, then single quotes would deactivate it.) + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#4621 + def locked?(node, quote); end + + # Find the matching closing quote for the given opening quote. + # + # source://syntax_tree//lib/syntax_tree/node.rb#4628 + def matching(quote); end + + # Escape and unescape single and double quotes as needed to be able to + # enclose +content+ with +enclosing+. + # + # source://syntax_tree//lib/syntax_tree/node.rb#4634 + def normalize(content, enclosing); end + end +end + +# The matching pairs of quotes that can be used with % literals. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4614 +SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash) + +# RAssign represents a single-line pattern match. +# +# value in pattern +# value => pattern +# +# source://syntax_tree//lib/syntax_tree/node.rb#3199 +class SyntaxTree::RAssign < ::SyntaxTree::Node + # @return [RAssign] a new instance of RAssign + # + # source://syntax_tree//lib/syntax_tree/node.rb#3212 + def initialize(value:, operator:, pattern:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3274 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3220 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3224 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#3210 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3228 + def copy(value: T.unsafe(nil), operator: T.unsafe(nil), pattern: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3224 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#3243 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#3253 + def format(q); end + + # [Kw | Op] the operator being used to match against the pattern, which is + # either => or in + # + # source://syntax_tree//lib/syntax_tree/node.rb#3204 + def operator; end + + # [Node] the pattern on the right-hand side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#3207 + def pattern; end + + # [Node] the left-hand expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#3200 + def value; end +end + +# RBrace represents the use of a right brace, i.e., +++. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8962 +class SyntaxTree::RBrace < ::SyntaxTree::Node + # @return [RBrace] a new instance of RBrace + # + # source://syntax_tree//lib/syntax_tree/node.rb#8965 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8991 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8970 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8974 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8978 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8974 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8987 + def deconstruct_keys(_keys); end + + # [String] the right brace + # + # source://syntax_tree//lib/syntax_tree/node.rb#8963 + def value; end +end + +# RBracket represents the use of a right bracket, i.e., +]+. +# +# source://syntax_tree//lib/syntax_tree/node.rb#8998 +class SyntaxTree::RBracket < ::SyntaxTree::Node + # @return [RBracket] a new instance of RBracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#9001 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9027 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9006 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9010 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9014 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9010 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9023 + def deconstruct_keys(_keys); end + + # [String] the right bracket + # + # source://syntax_tree//lib/syntax_tree/node.rb#8999 + def value; end +end + +# RParen represents the use of a right parenthesis, i.e., +)+. +# +# source://syntax_tree//lib/syntax_tree/node.rb#9768 +class SyntaxTree::RParen < ::SyntaxTree::Node + # @return [RParen] a new instance of RParen + # + # source://syntax_tree//lib/syntax_tree/node.rb#9771 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9797 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9776 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9780 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9784 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9780 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9793 + def deconstruct_keys(_keys); end + + # [String] the parenthesis + # + # source://syntax_tree//lib/syntax_tree/node.rb#9769 + def value; end +end + +# RangeNode represents using the .. or the ... operator between two +# expressions. Usually this is to create a range object. +# +# 1..2 +# +# Sometimes this operator is used to create a flip-flop. +# +# if value == 5 .. value == 10 +# end +# +# One of the sides of the expression may be nil, but not both. +# +# source://syntax_tree//lib/syntax_tree/node.rb#4538 +class SyntaxTree::RangeNode < ::SyntaxTree::Node + # @return [RangeNode] a new instance of RangeNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#4550 + def initialize(left:, operator:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4604 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4558 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4562 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#4548 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4566 + def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4562 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#4581 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#4591 + def format(q); end + + # [nil | Node] the left side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#4539 + def left; end + + # [Op] the operator used for this range + # + # source://syntax_tree//lib/syntax_tree/node.rb#4542 + def operator; end + + # [nil | Node] the right side of the expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#4545 + def right; end +end + +# RationalLiteral represents the use of a rational number literal. +# +# 1r +# +# source://syntax_tree//lib/syntax_tree/node.rb#8914 +class SyntaxTree::RationalLiteral < ::SyntaxTree::Node + # @return [RationalLiteral] a new instance of RationalLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#8920 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8955 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8926 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8930 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#8918 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8934 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8930 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#8947 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#8951 + def format(q); end + + # [String] the rational number literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#8915 + def value; end +end + +# Redo represents the use of the +redo+ keyword. +# +# redo +# +# source://syntax_tree//lib/syntax_tree/node.rb#9037 +class SyntaxTree::Redo < ::SyntaxTree::Node + # @return [Redo] a new instance of Redo + # + # source://syntax_tree//lib/syntax_tree/node.rb#9040 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9070 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9045 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9049 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9038 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9053 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9049 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9062 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9066 + def format(q); end +end + +# RegexpBeg represents the start of a regular expression literal. +# +# /.+/ +# +# In the example above, RegexpBeg represents the first / token. Regular +# expression literals can also be declared using the %r syntax, as in: +# +# %r{.+} +# +# source://syntax_tree//lib/syntax_tree/node.rb#9133 +class SyntaxTree::RegexpBeg < ::SyntaxTree::Node + # @return [RegexpBeg] a new instance of RegexpBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#9136 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9162 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9141 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9145 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9149 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9145 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9158 + def deconstruct_keys(_keys); end + + # [String] the beginning of the regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9134 + def value; end +end + +# RegexpContent represents the body of a regular expression. +# +# /.+ #{pattern} .+/ +# +# In the example above, a RegexpContent node represents everything contained +# within the forward slashes. +# +# source://syntax_tree//lib/syntax_tree/node.rb#9082 +class SyntaxTree::RegexpContent < ::SyntaxTree::Node + # @return [RegexpContent] a new instance of RegexpContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#9089 + def initialize(beginning:, parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9117 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9095 + def accept(visitor); end + + # [String] the opening of the regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9083 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9099 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9103 + def copy(beginning: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9099 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9113 + def deconstruct_keys(_keys); end + + # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the + # regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9087 + def parts; end +end + +# RegexpEnd represents the end of a regular expression literal. +# +# /.+/m +# +# In the example above, the RegexpEnd event represents the /m at the end of +# the regular expression literal. You can also declare regular expression +# literals using %r, as in: +# +# %r{.+}m +# +# source://syntax_tree//lib/syntax_tree/node.rb#9178 +class SyntaxTree::RegexpEnd < ::SyntaxTree::Node + # @return [RegexpEnd] a new instance of RegexpEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#9181 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9207 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9186 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9190 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9194 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9190 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9203 + def deconstruct_keys(_keys); end + + # [String] the end of the regular expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#9179 + def value; end +end + +# RegexpLiteral represents a regular expression literal. +# +# /.+/ +# +# source://syntax_tree//lib/syntax_tree/node.rb#9217 +class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node + # @return [RegexpLiteral] a new instance of RegexpLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#9230 + def initialize(beginning:, ending:, parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9312 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9238 + def accept(visitor); end + + # [String] the beginning of the regular expression literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#9218 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9242 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9228 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9246 + def copy(beginning: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9242 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9261 + def deconstruct_keys(_keys); end + + # [String] the ending of the regular expression literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#9221 + def ending; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9272 + def format(q); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9318 + def options; end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # regular expression literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#9225 + def parts; end + + private + + # If the first part of this regex is plain string content, we have a space + # or an =, and we're contained within a command or command_call node, then + # we want to use braces because otherwise we could end up with an ambiguous + # operator, e.g. foo / bar/ or foo /=bar/ + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#9334 + def ambiguous?(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#9324 + def include?(pattern); end +end + +# Rescue represents the use of the rescue keyword inside of a BodyStmt node. +# +# begin +# rescue +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9425 +class SyntaxTree::Rescue < ::SyntaxTree::Node + # @return [Rescue] a new instance of Rescue + # + # source://syntax_tree//lib/syntax_tree/node.rb#9440 + def initialize(keyword:, exception:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9536 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9471 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9449 + def bind_end(end_char, end_column); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9475 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9438 + def comments; end + + # [nil | Rescue] the optional next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#9435 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9479 + def copy(keyword: T.unsafe(nil), exception: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9475 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9501 + def deconstruct_keys(_keys); end + + # [nil | RescueEx] the exceptions being rescued + # + # source://syntax_tree//lib/syntax_tree/node.rb#9429 + def exception; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9512 + def format(q); end + + # [Kw] the rescue keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#9426 + def keyword; end + + # [Statements] the expressions to evaluate when an error is rescued + # + # source://syntax_tree//lib/syntax_tree/node.rb#9432 + def statements; end +end + +# RescueEx represents the list of exceptions being rescued in a rescue clause. +# +# begin +# rescue Exception => exception +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9350 +class SyntaxTree::RescueEx < ::SyntaxTree::Node + # @return [RescueEx] a new instance of RescueEx + # + # source://syntax_tree//lib/syntax_tree/node.rb#9360 + def initialize(exceptions:, variable:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9412 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9367 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9371 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9358 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9375 + def copy(exceptions: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9371 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9389 + def deconstruct_keys(_keys); end + + # [nil | Node] the list of exceptions being rescued + # + # source://syntax_tree//lib/syntax_tree/node.rb#9351 + def exceptions; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9398 + def format(q); end + + # [nil | Field | VarField] the expression being used to capture the raised + # exception + # + # source://syntax_tree//lib/syntax_tree/node.rb#9355 + def variable; end +end + +# RescueMod represents the use of the modifier form of a +rescue+ clause. +# +# expression rescue value +# +# source://syntax_tree//lib/syntax_tree/node.rb#9548 +class SyntaxTree::RescueMod < ::SyntaxTree::Node + # @return [RescueMod] a new instance of RescueMod + # + # source://syntax_tree//lib/syntax_tree/node.rb#9557 + def initialize(statement:, value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9613 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9564 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9568 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9555 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9572 + def copy(statement: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9568 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9586 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9595 + def format(q); end + + # [Node] the expression to execute + # + # source://syntax_tree//lib/syntax_tree/node.rb#9549 + def statement; end + + # [Node] the value to use if the executed expression raises an error + # + # source://syntax_tree//lib/syntax_tree/node.rb#9552 + def value; end +end + +# RestParam represents defining a parameter in a method definition that +# accepts all remaining positional parameters. +# +# def method(*rest) end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9625 +class SyntaxTree::RestParam < ::SyntaxTree::Node + # @return [RestParam] a new instance of RestParam + # + # source://syntax_tree//lib/syntax_tree/node.rb#9631 + def initialize(name:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9667 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9637 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9641 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9629 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9645 + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9641 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9658 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9662 + def format(q); end + + # [nil | Ident] the name of the parameter + # + # source://syntax_tree//lib/syntax_tree/node.rb#9626 + def name; end +end + +# Retry represents the use of the +retry+ keyword. +# +# retry +# +# source://syntax_tree//lib/syntax_tree/node.rb#9677 +class SyntaxTree::Retry < ::SyntaxTree::Node + # @return [Retry] a new instance of Retry + # + # source://syntax_tree//lib/syntax_tree/node.rb#9680 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9710 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9685 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9689 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9678 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9693 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9689 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9702 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9706 + def format(q); end +end + +# Return represents using the +return+ keyword with arguments. +# +# return value +# +# source://syntax_tree//lib/syntax_tree/node.rb#9720 +class SyntaxTree::ReturnNode < ::SyntaxTree::Node + # @return [ReturnNode] a new instance of ReturnNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#9726 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9761 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9732 + def accept(visitor); end + + # [nil | Args] the arguments being passed to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#9721 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9736 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9724 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9740 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9736 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9753 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9757 + def format(q); end +end + +# SClass represents a block of statements that should be evaluated within the +# context of the singleton class of an object. It's frequently used to define +# singleton methods. +# +# class << self +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#9810 +class SyntaxTree::SClass < ::SyntaxTree::Node + # @return [SClass] a new instance of SClass + # + # source://syntax_tree//lib/syntax_tree/node.rb#9819 + def initialize(target:, bodystmt:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9870 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9826 + def accept(visitor); end + + # [BodyStmt] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#9814 + def bodystmt; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9830 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9817 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9834 + def copy(target: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9830 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9848 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9857 + def format(q); end + + # [Node] the target of the singleton class to enter + # + # source://syntax_tree//lib/syntax_tree/node.rb#9811 + def target; end +end + +# Provides an interface for searching for a pattern of nodes against a +# subtree of an AST. +# +# source://syntax_tree//lib/syntax_tree/search.rb#6 +class SyntaxTree::Search + # @return [Search] a new instance of Search + # + # source://syntax_tree//lib/syntax_tree/search.rb#9 + def initialize(pattern); end + + # Returns the value of attribute pattern. + # + # source://syntax_tree//lib/syntax_tree/search.rb#7 + def pattern; end + + # source://syntax_tree//lib/syntax_tree/search.rb#13 + def scan(root); end +end + +# Everything that has a block of code inside of it has a list of statements. +# Normally we would just track those as a node that has an array body, but we +# have some special handling in order to handle empty statement lists. They +# need to have the right location information, so all of the parent node of +# stmts nodes will report back down the location information. We then +# propagate that onto void_stmt nodes inside the stmts in order to make sure +# all comments get printed appropriately. +# +# source://syntax_tree//lib/syntax_tree/node.rb#9884 +class SyntaxTree::Statements < ::SyntaxTree::Node + # @return [Statements] a new instance of Statements + # + # source://syntax_tree//lib/syntax_tree/node.rb#9890 + def initialize(body:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10016 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9943 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9896 + def bind(parser, start_char, start_column, end_char, end_column); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9925 + def bind_end(end_char, end_column); end + + # [Array[ Node ]] the list of expressions contained within this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9885 + def body; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9947 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#9888 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9951 + def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#9947 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9964 + def deconstruct_keys(_keys); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#9937 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#9968 + def format(q); end + + private + + # As efficiently as possible, gather up all of the comments that have been + # found while this statements list was being parsed and add them into the + # body. + # + # source://syntax_tree//lib/syntax_tree/node.rb#10025 + def attach_comments(parser, start_char, end_char); end +end + +# StringConcat represents concatenating two strings together using a backward +# slash. +# +# "first" \ +# "second" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10142 +class SyntaxTree::StringConcat < ::SyntaxTree::Node + # @return [StringConcat] a new instance of StringConcat + # + # source://syntax_tree//lib/syntax_tree/node.rb#10151 + def initialize(left:, right:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10195 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10158 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10162 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10149 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10166 + def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10162 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10180 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10184 + def format(q); end + + # [Heredoc | StringConcat | StringLiteral] the left side of the + # concatenation + # + # source://syntax_tree//lib/syntax_tree/node.rb#10143 + def left; end + + # [StringLiteral] the right side of the concatenation + # + # source://syntax_tree//lib/syntax_tree/node.rb#10146 + def right; end +end + +# StringContent represents the contents of a string-like value. +# +# "string" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10069 +class SyntaxTree::StringContent < ::SyntaxTree::Node + # @return [StringContent] a new instance of StringContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#10075 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10102 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10081 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10085 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10073 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10089 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10085 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10098 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10106 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # string + # + # source://syntax_tree//lib/syntax_tree/node.rb#10070 + def parts; end +end + +# StringDVar represents shorthand interpolation of a variable into a string. +# It allows you to take an instance variable, class variable, or global +# variable and omit the braces when interpolating. +# +# "#@variable" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10207 +class SyntaxTree::StringDVar < ::SyntaxTree::Node + # @return [StringDVar] a new instance of StringDVar + # + # source://syntax_tree//lib/syntax_tree/node.rb#10213 + def initialize(variable:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10250 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10219 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10223 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10211 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10227 + def copy(variable: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10223 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10240 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10244 + def format(q); end + + # [Backref | VarRef] the variable being interpolated + # + # source://syntax_tree//lib/syntax_tree/node.rb#10208 + def variable; end +end + +# StringEmbExpr represents interpolated content. It can be contained within a +# couple of different parent nodes, including regular expressions, strings, +# and dynamic symbols. +# +# "string #{expression}" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10262 +class SyntaxTree::StringEmbExpr < ::SyntaxTree::Node + # @return [StringEmbExpr] a new instance of StringEmbExpr + # + # source://syntax_tree//lib/syntax_tree/node.rb#10268 + def initialize(statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10325 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10274 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10278 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10266 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10282 + def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10278 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10295 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10299 + def format(q); end + + # [Statements] the expressions to be interpolated + # + # source://syntax_tree//lib/syntax_tree/node.rb#10263 + def statements; end +end + +# StringLiteral represents a string literal. +# +# "string" +# +# source://syntax_tree//lib/syntax_tree/node.rb#10336 +class SyntaxTree::StringLiteral < ::SyntaxTree::Node + # @return [StringLiteral] a new instance of StringLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#10345 + def initialize(parts:, quote:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10419 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10352 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10356 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10343 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10360 + def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10356 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10374 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10378 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # string literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10337 + def parts; end + + # [nil | String] which quote was used by the string literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10340 + def quote; end +end + +# Super represents using the +super+ keyword with arguments. It can optionally +# use parentheses. +# +# super(value) +# +# source://syntax_tree//lib/syntax_tree/node.rb#10431 +class SyntaxTree::Super < ::SyntaxTree::Node + # @return [Super] a new instance of Super + # + # source://syntax_tree//lib/syntax_tree/node.rb#10437 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10481 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10443 + def accept(visitor); end + + # [ArgParen | Args] the arguments to the keyword + # + # source://syntax_tree//lib/syntax_tree/node.rb#10432 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10447 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10435 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10451 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10447 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10464 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10468 + def format(q); end +end + +# SymBeg represents the beginning of a symbol literal. +# +# :symbol +# +# SymBeg is also used for dynamic symbols, as in: +# +# :"symbol" +# +# Finally, SymBeg is also used for symbols using the %s syntax, as in: +# +# %s[symbol] +# +# The value of this node is a string. In most cases (as in the first example +# above) it will contain just ":". In the case of dynamic symbols it will +# contain ":'" or ":\"". In the case of %s symbols, it will contain the start +# of the symbol including the %s and the delimiter. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10503 +class SyntaxTree::SymBeg < ::SyntaxTree::Node + # @return [SymBeg] a new instance of SymBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10506 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10532 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10511 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10515 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10519 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10515 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10528 + def deconstruct_keys(_keys); end + + # [String] the beginning of the symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#10504 + def value; end +end + +# SymbolContent represents symbol contents and is always the child of a +# SymbolLiteral node. +# +# :symbol +# +# source://syntax_tree//lib/syntax_tree/node.rb#10544 +class SyntaxTree::SymbolContent < ::SyntaxTree::Node + # @return [SymbolContent] a new instance of SymbolContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#10547 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10573 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10552 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10556 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10560 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10556 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10569 + def deconstruct_keys(_keys); end + + # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op] the value of the + # symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#10545 + def value; end +end + +# SymbolLiteral represents a symbol in the system with no interpolation +# (as opposed to a DynaSymbol which has interpolation). +# +# :symbol +# +# source://syntax_tree//lib/syntax_tree/node.rb#10585 +class SyntaxTree::SymbolLiteral < ::SyntaxTree::Node + # @return [SymbolLiteral] a new instance of SymbolLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#10591 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10628 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10597 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10601 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10589 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10605 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10601 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10618 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10622 + def format(q); end + + # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op | TStringContent] + # the value of the symbol + # + # source://syntax_tree//lib/syntax_tree/node.rb#10586 + def value; end +end + +# Symbols represents a symbol array literal with interpolation. +# +# %I[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#10638 +class SyntaxTree::Symbols < ::SyntaxTree::Node + # @return [Symbols] a new instance of Symbols + # + # source://syntax_tree//lib/syntax_tree/node.rb#10647 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10703 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10654 + def accept(visitor); end + + # [SymbolsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10639 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10658 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10645 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10662 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10658 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10672 + def deconstruct_keys(_keys); end + + # [Array[ Word ]] the words in the symbol array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10642 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10681 + def format(q); end +end + +# SymbolsBeg represents the start of a symbol array literal with +# interpolation. +# +# %I[one two three] +# +# In the snippet above, SymbolsBeg represents the "%I[" token. Note that these +# kinds of arrays can start with a lot of different delimiter types +# (e.g., %I| or %I<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#10718 +class SyntaxTree::SymbolsBeg < ::SyntaxTree::Node + # @return [SymbolsBeg] a new instance of SymbolsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10721 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10747 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10726 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10730 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10734 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10730 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10743 + def deconstruct_keys(_keys); end + + # [String] the beginning of the symbol literal array + # + # source://syntax_tree//lib/syntax_tree/node.rb#10719 + def value; end +end + +# TLamBeg represents the beginning of the body of a lambda literal using +# braces. +# +# -> { value } +# +# In the example above the TLamBeg represents the +{+ operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10799 +class SyntaxTree::TLamBeg < ::SyntaxTree::Node + # @return [TLamBeg] a new instance of TLamBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10802 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10828 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10807 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10811 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10815 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10811 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10824 + def deconstruct_keys(_keys); end + + # [String] the beginning of the body of the lambda literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10800 + def value; end +end + +# TLambda represents the beginning of a lambda literal. +# +# -> { value } +# +# In the example above the TLambda represents the +->+ operator. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10758 +class SyntaxTree::TLambda < ::SyntaxTree::Node + # @return [TLambda] a new instance of TLambda + # + # source://syntax_tree//lib/syntax_tree/node.rb#10761 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10787 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10766 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10770 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10774 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10770 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10783 + def deconstruct_keys(_keys); end + + # [String] the beginning of the lambda literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#10759 + def value; end +end + +# TStringBeg represents the beginning of a string literal. +# +# "string" +# +# In the example above, TStringBeg represents the first set of quotes. Strings +# can also use single quotes. They can also be declared using the +%q+ and +# +%Q+ syntax, as in: +# +# %q{string} +# +# source://syntax_tree//lib/syntax_tree/node.rb#10951 +class SyntaxTree::TStringBeg < ::SyntaxTree::Node + # @return [TStringBeg] a new instance of TStringBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#10954 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10980 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10959 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10963 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10967 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10963 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10976 + def deconstruct_keys(_keys); end + + # [String] the beginning of the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#10952 + def value; end +end + +# TStringContent represents plain characters inside of an entity that accepts +# string content like a string, heredoc, command string, or regular +# expression. +# +# "string" +# +# In the example above, TStringContent represents the +string+ token contained +# within the string. +# +# source://syntax_tree//lib/syntax_tree/node.rb#10994 +class SyntaxTree::TStringContent < ::SyntaxTree::Node + # @return [TStringContent] a new instance of TStringContent + # + # source://syntax_tree//lib/syntax_tree/node.rb#11000 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11039 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11010 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11014 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10998 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11018 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11014 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11031 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11035 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11006 + def match?(pattern); end + + # [String] the content of the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#10995 + def value; end +end + +# TStringEnd represents the end of a string literal. +# +# "string" +# +# In the example above, TStringEnd represents the second set of quotes. +# Strings can also use single quotes. They can also be declared using the +%q+ +# and +%Q+ syntax, as in: +# +# %q{string} +# +# source://syntax_tree//lib/syntax_tree/node.rb#11055 +class SyntaxTree::TStringEnd < ::SyntaxTree::Node + # @return [TStringEnd] a new instance of TStringEnd + # + # source://syntax_tree//lib/syntax_tree/node.rb#11058 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11084 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11063 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11067 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11071 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11067 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11080 + def deconstruct_keys(_keys); end + + # [String] the end of the string + # + # source://syntax_tree//lib/syntax_tree/node.rb#11056 + def value; end +end + +# In order for an `if` or `unless` expression to be shortened to a ternary, +# there has to be one and only one consequent clause which is an Else. Both +# the body of the main node and the body of the Else node must have only one +# statement, and that statement must not be on the denied list of potential +# statements. +# +# source://syntax_tree//lib/syntax_tree/node.rb#6251 +module SyntaxTree::Ternaryable + class << self + # source://syntax_tree//lib/syntax_tree/node.rb#6253 + def call(q, node); end + + private + + # Certain expressions cannot be reduced to a ternary without adding + # parentheses around them. In this case we say they cannot be ternaried + # and default instead to breaking them into multiple lines. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#6291 + def ternaryable?(statement); end + end +end + +# TopConstField is always the child node of some kind of assignment. It +# represents when you're assigning to a constant that is being referenced at +# the top level. +# +# ::Constant = value +# +# source://syntax_tree//lib/syntax_tree/node.rb#10840 +class SyntaxTree::TopConstField < ::SyntaxTree::Node + # @return [TopConstField] a new instance of TopConstField + # + # source://syntax_tree//lib/syntax_tree/node.rb#10846 + def initialize(constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10882 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10852 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10856 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10844 + def comments; end + + # [Const] the constant being assigned + # + # source://syntax_tree//lib/syntax_tree/node.rb#10841 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10860 + def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10856 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10873 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10877 + def format(q); end +end + +# TopConstRef is very similar to TopConstField except that it is not involved +# in an assignment. +# +# ::Constant +# +# source://syntax_tree//lib/syntax_tree/node.rb#10893 +class SyntaxTree::TopConstRef < ::SyntaxTree::Node + # @return [TopConstRef] a new instance of TopConstRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#10899 + def initialize(constant:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10935 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10905 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10909 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#10897 + def comments; end + + # [Const] the constant being referenced + # + # source://syntax_tree//lib/syntax_tree/node.rb#10894 + def constant; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10913 + def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10909 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#10926 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#10930 + def format(q); end +end + +# This module is responsible for translating the Syntax Tree syntax tree into +# other representations. +# +# source://syntax_tree//lib/syntax_tree/translation.rb#6 +module SyntaxTree::Translation + class << self + # This method translates the given node into the representation defined by + # the whitequark/parser gem. We don't explicitly list it as a dependency + # because it's not required for the core functionality of Syntax Tree. + # + # source://syntax_tree//lib/syntax_tree/translation.rb#10 + def to_parser(node, buffer); end + + # This method translates the given node into the representation defined by + # the rubocop/rubocop-ast gem. We don't explicitly list it as a dependency + # because it's not required for the core functionality of Syntax Tree. + # + # source://syntax_tree//lib/syntax_tree/translation.rb#20 + def to_rubocop_ast(node, buffer); end + end +end + +# Unary represents a unary method being called on an expression, as in +!+ or +# +~+. +# +# !value +# +# source://syntax_tree//lib/syntax_tree/node.rb#11178 +class SyntaxTree::Unary < ::SyntaxTree::Node + # @return [Unary] a new instance of Unary + # + # source://syntax_tree//lib/syntax_tree/node.rb#11187 + def initialize(operator:, statement:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11230 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11194 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11198 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11185 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11202 + def copy(operator: T.unsafe(nil), statement: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11198 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11216 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11225 + def format(q); end + + # [String] the operator being used + # + # source://syntax_tree//lib/syntax_tree/node.rb#11179 + def operator; end + + # [Node] the statement on which to operate + # + # source://syntax_tree//lib/syntax_tree/node.rb#11182 + def statement; end +end + +# Undef represents the use of the +undef+ keyword. +# +# undef method +# +# source://syntax_tree//lib/syntax_tree/node.rb#11243 +class SyntaxTree::Undef < ::SyntaxTree::Node + # @return [Undef] a new instance of Undef + # + # source://syntax_tree//lib/syntax_tree/node.rb#11271 + def initialize(symbols:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11314 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11277 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11281 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11269 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11285 + def copy(symbols: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11281 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11298 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11302 + def format(q); end + + # [Array[ DynaSymbol | SymbolLiteral ]] the symbols to undefine + # + # source://syntax_tree//lib/syntax_tree/node.rb#11266 + def symbols; end +end + +# Undef accepts a variable number of arguments that can be either DynaSymbol +# or SymbolLiteral objects. For SymbolLiteral objects we descend directly +# into the value in order to have it come out as bare words. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11244 +class SyntaxTree::Undef::UndefArgumentFormatter + # @return [UndefArgumentFormatter] a new instance of UndefArgumentFormatter + # + # source://syntax_tree//lib/syntax_tree/node.rb#11248 + def initialize(node); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11252 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11260 + def format(q); end + + # [DynaSymbol | SymbolLiteral] the symbol to undefine + # + # source://syntax_tree//lib/syntax_tree/node.rb#11246 + def node; end +end + +# Unless represents the first clause in an +unless+ chain. +# +# unless predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11325 +class SyntaxTree::UnlessNode < ::SyntaxTree::Node + # @return [UnlessNode] a new instance of UnlessNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#11337 + def initialize(predicate:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11382 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11345 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11349 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11335 + def comments; end + + # [nil | Elsif | Else] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#11332 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11353 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11349 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11368 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11378 + def format(q); end + + # Checks if the node was originally found in the modifier form. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11388 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#11326 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11329 + def statements; end +end + +# Until represents an +until+ loop. +# +# until predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11471 +class SyntaxTree::UntilNode < ::SyntaxTree::Node + # @return [UntilNode] a new instance of UntilNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#11480 + def initialize(predicate:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11522 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11487 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11491 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11478 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11495 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11491 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11509 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11518 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11527 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#11472 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11475 + def statements; end +end + +# VCall represent any plain named object with Ruby that could be either a +# local variable or a method call. +# +# variable +# +# source://syntax_tree//lib/syntax_tree/node.rb#11733 +class SyntaxTree::VCall < ::SyntaxTree::Node + # @return [VCall] a new instance of VCall + # + # source://syntax_tree//lib/syntax_tree/node.rb#11739 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11774 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11745 + def accept(visitor); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#11778 + def access_control?; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11782 + def arity; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11749 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11737 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11753 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11749 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11766 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11770 + def format(q); end + + # [Ident] the value of this expression + # + # source://syntax_tree//lib/syntax_tree/node.rb#11734 + def value; end +end + +# source://syntax_tree//lib/syntax_tree/version.rb#4 +SyntaxTree::VERSION = T.let(T.unsafe(nil), String) + +# VarField represents a variable that is being assigned a value. As such, it +# is always a child of an assignment type node. +# +# variable = value +# +# In the example above, the VarField node represents the +variable+ token. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11539 +class SyntaxTree::VarField < ::SyntaxTree::Node + # @return [VarField] a new instance of VarField + # + # source://syntax_tree//lib/syntax_tree/node.rb#11545 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11584 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11551 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11555 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11543 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11559 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11555 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11572 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11576 + def format(q); end + + # [nil | :nil | Const | CVar | GVar | Ident | IVar] the target of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11540 + def value; end +end + +# VarRef represents a variable reference. +# +# true +# +# This can be a plain local variable like the example above. It can also be a +# constant, a class variable, a global variable, an instance variable, a +# keyword (like +self+, +nil+, +true+, or +false+), or a numbered block +# variable. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11598 +class SyntaxTree::VarRef < ::SyntaxTree::Node + # @return [VarRef] a new instance of VarRef + # + # source://syntax_tree//lib/syntax_tree/node.rb#11604 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11639 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11610 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11614 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11602 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11618 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11614 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11631 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11635 + def format(q); end + + # Oh man I hate this so much. Basically, ripper doesn't provide enough + # functionality to actually know where pins are within an expression. So we + # have to walk the tree ourselves and insert more information. In doing so, + # we have to replace this node by a pinned node when necessary. + # + # To be clear, this method should just not exist. It's not good. It's a + # place of shame. But it's necessary for now, so I'm keeping it. + # + # source://syntax_tree//lib/syntax_tree/node.rb#11650 + def pin(parent, pin); end + + # [Const | CVar | GVar | Ident | IVar | Kw] the value of this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11599 + def value; end +end + +# Visitor is a parent class that provides the ability to walk down the tree +# and handle a subset of nodes. By defining your own subclass, you can +# explicitly handle a node type by defining a visit_* method. +# +# source://syntax_tree//lib/syntax_tree/visitor.rb#8 +class SyntaxTree::Visitor < ::SyntaxTree::BasicVisitor + # Visit a BEGINBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_BEGIN(node); end + + # Visit a CHAR node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_CHAR(node); end + + # Visit an ENDBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_END(node); end + + # Visit an EndContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit___end__(node); end + + # Visit an AliasNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_alias(node); end + + # Visit an ARef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_aref(node); end + + # Visit an ARefField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_aref_field(node); end + + # Visit an ArgBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_arg_block(node); end + + # Visit an ArgParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_arg_paren(node); end + + # Visit an ArgStar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_arg_star(node); end + + # Visit an Args node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_args(node); end + + # Visit an ArgsForward node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_args_forward(node); end + + # Visit an ArrayLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_array(node); end + + # Visit an AryPtn node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_aryptn(node); end + + # Visit an Assign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_assign(node); end + + # Visit an Assoc node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_assoc(node); end + + # Visit an AssocSplat node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_assoc_splat(node); end + + # Visit a Backref node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_backref(node); end + + # Visit a Backtick node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_backtick(node); end + + # Visit a BareAssocHash node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_bare_assoc_hash(node); end + + # Visit a Begin node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_begin(node); end + + # Visit a Binary node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_binary(node); end + + # Visit a Block node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_block(node); end + + # Visit a BlockVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_block_var(node); end + + # Visit a BlockArg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_blockarg(node); end + + # Visit a BodyStmt node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_bodystmt(node); end + + # Visit a Break node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_break(node); end + + # Visit a Call node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_call(node); end + + # Visit a Case node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_case(node); end + + # Visit a ClassDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_class(node); end + + # Visit a Comma node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_comma(node); end + + # Visit a Command node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_command(node); end + + # Visit a CommandCall node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_command_call(node); end + + # Visit a Comment node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_comment(node); end + + # Visit a Const node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const(node); end + + # Visit a ConstPathField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const_path_field(node); end + + # Visit a ConstPathRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const_path_ref(node); end + + # Visit a ConstRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_const_ref(node); end + + # Visit a CVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_cvar(node); end + + # Visit a Def node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_def(node); end + + # Visit a Defined node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_defined(node); end + + # Visit a DynaSymbol node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_dyna_symbol(node); end + + # Visit an Else node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_else(node); end + + # Visit an Elsif node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_elsif(node); end + + # Visit an EmbDoc node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embdoc(node); end + + # Visit an EmbExprBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embexpr_beg(node); end + + # Visit an EmbExprEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embexpr_end(node); end + + # Visit an EmbVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_embvar(node); end + + # Visit an Ensure node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_ensure(node); end + + # Visit an ExcessedComma node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_excessed_comma(node); end + + # Visit a Field node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_field(node); end + + # Visit a FloatLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_float(node); end + + # Visit a FndPtn node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_fndptn(node); end + + # Visit a For node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_for(node); end + + # Visit a GVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_gvar(node); end + + # Visit a HashLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_hash(node); end + + # Visit a Heredoc node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_heredoc(node); end + + # Visit a HeredocBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_heredoc_beg(node); end + + # Visit a HeredocEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_heredoc_end(node); end + + # Visit a HshPtn node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_hshptn(node); end + + # Visit an Ident node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_ident(node); end + + # Visit an IfNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_if(node); end + + # Visit an IfOp node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_if_op(node); end + + # Visit an Imaginary node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_imaginary(node); end + + # Visit an In node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_in(node); end + + # Visit an Int node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_int(node); end + + # Visit an IVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_ivar(node); end + + # Visit a Kw node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_kw(node); end + + # Visit a KwRestParam node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_kwrest_param(node); end + + # Visit a Label node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_label(node); end + + # Visit a LabelEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_label_end(node); end + + # Visit a Lambda node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lambda(node); end + + # Visit a LambdaVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lambda_var(node); end + + # Visit a LBrace node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lbrace(node); end + + # Visit a LBracket node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lbracket(node); end + + # Visit a LParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_lparen(node); end + + # Visit a MAssign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_massign(node); end + + # Visit a MethodAddBlock node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_method_add_block(node); end + + # Visit a MLHS node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_mlhs(node); end + + # Visit a MLHSParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_mlhs_paren(node); end + + # Visit a ModuleDeclaration node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_module(node); end + + # Visit a MRHS node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_mrhs(node); end + + # Visit a Next node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_next(node); end + + # Visit a Not node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_not(node); end + + # Visit an Op node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_op(node); end + + # Visit an OpAssign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_opassign(node); end + + # Visit a Params node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_params(node); end + + # Visit a Paren node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_paren(node); end + + # Visit a Period node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_period(node); end + + # Visit a PinnedBegin node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_pinned_begin(node); end + + # Visit a PinnedVarRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_pinned_var_ref(node); end + + # Visit a Program node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_program(node); end + + # Visit a QSymbols node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qsymbols(node); end + + # Visit a QSymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qsymbols_beg(node); end + + # Visit a QWords node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qwords(node); end + + # Visit a QWordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_qwords_beg(node); end + + # Visit a RangeNode node + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_range(node); end + + # Visit a RAssign node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rassign(node); end + + # Visit a RationalLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rational(node); end + + # Visit a RBrace node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rbrace(node); end + + # Visit a RBracket node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rbracket(node); end + + # Visit a Redo node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_redo(node); end + + # Visit a RegexpBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_beg(node); end + + # Visit a RegexpContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_content(node); end + + # Visit a RegexpEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_end(node); end + + # Visit a RegexpLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_regexp_literal(node); end + + # Visit a Rescue node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rescue(node); end + + # Visit a RescueEx node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rescue_ex(node); end + + # Visit a RescueMod node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rescue_mod(node); end + + # Visit a RestParam node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rest_param(node); end + + # Visit a Retry node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_retry(node); end + + # Visit a Return node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_return(node); end + + # Visit a RParen node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_rparen(node); end + + # Visit a SClass node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_sclass(node); end + + # Visit a Statements node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_statements(node); end + + # Visit a StringConcat node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_concat(node); end + + # Visit a StringContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_content(node); end + + # Visit a StringDVar node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_dvar(node); end + + # Visit a StringEmbExpr node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_embexpr(node); end + + # Visit a StringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_string_literal(node); end + + # Visit a Super node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_super(node); end + + # Visit a SymBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbeg(node); end + + # Visit a SymbolContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbol_content(node); end + + # Visit a SymbolLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbol_literal(node); end + + # Visit a Symbols node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbols(node); end + + # Visit a SymbolsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_symbols_beg(node); end + + # Visit a TLambda node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tlambda(node); end + + # Visit a TLamBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tlambeg(node); end + + # Visit a TopConstField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_top_const_field(node); end + + # Visit a TopConstRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_top_const_ref(node); end + + # Visit a TStringBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tstring_beg(node); end + + # Visit a TStringContent node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tstring_content(node); end + + # Visit a TStringEnd node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_tstring_end(node); end + + # Visit an Unary node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_unary(node); end + + # Visit an Undef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_undef(node); end + + # Visit an UnlessNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_unless(node); end + + # Visit an UntilNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_until(node); end + + # Visit a VarField node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_var_field(node); end + + # Visit a VarRef node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_var_ref(node); end + + # Visit a VCall node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_vcall(node); end + + # Visit a VoidStmt node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_void_stmt(node); end + + # Visit a When node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_when(node); end + + # Visit a WhileNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_while(node); end + + # Visit a Word node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_word(node); end + + # Visit a Words node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_words(node); end + + # Visit a WordsBeg node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_words_beg(node); end + + # Visit a XString node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_xstring(node); end + + # Visit a XStringLiteral node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_xstring_literal(node); end + + # Visit a YieldNode node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_yield(node); end + + # Visit a ZSuper node. + # + # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 + def visit_zsuper(node); end +end + +# VoidStmt represents an empty lexical block of code. +# +# ;; +# +# source://syntax_tree//lib/syntax_tree/node.rb#11792 +class SyntaxTree::VoidStmt < ::SyntaxTree::Node + # @return [VoidStmt] a new instance of VoidStmt + # + # source://syntax_tree//lib/syntax_tree/node.rb#11795 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11824 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11800 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11804 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11793 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11808 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11804 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11817 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11821 + def format(q); end +end + +# When represents a +when+ clause in a +case+ chain. +# +# case value +# when predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11836 +class SyntaxTree::When < ::SyntaxTree::Node + # @return [When] a new instance of When + # + # source://syntax_tree//lib/syntax_tree/node.rb#11848 + def initialize(arguments:, statements:, consequent:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11940 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11856 + def accept(visitor); end + + # [Args] the arguments to the when clause + # + # source://syntax_tree//lib/syntax_tree/node.rb#11837 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11860 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11846 + def comments; end + + # [nil | Else | When] the next clause in the chain + # + # source://syntax_tree//lib/syntax_tree/node.rb#11843 + def consequent; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11864 + def copy(arguments: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11860 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11879 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11905 + def format(q); end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11840 + def statements; end +end + +# We're going to keep a single instance of this separator around so we don't +# have to allocate a new one every time we format a when clause. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11903 +SyntaxTree::When::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::When::Separator) + +# We have a special separator here for when clauses which causes them to +# fill as much of the line as possible as opposed to everything breaking +# into its own line as soon as you hit the print limit. +# +# source://syntax_tree//lib/syntax_tree/node.rb#11892 +class SyntaxTree::When::Separator + # source://syntax_tree//lib/syntax_tree/node.rb#11893 + def call(q); end +end + +# While represents a +while+ loop. +# +# while predicate +# end +# +# source://syntax_tree//lib/syntax_tree/node.rb#11952 +class SyntaxTree::WhileNode < ::SyntaxTree::Node + # @return [WhileNode] a new instance of WhileNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#11961 + def initialize(predicate:, statements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12003 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11968 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11972 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#11959 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11976 + def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11972 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#11990 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#11999 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#12008 + def modifier?; end + + # [Node] the expression to be checked + # + # source://syntax_tree//lib/syntax_tree/node.rb#11953 + def predicate; end + + # [Statements] the expressions to be executed + # + # source://syntax_tree//lib/syntax_tree/node.rb#11956 + def statements; end +end + +# WithScope is a module intended to be included in classes inheriting from +# Visitor. The module overrides a few visit methods to automatically keep +# track of local variables and arguments defined in the current scope. +# Example usage: +# +# class MyVisitor < Visitor +# include WithScope +# +# def visit_ident(node) +# # Check if we're visiting an identifier for an argument, a local +# # variable or something else +# local = current_scope.find_local(node) +# +# if local.type == :argument +# # handle identifiers for arguments +# elsif local.type == :variable +# # handle identifiers for variables +# else +# # handle other identifiers, such as method names +# end +# end +# end +# +# source://syntax_tree//lib/syntax_tree/with_scope.rb#27 +module SyntaxTree::WithScope + # source://syntax_tree//lib/syntax_tree/with_scope.rb#122 + def initialize(*args, **kwargs, &block); end + + # Returns the value of attribute current_scope. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#120 + def current_scope; end + + # Visit for capturing local variables defined in regex named capture groups + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#239 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#192 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#185 + def visit_blockarg(node); end + + # Visits for nodes that create new scopes, such as classes, modules + # and method definitions. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#131 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#147 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#178 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#192 + def visit_lambda_var(node); end + + # When we find a method invocation with a block, only the code that happens + # inside of the block needs a fresh scope. The method invocation + # itself happens in the same scope. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#142 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#135 + def visit_module(node); end + + # Visit for keeping track of local arguments, such as method and block + # arguments. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#153 + def visit_params(node); end + + # Visit for keeping track of local variable definitions + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#210 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#171 + def visit_rest_param(node); end + + # Visit for keeping track of local variable definitions + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#202 + def visit_var_field(node); end + + # Visits for keeping track of variable and argument usages + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#218 + def visit_var_ref(node); end + + # When using regex named capture groups, vcalls might actually be a variable + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#230 + def visit_vcall(node); end + + private + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#288 + def add_argument_definitions(list); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#302 + def next_scope_id; end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#306 + def with_scope(parent_scope = T.unsafe(nil)); end +end + +# The scope class is used to keep track of local variables and arguments +# inside a particular scope. +# +# source://syntax_tree//lib/syntax_tree/with_scope.rb#30 +class SyntaxTree::WithScope::Scope + # @return [Scope] a new instance of Scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#68 + def initialize(id, parent = T.unsafe(nil)); end + + # Adding a local definition will either insert a new entry in the locals + # hash or append a new definition location to an existing local. Notice + # that it's not possible to change the type of a local after it has been + # registered. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#78 + def add_local_definition(identifier, type); end + + # Adding a local usage will either insert a new entry in the locals + # hash or append a new usage location to an existing local. Notice that + # it's not possible to change the type of a local after it has been + # registered. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#95 + def add_local_usage(identifier, type); end + + # Try to find the local given its name in this scope or any of its + # parents. + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#102 + def find_local(name); end + + # [Integer] a unique identifier for this scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#59 + def id; end + + # [Hash[String, Local]] The local variables and arguments defined in this + # scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#66 + def locals; end + + # [scope | nil] The parent scope + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#62 + def parent; end + + private + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#108 + def resolve_local(name, type); end +end + +# This class tracks the occurrences of a local variable or argument. +# +# source://syntax_tree//lib/syntax_tree/with_scope.rb#32 +class SyntaxTree::WithScope::Scope::Local + # @return [Local] a new instance of Local + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#43 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#49 + def add_definition(location); end + + # source://syntax_tree//lib/syntax_tree/with_scope.rb#53 + def add_usage(location); end + + # [Array[Location]] The locations of all definitions and assignments of + # this local + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#38 + def definitions; end + + # [Symbol] The type of the local (e.g. :argument, :variable) + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#34 + def type; end + + # [Array[Location]] The locations of all usages of this local + # + # source://syntax_tree//lib/syntax_tree/with_scope.rb#41 + def usages; end +end + +# Word represents an element within a special array literal that accepts +# interpolation. +# +# %W[a#{b}c xyz] +# +# In the example above, there would be two Word nodes within a parent Words +# node. +# +# source://syntax_tree//lib/syntax_tree/node.rb#12022 +class SyntaxTree::Word < ::SyntaxTree::Node + # @return [Word] a new instance of Word + # + # source://syntax_tree//lib/syntax_tree/node.rb#12028 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12067 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12038 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12042 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12026 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12046 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12042 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12059 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12063 + def format(q); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/node.rb#12034 + def match?(pattern); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # word + # + # source://syntax_tree//lib/syntax_tree/node.rb#12023 + def parts; end +end + +# Words represents a string literal array with interpolation. +# +# %W[one two three] +# +# source://syntax_tree//lib/syntax_tree/node.rb#12077 +class SyntaxTree::Words < ::SyntaxTree::Node + # @return [Words] a new instance of Words + # + # source://syntax_tree//lib/syntax_tree/node.rb#12086 + def initialize(beginning:, elements:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12142 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12093 + def accept(visitor); end + + # [WordsBeg] the token that opens this array literal + # + # source://syntax_tree//lib/syntax_tree/node.rb#12078 + def beginning; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12097 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12084 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12101 + def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12097 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12111 + def deconstruct_keys(_keys); end + + # [Array[ Word ]] the elements of this array + # + # source://syntax_tree//lib/syntax_tree/node.rb#12081 + def elements; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12120 + def format(q); end +end + +# WordsBeg represents the beginning of a string literal array with +# interpolation. +# +# %W[one two three] +# +# In the snippet above, a WordsBeg would be created with the value of "%W[". +# Note that these kinds of arrays can start with a lot of different delimiter +# types (e.g., %W| or %W<). +# +# source://syntax_tree//lib/syntax_tree/node.rb#12157 +class SyntaxTree::WordsBeg < ::SyntaxTree::Node + # @return [WordsBeg] a new instance of WordsBeg + # + # source://syntax_tree//lib/syntax_tree/node.rb#12160 + def initialize(value:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12186 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12165 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12169 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12173 + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12169 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12182 + def deconstruct_keys(_keys); end + + # [String] the start of the word literal array + # + # source://syntax_tree//lib/syntax_tree/node.rb#12158 + def value; end +end + +# XString represents the contents of an XStringLiteral. +# +# `ls` +# +# source://syntax_tree//lib/syntax_tree/node.rb#12197 +class SyntaxTree::XString < ::SyntaxTree::Node + # @return [XString] a new instance of XString + # + # source://syntax_tree//lib/syntax_tree/node.rb#12200 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12226 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12205 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12209 + def child_nodes; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12213 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12209 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12222 + def deconstruct_keys(_keys); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # xstring + # + # source://syntax_tree//lib/syntax_tree/node.rb#12198 + def parts; end +end + +# XStringLiteral represents a string that gets executed. +# +# `ls` +# +# source://syntax_tree//lib/syntax_tree/node.rb#12237 +class SyntaxTree::XStringLiteral < ::SyntaxTree::Node + # @return [XStringLiteral] a new instance of XStringLiteral + # + # source://syntax_tree//lib/syntax_tree/node.rb#12243 + def initialize(parts:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12280 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12249 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12253 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12241 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12257 + def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12253 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12270 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12274 + def format(q); end + + # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the + # xstring + # + # source://syntax_tree//lib/syntax_tree/node.rb#12238 + def parts; end +end + +# This module provides an object representation of the YARV bytecode. +# +# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#4 +module SyntaxTree::YARV + class << self + # A convenience method for creating a CallData object. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#82 + def calldata(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end + + # Compile the given source into a YARV instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv.rb#25 + def compile(source, options = T.unsafe(nil)); end + + # Compile and interpret the given source. + # + # source://syntax_tree//lib/syntax_tree/yarv.rb#30 + def interpret(source, options = T.unsafe(nil)); end + end +end + +# ### Summary +# +# `adjuststack` accepts a single integer argument and removes that many +# elements from the top of the stack. +# +# ### Usage +# +# ~~~ruby +# x = [true] +# x[0] ||= nil +# x[0] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#69 +class SyntaxTree::YARV::AdjustStack < ::SyntaxTree::YARV::Instruction + # @return [AdjustStack] a new instance of AdjustStack + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#72 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#88 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#100 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#84 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#76 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#92 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#70 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#96 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#80 + def to_a(_iseq); end +end + +# ### Summary +# +# `anytostring` ensures that the value on top of the stack is a string. +# +# It pops two values off the stack. If the first value is a string it +# pushes it back on the stack. If the first value is not a string, it uses +# Ruby's built in string coercion to coerce the second value to a string +# and then pushes that back on the stack. +# +# This is used in conjunction with `objtostring` as a fallback for when an +# object's `to_s` method does not return a string. +# +# ### Usage +# +# ~~~ruby +# "#{5}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#123 +class SyntaxTree::YARV::AnyToString < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#136 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#148 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#132 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#124 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#140 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#144 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#128 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#5 +class SyntaxTree::YARV::Assembler + # @return [Assembler] a new instance of Assembler + # + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#67 + def initialize(lines); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#71 + def assemble; end + + # Returns the value of attribute lines. + # + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#65 + def lines; end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#89 + def assemble_iseq(iseq, lines); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#409 + def find_local(iseq, operands); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#418 + def parse(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#450 + def parse_calldata(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#445 + def parse_nested(lines); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#433 + def parse_number(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#425 + def parse_options(value, options); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#437 + def parse_string(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#441 + def parse_symbol(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#429 + def parse_type(value, type); end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#79 + def assemble(source); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#83 + def assemble_file(filepath); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#28 +SyntaxTree::YARV::Assembler::CALLDATA_FLAGS = T.let(T.unsafe(nil), Hash) + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#44 +SyntaxTree::YARV::Assembler::DEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#6 +class SyntaxTree::YARV::Assembler::ObjectVisitor < ::SyntaxTree::YARV::Compiler::RubyVisitor + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#7 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#15 + def visit_string_literal(node); end +end + +# This object represents a single basic block, wherein all contained +# instructions do not branch except for the last one. +# +# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#7 +class SyntaxTree::YARV::BasicBlock + # @return [BasicBlock] a new instance of BasicBlock + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#23 + def initialize(block_start, insns); end + + # This is the index into the list of instructions where this block starts. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#12 + def block_start; end + + # Yield each instruction in this basic block along with its index from the + # original instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#35 + def each_with_length; end + + # This is the unique identifier for this basic block. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#9 + def id; end + + # This is an array of basic blocks that lead into this block. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#18 + def incoming_blocks; end + + # This is the set of instructions that this block contains. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#15 + def insns; end + + # This is an array of basic blocks that this block leads into. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#21 + def outgoing_blocks; end + + # This method is used to verify that the basic block is well formed. It + # checks that the only instruction in this basic block that branches is + # the last instruction. + # + # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#48 + def verify; end +end + +# Parses the given source code into a syntax tree, compiles that syntax tree +# into YARV bytecode. +# +# source://syntax_tree//lib/syntax_tree/yarv/bf.rb#7 +class SyntaxTree::YARV::Bf + # @return [Bf] a new instance of Bf + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#10 + def initialize(source); end + + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#14 + def compile; end + + # Returns the value of attribute source. + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#8 + def source; end + + private + + # $tape[$cursor] += value + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#84 + def change_by(iseq, value); end + + # $tape[$cursor] = $stdin.getc.ord + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#133 + def input_char(iseq); end + + # Jump back to the start of the loop. + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#163 + def loop_end(iseq, start_label, end_label); end + + # unless $tape[$cursor] == 0 + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#146 + def loop_start(iseq); end + + # $stdout.putc($tape[$cursor].chr) + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#120 + def output_char(iseq); end + + # $cursor += value + # + # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#105 + def shift_by(iseq, value); end +end + +# ### Summary +# +# `branchif` has one argument: the jump index. It pops one value off the +# stack: the jump condition. +# +# If the value popped off the stack is true, `branchif` jumps to +# the jump index and continues executing there. +# +# ### Usage +# +# ~~~ruby +# x = true +# x ||= "foo" +# puts x +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#175 +class SyntaxTree::YARV::BranchIf < ::SyntaxTree::YARV::Instruction + # @return [BranchIf] a new instance of BranchIf + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#178 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#194 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#210 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#206 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#190 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#182 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#214 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#176 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#198 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#202 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#186 + def to_a(_iseq); end +end + +# ### Summary +# +# `branchnil` has one argument: the jump index. It pops one value off the +# stack: the jump condition. +# +# If the value popped off the stack is nil, `branchnil` jumps to +# the jump index and continues executing there. +# +# ### Usage +# +# ~~~ruby +# x = nil +# if x&.to_s +# puts "hi" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#236 +class SyntaxTree::YARV::BranchNil < ::SyntaxTree::YARV::Instruction + # @return [BranchNil] a new instance of BranchNil + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#239 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#255 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#271 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#267 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#251 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#243 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#275 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#237 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#259 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#263 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#247 + def to_a(_iseq); end +end + +# ### Summary +# +# `branchunless` has one argument: the jump index. It pops one value off +# the stack: the jump condition. +# +# If the value popped off the stack is false or nil, `branchunless` jumps +# to the jump index and continues executing there. +# +# ### Usage +# +# ~~~ruby +# if 2 + 3 +# puts "foo" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#296 +class SyntaxTree::YARV::BranchUnless < ::SyntaxTree::YARV::Instruction + # @return [BranchUnless] a new instance of BranchUnless + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#299 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#315 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#331 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#327 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#311 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#303 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#335 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#297 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#319 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#323 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#307 + def to_a(_iseq); end +end + +# This is an operand to various YARV instructions that represents the +# information about a specific call site. +# +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#7 +class SyntaxTree::YARV::CallData + # @return [CallData] a new instance of CallData + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#24 + def initialize(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end + + # Returns the value of attribute argc. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + def argc; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#36 + def flag?(mask); end + + # Returns the value of attribute flags. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + def flags; end + + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#46 + def inspect; end + + # Returns the value of attribute kw_arg. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + def kw_arg; end + + # Returns the value of attribute method. + # + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#22 + def method; end + + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#40 + def to_h; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#71 + def from(serialized); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#9 +SyntaxTree::YARV::CallData::CALL_ARGS_BLOCKARG = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#12 +SyntaxTree::YARV::CallData::CALL_ARGS_SIMPLE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#8 +SyntaxTree::YARV::CallData::CALL_ARGS_SPLAT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#13 +SyntaxTree::YARV::CallData::CALL_BLOCKISEQ = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#10 +SyntaxTree::YARV::CallData::CALL_FCALL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#14 +SyntaxTree::YARV::CallData::CALL_KWARG = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#15 +SyntaxTree::YARV::CallData::CALL_KW_SPLAT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#20 +SyntaxTree::YARV::CallData::CALL_KW_SPLAT_MUT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#19 +SyntaxTree::YARV::CallData::CALL_OPT_SEND = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#17 +SyntaxTree::YARV::CallData::CALL_SUPER = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#16 +SyntaxTree::YARV::CallData::CALL_TAILCALL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#11 +SyntaxTree::YARV::CallData::CALL_VCALL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#18 +SyntaxTree::YARV::CallData::CALL_ZSUPER = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `checkkeyword` checks if a keyword was passed at the callsite that +# called into the method represented by the instruction sequence. It has +# two arguments: the index of the local variable that stores the keywords +# metadata and the index of the keyword within that metadata. It pushes +# a boolean onto the stack indicating whether or not the keyword was +# given. +# +# ### Usage +# +# ~~~ruby +# def evaluate(value: rand) +# value +# end +# +# evaluate(value: 3) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#359 +class SyntaxTree::YARV::CheckKeyword < ::SyntaxTree::YARV::Instruction + # @return [CheckKeyword] a new instance of CheckKeyword + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#362 + def initialize(keyword_bits_index, keyword_index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#386 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#400 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#382 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#367 + def disasm(fmt); end + + # Returns the value of attribute keyword_bits_index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 + def keyword_bits_index; end + + # Returns the value of attribute keyword_index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 + def keyword_index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#392 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#396 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#374 + def to_a(iseq); end +end + +# ### Summary +# +# `checkmatch` checks if the current pattern matches the current value. It +# pops the target and the pattern off the stack and pushes a boolean onto +# the stack if it matches or not. +# +# ### Usage +# +# ~~~ruby +# foo in Foo +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#417 +class SyntaxTree::YARV::CheckMatch < ::SyntaxTree::YARV::Instruction + # @return [CheckMatch] a new instance of CheckMatch + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#426 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#442 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#458 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#438 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#430 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#446 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#450 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#454 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#434 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#424 + def type; end + + private + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#472 + def check?(pattern, target); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#422 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_ARRAY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#419 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_CASE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#421 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_MASK = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#420 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_RESCUE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#418 +SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_WHEN = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `checktype` checks if the value on top of the stack is of a certain type. +# The type is the only argument. It pops the value off the stack and pushes +# a boolean onto the stack indicating whether or not the value is of the +# given type. +# +# ### Usage +# +# ~~~ruby +# foo in [bar] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#501 +class SyntaxTree::YARV::CheckType < ::SyntaxTree::YARV::Instruction + # @return [CheckType] a new instance of CheckType + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#526 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#588 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#608 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#584 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#530 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#592 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#596 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#600 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#580 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#524 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#508 +SyntaxTree::YARV::CheckType::TYPE_ARRAY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#511 +SyntaxTree::YARV::CheckType::TYPE_BIGNUM = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#503 +SyntaxTree::YARV::CheckType::TYPE_CLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#515 +SyntaxTree::YARV::CheckType::TYPE_COMPLEX = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#513 +SyntaxTree::YARV::CheckType::TYPE_DATA = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#519 +SyntaxTree::YARV::CheckType::TYPE_FALSE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#512 +SyntaxTree::YARV::CheckType::TYPE_FILE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#521 +SyntaxTree::YARV::CheckType::TYPE_FIXNUM = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#505 +SyntaxTree::YARV::CheckType::TYPE_FLOAT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#509 +SyntaxTree::YARV::CheckType::TYPE_HASH = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#514 +SyntaxTree::YARV::CheckType::TYPE_MATCH = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#504 +SyntaxTree::YARV::CheckType::TYPE_MODULE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#517 +SyntaxTree::YARV::CheckType::TYPE_NIL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#502 +SyntaxTree::YARV::CheckType::TYPE_OBJECT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#516 +SyntaxTree::YARV::CheckType::TYPE_RATIONAL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#507 +SyntaxTree::YARV::CheckType::TYPE_REGEXP = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#506 +SyntaxTree::YARV::CheckType::TYPE_STRING = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#510 +SyntaxTree::YARV::CheckType::TYPE_STRUCT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#520 +SyntaxTree::YARV::CheckType::TYPE_SYMBOL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#518 +SyntaxTree::YARV::CheckType::TYPE_TRUE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#522 +SyntaxTree::YARV::CheckType::TYPE_UNDEF = T.let(T.unsafe(nil), Integer) + +# This class is an experiment in transforming Syntax Tree nodes into their +# corresponding YARV instruction sequences. It attempts to mirror the +# behavior of RubyVM::InstructionSequence.compile. +# +# You use this as with any other visitor. First you parse code into a tree, +# then you visit it with this compiler. Visiting the root node of the tree +# will return a SyntaxTree::YARV::Compiler::InstructionSequence object. +# With that object you can call #to_a on it, which will return a serialized +# form of the instruction sequence as an array. This array _should_ mirror +# the array given by RubyVM::InstructionSequence#to_a. +# +# As an example, here is how you would compile a single expression: +# +# program = SyntaxTree.parse("1 + 2") +# program.accept(SyntaxTree::YARV::Compiler.new).to_a +# +# [ +# "YARVInstructionSequence/SimpleDataFormat", +# 3, +# 1, +# 1, +# {:arg_size=>0, :local_size=>0, :stack_max=>2}, +# "<compiled>", +# "<compiled>", +# "<compiled>", +# 1, +# :top, +# [], +# {}, +# [], +# [ +# [:putobject_INT2FIX_1_], +# [:putobject, 2], +# [:opt_plus, {:mid=>:+, :flag=>16, :orig_argc=>1}], +# [:leave] +# ] +# ] +# +# Note that this is the same output as calling: +# +# RubyVM::InstructionSequence.compile("1 + 2").to_a +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#51 +class SyntaxTree::YARV::Compiler < ::SyntaxTree::BasicVisitor + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#293 + def initialize(options = T.unsafe(nil)); end + + # The current instruction sequence that is being compiled. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#286 + def iseq; end + + # A boolean to track if we're currently compiling the last statement + # within a set of statements. This information is necessary to determine + # if we need to return the value of the last statement. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#291 + def last_statement; end + + # These options mirror the compilation options that we currently support + # that can be also passed to RubyVM::InstructionSequence.compile. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#283 + def options; end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#299 + def visit_BEGIN(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#303 + def visit_CHAR(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#311 + def visit_END(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#339 + def visit_alias(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#347 + def visit_aref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#369 + def visit_arg_block(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#373 + def visit_arg_paren(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#377 + def visit_arg_star(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#382 + def visit_args(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#386 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#421 + def visit_aryptn(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#424 + def visit_assign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#522 + def visit_assoc(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#527 + def visit_assoc_splat(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#531 + def visit_backref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#535 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#543 + def visit_begin(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#546 + def visit_binary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#575 + def visit_block(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#585 + def visit_block_var(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#599 + def visit_blockarg(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#605 + def visit_bodystmt(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#609 + def visit_break(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#612 + def visit_call(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#712 + def visit_case(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#757 + def visit_class(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#792 + def visit_command(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#805 + def visit_command_call(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#818 + def visit_const_path_field(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#822 + def visit_const_path_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#827 + def visit_def(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#850 + def visit_defined(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#907 + def visit_dyna_symbol(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#913 + def visit_else(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#918 + def visit_elsif(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#929 + def visit_ensure(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#932 + def visit_field(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#936 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#940 + def visit_fndptn(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#943 + def visit_for(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#976 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#988 + def visit_heredoc(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#985 + def visit_hshptn(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#999 + def visit_if(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1053 + def visit_if_op(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1074 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1078 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1082 + def visit_kwrest_param(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1088 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1092 + def visit_lambda(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1106 + def visit_lambda_var(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1110 + def visit_massign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1116 + def visit_method_add_block(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1129 + def visit_mlhs(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1142 + def visit_module(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1171 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1180 + def visit_next(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1183 + def visit_not(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1188 + def visit_opassign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1254 + def visit_params(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1360 + def visit_paren(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1364 + def visit_pinned_begin(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1367 + def visit_pinned_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1370 + def visit_program(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1421 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1425 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1434 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1444 + def visit_rassign(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1521 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1525 + def visit_redo(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1528 + def visit_regexp_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1538 + def visit_rescue(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1541 + def visit_rescue_ex(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1544 + def visit_rescue_mod(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1547 + def visit_rest_param(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1553 + def visit_retry(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1556 + def visit_return(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1559 + def visit_sclass(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1580 + def visit_statements(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1594 + def visit_string_concat(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1606 + def visit_string_embexpr(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1610 + def visit_string_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1619 + def visit_super(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1633 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1637 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1656 + def visit_top_const_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1660 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1668 + def visit_unary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1689 + def visit_undef(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1699 + def visit_unless(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1725 + def visit_until(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1744 + def visit_var_field(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1761 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1796 + def visit_vcall(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1808 + def visit_when(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1812 + def visit_while(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1831 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1840 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1850 + def visit_xstring_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1863 + def visit_yield(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1869 + def visit_zsuper(_node); end + + private + + # This is a helper that is used in places where arguments may be present + # or they may be wrapped in parentheses. It's meant to descend down the + # tree and return an array of argument nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1887 + def argument_parts(node); end + + # Constant names when they are being assigned or referenced come in as a + # tree, but it's more convenient to work with them as an array. This + # method converts them into that array. This is nice because it's the + # operand that goes to opt_getconstant_path in Ruby 3.2. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1908 + def constant_names(node); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2196 + def last_statement?; end + + # For the most part when an OpAssign (operator assignment) node with a ||= + # operator is being compiled it's a matter of reading the target, checking + # if the value should be evaluated, evaluating it if so, and then writing + # the result back to the target. + # + # However, in certain kinds of assignments (X, ::X, X::Y, @@x, and $x) we + # first check if the value is defined using the defined instruction. I + # don't know why it is necessary, and suspect that it isn't. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1936 + def opassign_defined(node); end + + # Whenever a value is interpolated into a string-like structure, these + # three instructions are pushed. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2016 + def push_interpolate; end + + # Visit a type of pattern in a pattern match. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2029 + def visit_pattern(node, end_label); end + + # There are a lot of nodes in the AST that act as contains of parts of + # strings. This includes things like string literals, regular expressions, + # heredocs, etc. This method will visit all the parts of a string within + # those containers. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2137 + def visit_string_parts(node); end + + # The current instruction sequence that we're compiling is always stored + # on the compiler. When we descend into a node that has its own + # instruction sequence, this method can be called to temporarily set the + # new value of the instruction sequence, yield, and then set it back. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2167 + def with_child_iseq(child_iseq); end + + # When we're compiling the last statement of a set of statements within a + # scope, the instructions sometimes change from pops to leaves. These + # kinds of peephole optimizations can reduce the overall number of + # instructions. Therefore, we keep track of whether we're compiling the + # last statement of a scope and allow visit methods to query that + # information. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2185 + def with_last_statement; end + + # OpAssign nodes can have a number of different kinds of nodes as their + # "target" (i.e., the left-hand side of the assignment). When compiling + # these nodes we typically need to first fetch the current value of the + # variable, then perform some kind of action, then store the result back + # into the variable. This method handles that by first fetching the value, + # then yielding to the block, then storing the result. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2206 + def with_opassign(node); end +end + +# This represents a set of options that can be passed to the compiler to +# control how it compiles the code. It mirrors the options that can be +# passed to RubyVM::InstructionSequence.compile, except it only includes +# options that actually change the behavior. +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#52 +class SyntaxTree::YARV::Compiler::Options + # @return [Options] a new instance of Options + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#53 + def initialize(frozen_string_literal: T.unsafe(nil), inline_const_cache: T.unsafe(nil), operands_unification: T.unsafe(nil), peephole_optimization: T.unsafe(nil), specialized_instruction: T.unsafe(nil), tailcall_optimization: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#80 + def frozen_string_literal!; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#84 + def frozen_string_literal?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#88 + def inline_const_cache?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#92 + def operands_unification?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#96 + def peephole_optimization?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#100 + def specialized_instruction?; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#104 + def tailcall_optimization?; end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#69 + def to_hash; end +end + +# This visitor is responsible for converting Syntax Tree nodes into their +# corresponding Ruby structures. This is used to convert the operands of +# some instructions like putobject that push a Ruby object directly onto +# the stack. It is only used when the entire structure can be represented +# at compile-time, as opposed to constructed at run-time. +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#116 +class SyntaxTree::YARV::Compiler::RubyVisitor < ::SyntaxTree::BasicVisitor + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_BEGIN(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_CHAR(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_END(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit___end__(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_alias(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_aref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_aref_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_arg_block(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_arg_paren(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_arg_star(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_args(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_args_forward(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#128 + def visit_array(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_aryptn(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_assign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_assoc(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_assoc_splat(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_backref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_backtick(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 + def visit_bare_assoc_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_begin(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_binary(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_block(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_block_var(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_blockarg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_bodystmt(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_break(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_call(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_case(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_class(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_comma(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_command(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_command_call(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_comment(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const_path_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const_path_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_const_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_cvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_def(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_defined(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_dyna_symbol(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_else(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_elsif(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embdoc(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embexpr_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embexpr_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_embvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_ensure(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_excessed_comma(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#141 + def visit_float(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_fndptn(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_for(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_gvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 + def visit_hash(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_heredoc(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_heredoc_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_heredoc_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_hshptn(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_ident(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_if(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_if_op(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#147 + def visit_imaginary(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_in(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#151 + def visit_int(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_ivar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_kw(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_kwrest_param(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#166 + def visit_label(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_label_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lambda(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lambda_var(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lbrace(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lbracket(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_lparen(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_massign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_method_add_block(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_mlhs(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_mlhs_paren(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_module(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#170 + def visit_mrhs(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_next(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_not(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_op(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_opassign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_params(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_paren(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_period(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_pinned_begin(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_pinned_var_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_program(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#174 + def visit_qsymbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_qsymbols_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#178 + def visit_qwords(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_qwords_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#182 + def visit_range(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rassign(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#187 + def visit_rational(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rbrace(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rbracket(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_redo(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_regexp_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_regexp_content(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_regexp_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#191 + def visit_regexp_literal(node); end + + # This isn't actually a visit method, though maybe it should be. It is + # responsible for converting the set of string options on a regular + # expression into its equivalent integer. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#249 + def visit_regexp_literal_flags(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rescue(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rescue_ex(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rescue_mod(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rest_param(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_retry(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_return(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_rparen(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_sclass(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_statements(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_concat(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_content(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_dvar(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_embexpr(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_string_literal(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_super(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_symbeg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_symbol_content(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#204 + def visit_symbol_literal(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#208 + def visit_symbols(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_symbols_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tlambda(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tlambeg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_top_const_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_top_const_ref(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tstring_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#212 + def visit_tstring_content(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_tstring_end(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_unary(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_undef(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_unless(_node); end + + # @raise [CompilationError] + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_unsupported(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_until(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_var_field(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#216 + def visit_var_ref(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_vcall(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_void_stmt(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_when(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_while(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#231 + def visit_word(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#241 + def visit_words(node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_words_beg(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_xstring(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_xstring_literal(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_yield(_node); end + + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 + def visit_zsuper(_node); end + + class << self + # This will attempt to compile the given node. If it's possible, then + # it will return the compiled object. Otherwise it will return nil. + # + # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#122 + def compile(node); end + end +end + +# This error is raised whenever a node cannot be converted into a Ruby +# object at compile-time. +# +# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#117 +class SyntaxTree::YARV::Compiler::RubyVisitor::CompilationError < ::StandardError; end + +# ### Summary +# +# `concatarray` concatenates the two Arrays on top of the stack. +# +# It coerces the two objects at the top of the stack into Arrays by +# calling `to_a` if necessary, and makes sure to `dup` the first Array if +# it was already an Array, to avoid mutating it when concatenating. +# +# ### Usage +# +# ~~~ruby +# [1, *2] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#674 +class SyntaxTree::YARV::ConcatArray < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#687 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#699 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#683 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#675 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#691 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#695 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#679 + def to_a(_iseq); end +end + +# ### Summary +# +# `concatstrings` pops a number of strings from the stack joins them +# together into a single string and pushes that string back on the stack. +# +# This does no coercion and so is always used in conjunction with +# `objtostring` and `anytostring` to ensure the stack contents are always +# strings. +# +# ### Usage +# +# ~~~ruby +# "#{5}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#720 +class SyntaxTree::YARV::ConcatStrings < ::SyntaxTree::YARV::Instruction + # @return [ConcatStrings] a new instance of ConcatStrings + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#723 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#739 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#755 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#735 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#727 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#743 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#721 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#747 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#751 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#731 + def to_a(_iseq); end +end + +# This class represents a control flow graph of a YARV instruction sequence. +# It constructs a graph of basic blocks that hold subsets of the list of +# instructions from the instruction sequence. +# +# You can use this class by calling the ::compile method and passing it a +# YARV instruction sequence. It will return a control flow graph object. +# +# iseq = RubyVM::InstructionSequence.compile("1 + 2") +# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) +# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) +# +# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#16 +class SyntaxTree::YARV::ControlFlowGraph + # @return [ControlFlowGraph] a new instance of ControlFlowGraph + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#173 + def initialize(iseq, insns, blocks); end + + # This is the set of basic blocks that this control-flow graph contains. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#171 + def blocks; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#179 + def disasm; end + + # This is the list of instructions that this control flow graph contains. + # It is effectively the same as the list of instructions in the + # instruction sequence but with line numbers and events filtered out. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#168 + def insns; end + + # This is the instruction sequence that this control flow graph + # corresponds to. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#163 + def iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#202 + def to_dfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#210 + def to_mermaid; end + + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#206 + def to_son; end + + # This method is used to verify that the control flow graph is well + # formed. It does this by checking that each basic block is itself well + # formed. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#248 + def verify; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#252 + def compile(iseq); end + end +end + +# This class is responsible for creating a control flow graph from the +# given instruction sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#19 +class SyntaxTree::YARV::ControlFlowGraph::Compiler + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#34 + def initialize(iseq); end + + # This method is used to compile the instruction sequence into a control + # flow graph. It returns an instance of ControlFlowGraph. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#54 + def compile; end + + # This is a hash of indices in the YARV instruction sequence that point + # to their corresponding instruction. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#25 + def insns; end + + # This is the instruction sequence that is being compiled. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#21 + def iseq; end + + # This is a hash of labels that point to their corresponding index into + # the YARV instruction sequence. Note that this is not the same as the + # index into the list of instructions on the instruction sequence + # object. Instead, this is the index into the C array, so it includes + # operands. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#32 + def labels; end + + private + + # Builds up a set of basic blocks by iterating over the starts of each + # block. They are keyed by the index of their first instruction. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#92 + def build_basic_blocks; end + + # Connect the blocks by letting them know which blocks are incoming and + # outgoing from each block. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#123 + def connect_basic_blocks(blocks); end + + # Finds the indices of the instructions that start a basic block because + # they're either: + # + # * the start of an instruction sequence + # * the target of a branch + # * fallen through to from a branch + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#72 + def find_basic_block_starts; end + + # If there are blocks that are unreachable, we can remove them from the + # graph entirely at this point. + # + # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#145 + def prune_basic_blocks(blocks); end +end + +# Constructs a data-flow-graph of a YARV instruction sequence, via a +# control-flow-graph. Data flow is discovered locally and then globally. The +# graph only considers data flow through the stack - local variables and +# objects are considered fully escaped in this analysis. +# +# You can use this class by calling the ::compile method and passing it a +# control flow graph. It will return a data flow graph object. +# +# iseq = RubyVM::InstructionSequence.compile("1 + 2") +# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) +# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) +# dfg = SyntaxTree::YARV::DataFlowGraph.compile(cfg) +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#18 +class SyntaxTree::YARV::DataFlowGraph + # @return [DataFlowGraph] a new instance of DataFlowGraph + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#68 + def initialize(cfg, insn_flows, block_flows); end + + # Returns the value of attribute block_flows. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 + def block_flows; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#74 + def blocks; end + + # Returns the value of attribute cfg. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 + def cfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#78 + def disasm; end + + # Returns the value of attribute insn_flows. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 + def insn_flows; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#127 + def to_mermaid; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#123 + def to_son; end + + # Verify that we constructed the data flow graph correctly. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#179 + def verify; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#204 + def compile(cfg); end + end +end + +# This represents an object that goes on the stack that is passed between +# basic blocks. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#32 +class SyntaxTree::YARV::DataFlowGraph::BlockArgument + # @return [BlockArgument] a new instance of BlockArgument + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#35 + def initialize(name); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#39 + def local?; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#33 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#43 + def to_str; end +end + +# This class is responsible for creating a data flow graph from the given +# control flow graph. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#210 +class SyntaxTree::YARV::DataFlowGraph::Compiler + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#221 + def initialize(cfg); end + + # This data structure will hold the data flow between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#219 + def block_flows; end + + # This is the control flow graph that is being compiled. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#212 + def cfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#227 + def compile; end + + # This data structure will hold the data flow between instructions + # within individual basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#216 + def insn_flows; end + + private + + # Find the data that flows between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#304 + def find_external_flow; end + + # Find the data flow within each basic block. Using an abstract stack, + # connect from consumers of data to the producers of that data. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#237 + def find_internal_flow; end +end + +# This object represents the flow of data between instructions. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#20 +class SyntaxTree::YARV::DataFlowGraph::DataFlow + # @return [DataFlow] a new instance of DataFlow + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#24 + def initialize; end + + # Returns the value of attribute in. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#21 + def in; end + + # Returns the value of attribute out. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#22 + def out; end +end + +# This represents an object that goes on the stack that is passed between +# instructions within a basic block. +# +# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#50 +class SyntaxTree::YARV::DataFlowGraph::LocalArgument + # @return [LocalArgument] a new instance of LocalArgument + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#53 + def initialize(length); end + + # Returns the value of attribute length. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 + def length; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#57 + def local?; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#61 + def to_str; end +end + +# This class is responsible for taking a compiled instruction sequence and +# walking through it to generate equivalent Ruby code. +# +# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#7 +class SyntaxTree::YARV::Decompiler + include ::SyntaxTree::DSL + + # @return [Decompiler] a new instance of Decompiler + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#32 + def initialize(iseq); end + + # Returns the value of attribute block_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 + def block_label; end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 + def iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#37 + def to_ruby; end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#52 + def decompile(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#256 + def local_name(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#43 + def node_for(value); end +end + +# When we're decompiling, we use a looped case statement to emulate +# jumping around in the same way the virtual machine would. This class +# provides convenience methods for generating the AST nodes that have to +# do with that label. +# +# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#12 +class SyntaxTree::YARV::Decompiler::BlockLabel + include ::SyntaxTree::DSL + + # @return [BlockLabel] a new instance of BlockLabel + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#16 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#20 + def field; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#14 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#24 + def ref; end +end + +# ### Summary +# +# `defineclass` defines a class. First it pops the superclass off the +# stack, then it pops the object off the stack that the class should be +# defined under. It has three arguments: the name of the constant, the +# instruction sequence associated with the class, and various flags that +# indicate if it is a singleton class, a module, or a regular class. +# +# ### Usage +# +# ~~~ruby +# class Foo +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#775 +class SyntaxTree::YARV::DefineClass < ::SyntaxTree::YARV::Instruction + # @return [DefineClass] a new instance of DefineClass + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#784 + def initialize(name, class_iseq, flags); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#806 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#823 + def call(vm); end + + # Returns the value of attribute class_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 + def class_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#802 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#790 + def disasm(fmt); end + + # Returns the value of attribute flags. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 + def flags; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#811 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#815 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#819 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#798 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#780 +SyntaxTree::YARV::DefineClass::FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#779 +SyntaxTree::YARV::DefineClass::FLAG_SCOPED = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#776 +SyntaxTree::YARV::DefineClass::TYPE_CLASS = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#778 +SyntaxTree::YARV::DefineClass::TYPE_MODULE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#777 +SyntaxTree::YARV::DefineClass::TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `definemethod` defines a method on the class of the current value of +# `self`. It accepts two arguments. The first is the name of the method +# being defined. The second is the instruction sequence representing the +# body of the method. +# +# ### Usage +# +# ~~~ruby +# def value = "value" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1068 +class SyntaxTree::YARV::DefineMethod < ::SyntaxTree::YARV::Instruction + # @return [DefineMethod] a new instance of DefineMethod + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1071 + def initialize(method_name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1092 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1101 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1088 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1076 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1097 + def length; end + + # Returns the value of attribute method_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 + def method_iseq; end + + # Returns the value of attribute method_name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 + def method_name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1084 + def to_a(_iseq); end +end + +# ### Summary +# +# `definesmethod` defines a method on the singleton class of the current +# value of `self`. It accepts two arguments. The first is the name of the +# method being defined. The second is the instruction sequence representing +# the body of the method. It pops the object off the stack that the method +# should be defined on. +# +# ### Usage +# +# ~~~ruby +# def self.value = "value" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1137 +class SyntaxTree::YARV::DefineSMethod < ::SyntaxTree::YARV::Instruction + # @return [DefineSMethod] a new instance of DefineSMethod + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1140 + def initialize(method_name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1161 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1174 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1157 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1145 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1166 + def length; end + + # Returns the value of attribute method_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 + def method_iseq; end + + # Returns the value of attribute method_name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 + def method_name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1170 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1153 + def to_a(_iseq); end +end + +# ### Summary +# +# `defined` checks if the top value of the stack is defined. If it is, it +# pushes its value onto the stack. Otherwise it pushes `nil`. +# +# ### Usage +# +# ~~~ruby +# defined?(x) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#859 +class SyntaxTree::YARV::Defined < ::SyntaxTree::YARV::Instruction + # @return [Defined] a new instance of Defined + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#880 + def initialize(type, name, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#939 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#956 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#935 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#886 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#944 + def length; end + + # Returns the value of attribute message. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 + def message; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#948 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#952 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#931 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#872 +SyntaxTree::YARV::Defined::TYPE_ASGN = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#865 +SyntaxTree::YARV::Defined::TYPE_CONST = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#876 +SyntaxTree::YARV::Defined::TYPE_CONST_FROM = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#864 +SyntaxTree::YARV::Defined::TYPE_CVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#873 +SyntaxTree::YARV::Defined::TYPE_EXPR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#871 +SyntaxTree::YARV::Defined::TYPE_FALSE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#875 +SyntaxTree::YARV::Defined::TYPE_FUNC = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#863 +SyntaxTree::YARV::Defined::TYPE_GVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#861 +SyntaxTree::YARV::Defined::TYPE_IVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#862 +SyntaxTree::YARV::Defined::TYPE_LVAR = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#866 +SyntaxTree::YARV::Defined::TYPE_METHOD = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#860 +SyntaxTree::YARV::Defined::TYPE_NIL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#874 +SyntaxTree::YARV::Defined::TYPE_REF = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#869 +SyntaxTree::YARV::Defined::TYPE_SELF = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#870 +SyntaxTree::YARV::Defined::TYPE_TRUE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#867 +SyntaxTree::YARV::Defined::TYPE_YIELD = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#868 +SyntaxTree::YARV::Defined::TYPE_ZSUPER = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `definedivar` checks if an instance variable is defined. It is a +# specialization of the `defined` instruction. It accepts three arguments: +# the name of the instance variable, an inline cache, and the string that +# should be pushed onto the stack in the event that the instance variable +# is defined. +# +# ### Usage +# +# ~~~ruby +# defined?(@value) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1011 +class SyntaxTree::YARV::DefinedIVar < ::SyntaxTree::YARV::Instruction + # @return [DefinedIVar] a new instance of DefinedIVar + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1014 + def initialize(name, cache, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1035 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1048 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1031 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1020 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1040 + def length; end + + # Returns the value of attribute message. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 + def message; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1044 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1027 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#5 +class SyntaxTree::YARV::Disassembler + # @return [Disassembler] a new instance of Disassembler + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#46 + def initialize(current_iseq = T.unsafe(nil)); end + + # Helpers for various instructions + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#58 + def calldata(value); end + + # Returns the value of attribute current_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 + def current_iseq; end + + # Sets the attribute current_iseq + # + # @param value the value to set the attribute current_iseq to. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 + def current_iseq=(_arg0); end + + # Returns the value of attribute current_prefix. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#43 + def current_prefix; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#62 + def enqueue(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#66 + def event(name); end + + # Entrypoints + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#116 + def format!; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#123 + def format_insns!(insns, length = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#87 + def inline_storage(cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#91 + def instruction(name, operands = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#95 + def label(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#99 + def local(index, explicit: T.unsafe(nil), implicit: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#108 + def object(value); end + + # Returns the value of attribute output. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 + def output; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#167 + def print(string); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#171 + def puts(string); end + + # Returns the value of attribute queue. + # + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 + def queue; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#175 + def string; end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#179 + def with_prefix(value); end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#192 + def format_iseq(iseq); end +end + +# This class is another object that handles disassembling a YARV +# instruction sequence but it renders it without any of the extra spacing +# or alignment. +# +# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#9 +class SyntaxTree::YARV::Disassembler::Squished + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#10 + def calldata(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#14 + def enqueue(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#17 + def event(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#20 + def inline_storage(cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#24 + def instruction(name, operands = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#28 + def label(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#32 + def local(index, **_arg1); end + + # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#36 + def object(value); end +end + +# ### Summary +# +# `dup` copies the top value of the stack and pushes it onto the stack. +# +# ### Usage +# +# ~~~ruby +# $global = 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1206 +class SyntaxTree::YARV::Dup < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1219 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1231 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1215 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1207 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1223 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1227 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1235 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1211 + def to_a(_iseq); end +end + +# ### Summary +# +# `duparray` dups an Array literal and pushes it onto the stack. +# +# ### Usage +# +# ~~~ruby +# [true] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1250 +class SyntaxTree::YARV::DupArray < ::SyntaxTree::YARV::Instruction + # @return [DupArray] a new instance of DupArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1253 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1269 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1281 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1265 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1257 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1273 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1251 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1277 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1261 + def to_a(_iseq); end +end + +# ### Summary +# +# `duphash` dups a Hash literal and pushes it onto the stack. +# +# ### Usage +# +# ~~~ruby +# { a: 1 } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1296 +class SyntaxTree::YARV::DupHash < ::SyntaxTree::YARV::Instruction + # @return [DupHash] a new instance of DupHash + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1299 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1315 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1327 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1311 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1303 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1319 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1297 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1323 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1307 + def to_a(_iseq); end +end + +# ### Summary +# +# `dupn` duplicates the top `n` stack elements. +# +# ### Usage +# +# ~~~ruby +# Object::X ||= true +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1342 +class SyntaxTree::YARV::DupN < ::SyntaxTree::YARV::Instruction + # @return [DupN] a new instance of DupN + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1345 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1361 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1373 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1357 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1349 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1365 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1343 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1369 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1353 + def to_a(_iseq); end +end + +# ### Summary +# +# `expandarray` looks at the top of the stack, and if the value is an array +# it replaces it on the stack with `number` elements of the array, or `nil` +# if the elements are missing. +# +# ### Usage +# +# ~~~ruby +# x, = [true, false, nil] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1392 +class SyntaxTree::YARV::ExpandArray < ::SyntaxTree::YARV::Instruction + # @return [ExpandArray] a new instance of ExpandArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1395 + def initialize(number, flags); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1412 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1429 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1408 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1400 + def disasm(fmt); end + + # Returns the value of attribute flags. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 + def flags; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1417 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1421 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1425 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1404 + def to_a(_iseq); end +end + +# ### Summary +# +# `getblockparam` is a similar instruction to `getlocal` in that it looks +# for a local variable in the current instruction sequence's local table and +# walks recursively up the parent instruction sequences until it finds it. +# The local it retrieves, however, is a special block local that was passed +# to the current method. It pushes the value of the block local onto the +# stack. +# +# ### Usage +# +# ~~~ruby +# def foo(&block) +# block +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1486 +class SyntaxTree::YARV::GetBlockParam < ::SyntaxTree::YARV::Instruction + # @return [GetBlockParam] a new instance of GetBlockParam + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1489 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1508 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1521 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1504 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1494 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1513 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1517 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1498 + def to_a(iseq); end +end + +# ### Summary +# +# `getblockparamproxy` is almost the same as `getblockparam` except that it +# pushes a proxy object onto the stack instead of the actual value of the +# block local. This is used when a method is being called on the block +# local. +# +# ### Usage +# +# ~~~ruby +# def foo(&block) +# block.call +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1541 +class SyntaxTree::YARV::GetBlockParamProxy < ::SyntaxTree::YARV::Instruction + # @return [GetBlockParamProxy] a new instance of GetBlockParamProxy + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1544 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1566 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1579 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1562 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1549 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1571 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1575 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1556 + def to_a(iseq); end +end + +# ### Summary +# +# `getclassvariable` looks for a class variable in the current class and +# pushes its value onto the stack. It uses an inline cache to reduce the +# need to lookup the class variable in the class hierarchy every time. +# +# ### Usage +# +# ~~~ruby +# @@class_variable +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1596 +class SyntaxTree::YARV::GetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [GetClassVariable] a new instance of GetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1599 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1619 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1632 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1615 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1604 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1624 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1628 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1611 + def to_a(_iseq); end +end + +# ### Summary +# +# `getconstant` performs a constant lookup and pushes the value of the +# constant onto the stack. It pops both the class it should look in and +# whether or not it should look globally as well. +# +# ### Usage +# +# ~~~ruby +# Constant +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1651 +class SyntaxTree::YARV::GetConstant < ::SyntaxTree::YARV::Instruction + # @return [GetConstant] a new instance of GetConstant + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1654 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1670 + def ==(other); end + + # @raise [NameError] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1686 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1666 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1658 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1674 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1652 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1678 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1682 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1662 + def to_a(_iseq); end +end + +# ### Summary +# +# `getglobal` pushes the value of a global variables onto the stack. +# +# ### Usage +# +# ~~~ruby +# $$ +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1717 +class SyntaxTree::YARV::GetGlobal < ::SyntaxTree::YARV::Instruction + # @return [GetGlobal] a new instance of GetGlobal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1720 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1736 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1748 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1732 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1724 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1740 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1718 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1744 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1728 + def to_a(_iseq); end +end + +# ### Summary +# +# `getinstancevariable` pushes the value of an instance variable onto the +# stack. It uses an inline cache to avoid having to look up the instance +# variable in the class hierarchy every time. +# +# This instruction has two forms, but both have the same structure. Before +# Ruby 3.2, the inline cache corresponded to both the get and set +# instructions and could be shared. Since Ruby 3.2, it uses object shapes +# instead so the caches are unique per instruction. +# +# ### Usage +# +# ~~~ruby +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1772 +class SyntaxTree::YARV::GetInstanceVariable < ::SyntaxTree::YARV::Instruction + # @return [GetInstanceVariable] a new instance of GetInstanceVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1775 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1795 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1808 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1791 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1780 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1800 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1804 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1787 + def to_a(_iseq); end +end + +# ### Summary +# +# `getlocal` fetches the value of a local variable from a frame determined +# by the level and index arguments. The level is the number of frames back +# to look and the index is the index in the local table. It pushes the value +# it finds onto the stack. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# tap { tap { value } } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1828 +class SyntaxTree::YARV::GetLocal < ::SyntaxTree::YARV::Instruction + # @return [GetLocal] a new instance of GetLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1831 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1850 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1862 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1846 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1836 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1854 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1858 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1840 + def to_a(iseq); end +end + +# ### Summary +# +# `getlocal_WC_0` is a specialized version of the `getlocal` instruction. It +# fetches the value of a local variable from the current frame determined by +# the index given as its only argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# value +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1880 +class SyntaxTree::YARV::GetLocalWC0 < ::SyntaxTree::YARV::Instruction + # @return [GetLocalWC0] a new instance of GetLocalWC0 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1883 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1899 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1915 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1911 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1895 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1887 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1881 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1903 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1907 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1891 + def to_a(iseq); end +end + +# ### Summary +# +# `getlocal_WC_1` is a specialized version of the `getlocal` instruction. It +# fetches the value of a local variable from the parent frame determined by +# the index given as its only argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# self.then { value } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1933 +class SyntaxTree::YARV::GetLocalWC1 < ::SyntaxTree::YARV::Instruction + # @return [GetLocalWC1] a new instance of GetLocalWC1 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1936 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1952 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1968 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1964 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1948 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1940 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1934 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1956 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1960 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1944 + def to_a(iseq); end +end + +# ### Summary +# +# `getspecial` pushes the value of a special local variable onto the stack. +# +# ### Usage +# +# ~~~ruby +# 1 if (a == 1) .. (b == 2) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1983 +class SyntaxTree::YARV::GetSpecial < ::SyntaxTree::YARV::Instruction + # @return [GetSpecial] a new instance of GetSpecial + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1990 + def initialize(key, type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2007 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2019 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2003 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1995 + def disasm(fmt); end + + # Returns the value of attribute key. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 + def key; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2011 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2015 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1999 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 + def type; end +end + +# $~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1985 +SyntaxTree::YARV::GetSpecial::SVAR_BACKREF = T.let(T.unsafe(nil), Integer) + +# flipflop +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1986 +SyntaxTree::YARV::GetSpecial::SVAR_FLIPFLOP_START = T.let(T.unsafe(nil), Integer) + +# $_ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1984 +SyntaxTree::YARV::GetSpecial::SVAR_LASTLINE = T.let(T.unsafe(nil), Integer) + +# This is a base class for all YARV instructions. It provides a few +# convenience methods for working with instructions. +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#7 +class SyntaxTree::YARV::Instruction + # This returns an array of labels. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#33 + def branch_targets; end + + # This method creates an instruction that represents the canonical + # (non-specialized) form of this instruction. If this instruction is not + # a specialized instruction, then this method returns `self`. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#11 + def canonical; end + + # Whether or not this instruction falls through to the next instruction if + # its branching fails. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#44 + def falls_through?; end + + # Whether or not this instruction leaves the current frame. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#38 + def leaves?; end + + # This returns the size of the instruction in terms of the number of slots + # it occupies in the instruction sequence. Effectively this is 1 plus the + # number of operands. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#18 + def length; end + + # This returns the number of values that are popped off the stack. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#28 + def pops; end + + # This returns the number of values that are pushed onto the stack. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#23 + def pushes; end + + # Does the instruction have side effects? Control-flow counts as a + # side-effect, as do some special-case instructions like Leave. By default + # every instruction is marked as having side effects. + # + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#51 + def side_effects?; end +end + +# This class is meant to mirror RubyVM::InstructionSequence. It contains a +# list of instructions along with the metadata pertaining to them. It also +# functions as a builder for the instruction sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#9 +class SyntaxTree::YARV::InstructionSequence + # @return [InstructionSequence] a new instance of InstructionSequence + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#168 + def initialize(name, file, line, type, parent_iseq = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#636 + def adjuststack(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#640 + def anytostring; end + + # Returns the value of attribute argument_options. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#143 + def argument_options; end + + # This is the list of information about the arguments to this + # instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 + def argument_size; end + + # This is the list of information about the arguments to this + # instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 + def argument_size=(_arg0); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#456 + def block_child_iseq(line); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#644 + def branchif(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648 + def branchnil(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652 + def branchunless(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#549 + def catch_break(iseq, begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559 + def catch_ensure(iseq, begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#569 + def catch_next(begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#579 + def catch_redo(begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#589 + def catch_rescue(iseq, begin_label, end_label, exit_label, restore_sp); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#599 + def catch_retry(begin_label, end_label, exit_label, restore_sp); end + + # The catch table for this instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#146 + def catch_table; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656 + def checkkeyword(keyword_bits_index, keyword_index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660 + def checkmatch(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664 + def checktype(type); end + + # Child instruction sequence methods + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#452 + def child_iseq(name, line, type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#462 + def class_child_iseq(name, line); end + + # This method converts our linked list of instructions into a final array + # and performs any other compilation steps necessary. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#305 + def compile!; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668 + def concatarray; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672 + def concatstrings(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676 + def defineclass(name, class_iseq, flags); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680 + def defined(type, name, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684 + def definedivar(name, cache, message); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#693 + def definemethod(name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#697 + def definesmethod(name, method_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#292 + def disasm; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#701 + def dup; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#705 + def duparray(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709 + def duphash(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713 + def dupn(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#232 + def eval; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#632 + def event(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717 + def expandarray(length, flags); end + + # The source location of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 + def file; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721 + def getblockparam(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725 + def getblockparamproxy(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729 + def getclassvariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737 + def getconstant(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741 + def getglobal(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745 + def getinstancevariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753 + def getlocal(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#772 + def getspecial(key, type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#207 + def inline_storage; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#213 + def inline_storage_for(name); end + + # The hash of names of instance and class variables pointing to the + # index of their associated inline storage. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#156 + def inline_storages; end + + # The list of instructions for this instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#149 + def insns; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#299 + def inspect; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#776 + def intern; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#780 + def invokeblock(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#784 + def invokesuper(calldata, block_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788 + def jump(label); end + + # Instruction push methods + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#613 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792 + def leave; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#219 + def length; end + + # The source location of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 + def line; end + + # The table of local variables. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#152 + def local_table; end + + # Query methods + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#199 + def local_variable(name, level = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#466 + def method_child_iseq(name, line); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#470 + def module_child_iseq(name, line); end + + # The name of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#129 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796 + def newarray(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800 + def newarraykwsplat(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804 + def newhash(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808 + def newrange(exclude_end); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812 + def nop; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816 + def objtostring(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820 + def once(iseq, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824 + def opt_aref_with(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828 + def opt_aset_with(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832 + def opt_case_dispatch(case_dispatch_hash, else_label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836 + def opt_getconstant_path(names); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#872 + def opt_getinlinecache(label, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#876 + def opt_setinlinecache(cache); end + + # These are various compilation options provided. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#166 + def options; end + + # The parent instruction sequence, if there is one. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#138 + def parent_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#880 + def pop; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#617 + def push(value); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#884 + def putnil; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888 + def putobject(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#906 + def putself; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#910 + def putspecialobject(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#914 + def putstring(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#918 + def send(calldata, block_iseq = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922 + def setblockparam(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926 + def setclassvariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934 + def setconstant(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938 + def setglobal(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942 + def setinstancevariable(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950 + def setlocal(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#969 + def setn(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#973 + def setspecial(key); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#474 + def singleton_class_child_iseq(line); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#341 + def specialize_instructions!; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#977 + def splatarray(flag); end + + # An object that will track the current size of the stack and the + # maximum size of the stack for this instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#163 + def stack; end + + # The index of the next inline storage that will be created. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#159 + def storage_index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#981 + def swap; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985 + def throw(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#236 + def to_a; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#280 + def to_cfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#284 + def to_dfg; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#288 + def to_son; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989 + def topn(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993 + def toregexp(options, length); end + + # The type of the instruction sequence. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#135 + def type; end + + class << self + # This method will create a new instruction sequence from a serialized + # RubyVM::InstructionSequence object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#999 + def from(source, options = T.unsafe(nil), parent_iseq = T.unsafe(nil)); end + + # This provides a handle to the rb_iseq_load function, which allows you + # to pass a serialized iseq to Ruby and have it return a + # RubyVM::InstructionSequence object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#13 + def iseq_load(iseq); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#494 +class SyntaxTree::YARV::InstructionSequence::CatchBreak < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#495 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#507 +class SyntaxTree::YARV::InstructionSequence::CatchEnsure < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#508 + def to_a; end +end + +# Catch table methods +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482 +class SyntaxTree::YARV::InstructionSequence::CatchEntry + # @return [CatchEntry] a new instance of CatchEntry + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#485 + def initialize(iseq, begin_label, end_label, exit_label, restore_sp); end + + # Returns the value of attribute begin_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + def begin_label; end + + # Returns the value of attribute end_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + def end_label; end + + # Returns the value of attribute exit_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + def exit_label; end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + def iseq; end + + # Returns the value of attribute restore_sp. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#483 + def restore_sp; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#519 +class SyntaxTree::YARV::InstructionSequence::CatchNext < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#520 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#525 +class SyntaxTree::YARV::InstructionSequence::CatchRedo < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#526 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#531 +class SyntaxTree::YARV::InstructionSequence::CatchRescue < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#532 + def to_a; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#543 +class SyntaxTree::YARV::InstructionSequence::CatchRetry < ::SyntaxTree::YARV::InstructionSequence::CatchEntry + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#544 + def to_a; end +end + +# When the list of instructions is first being created, it's stored as a +# linked list. This is to make it easier to perform peephole optimizations +# and other transformations like instruction specialization. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#35 +class SyntaxTree::YARV::InstructionSequence::InstructionList + include ::Enumerable + + # @return [InstructionList] a new instance of InstructionList + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#48 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#53 + def each(&_blk); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#58 + def each_node; end + + # Returns the value of attribute head_node. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 + def head_node; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#68 + def push(instruction); end + + # Returns the value of attribute tail_node. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 + def tail_node; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#36 +class SyntaxTree::YARV::InstructionSequence::InstructionList::Node + # @return [Node] a new instance of Node + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#39 + def initialize(value, next_node = T.unsafe(nil)); end + + # Returns the value of attribute next_node. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def next_node; end + + # Sets the attribute next_node + # + # @param value the value to set the attribute next_node to. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def next_node=(_arg0); end + + # Returns the value of attribute value. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 + def value=(_arg0); end +end + +# This represents the destination of instructions that jump. Initially it +# does not track its position so that when we perform optimizations the +# indices don't get messed up. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#107 +class SyntaxTree::YARV::InstructionSequence::Label + # @return [Label] a new instance of Label + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#115 + def initialize(name = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#123 + def inspect; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#108 + def name; end + + # When we're serializing the instruction sequence, we need to be able to + # look up the label from the branch instructions and then access the + # subsequent node. So we'll store the reference here. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 + def node; end + + # When we're serializing the instruction sequence, we need to be able to + # look up the label from the branch instructions and then access the + # subsequent node. So we'll store the reference here. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 + def node=(_arg0); end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#119 + def patch!(name); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#83 +SyntaxTree::YARV::InstructionSequence::MAGIC = T.let(T.unsafe(nil), String) + +# This object is used to track the size of the stack at any given time. It +# is effectively a mini symbolic interpreter. It's necessary because when +# instruction sequences get serialized they include a :stack_max field on +# them. This field is used to determine how much stack space to allocate +# for the instruction sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#90 +class SyntaxTree::YARV::InstructionSequence::Stack + # @return [Stack] a new instance of Stack + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#93 + def initialize; end + + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#98 + def change_by(value); end + + # Returns the value of attribute current_size. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 + def current_size; end + + # Returns the value of attribute maximum_size. + # + # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 + def maximum_size; end +end + +# ### Summary +# +# `intern` converts the top element of the stack to a symbol and pushes the +# symbol onto the stack. +# +# ### Usage +# +# ~~~ruby +# :"#{"foo"}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2042 +class SyntaxTree::YARV::Intern < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2055 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2067 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2051 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2043 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2059 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2063 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2047 + def to_a(_iseq); end +end + +# ### Summary +# +# `invokeblock` invokes the block given to the current method. It pops the +# arguments for the block off the stack and pushes the result of running the +# block onto the stack. +# +# ### Usage +# +# ~~~ruby +# def foo +# yield +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2086 +class SyntaxTree::YARV::InvokeBlock < ::SyntaxTree::YARV::Instruction + # @return [InvokeBlock] a new instance of InvokeBlock + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2089 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2105 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2121 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2087 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2101 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2093 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2109 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2113 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2117 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2097 + def to_a(_iseq); end +end + +# ### Summary +# +# `invokesuper` is similar to the `send` instruction, except that it calls +# the super method. It pops the receiver and arguments off the stack and +# pushes the return value onto the stack. +# +# ### Usage +# +# ~~~ruby +# def foo +# super +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2140 +class SyntaxTree::YARV::InvokeSuper < ::SyntaxTree::YARV::Instruction + # @return [InvokeSuper] a new instance of InvokeSuper + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2143 + def initialize(calldata, block_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2164 + def ==(other); end + + # Returns the value of attribute block_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 + def block_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2178 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2160 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2148 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2169 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2174 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2156 + def to_a(_iseq); end +end + +# ### Summary +# +# `jump` unconditionally jumps to the label given as its only argument. +# +# ### Usage +# +# ~~~ruby +# x = 0 +# if x == 0 +# puts "0" +# else +# puts "2" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2217 +class SyntaxTree::YARV::Jump < ::SyntaxTree::YARV::Instruction + # @return [Jump] a new instance of Jump + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2220 + def initialize(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2236 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2248 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2244 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2232 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2224 + def disasm(fmt); end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2218 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2240 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2228 + def to_a(_iseq); end +end + +# ### Summary +# +# `leave` exits the current frame. +# +# ### Usage +# +# ~~~ruby +# ;; +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2263 +class SyntaxTree::YARV::Leave < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2276 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2290 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2272 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2264 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2294 + def leaves?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2280 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2284 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2268 + def to_a(_iseq); end +end + +# This module contains the instructions that used to be a part of YARV but +# have been replaced or removed in more recent versions. +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#7 +module SyntaxTree::YARV::Legacy; end + +# ### Summary +# +# `getclassvariable` looks for a class variable in the current class and +# pushes its value onto the stack. +# +# This version of the `getclassvariable` instruction is no longer used +# since in Ruby 3.0 it gained an inline cache.` +# +# ### Usage +# +# ~~~ruby +# @@class_variable +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#22 +class SyntaxTree::YARV::Legacy::GetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [GetClassVariable] a new instance of GetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#25 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#41 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#57 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#53 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#37 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#29 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#45 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#23 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#49 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#33 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_getinlinecache` is a wrapper around a series of `putobject` and +# `getconstant` instructions that allows skipping past them if the inline +# cache is currently set. It pushes the value of the cache onto the stack +# if it is set, otherwise it pushes `nil`. +# +# This instruction is no longer used since in Ruby 3.2 it was replaced by +# the consolidated `opt_getconstant_path` instruction. +# +# ### Usage +# +# ~~~ruby +# Constant +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#78 +class SyntaxTree::YARV::Legacy::OptGetInlineCache < ::SyntaxTree::YARV::Instruction + # @return [OptGetInlineCache] a new instance of OptGetInlineCache + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#81 + def initialize(label, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#101 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#118 + def branch_targets; end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#114 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#97 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#86 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#122 + def falls_through?; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 + def label; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#106 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#110 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#93 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_setinlinecache` sets an inline cache for a constant lookup. It pops +# the value it should set off the top of the stack. It uses this value to +# set the cache. It then pushes that value back onto the top of the stack. +# +# This instruction is no longer used since in Ruby 3.2 it was replaced by +# the consolidated `opt_getconstant_path` instruction. +# +# ### Usage +# +# ~~~ruby +# Constant +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142 +class SyntaxTree::YARV::Legacy::OptSetInlineCache < ::SyntaxTree::YARV::Instruction + # @return [OptSetInlineCache] a new instance of OptSetInlineCache + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#145 + def initialize(cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#161 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#143 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#177 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#157 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#149 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#165 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#169 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#173 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#153 + def to_a(_iseq); end +end + +# ### Summary +# +# `setclassvariable` looks for a class variable in the current class and +# sets its value to the value it pops off the top of the stack. +# +# This version of the `setclassvariable` instruction is no longer used +# since in Ruby 3.0 it gained an inline cache. +# +# ### Usage +# +# ~~~ruby +# @@class_variable = 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#195 +class SyntaxTree::YARV::Legacy::SetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [SetClassVariable] a new instance of SetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#230 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#196 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206 + def to_a(_iseq); end +end + +# This represents every local variable associated with an instruction +# sequence. There are two kinds of locals: plain locals that are what you +# expect, and block proxy locals, which represent local variables +# associated with blocks that were passed into the current instruction +# sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#10 +class SyntaxTree::YARV::LocalTable + # @return [LocalTable] a new instance of LocalTable + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#43 + def initialize; end + + # Add a BlockLocal to the local table. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#73 + def block(name); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#47 + def empty?; end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#51 + def find(name, level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#56 + def has?(name); end + + # Returns the value of attribute locals. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#41 + def locals; end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#64 + def name_at(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#60 + def names; end + + # This is the offset from the top of the stack where this local variable + # lives. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#84 + def offset(index); end + + # Add a PlainLocal to the local table. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#78 + def plain(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#68 + def size; end +end + +# A local representing a block passed into the current instruction +# sequence. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#13 +class SyntaxTree::YARV::LocalTable::BlockLocal + # @return [BlockLocal] a new instance of BlockLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#16 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#14 + def name; end +end + +# The result of looking up a local variable in the current local table. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#31 +class SyntaxTree::YARV::LocalTable::Lookup + # @return [Lookup] a new instance of Lookup + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#34 + def initialize(local, index, level); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 + def index; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 + def level; end + + # Returns the value of attribute local. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 + def local; end +end + +# A regular local variable. +# +# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#22 +class SyntaxTree::YARV::LocalTable::PlainLocal + # @return [PlainLocal] a new instance of PlainLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#25 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#23 + def name; end +end + +# ### Summary +# +# `newarray` puts a new array initialized with `number` values from the +# stack. It pops `number` values off the stack and pushes the array onto the +# stack. +# +# ### Usage +# +# ~~~ruby +# ["string"] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2311 +class SyntaxTree::YARV::NewArray < ::SyntaxTree::YARV::Instruction + # @return [NewArray] a new instance of NewArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2314 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2330 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2346 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2326 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2318 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2334 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2312 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2338 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2342 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2322 + def to_a(_iseq); end +end + +# ### Summary +# +# `newarraykwsplat` is a specialized version of `newarray` that takes a ** +# splat argument. It pops `number` values off the stack and pushes the array +# onto the stack. +# +# ### Usage +# +# ~~~ruby +# ["string", **{ foo: "bar" }] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2363 +class SyntaxTree::YARV::NewArrayKwSplat < ::SyntaxTree::YARV::Instruction + # @return [NewArrayKwSplat] a new instance of NewArrayKwSplat + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2366 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2382 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2398 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2378 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2370 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2386 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2364 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2390 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2394 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2374 + def to_a(_iseq); end +end + +# ### Summary +# +# `newhash` puts a new hash onto the stack, using `number` elements from the +# stack. `number` needs to be even. It pops `number` elements off the stack +# and pushes a hash onto the stack. +# +# ### Usage +# +# ~~~ruby +# def foo(key, value) +# { key => value } +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2417 +class SyntaxTree::YARV::NewHash < ::SyntaxTree::YARV::Instruction + # @return [NewHash] a new instance of NewHash + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2420 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2436 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2452 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2432 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2424 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2440 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2418 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2444 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2448 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2428 + def to_a(_iseq); end +end + +# ### Summary +# +# `newrange` creates a new range object from the top two values on the +# stack. It pops both of them off, and then pushes on the new range. It +# takes one argument which is 0 if the end is included or 1 if the end value +# is excluded. +# +# ### Usage +# +# ~~~ruby +# x = 0 +# y = 1 +# p (x..y), (x...y) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2472 +class SyntaxTree::YARV::NewRange < ::SyntaxTree::YARV::Instruction + # @return [NewRange] a new instance of NewRange + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2475 + def initialize(exclude_end); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2491 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2507 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2487 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2479 + def disasm(fmt); end + + # Returns the value of attribute exclude_end. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2473 + def exclude_end; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2495 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2499 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2503 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2483 + def to_a(_iseq); end +end + +# ### Summary +# +# `nop` is a no-operation instruction. It is used to pad the instruction +# sequence so there is a place for other instructions to jump to. +# +# ### Usage +# +# ~~~ruby +# raise rescue true +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2523 +class SyntaxTree::YARV::Nop < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2536 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2540 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2532 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2524 + def disasm(fmt); end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2543 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2528 + def to_a(_iseq); end +end + +# ### Summary +# +# `objtostring` pops a value from the stack, calls `to_s` on that value and +# then pushes the result back to the stack. +# +# It has various fast paths for classes like String, Symbol, Module, Class, +# etc. For everything else it calls `to_s`. +# +# ### Usage +# +# ~~~ruby +# "#{5}" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2562 +class SyntaxTree::YARV::ObjToString < ::SyntaxTree::YARV::Instruction + # @return [ObjToString] a new instance of ObjToString + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2565 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2581 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2597 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2563 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2577 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2569 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2585 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2589 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2593 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2573 + def to_a(_iseq); end +end + +# ### Summary +# +# `once` is an instruction that wraps an instruction sequence and ensures +# that is it only ever executed once for the lifetime of the program. It +# uses a cache to ensure that it is only executed once. It pushes the result +# of running the instruction sequence onto the stack. +# +# ### Usage +# +# ~~~ruby +# END { puts "END" } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2615 +class SyntaxTree::YARV::Once < ::SyntaxTree::YARV::Instruction + # @return [Once] a new instance of Once + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2618 + def initialize(iseq, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2636 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2648 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2632 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2623 + def disasm(fmt); end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 + def iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2640 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2644 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2628 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_and` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `&` operator is used. There is a fast path for if +# both operands are integers. It pops both the receiver and the argument off +# the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 & 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2668 +class SyntaxTree::YARV::OptAnd < ::SyntaxTree::YARV::Instruction + # @return [OptAnd] a new instance of OptAnd + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2671 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2687 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2707 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2669 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2703 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2683 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2675 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2691 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2695 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2699 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2679 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aref` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `[]` operator is used. There are fast paths if the +# receiver is an integer, array, or hash. +# +# ### Usage +# +# ~~~ruby +# 7[2] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2724 +class SyntaxTree::YARV::OptAref < ::SyntaxTree::YARV::Instruction + # @return [OptAref] a new instance of OptAref + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2727 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2743 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2763 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2725 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2759 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2739 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2731 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2747 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2751 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2755 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2735 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aref_with` is a specialization of the `opt_aref` instruction that +# occurs when the `[]` operator is used with a string argument known at +# compile time. There are fast paths if the receiver is a hash. It pops the +# receiver off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# { 'test' => true }['test'] +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2781 +class SyntaxTree::YARV::OptArefWith < ::SyntaxTree::YARV::Instruction + # @return [OptArefWith] a new instance of OptArefWith + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2784 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2804 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2821 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2800 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2789 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2809 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2813 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2817 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2796 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aset` is an instruction for setting the hash value by the key in +# the `recv[obj] = set` format. It is a specialization of the +# `opt_send_without_block` instruction. It pops the receiver, the key, and +# the value off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# {}[:key] = value +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2839 +class SyntaxTree::YARV::OptAset < ::SyntaxTree::YARV::Instruction + # @return [OptAset] a new instance of OptAset + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2842 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2858 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2878 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2840 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2874 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2854 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2846 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2862 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2866 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2870 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2850 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_aset_with` is an instruction for setting the hash value by the known +# string key in the `recv[obj] = set` format. It pops the receiver and the +# value off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# {}["key"] = value +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2895 +class SyntaxTree::YARV::OptAsetWith < ::SyntaxTree::YARV::Instruction + # @return [OptAsetWith] a new instance of OptAsetWith + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2898 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2918 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2935 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2914 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2903 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2923 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2927 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2931 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2910 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_case_dispatch` is a branch instruction that moves the control flow +# for case statements that have clauses where they can all be used as hash +# keys for an internal hash. +# +# It has two arguments: the `case_dispatch_hash` and an `else_label`. It +# pops one value off the stack: a hash key. `opt_case_dispatch` looks up the +# key in the `case_dispatch_hash` and jumps to the corresponding label if +# there is one. If there is no value in the `case_dispatch_hash`, +# `opt_case_dispatch` jumps to the `else_label` index. +# +# ### Usage +# +# ~~~ruby +# case 1 +# when 1 +# puts "foo" +# else +# puts "bar" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2964 +class SyntaxTree::YARV::OptCaseDispatch < ::SyntaxTree::YARV::Instruction + # @return [OptCaseDispatch] a new instance of OptCaseDispatch + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2967 + def initialize(case_dispatch_hash, else_label); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2991 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3009 + def branch_targets; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3005 + def call(vm); end + + # Returns the value of attribute case_dispatch_hash. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 + def case_dispatch_hash; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2987 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2972 + def disasm(fmt); end + + # Returns the value of attribute else_label. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 + def else_label; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3013 + def falls_through?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2997 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3001 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2979 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_div` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `/` operator is used. There are fast paths for if +# both operands are integers, or if both operands are floats. It pops both +# the receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 / 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3031 +class SyntaxTree::YARV::OptDiv < ::SyntaxTree::YARV::Instruction + # @return [OptDiv] a new instance of OptDiv + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3034 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3050 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3070 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3032 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3066 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3046 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3038 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3054 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3058 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3062 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3042 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_empty_p` is an optimization applied when the method `empty?` is +# called. It pops the receiver off the stack and pushes on the result of the +# method call. +# +# ### Usage +# +# ~~~ruby +# "".empty? +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3087 +class SyntaxTree::YARV::OptEmptyP < ::SyntaxTree::YARV::Instruction + # @return [OptEmptyP] a new instance of OptEmptyP + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3090 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3106 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3126 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3088 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3122 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3102 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3094 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3110 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3114 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3118 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3098 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_eq` is a specialization of the `opt_send_without_block` instruction +# that occurs when the == operator is used. Fast paths exist when both +# operands are integers, floats, symbols or strings. It pops both the +# receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 == 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3144 +class SyntaxTree::YARV::OptEq < ::SyntaxTree::YARV::Instruction + # @return [OptEq] a new instance of OptEq + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3147 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3163 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3183 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3145 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3179 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3159 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3151 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3167 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3171 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3175 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3155 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_ge` is a specialization of the `opt_send_without_block` instruction +# that occurs when the >= operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 4 >= 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3201 +class SyntaxTree::YARV::OptGE < ::SyntaxTree::YARV::Instruction + # @return [OptGE] a new instance of OptGE + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3204 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3220 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3240 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3202 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3236 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3216 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3208 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3224 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3228 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3232 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3212 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_gt` is a specialization of the `opt_send_without_block` instruction +# that occurs when the > operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 4 > 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3314 +class SyntaxTree::YARV::OptGT < ::SyntaxTree::YARV::Instruction + # @return [OptGT] a new instance of OptGT + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3317 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3333 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3353 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3315 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3349 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3329 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3321 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3337 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3341 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3345 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3325 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_getconstant_path` performs a constant lookup on a chain of constant +# names. It accepts as its argument an array of constant names, and pushes +# the value of the constant onto the stack. +# +# ### Usage +# +# ~~~ruby +# ::Object +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3257 +class SyntaxTree::YARV::OptGetConstantPath < ::SyntaxTree::YARV::Instruction + # @return [OptGetConstantPath] a new instance of OptGetConstantPath + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3260 + def initialize(names); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3277 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3289 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3273 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3264 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3281 + def length; end + + # Returns the value of attribute names. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3258 + def names; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3285 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3269 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_le` is a specialization of the `opt_send_without_block` instruction +# that occurs when the <= operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 3 <= 4 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3371 +class SyntaxTree::YARV::OptLE < ::SyntaxTree::YARV::Instruction + # @return [OptLE] a new instance of OptLE + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3374 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3390 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3410 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3372 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3406 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3386 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3378 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3394 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3398 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3402 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3382 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_lt` is a specialization of the `opt_send_without_block` instruction +# that occurs when the < operator is used. Fast paths exist when both +# operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 3 < 4 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3485 +class SyntaxTree::YARV::OptLT < ::SyntaxTree::YARV::Instruction + # @return [OptLT] a new instance of OptLT + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3488 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3504 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3524 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3486 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3520 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3500 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3492 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3508 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3512 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3516 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3496 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_ltlt` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `<<` operator is used. Fast paths exists when the +# receiver is either a String or an Array. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# "" << 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3542 +class SyntaxTree::YARV::OptLTLT < ::SyntaxTree::YARV::Instruction + # @return [OptLTLT] a new instance of OptLTLT + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3545 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3561 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3581 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3543 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3577 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3557 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3549 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3565 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3569 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3573 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3553 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_length` is a specialization of `opt_send_without_block`, when the +# `length` method is called. There are fast paths when the receiver is +# either a string, hash, or array. It pops the receiver off the stack and +# pushes on the result of the method call. +# +# ### Usage +# +# ~~~ruby +# "".length +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3428 +class SyntaxTree::YARV::OptLength < ::SyntaxTree::YARV::Instruction + # @return [OptLength] a new instance of OptLength + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3431 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3447 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3467 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3429 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3463 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3443 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3435 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3451 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3455 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3459 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3439 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_minus` is a specialization of the `opt_send_without_block` +# instruction that occurs when the `-` operator is used. There are fast +# paths for if both operands are integers or if both operands are floats. It +# pops both the receiver and the argument off the stack and pushes on the +# result. +# +# ### Usage +# +# ~~~ruby +# 3 - 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3600 +class SyntaxTree::YARV::OptMinus < ::SyntaxTree::YARV::Instruction + # @return [OptMinus] a new instance of OptMinus + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3603 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3619 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3639 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3601 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3635 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3615 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3607 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3623 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3627 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3631 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3611 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_mod` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `%` operator is used. There are fast paths for if +# both operands are integers or if both operands are floats. It pops both +# the receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 4 % 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3657 +class SyntaxTree::YARV::OptMod < ::SyntaxTree::YARV::Instruction + # @return [OptMod] a new instance of OptMod + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3660 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3676 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3696 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3658 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3692 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3672 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3664 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3680 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3684 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3688 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3668 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_mult` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `*` operator is used. There are fast paths for if +# both operands are integers or floats. It pops both the receiver and the +# argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 3 * 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3714 +class SyntaxTree::YARV::OptMult < ::SyntaxTree::YARV::Instruction + # @return [OptMult] a new instance of OptMult + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3717 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3733 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3753 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3715 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3749 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3729 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3721 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3737 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3741 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3745 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3725 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_neq` is an optimization that tests whether two values at the top of +# the stack are not equal by testing their equality and calling the `!` on +# the result. This allows `opt_neq` to use the fast paths optimized in +# `opt_eq` when both operands are Integers, Floats, Symbols, or Strings. It +# pops both the receiver and the argument off the stack and pushes on the +# result. +# +# ### Usage +# +# ~~~ruby +# 2 != 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3773 +class SyntaxTree::YARV::OptNEq < ::SyntaxTree::YARV::Instruction + # @return [OptNEq] a new instance of OptNEq + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3776 + def initialize(eq_calldata, neq_calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3796 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3813 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3792 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3781 + def disasm(fmt); end + + # Returns the value of attribute eq_calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 + def eq_calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3801 + def length; end + + # Returns the value of attribute neq_calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 + def neq_calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3805 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3809 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3788 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_newarray_max` is a specialization that occurs when the `max` method +# is called on an array literal. It pops the values of the array off the +# stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].max +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3831 +class SyntaxTree::YARV::OptNewArrayMax < ::SyntaxTree::YARV::Instruction + # @return [OptNewArrayMax] a new instance of OptNewArrayMax + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3834 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3850 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3866 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3846 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3838 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3854 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3858 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3862 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3842 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_newarray_min` is a specialization that occurs when the `min` method +# is called on an array literal. It pops the values of the array off the +# stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# [a, b, c].min +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3883 +class SyntaxTree::YARV::OptNewArrayMin < ::SyntaxTree::YARV::Instruction + # @return [OptNewArrayMin] a new instance of OptNewArrayMin + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3886 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3902 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3918 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3898 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3906 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3884 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3910 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3914 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3894 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_nil_p` is an optimization applied when the method `nil?` is called. +# It returns true immediately when the receiver is `nil` and defers to the +# `nil?` method in other cases. It pops the receiver off the stack and +# pushes on the result. +# +# ### Usage +# +# ~~~ruby +# "".nil? +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3936 +class SyntaxTree::YARV::OptNilP < ::SyntaxTree::YARV::Instruction + # @return [OptNilP] a new instance of OptNilP + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3939 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3955 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3975 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3937 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3971 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3951 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3943 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3959 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3963 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3967 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3947 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_not` negates the value on top of the stack by calling the `!` method +# on it. It pops the receiver off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# !true +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3991 +class SyntaxTree::YARV::OptNot < ::SyntaxTree::YARV::Instruction + # @return [OptNot] a new instance of OptNot + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3994 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4010 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4030 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3992 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4026 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4006 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3998 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4014 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4018 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4022 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_or` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `|` operator is used. There is a fast path for if +# both operands are integers. It pops both the receiver and the argument off +# the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 | 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4048 +class SyntaxTree::YARV::OptOr < ::SyntaxTree::YARV::Instruction + # @return [OptOr] a new instance of OptOr + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4051 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4067 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4087 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4049 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4083 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4063 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4055 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4071 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4075 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4079 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_plus` is a specialization of the `opt_send_without_block` instruction +# that occurs when the `+` operator is used. There are fast paths for if +# both operands are integers, floats, strings, or arrays. It pops both the +# receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# 2 + 3 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4105 +class SyntaxTree::YARV::OptPlus < ::SyntaxTree::YARV::Instruction + # @return [OptPlus] a new instance of OptPlus + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4108 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4124 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4144 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4106 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4140 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4120 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4112 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4128 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4132 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4136 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_regexpmatch2` is a specialization of the `opt_send_without_block` +# instruction that occurs when the `=~` operator is used. It pops both the +# receiver and the argument off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# /a/ =~ "a" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4161 +class SyntaxTree::YARV::OptRegExpMatch2 < ::SyntaxTree::YARV::Instruction + # @return [OptRegExpMatch2] a new instance of OptRegExpMatch2 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4164 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4180 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4200 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4162 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4196 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4176 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4168 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4184 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4188 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4192 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_send_without_block` is a specialization of the send instruction that +# occurs when a method is being called without a block. It pops the receiver +# and the arguments off the stack and pushes on the result. +# +# ### Usage +# +# ~~~ruby +# puts "Hello, world!" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4217 +class SyntaxTree::YARV::OptSendWithoutBlock < ::SyntaxTree::YARV::Instruction + # @return [OptSendWithoutBlock] a new instance of OptSendWithoutBlock + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4220 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4236 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4256 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4218 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4252 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4232 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4224 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4240 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4244 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4248 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_size` is a specialization of `opt_send_without_block`, when the +# `size` method is called. There are fast paths when the receiver is either +# a string, hash, or array. It pops the receiver off the stack and pushes on +# the result. +# +# ### Usage +# +# ~~~ruby +# "".size +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4274 +class SyntaxTree::YARV::OptSize < ::SyntaxTree::YARV::Instruction + # @return [OptSize] a new instance of OptSize + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4277 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4293 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4313 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4275 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4309 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4289 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4281 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4297 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4301 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4305 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_str_freeze` pushes a frozen known string value with no interpolation +# onto the stack using the #freeze method. If the method gets overridden, +# this will fall back to a send. +# +# ### Usage +# +# ~~~ruby +# "hello".freeze +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4330 +class SyntaxTree::YARV::OptStrFreeze < ::SyntaxTree::YARV::Instruction + # @return [OptStrFreeze] a new instance of OptStrFreeze + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4333 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4353 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4366 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4331 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4349 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4358 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4331 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4362 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_str_uminus` pushes a frozen known string value with no interpolation +# onto the stack. If the method gets overridden, this will fall back to a +# send. +# +# ### Usage +# +# ~~~ruby +# -"string" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4383 +class SyntaxTree::YARV::OptStrUMinus < ::SyntaxTree::YARV::Instruction + # @return [OptStrUMinus] a new instance of OptStrUMinus + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4386 + def initialize(object, calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4419 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4384 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4411 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4384 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4415 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398 + def to_a(_iseq); end +end + +# ### Summary +# +# `opt_succ` is a specialization of the `opt_send_without_block` instruction +# when the method being called is `succ`. Fast paths exist when the receiver +# is either a String or a Fixnum. It pops the receiver off the stack and +# pushes on the result. +# +# ### Usage +# +# ~~~ruby +# "".succ +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4437 +class SyntaxTree::YARV::OptSucc < ::SyntaxTree::YARV::Instruction + # @return [OptSucc] a new instance of OptSucc + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4440 + def initialize(calldata); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4456 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4476 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4438 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4472 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4452 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4444 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4460 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4464 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4468 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4448 + def to_a(_iseq); end +end + +# ### Summary +# +# `pop` pops the top value off the stack. +# +# ### Usage +# +# ~~~ruby +# a ||= 2 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4491 +class SyntaxTree::YARV::Pop < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4504 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4512 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4500 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4492 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4508 + def pops; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4516 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4496 + def to_a(_iseq); end +end + +# ### Summary +# +# `putnil` pushes a global nil object onto the stack. +# +# ### Usage +# +# ~~~ruby +# nil +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4531 +class SyntaxTree::YARV::PutNil < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536 + def to_a(_iseq); end +end + +# ### Summary +# +# `putobject` pushes a known value onto the stack. +# +# ### Usage +# +# ~~~ruby +# 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4575 +class SyntaxTree::YARV::PutObject < ::SyntaxTree::YARV::Instruction + # @return [PutObject] a new instance of PutObject + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4578 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4576 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586 + def to_a(_iseq); end +end + +# ### Summary +# +# `putobject_INT2FIX_0_` pushes 0 on the stack. It is a specialized +# instruction resulting from the operand unification optimization. It is +# equivalent to `putobject 0`. +# +# ### Usage +# +# ~~~ruby +# 0 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627 +class SyntaxTree::YARV::PutObjectInt2Fix0 < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632 + def to_a(_iseq); end +end + +# ### Summary +# +# `putobject_INT2FIX_1_` pushes 1 on the stack. It is a specialized +# instruction resulting from the operand unification optimization. It is +# equivalent to `putobject 1`. +# +# ### Usage +# +# ~~~ruby +# 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4673 +class SyntaxTree::YARV::PutObjectInt2Fix1 < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4686 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4698 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4694 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4682 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4674 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4690 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4702 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4678 + def to_a(_iseq); end +end + +# ### Summary +# +# `putself` pushes the current value of self onto the stack. +# +# ### Usage +# +# ~~~ruby +# puts "Hello, world!" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4717 +class SyntaxTree::YARV::PutSelf < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4730 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4738 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4726 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4734 + def pushes; end + + # @return [Boolean] + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4742 + def side_effects?; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4722 + def to_a(_iseq); end +end + +# ### Summary +# +# `putspecialobject` pushes one of three special objects onto the stack. +# These are either the VM core special object, the class base special +# object, or the constant base special object. +# +# ### Usage +# +# ~~~ruby +# alias foo bar +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4759 +class SyntaxTree::YARV::PutSpecialObject < ::SyntaxTree::YARV::Instruction + # @return [PutSpecialObject] a new instance of PutSpecialObject + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4766 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4782 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4794 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4778 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4770 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4786 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4764 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4790 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4774 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4761 +SyntaxTree::YARV::PutSpecialObject::OBJECT_CBASE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4762 +SyntaxTree::YARV::PutSpecialObject::OBJECT_CONST_BASE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4760 +SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `putstring` pushes an unfrozen string literal onto the stack. +# +# ### Usage +# +# ~~~ruby +# "foo" +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4818 +class SyntaxTree::YARV::PutString < ::SyntaxTree::YARV::Instruction + # @return [PutString] a new instance of PutString + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821 + def initialize(object); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4849 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4833 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4825 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841 + def length; end + + # Returns the value of attribute object. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4819 + def object; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829 + def to_a(_iseq); end +end + +# A sea of nodes is an intermediate representation used by a compiler to +# represent both control and data flow in the same graph. The way we use it +# allows us to have the vertices of the graph represent either an +# instruction in the instruction sequence or a synthesized node that we add +# to the graph. The edges of the graph represent either control flow or data +# flow. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#11 +class SyntaxTree::YARV::SeaOfNodes + # @return [SeaOfNodes] a new instance of SeaOfNodes + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#462 + def initialize(dfg, nodes, local_graphs); end + + # Returns the value of attribute dfg. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 + def dfg; end + + # Returns the value of attribute local_graphs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 + def local_graphs; end + + # Returns the value of attribute nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 + def nodes; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#468 + def to_mermaid; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#499 + def verify; end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#529 + def compile(dfg); end + end +end + +# The compiler is responsible for taking a data flow graph and turning it +# into a sea of nodes. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#100 +class SyntaxTree::YARV::SeaOfNodes::Compiler + # @return [Compiler] a new instance of Compiler + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#103 + def initialize(dfg); end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#113 + def compile; end + + # Returns the value of attribute dfg. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 + def dfg; end + + # Returns the value of attribute nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 + def nodes; end + + private + + # Eliminate as many unnecessary nodes as we can. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#339 + def cleanup_insn_nodes; end + + # We don't always build things in an optimal way. Go back and fix up + # some mess we left. Ideally we wouldn't create these problems in the + # first place. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#315 + def cleanup_phi_nodes; end + + # Connect one node to another. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#423 + def connect(from, to, type, label = T.unsafe(nil)); end + + # Connect control flow that flows between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#246 + def connect_local_graphs_control(local_graphs); end + + # Connect data flow that flows between basic blocks. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#271 + def connect_local_graphs_data(local_graphs); end + + # Connect all of the inputs to all of the outputs of a node. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#433 + def connect_over(node); end + + # Create a sub-graph for a single basic block - block block argument + # inputs and outputs will be left dangling, to be connected later. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#136 + def create_local_graph(block); end + + # Counter for synthetic nodes. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#130 + def id_counter; end + + # Remove a node from the graph. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#447 + def remove(node); end +end + +# The edge of a graph represents either control flow or data flow. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#67 +class SyntaxTree::YARV::SeaOfNodes::Edge + # @return [Edge] a new instance of Edge + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#75 + def initialize(from, to, type, label); end + + # Returns the value of attribute from. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#70 + def from; end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#73 + def label; end + + # Returns the value of attribute to. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#71 + def to; end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#72 + def type; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#68 +SyntaxTree::YARV::SeaOfNodes::Edge::TYPES = T.let(T.unsafe(nil), Array) + +# This object represents a node in the graph that holds a YARV +# instruction. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#14 +class SyntaxTree::YARV::SeaOfNodes::InsnNode + # @return [InsnNode] a new instance of InsnNode + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#17 + def initialize(insn, offset); end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#25 + def id; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def inputs; end + + # Returns the value of attribute insn. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def insn; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#29 + def label; end + + # Returns the value of attribute offset. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def offset; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 + def outputs; end +end + +# Merge nodes are present in any block that has multiple incoming blocks. +# It provides a place for Phi nodes to attach their results. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#52 +class SyntaxTree::YARV::SeaOfNodes::MergeNode + # @return [MergeNode] a new instance of MergeNode + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#55 + def initialize(id); end + + # Returns the value of attribute id. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 + def id; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 + def inputs; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#61 + def label; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 + def outputs; end +end + +# Phi nodes are used to represent the merging of data flow from multiple +# incoming blocks. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#36 +class SyntaxTree::YARV::SeaOfNodes::PhiNode + # @return [PhiNode] a new instance of PhiNode + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#39 + def initialize(id); end + + # Returns the value of attribute id. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 + def id; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 + def inputs; end + + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#45 + def label; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 + def outputs; end +end + +# A subgraph represents the local data and control flow of a single basic +# block. +# +# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#87 +class SyntaxTree::YARV::SeaOfNodes::SubGraph + # @return [SubGraph] a new instance of SubGraph + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#90 + def initialize(first_fixed, last_fixed, inputs, outputs); end + + # Returns the value of attribute first_fixed. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def first_fixed; end + + # Returns the value of attribute inputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def inputs; end + + # Returns the value of attribute last_fixed. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def last_fixed; end + + # Returns the value of attribute outputs. + # + # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 + def outputs; end +end + +# ### Summary +# +# `send` invokes a method with an optional block. It pops its receiver and +# the arguments for the method off the stack and pushes the return value +# onto the stack. It has two arguments: the calldata for the call site and +# the optional block instruction sequence. +# +# ### Usage +# +# ~~~ruby +# "hello".tap { |i| p i } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4867 +class SyntaxTree::YARV::Send < ::SyntaxTree::YARV::Instruction + # @return [Send] a new instance of Send + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4870 + def initialize(calldata, block_iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4891 + def ==(other); end + + # Returns the value of attribute block_iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4868 + def block_iseq; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4909 + def call(vm); end + + # Returns the value of attribute calldata. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4868 + def calldata; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4887 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4875 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4896 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4900 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4883 + def to_a(_iseq); end +end + +# ### Summary +# +# `setblockparam` sets the value of a block local variable on a frame +# determined by the level and index arguments. The level is the number of +# frames back to look and the index is the index in the local table. It pops +# the value it is setting off the stack. +# +# ### Usage +# +# ~~~ruby +# def foo(&bar) +# bar = baz +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4951 +class SyntaxTree::YARV::SetBlockParam < ::SyntaxTree::YARV::Instruction + # @return [SetBlockParam] a new instance of SetBlockParam + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4954 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4969 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4952 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4978 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4952 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4982 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4963 + def to_a(iseq); end +end + +# ### Summary +# +# `setclassvariable` looks for a class variable in the current class and +# sets its value to the value it pops off the top of the stack. It uses an +# inline cache to reduce the need to lookup the class variable in the class +# hierarchy every time. +# +# ### Usage +# +# ~~~ruby +# @@class_variable = 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5004 +class SyntaxTree::YARV::SetClassVariable < ::SyntaxTree::YARV::Instruction + # @return [SetClassVariable] a new instance of SetClassVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5007 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5005 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5040 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5032 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5005 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5036 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019 + def to_a(_iseq); end +end + +# ### Summary +# +# `setconstant` pops two values off the stack: the value to set the +# constant to and the constant base to set it in. +# +# ### Usage +# +# ~~~ruby +# Constant = 1 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5058 +class SyntaxTree::YARV::SetConstant < ::SyntaxTree::YARV::Instruction + # @return [SetConstant] a new instance of SetConstant + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5077 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5089 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5073 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5065 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5081 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5059 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5085 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5069 + def to_a(_iseq); end +end + +# ### Summary +# +# `setglobal` sets the value of a global variable to a value popped off the +# top of the stack. +# +# ### Usage +# +# ~~~ruby +# $global = 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5106 +class SyntaxTree::YARV::SetGlobal < ::SyntaxTree::YARV::Instruction + # @return [SetGlobal] a new instance of SetGlobal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5109 + def initialize(name); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5125 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5121 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5113 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5107 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117 + def to_a(_iseq); end +end + +# ### Summary +# +# `setinstancevariable` pops a value off the top of the stack and then sets +# the instance variable associated with the instruction to that value. +# +# This instruction has two forms, but both have the same structure. Before +# Ruby 3.2, the inline cache corresponded to both the get and set +# instructions and could be shared. Since Ruby 3.2, it uses object shapes +# instead so the caches are unique per instruction. +# +# ### Usage +# +# ~~~ruby +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5160 +class SyntaxTree::YARV::SetInstanceVariable < ::SyntaxTree::YARV::Instruction + # @return [SetInstanceVariable] a new instance of SetInstanceVariable + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5163 + def initialize(name, cache); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5183 + def ==(other); end + + # Returns the value of attribute cache. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5161 + def cache; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5179 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5168 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188 + def length; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5161 + def name; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5175 + def to_a(_iseq); end +end + +# ### Summary +# +# `setlocal` sets the value of a local variable on a frame determined by the +# level and index arguments. The level is the number of frames back to +# look and the index is the index in the local table. It pops the value it +# is setting off the stack. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# tap { tap { value = 10 } } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5216 +class SyntaxTree::YARV::SetLocal < ::SyntaxTree::YARV::Instruction + # @return [SetLocal] a new instance of SetLocal + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5219 + def initialize(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5238 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5250 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5234 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5224 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5217 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5242 + def length; end + + # Returns the value of attribute level. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5217 + def level; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5246 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5228 + def to_a(iseq); end +end + +# ### Summary +# +# `setlocal_WC_0` is a specialized version of the `setlocal` instruction. It +# sets the value of a local variable on the current frame to the value at +# the top of the stack as determined by the index given as its only +# argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5268 +class SyntaxTree::YARV::SetLocalWC0 < ::SyntaxTree::YARV::Instruction + # @return [SetLocalWC0] a new instance of SetLocalWC0 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5271 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5287 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5303 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5299 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5283 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5269 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5291 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5295 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5279 + def to_a(iseq); end +end + +# ### Summary +# +# `setlocal_WC_1` is a specialized version of the `setlocal` instruction. It +# sets the value of a local variable on the parent frame to the value at the +# top of the stack as determined by the index given as its only argument. +# +# ### Usage +# +# ~~~ruby +# value = 5 +# self.then { value = 10 } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5321 +class SyntaxTree::YARV::SetLocalWC1 < ::SyntaxTree::YARV::Instruction + # @return [SetLocalWC1] a new instance of SetLocalWC1 + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5324 + def initialize(index); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5340 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5356 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5352 + def canonical; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5336 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5328 + def disasm(fmt); end + + # Returns the value of attribute index. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5322 + def index; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5344 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5348 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5332 + def to_a(iseq); end +end + +# ### Summary +# +# `setn` sets a value in the stack to a value popped off the top of the +# stack. It then pushes that value onto the top of the stack as well. +# +# ### Usage +# +# ~~~ruby +# {}[:key] = 'val' +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5372 +class SyntaxTree::YARV::SetN < ::SyntaxTree::YARV::Instruction + # @return [SetN] a new instance of SetN + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5375 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5391 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5407 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5387 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5395 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5373 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5399 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5403 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5383 + def to_a(_iseq); end +end + +# ### Summary +# +# `setspecial` pops a value off the top of the stack and sets a special +# local variable to that value. The special local variable is determined by +# the key given as its only argument. +# +# ### Usage +# +# ~~~ruby +# baz if (foo == 1) .. (bar == 1) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5424 +class SyntaxTree::YARV::SetSpecial < ::SyntaxTree::YARV::Instruction + # @return [SetSpecial] a new instance of SetSpecial + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5427 + def initialize(key); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5443 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5455 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5439 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5431 + def disasm(fmt); end + + # Returns the value of attribute key. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5425 + def key; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5447 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5451 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5435 + def to_a(_iseq); end +end + +# ### Summary +# +# `splatarray` coerces the array object at the top of the stack into Array +# by calling `to_a`. It pushes a duplicate of the array if there is a flag, +# and the original array if there isn't one. +# +# ### Usage +# +# ~~~ruby +# x = *(5) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5479 +class SyntaxTree::YARV::SplatArray < ::SyntaxTree::YARV::Instruction + # @return [SplatArray] a new instance of SplatArray + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5482 + def initialize(flag); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5498 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5514 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5494 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5486 + def disasm(fmt); end + + # Returns the value of attribute flag. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5480 + def flag; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5502 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5506 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5510 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5490 + def to_a(_iseq); end +end + +# ### Summary +# +# `swap` swaps the top two elements in the stack. +# +# ### TracePoint +# +# `swap` does not dispatch any events. +# +# ### Usage +# +# ~~~ruby +# !!defined?([[]]) +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553 +class SyntaxTree::YARV::Swap < ::SyntaxTree::YARV::Instruction + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558 + def to_a(_iseq); end +end + +# ### Summary +# +# `throw` pops a value off the top of the stack and throws it. It is caught +# using the instruction sequence's (or an ancestor's) catch table. It pushes +# on the result of throwing the value. +# +# ### Usage +# +# ~~~ruby +# [1, 2, 3].map { break 2 } +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5596 +class SyntaxTree::YARV::Throw < ::SyntaxTree::YARV::Instruction + # @return [Throw] a new instance of Throw + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5612 + def initialize(type); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5628 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5644 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5624 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5616 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5632 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5636 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5640 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5620 + def to_a(_iseq); end + + # Returns the value of attribute type. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5610 + def type; end + + private + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5671 + def error_backtrace(vm); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5599 +SyntaxTree::YARV::Throw::RUBY_TAG_BREAK = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5605 +SyntaxTree::YARV::Throw::RUBY_TAG_FATAL = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5600 +SyntaxTree::YARV::Throw::RUBY_TAG_NEXT = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5597 +SyntaxTree::YARV::Throw::RUBY_TAG_NONE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5603 +SyntaxTree::YARV::Throw::RUBY_TAG_RAISE = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5602 +SyntaxTree::YARV::Throw::RUBY_TAG_REDO = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5601 +SyntaxTree::YARV::Throw::RUBY_TAG_RETRY = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598 +SyntaxTree::YARV::Throw::RUBY_TAG_RETURN = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5604 +SyntaxTree::YARV::Throw::RUBY_TAG_THROW = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5607 +SyntaxTree::YARV::Throw::VM_THROW_NO_ESCAPE_FLAG = T.let(T.unsafe(nil), Integer) + +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5608 +SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer) + +# ### Summary +# +# `toregexp` pops a number of values off the stack, combines them into a new +# regular expression, and pushes the new regular expression onto the stack. +# +# ### Usage +# +# ~~~ruby +# /foo #{bar}/ +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5746 +class SyntaxTree::YARV::ToRegExp < ::SyntaxTree::YARV::Instruction + # @return [ToRegExp] a new instance of ToRegExp + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5749 + def initialize(options, length); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5766 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5779 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5762 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5754 + def disasm(fmt); end + + # Returns the value of attribute length. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5747 + def length; end + + # Returns the value of attribute options. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5747 + def options; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5771 + def pops; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5775 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5758 + def to_a(_iseq); end +end + +# ### Summary +# +# `topn` pushes a single value onto the stack that is a copy of the value +# within the stack that is `number` of slots down from the top. +# +# ### Usage +# +# ~~~ruby +# case 3 +# when 1..5 +# puts "foo" +# end +# ~~~ +# +# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5699 +class SyntaxTree::YARV::TopN < ::SyntaxTree::YARV::Instruction + # @return [TopN] a new instance of TopN + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5702 + def initialize(number); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5718 + def ==(other); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5730 + def call(vm); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5714 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5706 + def disasm(fmt); end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5722 + def length; end + + # Returns the value of attribute number. + # + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700 + def number; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5726 + def pushes; end + + # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5710 + def to_a(_iseq); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#8 +class SyntaxTree::YARV::VM + extend ::Forwardable + + # @return [VM] a new instance of VM + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#216 + def initialize(events = T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#623 + def catch(tag, &block); end + + # Helper methods for instructions + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#494 + def const_base; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#610 + def eval(source, binding = T.unsafe(nil), filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Returns the value of attribute events. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#209 + def events; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#344 + def find_catch_entry(frame, type); end + + # Returns the value of attribute frame. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#214 + def frame; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#498 + def frame_at(level); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#504 + def frame_svar; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#510 + def frame_yield; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#516 + def frozen_core; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#520 + def jump(label); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#524 + def leave; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#606 + def load(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#528 + def local_get(index, level); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#532 + def local_set(index, level, value); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def pop(*args, **_arg1, &block); end + + # source://forwardable/1.3.2/forwardable.rb#229 + def push(*args, **_arg1, &block); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#598 + def require(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#549 + def require_internal(filepath, loading: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#602 + def require_relative(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#543 + def require_resolved(filepath); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#360 + def run_block_frame(iseq, frame, *args, **kwargs, &block); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#366 + def run_class_frame(iseq, clazz); end + + # Helper methods for frames + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#230 + def run_frame(frame); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#370 + def run_method_frame(name, nesting, iseq, _self, *args, **kwargs, &block); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#384 + def run_rescue_frame(iseq, frame, error); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#356 + def run_top_frame(iseq); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#391 + def setup_arguments(iseq, args, kwargs, block); end + + # Returns the value of attribute stack. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#211 + def stack; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#619 + def throw(tag, value = T.unsafe(nil)); end + + class << self + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#222 + def run(iseq); end + end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#48 +class SyntaxTree::YARV::VM::BlockFrame < ::SyntaxTree::YARV::VM::Frame + # @return [BlockFrame] a new instance of BlockFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#49 + def initialize(iseq, parent, stack_index); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#89 +class SyntaxTree::YARV::VM::BreakError < ::SyntaxTree::YARV::VM::ThrownError; end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#64 +class SyntaxTree::YARV::VM::ClassFrame < ::SyntaxTree::YARV::VM::Frame + # @return [ClassFrame] a new instance of ClassFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#65 + def initialize(iseq, parent, stack_index, _self); end +end + +# Methods for overriding runtime behavior +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#540 +SyntaxTree::YARV::VM::DLEXT = T.let(T.unsafe(nil), String) + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#205 +SyntaxTree::YARV::VM::FROZEN_CORE = T.let(T.unsafe(nil), SyntaxTree::YARV::VM::FrozenCore) + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#25 +class SyntaxTree::YARV::VM::Frame + # @return [Frame] a new instance of Frame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#29 + def initialize(iseq, parent, stack_index, _self, nesting); end + + # Returns the value of attribute _self. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def _self; end + + # Returns the value of attribute iseq. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def iseq; end + + # Returns the value of attribute line. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def line; end + + # Sets the attribute line + # + # @param value the value to set the attribute line to. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def line=(_arg0); end + + # Returns the value of attribute nesting. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def nesting; end + + # Returns the value of attribute parent. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def parent; end + + # Returns the value of attribute pc. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def pc; end + + # Sets the attribute pc + # + # @param value the value to set the attribute pc to. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 + def pc=(_arg0); end + + # Returns the value of attribute stack_index. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def stack_index; end + + # Returns the value of attribute svars. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 + def svars; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#95 +class SyntaxTree::YARV::VM::FrozenCore; end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#9 +class SyntaxTree::YARV::VM::Jump + # @return [Jump] a new instance of Jump + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#12 + def initialize(label); end + + # Returns the value of attribute label. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#10 + def label; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#17 +class SyntaxTree::YARV::VM::Leave + # @return [Leave] a new instance of Leave + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#20 + def initialize(value); end + + # Returns the value of attribute value. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#18 + def value; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#54 +class SyntaxTree::YARV::VM::MethodFrame < ::SyntaxTree::YARV::VM::Frame + # @return [MethodFrame] a new instance of MethodFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#57 + def initialize(iseq, nesting, parent, stack_index, _self, name, block); end + + # Returns the value of attribute block. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 + def block; end + + # Returns the value of attribute name. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 + def name; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#92 +class SyntaxTree::YARV::VM::NextError < ::SyntaxTree::YARV::VM::ThrownError; end + +# This is the main entrypoint for events firing in the VM, which allows +# us to implement tracing. +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#122 +class SyntaxTree::YARV::VM::NullEvents + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#123 + def publish_frame_change(frame); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#126 + def publish_instruction(iseq, insn); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#129 + def publish_stack_change(stack); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#132 + def publish_tracepoint(event); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#70 +class SyntaxTree::YARV::VM::RescueFrame < ::SyntaxTree::YARV::VM::Frame + # @return [RescueFrame] a new instance of RescueFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#71 + def initialize(iseq, parent, stack_index); end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#86 +class SyntaxTree::YARV::VM::ReturnError < ::SyntaxTree::YARV::VM::ThrownError; end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#541 +SyntaxTree::YARV::VM::SOEXT = T.let(T.unsafe(nil), String) + +# This is a simple implementation of tracing that prints to STDOUT. +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#137 +class SyntaxTree::YARV::VM::STDOUTEvents + # @return [STDOUTEvents] a new instance of STDOUTEvents + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#140 + def initialize; end + + # Returns the value of attribute disassembler. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#138 + def disassembler; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#144 + def publish_frame_change(frame); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#148 + def publish_instruction(iseq, insn); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#153 + def publish_stack_change(stack); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#157 + def publish_tracepoint(event); end +end + +# This represents the global VM stack. It effectively is an array, but +# wraps mutating functions with instrumentation. +# +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#164 +class SyntaxTree::YARV::VM::Stack + # @return [Stack] a new instance of Stack + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#167 + def initialize(events); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#196 + def [](*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#200 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#172 + def concat(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute events. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 + def events; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#176 + def last; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#180 + def length; end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#188 + def pop(*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#184 + def push(*_arg0, **_arg1, &_arg2); end + + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#192 + def slice!(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute values. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 + def values; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#76 +class SyntaxTree::YARV::VM::ThrownError < ::StandardError + # @return [ThrownError] a new instance of ThrownError + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#79 + def initialize(value, backtrace); end + + # Returns the value of attribute value. + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#77 + def value; end +end + +# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#42 +class SyntaxTree::YARV::VM::TopFrame < ::SyntaxTree::YARV::VM::Frame + # @return [TopFrame] a new instance of TopFrame + # + # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#43 + def initialize(iseq); end +end + +# Yield represents using the +yield+ keyword with arguments. +# +# yield value +# +# source://syntax_tree//lib/syntax_tree/node.rb#12290 +class SyntaxTree::YieldNode < ::SyntaxTree::Node + # @return [YieldNode] a new instance of YieldNode + # + # source://syntax_tree//lib/syntax_tree/node.rb#12296 + def initialize(arguments:, location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12350 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12302 + def accept(visitor); end + + # [nil | Args | Paren] the arguments passed to the yield + # + # source://syntax_tree//lib/syntax_tree/node.rb#12291 + def arguments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12306 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12294 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12310 + def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12306 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12323 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12327 + def format(q); end +end + +# ZSuper represents the bare +super+ keyword with no arguments. +# +# super +# +# source://syntax_tree//lib/syntax_tree/node.rb#12360 +class SyntaxTree::ZSuper < ::SyntaxTree::Node + # @return [ZSuper] a new instance of ZSuper + # + # source://syntax_tree//lib/syntax_tree/node.rb#12363 + def initialize(location:); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12393 + def ===(other); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12368 + def accept(visitor); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12372 + def child_nodes; end + + # [Array[ Comment | EmbDoc ]] the comments attached to this node + # + # source://syntax_tree//lib/syntax_tree/node.rb#12361 + def comments; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12376 + def copy(location: T.unsafe(nil)); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12372 + def deconstruct; end + + # source://syntax_tree//lib/syntax_tree/node.rb#12385 + def deconstruct_keys(_keys); end + + # source://syntax_tree//lib/syntax_tree/node.rb#12389 + def format(q); end +end diff --git a/sorbet/rbi/gems/tapioca@0.11.8.rbi b/sorbet/rbi/gems/tapioca@0.11.8.rbi new file mode 100644 index 0000000000..1d60c3ecd4 --- /dev/null +++ b/sorbet/rbi/gems/tapioca@0.11.8.rbi @@ -0,0 +1,3349 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tapioca` gem. +# Please instead update this file by running `bin/tapioca gem tapioca`. + +class Bundler::Dependency < ::Gem::Dependency + include ::Tapioca::BundlerExt::AutoRequireHook +end + +# We need to do the alias-method-chain dance since Bootsnap does the same, +# and prepended modules and alias-method-chain don't play well together. +# +# So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked! +# That's because RubyGems does alias-method-chain for Kernel#require and such, +# so, if Bootsnap were to do prepend, it might end up breaking RubyGems. +# +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68 +class Module + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101 + def append_features(constant); end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71 + def autoload(const_name, path); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111 + def extend_object(obj); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91 + def prepend_features(constant); end +end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#4 +module RBI; end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#5 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi/0.0.17/lib/rbi/model.rb#119 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi/0.0.17/lib/rbi/model.rb#126 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi/0.0.17/lib/rbi/printer.rb#226 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi/0.0.17/lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi/0.0.17/lib/rbi/rewriters/annotate.rb#49 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#89 + sig do + params( + name: ::String, + parameters: T::Array[::RBI::TypedParam], + return_type: ::String, + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#25 + sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_module(name, &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_path(constant, &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + end + def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + + # source://rbi/0.0.17/lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi/0.0.17/lib/rbi/model.rb#132 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi/0.0.17/lib/rbi/rewriters/group_nodes.rb#38 + sig { void } + def group_nodes!; end + + # source://rbi/0.0.17/lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi/0.0.17/lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi/0.0.17/lib/rbi/rewriters/nest_non_public_methods.rb#46 + sig { void } + def nest_non_public_methods!; end + + # source://rbi/0.0.17/lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi/0.0.17/lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi/0.0.17/lib/rbi/printer.rb#233 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi/0.0.17/lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#116 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#111 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#126 +class RBI::TypedParam < ::T::Struct + const :param, ::RBI::Param + const :type, ::String + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5 +module T::Generic + include ::Kernel + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 + def [](*types); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 + def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37 + def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end +end + +# This module intercepts calls to generic type instantiations and type variable definitions. +# Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used +# to look up the original call details when we are trying to do code generation. +# +# We are interested in the data of the `[]`, `type_member` and `type_template` calls which +# are all needed to generate good generic information at runtime. +# +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#12 +module T::Generic::TypeStoragePatch + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 + def [](*types); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 + def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37 + def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28 +module T::Private::Methods + class << self + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 + def finalize_proc(decl); end + end +end + +class T::Private::Methods::Declaration < ::Struct + def bind; end + def bind=(_); end + def checked; end + def checked=(_); end + def finalized; end + def finalized=(_); end + def mod; end + def mod=(_); end + def mode; end + def mode=(_); end + def on_failure; end + def on_failure=(_); end + def override_allow_incompatible; end + def override_allow_incompatible=(_); end + def params; end + def params=(_); end + def raw; end + def raw=(_); end + def returns; end + def returns=(_); end + def type_parameters; end + def type_parameters=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +class T::Private::Methods::DeclarationBlock < ::Struct + def blk; end + def blk=(_); end + def final; end + def final=(_); end + def loc; end + def loc=(_); end + def mod; end + def mod=(_); end + def raw; end + def raw=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#29 +module T::Private::Methods::ProcBindPatch + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 + def finalize_proc(decl); end +end + +class T::Types::Proc < ::T::Types::Base; end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#6 +module T::Types::ProcBindPatch + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#7 + def initialize(arg_types, returns, bind = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#15 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6 +class T::Types::Simple < ::T::Types::Base + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#74 +module T::Types::Simple::GenericPatch + # This method intercepts calls to the `name` method for simple types, so that + # it can ask the name to the type if the type is generic, since, by this point, + # we've created a clone of that type with the `name` method returning the + # appropriate name for that specific concrete type. + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#7 +module T::Types::Simple::NamePatch + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#10 + def name; end + + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#16 + def qualified_name_of(constant); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 +T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#99 +module T::Utils::Private + class << self + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + def coerce_and_check_module_types(val, check_val, check_module_type); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#100 +module T::Utils::Private::PrivateCoercePatch + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + def coerce_and_check_module_types(val, check_val, check_module_type); end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 +module Tapioca + class << self + # source://tapioca//lib/tapioca.rb#20 + sig do + type_parameters(:Result) + .params( + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def silence_warnings(&blk); end + end +end + +# source://tapioca//lib/tapioca.rb#38 +Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 +module Tapioca::BundlerExt; end + +# This is a module that gets prepended to `Bundler::Dependency` and +# makes sure even gems marked as `require: false` are required during +# `Bundler.require`. +# +# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#9 +module Tapioca::BundlerExt::AutoRequireHook + requires_ancestor { Bundler::Dependency } + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#46 + sig { returns(T.untyped) } + def autorequire; end + + class << self + # @return [Boolean] + # + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#26 + def enabled?; end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#22 + sig { params(name: T.untyped).returns(T::Boolean) } + def excluded?(name); end + + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#36 + sig do + type_parameters(:Result) + .params( + exclude: T::Array[::String], + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def override_require_false(exclude:, &blk); end + end +end + +# source://tapioca//lib/tapioca.rb#61 +Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#60 +Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#59 +Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/cli.rb#5 +class Tapioca::Cli < ::Thor + include ::Tapioca::CliHelper + include ::Tapioca::ConfigHelper + include ::Tapioca::EnvHelper + + # source://tapioca//lib/tapioca/cli.rb#346 + def __print_version; end + + # source://tapioca//lib/tapioca/cli.rb#326 + def annotations; end + + # source://tapioca//lib/tapioca/cli.rb#296 + def check_shims; end + + # source://tapioca//lib/tapioca/cli.rb#41 + def configure; end + + # source://tapioca//lib/tapioca/cli.rb#137 + def dsl(*constant_or_paths); end + + # source://tapioca//lib/tapioca/cli.rb#247 + def gem(*gems); end + + # source://tapioca//lib/tapioca/cli.rb#27 + def init; end + + # source://tapioca//lib/tapioca/cli.rb#52 + def require; end + + # source://tapioca//lib/tapioca/cli.rb#71 + def todo; end + + private + + # source://tapioca//lib/tapioca/cli.rb#360 + def print_init_next_steps; end + + class << self + # source://tapioca//lib/tapioca/cli.rb#352 + def exit_on_failure?; end + end +end + +# source://tapioca//lib/tapioca/cli.rb#10 +Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/cli_helper.rb#5 +module Tapioca::CliHelper + requires_ancestor { Thor::Shell } + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#33 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) } + def netrc_file(options); end + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#26 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) } + def rbi_formatter(options); end + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#12 + sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void } + def say_error(message = T.unsafe(nil), *color); end +end + +# source://tapioca//lib/tapioca/commands.rb#5 +module Tapioca::Commands; end + +# source://tapioca//lib/tapioca/commands/annotations.rb#6 +class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/annotations.rb#18 + sig do + params( + central_repo_root_uris: T::Array[::String], + auth: T.nilable(::String), + netrc_file: T.nilable(::String), + central_repo_index_path: ::String, + typed_overrides: T::Hash[::String, ::String] + ).void + end + def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#36 + sig { override.void } + def execute; end + + private + + # source://tapioca//lib/tapioca/commands/annotations.rb#191 + sig { params(name: ::String, content: ::String).returns(::String) } + def add_header(name, content); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#211 + sig { params(name: ::String, content: ::String).returns(::String) } + def apply_typed_override(name, content); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#132 + sig { params(repo_uris: T::Array[::String], gem_name: ::String).void } + def fetch_annotation(repo_uris, gem_name); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#109 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) } + def fetch_annotations(gem_names); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#150 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_file(repo_uri, path); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#167 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_http_file(repo_uri, path); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#98 + sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) } + def fetch_index(repo_uri, repo_number:); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#77 + sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } + def fetch_indexes; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#159 + sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } + def fetch_local_file(repo_uri, path); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#46 + sig { returns(T::Array[::String]) } + def list_gemfile_gems; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#223 + sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } + def merge_files(gem_name, contents); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#56 + sig { params(project_gems: T::Array[::String]).void } + def remove_expired_annotations(project_gems); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#250 + sig { returns(T::Hash[::String, T.nilable(::String)]) } + def repo_tokens; end + + # source://tapioca//lib/tapioca/commands/annotations.rb#278 + sig { params(path: ::String, repo_uri: ::String, message: ::String).void } + def say_http_error(path, repo_uri, message:); end + + # source://tapioca//lib/tapioca/commands/annotations.rb#262 + sig { params(repo_uri: ::String).returns(T.nilable(::String)) } + def token_for(repo_uri); end +end + +# source://tapioca//lib/tapioca/commands/check_shims.rb#6 +class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + # source://tapioca//lib/tapioca/commands/check_shims.rb#22 + sig do + params( + gem_rbi_dir: ::String, + dsl_rbi_dir: ::String, + annotations_rbi_dir: ::String, + shim_rbi_dir: ::String, + todo_rbi_file: ::String, + payload: T::Boolean, + number_of_workers: T.nilable(::Integer) + ).void + end + def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end + + # source://tapioca//lib/tapioca/commands/check_shims.rb#42 + sig { override.void } + def execute; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/command.rb#6 +class Tapioca::Commands::Command + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + include ::Tapioca::CliHelper + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + abstract! + + # source://tapioca//lib/tapioca/commands/command.rb#20 + sig { void } + def initialize; end + + # @abstract + # + # source://tapioca//lib/tapioca/commands/command.rb#25 + sig { abstract.void } + def execute; end + + # source://thor/1.2.2/lib/thor/base.rb#139 + sig { returns(::Thor::Actions) } + def file_writer; end + + private + + # source://tapioca//lib/tapioca/commands/command.rb#46 + sig do + params( + path: T.any(::Pathname, ::String), + content: ::String, + force: T::Boolean, + skip: T::Boolean, + verbose: T::Boolean + ).void + end + def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/command.rb#30 + sig { params(command: ::Symbol, args: ::String).returns(::String) } + def default_command(command, *args); end + + # source://tapioca//lib/tapioca/commands/command.rb#56 + sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } + def remove_file(path, verbose: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/commands/command.rb#10 +class Tapioca::Commands::Command::FileWriter < ::Thor + include ::Thor::Actions + extend ::Thor::Actions::ClassMethods +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/command_without_tracker.rb#6 +class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command + abstract! + + # source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12 + sig { void } + def initialize; end +end + +# source://tapioca//lib/tapioca/commands/configure.rb#6 +class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/configure.rb#14 + sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } + def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end + + # source://tapioca//lib/tapioca/commands/configure.rb#30 + sig { override.void } + def execute; end + + private + + # source://tapioca//lib/tapioca/commands/configure.rb#79 + sig { void } + def create_binstub; end + + # source://tapioca//lib/tapioca/commands/configure.rb#69 + sig { void } + def create_post_require; end + + # source://tapioca//lib/tapioca/commands/configure.rb#40 + sig { void } + def create_sorbet_config; end + + # source://tapioca//lib/tapioca/commands/configure.rb#50 + sig { void } + def create_tapioca_config; end + + # source://tapioca//lib/tapioca/commands/configure.rb#92 + sig { returns(::Bundler::Installer) } + def installer; end + + # source://tapioca//lib/tapioca/commands/configure.rb#97 + sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) } + def spec; end +end + +# source://tapioca//lib/tapioca/commands/dsl.rb#6 +class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + # source://tapioca//lib/tapioca/commands/dsl.rb#30 + sig do + params( + requested_constants: T::Array[::String], + requested_paths: T::Array[::Pathname], + outpath: ::Pathname, + only: T::Array[::String], + exclude: T::Array[::String], + file_header: T::Boolean, + tapioca_path: ::String, + should_verify: T::Boolean, + quiet: T::Boolean, + verbose: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + gem_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#97 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/dsl.rb#69 + sig { void } + def list_compilers; end + + private + + # source://tapioca//lib/tapioca/commands/dsl.rb#330 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#254 + sig do + params( + constant_name: ::String, + rbi: ::RBI::File, + outpath: ::Pathname, + quiet: T::Boolean + ).returns(T.nilable(::Pathname)) + end + def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#192 + sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } + def constantize(constant_names, ignore_missing: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#215 + sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def constantize_compilers(compiler_names); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#390 + sig { returns(T::Array[::String]) } + def constants_from_requested_paths; end + + # source://tapioca//lib/tapioca/commands/dsl.rb#163 + sig { returns(::Tapioca::Dsl::Pipeline) } + def create_pipeline; end + + # source://tapioca//lib/tapioca/commands/dsl.rb#293 + sig { params(constant_name: ::String).returns(::Pathname) } + def dsl_rbi_filename(constant_name); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#178 + sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } + def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#385 + sig { params(constant: ::String).returns(::String) } + def generate_command_for(constant); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#272 + sig { params(dir: ::Pathname).void } + def perform_dsl_verification(dir); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#281 + sig { params(files: T::Set[::Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#380 + sig { params(constant: ::String).returns(::String) } + def rbi_filename_for(constant); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#361 + sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } + def rbi_files_in(path); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#339 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#234 + sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } + def resolve(name); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#368 + sig { params(class_name: ::String).returns(::String) } + def underscore(class_name); end + + # source://tapioca//lib/tapioca/commands/dsl.rb#298 + sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } + def verify_dsl_rbi(tmp_dir:); end +end + +# source://tapioca//lib/tapioca/commands/gem.rb#6 +class Tapioca::Commands::Gem < ::Tapioca::Commands::Command + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + # source://tapioca//lib/tapioca/commands/gem.rb#29 + sig do + params( + gem_names: T::Array[::String], + exclude: T::Array[::String], + prerequire: T.nilable(::String), + postrequire: ::String, + typed_overrides: T::Hash[::String, ::String], + outpath: ::Pathname, + file_header: T::Boolean, + include_doc: T::Boolean, + include_loc: T::Boolean, + include_exported_rbis: T::Boolean, + number_of_workers: T.nilable(::Integer), + auto_strictness: T::Boolean, + dsl_dir: ::String, + rbi_formatter: ::Tapioca::RBIFormatter, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/gem.rb#70 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/gem.rb#109 + sig { params(should_verify: T::Boolean, exclude: T::Array[::String]).void } + def sync(should_verify: T.unsafe(nil), exclude: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/gem.rb#288 + sig { returns(T::Array[::String]) } + def added_rbis; end + + # source://tapioca//lib/tapioca/commands/gem.rb#349 + sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } + def build_error_for_files(cause, files); end + + # source://tapioca//lib/tapioca/commands/gem.rb#158 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } + def compile_gem_rbi(gem); end + + # source://tapioca//lib/tapioca/commands/gem.rb#283 + sig { params(gem_name: ::String).returns(::Pathname) } + def existing_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/gem.rb#331 + sig { returns(T::Hash[::String, ::String]) } + def existing_rbis; end + + # source://tapioca//lib/tapioca/commands/gem.rb#295 + sig { params(gem_name: ::String).returns(::Pathname) } + def expected_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/gem.rb#337 + sig { returns(T::Hash[::String, ::String]) } + def expected_rbis; end + + # source://tapioca//lib/tapioca/commands/gem.rb#300 + sig { params(gem_name: ::String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + # source://tapioca//lib/tapioca/commands/gem.rb#344 + sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } + def gem_rbi_filename(gem_name, version); end + + # source://tapioca//lib/tapioca/commands/gem.rb#143 + sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def gems_to_generate(gem_names); end + + # source://tapioca//lib/tapioca/commands/gem.rb#354 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } + def merge_with_exported_rbi(gem, file); end + + # source://tapioca//lib/tapioca/commands/gem.rb#325 + sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } + def move(old_filename, new_filename); end + + # source://tapioca//lib/tapioca/commands/gem.rb#235 + sig { void } + def perform_additions; end + + # source://tapioca//lib/tapioca/commands/gem.rb#208 + sig { void } + def perform_removals; end + + # source://tapioca//lib/tapioca/commands/gem.rb#189 + sig { params(exclude: T::Array[::String]).void } + def perform_sync_verification(exclude: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/commands/gem.rb#278 + sig { returns(T::Array[::String]) } + def removed_rbis; end + + # source://tapioca//lib/tapioca/commands/gem.rb#305 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end +end + +# source://tapioca//lib/tapioca/commands/require.rb#6 +class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/require.rb#13 + sig { params(requires_path: ::String, sorbet_config_path: ::String).void } + def initialize(requires_path:, sorbet_config_path:); end + + # source://tapioca//lib/tapioca/commands/require.rb#21 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/todo.rb#6 +class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker + include ::Tapioca::SorbetHelper + + # source://tapioca//lib/tapioca/commands/todo.rb#15 + sig { params(todo_file: ::String, file_header: T::Boolean).void } + def initialize(todo_file:, file_header:); end + + # source://tapioca//lib/tapioca/commands/todo.rb#23 + sig { override.void } + def execute; end + + private + + # source://tapioca//lib/tapioca/commands/todo.rb#49 + sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } + def rbi(constants, command:); end + + # source://tapioca//lib/tapioca/commands/todo.rb#69 + sig { returns(T::Array[::String]) } + def unresolved_constants; end +end + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#5 +module Tapioca::ConfigHelper + requires_ancestor { Thor } + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#18 + sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void } + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#12 + sig { returns(::String) } + def command_name; end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#15 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def defaults; end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#34 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def options; end + + private + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#151 + sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } + def build_error(msg); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#176 + sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } + def build_error_message(config_file, errors); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#56 + sig do + params( + options: ::Thor::CoreExt::HashWithIndifferentAccess + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def config_options(options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#46 + sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } + def filter_defaults(options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#194 + sig do + params( + options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def merge_options(*options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#70 + sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void } + def validate_config!(config_file, config); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#102 + sig do + params( + command_options: T::Hash[::Symbol, ::Thor::Option], + config_key: ::String, + config_options: T::Hash[T.untyped, T.untyped] + ).returns(T::Array[::Tapioca::ConfigHelper::ConfigError]) + end + def validate_config_options(command_options, config_key, config_options); end +end + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#146 +class Tapioca::ConfigHelper::ConfigError < ::T::Struct + const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#141 +class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct + const :message, ::String + const :colors, T::Array[::Symbol] + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca.rb#45 +Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#41 +Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#57 +Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#42 +Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#47 +Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) + +# source://tapioca//lib/tapioca.rb#39 +Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#40 +Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/rbi_formatter.rb#29 +Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) + +# source://tapioca//lib/tapioca.rb#56 +Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://tapioca//lib/tapioca.rb#43 +Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#44 +Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/dsl/compilers.rb#5 +module Tapioca::Dsl; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/dsl/compiler.rb#6 +class Tapioca::Dsl::Compiler + extend T::Generic + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + abstract! + + ConstantType = type_member { { upper: Module } } + + # source://tapioca//lib/tapioca/dsl/compiler.rb#60 + sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void } + def initialize(pipeline, root, constant); end + + # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#77 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#68 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#20 + sig { returns(ConstantType) } + def constant; end + + # @abstract + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#73 + sig { abstract.void } + def decorate; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#23 + sig { returns(::RBI::Tree) } + def root; end + + private + + # source://tapioca//lib/tapioca/dsl/compiler.rb#126 + sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } + def compile_method_parameters_to_rbi(method_def); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#162 + sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } + def compile_method_return_type_to_rbi(method_def); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#116 + sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } + def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end + + # Get the types of each parameter from a method signature + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#90 + sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } + def parameters_types_from_signature(method_def, signature); end + + class << self + # @abstract + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#34 + sig { abstract.returns(T::Enumerable[::Module]) } + def gather_constants; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#29 + sig { params(constant: ::Module).returns(T::Boolean) } + def handles?(constant); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#37 + sig { returns(T::Set[::Module]) } + def processable_constants; end + + private + + # source://tapioca//lib/tapioca/dsl/compiler.rb#47 + sig { returns(T::Enumerable[T::Class[T.anything]]) } + def all_classes; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#53 + sig { returns(T::Enumerable[::Module]) } + def all_modules; end + end +end + +# source://tapioca//lib/tapioca/dsl/compilers.rb#6 +module Tapioca::Dsl::Compilers; end + +# DSL compilers are either built-in to Tapioca and live under the +# `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and +# can be referred to by just using the class name, or they live in +# a different namespace and can only be referred to using their fully +# qualified name. This constant encapsulates that dual lookup when +# a compiler needs to be resolved by name. +# +# source://tapioca//lib/tapioca/dsl/compilers.rb#13 +Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/dsl/pipeline.rb#6 +class Tapioca::Dsl::Pipeline + # source://tapioca//lib/tapioca/dsl/pipeline.rb#34 + sig do + params( + requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname], + requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + error_handler: T.proc.params(error: ::String).void, + number_of_workers: T.nilable(::Integer) + ).void + end + def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 + sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } + def active_compilers; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#93 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#98 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 + sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def compilers; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 + sig { returns(T::Array[::String]) } + def errors; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#13 + sig { returns(T::Array[::Module]) } + def requested_constants; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 + sig { returns(T::Array[::Pathname]) } + def requested_paths; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#58 + sig do + type_parameters(:T) + .params( + blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T)) + ).returns(T::Array[T.type_parameter(:T)]) + end + def run(&blk); end + + private + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#193 + sig { void } + def abort_if_pending_migrations!; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#139 + sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } + def filter_anonymous_and_reloaded_constants(constants); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#122 + sig do + params( + requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)] + ).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) + end + def gather_active_compilers(requested_compilers, excluded_compilers); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#130 + sig do + params( + requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname] + ).returns(T::Set[::Module]) + end + def gather_constants(requested_constants, requested_paths); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#167 + sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } + def rbi_for_constant(constant); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#186 + sig { params(error: ::String).returns(T.noreturn) } + def report_error(error); end +end + +# source://tapioca//lib/tapioca/helpers/env_helper.rb#5 +module Tapioca::EnvHelper + requires_ancestor { Thor } + + # source://tapioca//lib/tapioca/helpers/env_helper.rb#12 + sig { params(options: T::Hash[::Symbol, T.untyped]).void } + def set_environment(options); end +end + +class Tapioca::Error < ::StandardError; end + +# source://tapioca//lib/tapioca/executor.rb#5 +class Tapioca::Executor + # source://tapioca//lib/tapioca/executor.rb#11 + sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void } + def initialize(queue, number_of_workers: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/executor.rb#28 + sig do + type_parameters(:T) + .params( + block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T)) + ).returns(T::Array[T.type_parameter(:T)]) + end + def run_in_parallel(&block); end + + private + + # source://tapioca//lib/tapioca/executor.rb#37 + sig { returns(::Integer) } + def max_processors; end +end + +# source://tapioca//lib/tapioca/executor.rb#8 +Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) + +# source://tapioca//lib/tapioca/gem/events.rb#5 +module Tapioca::Gem; end + +# source://tapioca//lib/tapioca/gem/events.rb#77 +class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#84 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + def initialize(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/events.rb#81 + sig { returns(::RBI::Const) } + def node; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#26 +class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event + # source://tapioca//lib/tapioca/gem/events.rb#36 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#33 + sig { returns(::BasicObject) } + def constant; end + + # source://tapioca//lib/tapioca/gem/events.rb#30 + sig { returns(::String) } + def symbol; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/events.rb#6 +class Tapioca::Gem::Event + abstract! +end + +# source://tapioca//lib/tapioca/gem/events.rb#43 +class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound + # source://tapioca//lib/tapioca/gem/events.rb#52 + sig { params(symbol: ::String, constant: ::Module).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#47 + sig { override.returns(::Module) } + def constant; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#103 +class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end + +# source://tapioca//lib/tapioca/gem/listeners/base.rb#6 +module Tapioca::Gem::Listeners; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/listeners/base.rb#7 +class Tapioca::Gem::Listeners::Base + abstract! + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#14 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#19 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def dispatch(event); end + + private + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#49 + sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#37 + sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#45 + sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#41 + sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#7 +class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#31 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#7 +class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#60 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55 + sig { params(location: ::String).returns(T::Boolean) } + def mixed_in_by_gem?(location); end + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/methods.rb#7 +class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#35 + sig do + params( + tree: ::RBI::Tree, + module_name: ::String, + mod: ::Module, + for_visibility: T::Array[::Symbol], + attached_class: T.nilable(::Module) + ).void + end + def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#71 + sig do + params( + tree: ::RBI::Tree, + symbol_name: ::String, + constant: ::Module, + method: T.nilable(::UnboundMethod), + visibility: ::RBI::Visibility + ).void + end + def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#212 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#205 + sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } + def initialize_method_for(constant); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#173 + sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } + def method_names_by_visibility(mod); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#197 + sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } + def method_new_in_abstract_class?(attached_class, method_name); end + + # Check whether the method is defined by the constant. + # + # In most cases, it works to check that the constant is the method owner. However, + # in the case that a method is also defined in a module prepended to the constant, it + # will be owned by the prepended module, not the constant. + # + # This method implements a better way of checking whether a constant defines a method. + # It walks up the ancestor tree via the `super_method` method; if any of the super + # methods are owned by the constant, it means that the constant declares the method. + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#159 + sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } + def method_owned_by_constant?(method, constant); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#16 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#182 + sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } + def struct_method?(constant, method_name); end +end + +# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#7 +class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#42 + sig do + params( + tree: ::RBI::Tree, + constant: ::Module, + mods: T::Array[::Module], + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).void + end + def add_mixins(tree, constant, mods, mixin_type); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#84 + sig { params(mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(mixin_name); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#91 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def interesting_ancestors_of(constant); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#75 + sig do + params( + constant: ::Module, + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).returns(T::Boolean) + end + def mixed_in_by_gem?(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#7 +class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#20 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#7 +class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#7 +class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#27 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7 +class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#32 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#7 +class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#23 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#7 +class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#26 + sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) } + def compile_signature(signature, parameters); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#78 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#18 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#68 + sig { params(signature: T.untyped).returns(T::Boolean) } + def signature_final?(signature); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#13 +Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#7 +class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#27 + sig { params(tree: ::RBI::Tree, constant: ::Module).void } + def compile_type_variable_declarations(tree, constant); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#63 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) } + def node_from_type_variable(type_variable); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#7 +class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#41 + sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void } + def add_source_location_comment(node, file, line); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#13 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#35 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#19 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#7 +class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + private + + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#36 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#7 +class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#27 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + private + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#55 + sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def documentation_comments(name, sigs: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#99 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#36 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#46 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#10 +Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 +Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/events.rb#105 +class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#130 + sig do + params( + symbol: ::String, + constant: ::Module, + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def initialize(symbol, constant, method, node, signature, parameters); end + + # source://tapioca//lib/tapioca/gem/events.rb#109 + sig { returns(::UnboundMethod) } + def method; end + + # source://tapioca//lib/tapioca/gem/events.rb#112 + sig { returns(::RBI::Method) } + def node; end + + # source://tapioca//lib/tapioca/gem/events.rb#118 + sig { returns(T::Array[[::Symbol, ::String]]) } + def parameters; end + + # source://tapioca//lib/tapioca/gem/events.rb#115 + sig { returns(T.untyped) } + def signature; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/events.rb#57 +class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event + abstract! + + # source://tapioca//lib/tapioca/gem/events.rb#70 + sig { params(symbol: ::String, constant: ::Module).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#67 + sig { returns(::Module) } + def constant; end + + # source://tapioca//lib/tapioca/gem/events.rb#64 + sig { returns(::String) } + def symbol; end +end + +# source://tapioca//lib/tapioca/gem/pipeline.rb#6 +class Tapioca::Gem::Pipeline + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + # source://tapioca//lib/tapioca/gem/pipeline.rb#17 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void } + def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#48 + sig { returns(::RBI::Tree) } + def compile; end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#110 + sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } + def constant_in_gem?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#14 + sig { returns(::Tapioca::Gemfile::GemSpec) } + def gem; end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#122 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_in_gem?(method); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#130 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def name_of(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#69 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + def push_const(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#59 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def push_constant(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#64 + sig { params(symbol: ::String, constant: ::Module).void } + def push_foreign_constant(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#83 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def push_foreign_scope(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#97 + sig do + params( + symbol: ::String, + constant: ::Module, + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def push_method(symbol, constant, method, node, signature, parameters); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#76 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def push_scope(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#54 + sig { params(symbol: ::String).void } + def push_symbol(symbol); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#102 + sig { params(symbol_name: ::String).returns(T::Boolean) } + def symbol_in_payload?(symbol_name); end + + private + + # source://tapioca//lib/tapioca/gem/pipeline.rb#376 + sig { params(name: ::String).void } + def add_to_alias_namespace(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#381 + sig { params(name: ::String).returns(T::Boolean) } + def alias_namespaced?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#225 + sig { params(name: ::String, constant: ::Module).void } + def compile_alias(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#211 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def compile_constant(symbol, constant); end + + # Compile + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#206 + sig { params(symbol: ::String, constant: ::Module).void } + def compile_foreign_constant(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#283 + sig { params(name: ::String, constant: ::Module, foreign_constant: T::Boolean).void } + def compile_module(name, constant, foreign_constant: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#247 + sig { params(name: ::String, value: ::BasicObject).void } + def compile_object(name, value); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#308 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } + def compile_superclass(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#357 + sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } + def defined_in_gem?(constant, strict: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#158 + sig { params(event: ::Tapioca::Gem::Event).void } + def dispatch(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#398 + sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } + def generic_name_of(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#369 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def get_file_candidates(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#145 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def load_bootstrap_symbols(gem); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#388 + sig { params(name: ::String).void } + def mark_seen(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#414 + sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } + def name_of_proxy_target(constant, class_name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#153 + sig { returns(::Tapioca::Gem::Event) } + def next_event; end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#181 + sig { params(event: ::Tapioca::Gem::ConstantFound).void } + def on_constant(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#199 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def on_node(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#172 + sig { params(event: ::Tapioca::Gem::SymbolFound).void } + def on_symbol(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#393 + sig { params(name: ::String).returns(T::Boolean) } + def seen?(name); end +end + +# source://tapioca//lib/tapioca/gem/pipeline.rb#11 +Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/events.rb#90 +class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#97 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def initialize(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/events.rb#94 + sig { returns(::RBI::Scope) } + def node; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#13 +class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event + # source://tapioca//lib/tapioca/gem/events.rb#20 + sig { params(symbol: ::String).void } + def initialize(symbol); end + + # source://tapioca//lib/tapioca/gem/events.rb#17 + sig { returns(::String) } + def symbol; end +end + +# source://tapioca//lib/tapioca/helpers/gem_helper.rb#5 +module Tapioca::GemHelper + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#9 + sig { params(app_dir: T.any(::Pathname, ::String), full_gem_path: ::String).returns(T::Boolean) } + def gem_in_app_dir?(app_dir, full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#17 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_bundle_path?(full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#22 + sig { params(full_gem_path: ::String).returns(T::Boolean) } + def gem_in_ruby_path?(full_gem_path); end + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#27 + sig { params(path: T.any(::Pathname, ::String)).returns(::String) } + def to_realpath(path); end + + private + + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#36 + sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) } + def path_in_dir?(path, dir); end +end + +# source://tapioca//lib/tapioca/gemfile.rb#7 +class Tapioca::Gemfile + # source://tapioca//lib/tapioca/gemfile.rb#27 + sig { params(excluded_gems: T::Array[::String]).void } + def initialize(excluded_gems); end + + # source://tapioca//lib/tapioca/gemfile.rb#18 + sig { returns(::Bundler::Definition) } + def definition; end + + # source://tapioca//lib/tapioca/gemfile.rb#21 + sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def dependencies; end + + # source://tapioca//lib/tapioca/gemfile.rb#40 + sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } + def gem(gem_name); end + + # source://tapioca//lib/tapioca/gemfile.rb#24 + sig { returns(T::Array[::String]) } + def missing_specs; end + + # source://tapioca//lib/tapioca/gemfile.rb#45 + sig { void } + def require_bundle; end + + private + + # source://tapioca//lib/tapioca/gemfile.rb#92 + sig { returns(::String) } + def dir; end + + # source://tapioca//lib/tapioca/gemfile.rb#54 + sig { returns(::File) } + def gemfile; end + + # source://tapioca//lib/tapioca/gemfile.rb#87 + sig { returns(T::Array[::Symbol]) } + def groups; end + + # source://tapioca//lib/tapioca/gemfile.rb#57 + sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } + def load_dependencies; end + + # @return [File] + # + # source://tapioca//lib/tapioca/gemfile.rb#54 + def lockfile; end + + # source://tapioca//lib/tapioca/gemfile.rb#68 + sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } + def materialize_deps; end + + # source://tapioca//lib/tapioca/gemfile.rb#82 + sig { returns(::Bundler::Runtime) } + def runtime; end +end + +# source://tapioca//lib/tapioca/gemfile.rb#96 +class Tapioca::Gemfile::GemSpec + include ::Tapioca::GemHelper + + # source://tapioca//lib/tapioca/gemfile.rb#135 + sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } + def initialize(spec); end + + # source://tapioca//lib/tapioca/gemfile.rb#145 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://tapioca//lib/tapioca/gemfile.rb#165 + sig { params(path: ::String).returns(T::Boolean) } + def contains_path?(path); end + + # source://tapioca//lib/tapioca/gemfile.rb#184 + sig { returns(T::Boolean) } + def export_rbi_files?; end + + # source://tapioca//lib/tapioca/gemfile.rb#179 + sig { returns(T::Array[::String]) } + def exported_rbi_files; end + + # source://tapioca//lib/tapioca/gemfile.rb#189 + sig { returns(::RBI::MergeTree) } + def exported_rbi_tree; end + + # source://tapioca//lib/tapioca/gemfile.rb#132 + sig { returns(T::Array[::Pathname]) } + def files; end + + # source://tapioca//lib/tapioca/gemfile.rb#129 + sig { returns(::String) } + def full_gem_path; end + + # source://tapioca//lib/tapioca/gemfile.rb#150 + sig { params(gemfile_dir: ::String).returns(T::Boolean) } + def ignore?(gemfile_dir); end + + # source://tapioca//lib/tapioca/gemfile.rb#155 + sig { returns(::String) } + def name; end + + # source://tapioca//lib/tapioca/gemfile.rb#174 + sig { void } + def parse_yard_docs; end + + # source://tapioca//lib/tapioca/gemfile.rb#160 + sig { returns(::String) } + def rbi_file_name; end + + # source://tapioca//lib/tapioca/gemfile.rb#201 + sig { params(file: ::Pathname).returns(::Pathname) } + def relative_path_for(file); end + + # @return [String] + # + # source://tapioca//lib/tapioca/gemfile.rb#129 + def version; end + + private + + # source://tapioca//lib/tapioca/gemfile.rb#212 + sig { returns(T::Array[::Pathname]) } + def collect_files; end + + # source://tapioca//lib/tapioca/gemfile.rb#227 + sig { returns(T.nilable(T::Boolean)) } + def default_gem?; end + + # source://tapioca//lib/tapioca/gemfile.rb#285 + sig { returns(T::Boolean) } + def gem_ignored?; end + + # source://tapioca//lib/tapioca/gemfile.rb#264 + sig { params(path: ::String).returns(T::Boolean) } + def has_parent_gemspec?(path); end + + # source://tapioca//lib/tapioca/gemfile.rb#232 + sig { returns(::Regexp) } + def require_paths_prefix_matcher; end + + # source://tapioca//lib/tapioca/gemfile.rb#243 + sig { params(file: ::String).returns(::Pathname) } + def resolve_to_ruby_lib_dir(file); end + + # source://tapioca//lib/tapioca/gemfile.rb#257 + sig { returns(::String) } + def version_string; end + + class << self + # source://tapioca//lib/tapioca/gemfile.rb#104 + sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } + def spec_lookup_by_file_path; end + end +end + +# source://tapioca//lib/tapioca/gemfile.rb#116 +Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gemfile.rb#10 +Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } + +# source://tapioca//lib/tapioca/loaders/loader.rb#5 +module Tapioca::Loaders; end + +# source://tapioca//lib/tapioca/loaders/dsl.rb#6 +class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader + # source://tapioca//lib/tapioca/loaders/dsl.rb#38 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#27 + sig { override.void } + def load; end + + protected + + # source://tapioca//lib/tapioca/loaders/dsl.rb#71 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#53 + sig { void } + def load_dsl_compilers; end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#48 + sig { void } + def load_dsl_extensions; end + + class << self + # source://tapioca//lib/tapioca/loaders/dsl.rb#15 + sig do + params( + tapioca_path: ::String, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + end +end + +# source://tapioca//lib/tapioca/loaders/gem.rb#6 +class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader + # source://tapioca//lib/tapioca/loaders/gem.rb#49 + sig do + params( + bundle: ::Tapioca::Gemfile, + prerequire: T.nilable(::String), + postrequire: ::String, + default_command: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end + + # source://tapioca//lib/tapioca/loaders/gem.rb#34 + sig { override.void } + def load; end + + protected + + # source://tapioca//lib/tapioca/loaders/gem.rb#80 + sig { params(file: ::String, error: ::LoadError).void } + def explain_failed_require(file, error); end + + # source://tapioca//lib/tapioca/loaders/gem.rb#60 + sig { void } + def require_gem_file; end + + class << self + # source://tapioca//lib/tapioca/loaders/gem.rb#21 + sig do + params( + bundle: ::Tapioca::Gemfile, + prerequire: T.nilable(::String), + postrequire: ::String, + default_command: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/loaders/loader.rb#6 +class Tapioca::Loaders::Loader + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + include ::Tapioca::CliHelper + include ::Tapioca::GemHelper + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + abstract! + + # @abstract + # + # source://tapioca//lib/tapioca/loaders/loader.rb#17 + sig { abstract.void } + def load; end + + private + + # source://tapioca//lib/tapioca/loaders/loader.rb#198 + sig { void } + def eager_load_rails_app; end + + # @return [Array<T.class_of(Rails::Engine)>] + # + # source://tapioca//lib/tapioca/loaders/loader.rb#169 + def engines; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#29 + sig do + params( + gemfile: ::Tapioca::Gemfile, + initialize_file: T.nilable(::String), + require_file: T.nilable(::String), + halt_upon_load_error: T::Boolean + ).void + end + def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#127 + sig { void } + def load_engines_in_classic_mode; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#105 + sig { void } + def load_engines_in_zeitwerk_mode; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#49 + sig do + params( + environment_load: T::Boolean, + eager_load: T::Boolean, + app_root: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#80 + sig { void } + def load_rails_engines; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#219 + sig { params(file: T.nilable(::String)).void } + def require_helper(file); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#94 + def run_initializers; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#183 + sig { params(path: ::String).void } + def safe_require(path); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#190 + sig { void } + def silence_deprecations; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#152 + sig { params(blk: T.proc.void).void } + def with_rails_application(&blk); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#145 + sig { returns(T::Boolean) } + def zeitwerk_mode?; end +end + +# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5 +module Tapioca::RBIFilesHelper + requires_ancestor { Tapioca::SorbetHelper } + requires_ancestor { Thor::Shell } + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#48 + sig do + params( + index: ::RBI::Index, + shim_rbi_dir: ::String, + todo_rbi_file: ::String + ).returns(T::Hash[::String, T::Array[::RBI::Node]]) + end + def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#13 + sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void } + def index_rbi(index, kind, file); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#25 + sig { params(index: ::RBI::Index, kind: ::String, dir: ::String, number_of_workers: T.nilable(::Integer)).void } + def index_rbis(index, kind, dir, number_of_workers:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#65 + sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) } + def location_to_payload_url(loc, path_prefix:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#86 + sig do + params( + command: ::String, + gem_dir: ::String, + dsl_dir: ::String, + auto_strictness: T::Boolean, + gems: T::Array[::Tapioca::Gemfile::GemSpec], + compilers: T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)] + ).void + end + def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#209 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } + def extract_empty_scopes(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#214 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } + def extract_methods_and_attrs(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#224 + sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } + def extract_mixins(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#234 + sig do + params( + nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] + ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) + end + def extract_nodes_with_sigs(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 + sig do + params( + nodes: T::Array[::RBI::Node], + shim_rbi_dir: ::String, + todo_rbi_file: ::String + ).returns(T::Array[::RBI::Node]) + end + def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#266 + sig { params(path: ::String).returns(::String) } + def gem_name_from_rbi_path(path); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#155 + sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void } + def parse_and_index_files(index, files, number_of_workers:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#171 + sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } + def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#239 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } + def update_gem_rbis_strictnesses(errors, gem_dir); end +end + +# source://tapioca//lib/tapioca/rbi_formatter.rb#5 +class Tapioca::RBIFormatter < ::RBI::Formatter + # source://tapioca//lib/tapioca/rbi_formatter.rb#22 + sig { params(file: ::RBI::File).void } + def write_empty_body_comment!(file); end + + # source://tapioca//lib/tapioca/rbi_formatter.rb#15 + sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void } + def write_header!(file, command, reason: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#5 +module Tapioca::RBIHelper + include ::Tapioca::SorbetHelper + extend ::Tapioca::SorbetHelper + extend ::Tapioca::RBIHelper + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#91 + sig { params(type: ::String).returns(::String) } + def as_nilable_type(type); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_block_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#62 + sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } + def create_kw_opt_param(name, type:, default:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#57 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_kw_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#67 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_kw_rest_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#47 + sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } + def create_opt_param(name, type:, default:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#42 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#52 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_rest_param(name, type:); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#77 + sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) } + def create_typed_param(param, type); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#82 + sig { params(sig_string: ::String).returns(::String) } + def sanitize_signature_types(sig_string); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + sig { params(name: ::String).returns(T::Boolean) } + def valid_method_name?(name); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#114 + sig { params(name: ::String).returns(T::Boolean) } + def valid_parameter_name?(name); end + + class << self + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23 + sig do + params( + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).returns(::String) + end + def serialize_type_variable(type, variance, fixed, upper, lower); end + end +end + +# source://tapioca//lib/tapioca/repo_index.rb#5 +class Tapioca::RepoIndex + # source://tapioca//lib/tapioca/repo_index.rb#26 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/repo_index.rb#31 + sig { params(gem_name: ::String).void } + def <<(gem_name); end + + # source://tapioca//lib/tapioca/repo_index.rb#36 + sig { returns(T::Enumerable[::String]) } + def gems; end + + # source://tapioca//lib/tapioca/repo_index.rb#41 + sig { params(gem_name: ::String).returns(T::Boolean) } + def has_gem?(gem_name); end + + class << self + # source://tapioca//lib/tapioca/repo_index.rb#18 + sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) } + def from_hash(hash); end + + # source://tapioca//lib/tapioca/repo_index.rb#13 + sig { params(json: ::String).returns(Tapioca::RepoIndex) } + def from_json(json); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5 +module Tapioca::Runtime; end + +# This module should only be included when running versions of Ruby +# older than 3.2. Because the Class#attached_object method is not +# available, it implements finding the attached class of a singleton +# class by iterating through ObjectSpace. +module Tapioca::Runtime::AttachedClassOf + # source://tapioca//lib/tapioca/runtime/attached_class_of_legacy.rb#17 + sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } + def attached_class_of(singleton_class); end +end + +# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#6 +class Tapioca::Runtime::DynamicMixinCompiler + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20 + sig { params(constant: ::Module).void } + def initialize(constant); end + + # @return [Array<Symbol>] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + sig { returns(T::Array[::Symbol]) } + def class_attribute_readers; end + + # @return [Array<Symbol>] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137 + sig { params(tree: ::RBI::Tree).void } + def compile_class_attributes(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180 + sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) } + def compile_mixes_in_class_methods(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + sig { returns(T::Array[::Module]) } + def dynamic_extends; end + + # @return [Array<Module>] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + def dynamic_includes; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132 + sig { returns(T::Boolean) } + def empty_attributes?; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222 + sig { params(qualified_mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(qualified_mixin_name); end + + # @return [Array<Symbol>] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + sig { returns(T::Array[::Symbol]) } + def instance_attribute_readers; end + + # @return [Array<Symbol>] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215 + sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) } + def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end +end + +# This class is responsible for storing and looking up information related to generic types. +# +# The class stores 2 different kinds of data, in two separate lookup tables: +# 1. a lookup of generic type instances by name: `@generic_instances` +# 2. a lookup of type variable serializer by constant and type variable +# instance: `@type_variables` +# +# By storing the above data, we can cheaply query each constant against this registry +# to see if it declares any generic type variables. This becomes a simple lookup in the +# `@type_variables` hash table with the given constant. +# +# If there is no entry, then we can cheaply know that we can skip generic type +# information generation for this type. +# +# On the other hand, if we get a result, then the result will be a hash of type +# variable to type variable serializers. This allows us to associate type variables +# to the constant names that represent them, easily. +# +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23 +module Tapioca::Runtime::GenericTypeRegistry + class << self + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 + sig { params(instance: ::Object).returns(T::Boolean) } + def generic_type_instance?(instance); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85 + sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) } + def lookup_type_variables(constant); end + + # This method is responsible for building the name of the instantiated concrete type + # and cloning the given constant so that we can return a type that is the same + # as the current type but is a different instance and has a different name method. + # + # We cache those cloned instances by their name in `@generic_instances`, so that + # we don't keep instantiating a new type every single time it is referenced. + # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only + # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and + # 2 hash lookups (for the other two `Foo[Integer]`s). + # + # This method returns the created or cached clone of the constant. + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65 + sig { params(constant: T.untyped, types: T.untyped).returns(::Module) } + def register_type(constant, types); end + + # This method is called from intercepted calls to `type_member` and `type_template`. + # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable` + # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`. + # + # This method creates a `String` with that data and stores it in the + # `@type_variables` lookup table, keyed by the `constant` and `type_variable`. + # + # Finally, the original `type_variable` is returned from this method, so that the caller + # can return it from the original methods as well. + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104 + sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void } + def register_type_variable(constant, type_variable); end + + private + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113 + sig { params(constant: ::Module, name: ::String).returns(::Module) } + def create_generic_type(constant, name); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 + sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) } + def create_safe_subclass(constant); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 + sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) } + def lookup_or_initialize_type_variables(constant); end + end +end + +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34 +class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38 + sig { params(raw_type: ::Module, underlying_type: ::Module).void } + def initialize(raw_type, underlying_type); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 + sig { params(obj: T.untyped).returns(T::Boolean) } + def valid?(obj); end +end + +module Tapioca::Runtime::Reflection + include ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + # source://tapioca//lib/tapioca/runtime/reflection.rb#196 + sig { params(constant: ::Module).returns(T.untyped) } + def abstract_type_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#77 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def ancestors_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#92 + sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) } + def are_equal?(object, other); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#56 + sig { params(object: ::BasicObject).returns(T::Class[T.anything]) } + def class_of(object); end + + # @param constant [BasicObject] + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#38 + def constant_defined?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#49 + sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) } + def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#61 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def constants_of(constant); end + + # Returns an array with all classes that are < than the supplied class. + # + # class C; end + # descendants_of(C) # => [] + # + # class B < C; end + # descendants_of(C) # => [B] + # + # class A < B; end + # descendants_of(C) # => [B, A] + # + # class D < C; end + # descendants_of(C) # => [B, A, D] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#167 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#189 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def file_candidates_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#202 + sig { params(constant: ::Module).returns(T::Boolean) } + def final_module?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#112 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def inherited_ancestors_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#145 + sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } + def method_of(constant, method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#66 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def name_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#140 + sig { params(type: ::T::Types::Base).returns(::String) } + def name_of_type(type); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#87 + sig { params(object: ::BasicObject).returns(::Integer) } + def object_id_of(object); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#107 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def private_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#102 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def protected_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#97 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def public_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#121 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def qualified_name_of(constant); end + + # Examines the call stack to identify the closest location where a "require" is performed + # by searching for the label "<top (required)>". If none is found, it returns the location + # labeled "<main>", which is the original call site. + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#179 + sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } + def resolve_loc(locations); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#207 + sig { params(constant: ::Module).returns(T::Boolean) } + def sealed_module?(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#133 + sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } + def signature_of(method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#72 + sig { params(constant: ::Module).returns(T::Class[T.anything]) } + def singleton_class_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#82 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(T::Class[T.anything])) } + def superclass_of(constant); end + + private + + # source://tapioca//lib/tapioca/runtime/reflection.rb#244 + sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } + def child_module_for_parent_with_name(parent, name); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#255 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_defined_by_forwardable_module?(method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#230 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def methods_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#214 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def relevant_methods_for(constant); end +end + +# source://tapioca//lib/tapioca/runtime/reflection.rb#25 +Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#21 +Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#22 +Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#28 +Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#32 +Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#23 +Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#27 +Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#31 +Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#30 +Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#29 +Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#35 +Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#24 +Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/reflection.rb#26 +Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6 +module Tapioca::Runtime::Trackers + class << self + # source://tapioca//lib/tapioca/runtime/trackers.rb#34 + sig { void } + def disable_all!; end + + # source://tapioca//lib/tapioca/runtime/trackers.rb#39 + sig { params(tracker: ::Tapioca::Runtime::Trackers::Tracker).void } + def register_tracker(tracker); end + + # source://tapioca//lib/tapioca/runtime/trackers.rb#21 + sig do + type_parameters(:Return) + .params( + blk: T.proc.returns(T.type_parameter(:Return)) + ).returns(T.type_parameter(:Return)) + end + def with_trackers_enabled(&blk); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#7 +module Tapioca::Runtime::Trackers::Autoload + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19 + sig { void } + def eager_load_all!; end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31 + sig { params(constant_name: ::String).void } + def register(constant_name); end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#42 + sig do + type_parameters(:Result) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def with_disabled_exits(&block); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#11 +Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) + +# Registers a TracePoint immediately upon load to track points at which +# classes and modules are opened for definition. This is used to track +# correspondence between classes/modules and files, as this information isn't +# available in the ruby runtime without extra accounting. +module Tapioca::Runtime::Trackers::ConstantDefinition + extend ::Tapioca::Runtime::Trackers::Tracker + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#61 + def build_constant_location(tp, locations); end + + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#55 + def disable!; end + + # Returns the files in which this class or module was opened. Doesn't know + # about situations where the class was opened prior to +require+ing, + # or where metaprogramming was used via +eval+, etc. + # + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#71 + def files_for(klass); end + + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#75 + def locations_for(klass); end + end +end + +module Tapioca::Runtime::Trackers::Mixin + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56 + sig do + params( + mixin: ::Module + ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) + end + def constants_with_mixin(mixin); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#61 + sig do + params( + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, + constant: ::Module + ).returns(T.nilable(::String)) + end + def mixin_location(mixin, mixin_type, constant); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#35 + sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void } + def register(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#43 + def resolve_to_attached_class(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#30 + sig do + type_parameters(:Result) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def with_disabled_registration(&block); end + + private + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#76 + sig do + params( + mixin: ::Module + ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) + end + def find_or_initialize_mixin_lookup(mixin); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#68 + sig do + params( + constant: ::Module, + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, + location: ::String + ).void + end + def register_with_location(constant, mixin, mixin_type, location); end + end +end + +class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum + enums do + Prepend = new + Include = new + Extend = new + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#7 +module Tapioca::Runtime::Trackers::RequiredAncestor + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#15 + sig { params(requiring: ::T::Helpers, block: T.proc.void).void } + def register(requiring, block); end + + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#23 + sig { params(mod: ::Module).returns(T::Array[T.proc.void]) } + def required_ancestors_blocks_by(mod); end + + # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#28 + sig { params(mod: ::Module).returns(T::Array[T.untyped]) } + def required_ancestors_by(mod); end + end +end + +# @abstract Subclasses must implement the `abstract` methods below. +module Tapioca::Runtime::Trackers::Tracker + abstract! + + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#26 + sig { void } + def disable!; end + + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#30 + def enabled?; end + + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#34 + def with_disabled_tracker(&block); end + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#17 + sig { params(base: T.all(::Module, ::Tapioca::Runtime::Trackers::Tracker)).void } + def extended(base); end + end +end + +# source://tapioca//lib/tapioca.rb#34 +Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#33 +Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 +module Tapioca::SorbetHelper + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#34 + sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } + def sorbet(*sorbet_args); end + + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#39 + sig { returns(::String) } + def sorbet_path; end + + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#46 + sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } + def sorbet_supports?(feature, version: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#24 +Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#13 +Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18 +Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#8 +Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#20 +Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22 +Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context) + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#5 +module Tapioca::Static; end + +# source://tapioca//lib/tapioca/static/requires_compiler.rb#6 +class Tapioca::Static::RequiresCompiler + # source://tapioca//lib/tapioca/static/requires_compiler.rb#10 + sig { params(sorbet_path: ::String).void } + def initialize(sorbet_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#15 + sig { returns(::String) } + def compile; end + + private + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#29 + sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) } + def collect_files(config); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#44 + sig { params(file_path: ::String).returns(T::Enumerable[::String]) } + def collect_requires(file_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#51 + sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) } + def file_ignored_by_sorbet?(config, file_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#80 + sig { params(path: ::Pathname).returns(T::Array[::String]) } + def path_parts(path); end +end + +# source://tapioca//lib/tapioca/static/symbol_loader.rb#6 +module Tapioca::Static::SymbolLoader + extend ::Tapioca::SorbetHelper + extend ::Tapioca::Runtime::AttachedClassOf + extend ::Tapioca::Runtime::Reflection + + class << self + # source://tapioca//lib/tapioca/static/symbol_loader.rb#23 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def engine_symbols(gem); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#40 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def gem_symbols(gem); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#13 + sig { returns(T::Set[::String]) } + def payload_symbols; end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#45 + sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } + def symbols_from_paths(paths); end + + private + + # @return [Array<T.class_of(Rails::Engine)>] + # + # source://sorbet-runtime/0.5.11011/lib/types/private/methods/_methods.rb#255 + def engines(*args, **_arg1, &blk); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#73 + sig { params(input: ::String, table_type: ::String).returns(::String) } + def symbol_table_json_from(input, table_type: T.unsafe(nil)); end + end +end + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#6 +class Tapioca::Static::SymbolTableParser + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#30 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65 + sig { params(name: ::String).returns(::String) } + def fully_qualified_name(name); end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#36 + sig { params(object: T::Hash[::String, T.untyped]).void } + def parse_object(object); end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#27 + sig { returns(T::Set[::String]) } + def symbols; end + + class << self + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#15 + sig { params(json_string: ::String).returns(T::Set[::String]) } + def parse_json(json_string); end + end +end + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 +Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca.rb#36 +Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#35 +Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#137 +class Tapioca::TypeVariable < ::T::Types::TypeVariable + # @return [TypeVariable] a new instance of TypeVariable + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#138 + def initialize(name, variance); end + + # Returns the value of attribute name. + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#143 + def name; end +end + +# This is subclassing from `Module` so that instances of this type will be modules. +# The reason why we want that is because that means those instances will automatically +# get bound to the constant names they are assigned to by Ruby. As a result, we don't +# need to do any matching of constants to type variables to bind their names, Ruby will +# do that automatically for us and we get the `name` method for free from `Module`. +# +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#151 +class Tapioca::TypeVariableModule < ::Module + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#177 + sig do + params( + context: ::Module, + type: ::Tapioca::TypeVariableModule::Type, + variance: ::Symbol, + fixed: T.untyped, + lower: T.untyped, + upper: T.untyped, + bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped])) + ).void + end + def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#231 + sig { returns(::Tapioca::TypeVariable) } + def coerce_to_type_variable; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#211 + sig { returns(T::Boolean) } + def fixed?; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192 + sig { returns(T.nilable(::String)) } + def name; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#216 + sig { returns(::String) } + def serialize; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#163 + sig { returns(::Tapioca::TypeVariableModule::Type) } + def type; end + + private + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#265 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def bounds; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#241 + sig do + params( + fixed: T.untyped, + lower: T.untyped, + upper: T.untyped + ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped])) + end + def build_bounds_proc(fixed, lower, upper); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#255 + sig do + type_parameters(:Result) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def with_bound_name_pre_3_0(&block); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#154 +class Tapioca::TypeVariableModule::Type < ::T::Enum + enums do + Member = new + Template = new + HasAttachedClass = new + end +end + +# source://tapioca//lib/tapioca/version.rb#5 +Tapioca::VERSION = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/source_uri.rb#6 +module URI + include ::URI::RFC2396_REGEXP +end + +# source://tapioca//lib/tapioca/helpers/source_uri.rb#7 +class URI::Source < ::URI::File + # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri/0.12.1/uri/generic.rb#243 + def gem_name; end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri/0.12.1/uri/generic.rb#283 + def line_number; end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 + sig { returns(::String) } + def to_s; end + + class << self + # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +end + +# source://tapioca//lib/tapioca/helpers/source_uri.rb#10 +URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) + +class URI::WSS < ::URI::WS; end diff --git a/sorbet/rbi/gems/terminal-table@3.0.2.rbi b/sorbet/rbi/gems/terminal-table@3.0.2.rbi new file mode 100644 index 0000000000..fbdb547d30 --- /dev/null +++ b/sorbet/rbi/gems/terminal-table@3.0.2.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `terminal-table` gem. +# Please instead update this file by running `bin/tapioca gem terminal-table`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/thor@1.2.2.rbi b/sorbet/rbi/gems/thor@1.2.2.rbi new file mode 100644 index 0000000000..2bedd69837 --- /dev/null +++ b/sorbet/rbi/gems/thor@1.2.2.rbi @@ -0,0 +1,3965 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `thor` gem. +# Please instead update this file by running `bin/tapioca gem thor`. + +# source://thor//lib/thor/command.rb#1 +class Thor + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + # source://thor//lib/thor.rb#505 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + class << self + # Extend check unknown options to accept a hash of conditions. + # + # === Parameters + # options<Hash>: A hash containing :only and/or :except keys + # + # source://thor//lib/thor.rb#255 + def check_unknown_options!(options = T.unsafe(nil)); end + + # Overwrite check_unknown_options? to take subcommands and options into account. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#268 + def check_unknown_options?(config); end + + # Prints help information for the given command. + # + # ==== Parameters + # shell<Thor::Shell> + # command_name<String> + # + # source://thor//lib/thor.rb#172 + def command_help(shell, command_name); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth<Symbol>:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_command(meth = T.unsafe(nil)); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth<Symbol>:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_task(meth = T.unsafe(nil)); end + + # source://thor//lib/thor/base.rb#26 + def deprecation_warning(message); end + + # Defines the usage and the description of the next command. + # + # ==== Parameters + # usage<String> + # description<String> + # options<String> + # + # source://thor//lib/thor.rb#54 + def desc(usage, description, options = T.unsafe(nil)); end + + # Disable the check for required options for the given commands. + # This is useful if you have a command that does not need the required options + # to work, like help. + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#339 + def disable_required_check!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#343 + def disable_required_check?(command); end + + # Prints help information for this class. + # + # ==== Parameters + # shell<Thor::Shell> + # + # source://thor//lib/thor.rb#195 + def help(shell, subcommand = T.unsafe(nil)); end + + # Defines the long description of the next command. + # + # ==== Parameters + # long description<String> + # + # source://thor//lib/thor.rb#71 + def long_desc(long_description, options = T.unsafe(nil)); end + + # Maps an input to a command. If you define: + # + # map "-T" => "list" + # + # Running: + # + # thor -T + # + # Will invoke the list command. + # + # ==== Parameters + # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. + # + # source://thor//lib/thor.rb#93 + def map(mappings = T.unsafe(nil), **kw); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo => :bar, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#155 + def method_option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#121 + def method_options(options = T.unsafe(nil)); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo => :bar, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#155 + def option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#121 + def options(options = T.unsafe(nil)); end + + # Allows for custom "Command" package naming. + # + # === Parameters + # name<String> + # options<Hash> + # + # source://thor//lib/thor.rb#12 + def package_name(name, _ = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#214 + def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#214 + def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Registers another Thor subclass as a command. + # + # ==== Parameters + # klass<Class>:: Thor subclass to register + # command<String>:: Subcommand name to use + # usage<String>:: Short usage for the subcommand + # description<String>:: Description for the subcommand + # + # source://thor//lib/thor.rb#37 + def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end + + # Stop parsing of options as soon as an unknown option or a regular + # argument is encountered. All remaining arguments are passed to the command. + # This is useful if you have a command that can receive arbitrary additional + # options, and where those additional options should not be handled by + # Thor. + # + # ==== Example + # + # To better understand how this is useful, let's consider a command that calls + # an external command. A user may want to pass arbitrary options and + # arguments to that command. The command itself also accepts some options, + # which should be handled by Thor. + # + # class_option "verbose", :type => :boolean + # stop_on_unknown_option! :exec + # check_unknown_options! :except => :exec + # + # desc "exec", "Run a shell command" + # def exec(*args) + # puts "diagnostic output" if options[:verbose] + # Kernel.exec(*args) + # end + # + # Here +exec+ can be called with +--verbose+ to get diagnostic output, + # e.g.: + # + # $ thor exec --verbose echo foo + # diagnostic output + # foo + # + # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead: + # + # $ thor exec echo --verbose foo + # --verbose foo + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#325 + def stop_on_unknown_option!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#329 + def stop_on_unknown_option?(command); end + + # source://thor//lib/thor.rb#234 + def subcommand(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#230 + def subcommand_classes; end + + # source://thor//lib/thor.rb#225 + def subcommands; end + + # source://thor//lib/thor.rb#234 + def subtask(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#225 + def subtasks; end + + # Prints help information for the given command. + # + # ==== Parameters + # shell<Thor::Shell> + # command_name<String> + # + # source://thor//lib/thor.rb#172 + def task_help(shell, command_name); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. It receives + # the command that is going to be invoked and a boolean which indicates if + # the namespace should be displayed as arguments. + # + # source://thor//lib/thor.rb#400 + def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#406 + def baseclass; end + + # source://thor//lib/thor.rb#414 + def create_command(meth); end + + # source://thor//lib/thor.rb#414 + def create_task(meth); end + + # help command has the required check disabled by default. + # + # source://thor//lib/thor.rb#354 + def disable_required_check; end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor.rb#359 + def dispatch(meth, given_args, given_opts, config); end + + # source://thor//lib/thor.rb#410 + def dynamic_command_class; end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#476 + def find_command_possibilities(meth); end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#476 + def find_task_possibilities(meth); end + + # source://thor//lib/thor.rb#436 + def initialize_added; end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#455 + def normalize_command_name(meth); end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#455 + def normalize_task_name(meth); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#442 + def retrieve_command_name(args); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#442 + def retrieve_task_name(args); end + + # source://thor//lib/thor.rb#349 + def stop_on_unknown_option; end + + # source://thor//lib/thor.rb#491 + def subcommand_help(cmd); end + + # source://thor//lib/thor.rb#491 + def subtask_help(cmd); end + end +end + +# source://thor//lib/thor/actions/empty_directory.rb#2 +module Thor::Actions + mixes_in_class_methods ::Thor::Actions::ClassMethods + + # Extends initializer to add more configuration options. + # + # ==== Configuration + # behavior<Symbol>:: The actions default behavior. Can be :invoke or :revoke. + # It also accepts :force, :skip and :pretend to set the behavior + # and the respective option. + # + # destination_root<String>:: The root directory needed for some actions. + # + # source://thor//lib/thor/actions.rb#72 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Wraps an action object and call it accordingly to the thor class behavior. + # + # source://thor//lib/thor/actions.rb#89 + def action(instance); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # data<String|NilClass>:: the data to append to the file. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def add_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # source<String|NilClass>:: the relative path to the source root. + # config<Hash>:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def add_link(destination, *args); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to append to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#195 + def append_file(path, *args, &block); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to append to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#195 + def append_to_file(path, *args, &block); end + + # Loads an external file and execute it in the instance binding. + # + # ==== Parameters + # path<String>:: The path to the file to execute. Can be a web address or + # a relative path from the source root. + # + # ==== Examples + # + # apply "http://gist.github.com/103208" + # + # apply "recipes/jquery.rb" + # + # source://thor//lib/thor/actions.rb#216 + def apply(path, config = T.unsafe(nil)); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions.rb#10 + def behavior; end + + # Sets the attribute behavior + # + # @param value the value to set the attribute behavior to. + # + # source://thor//lib/thor/actions.rb#10 + def behavior=(_arg0); end + + # Changes the mode of the given file or directory. + # + # ==== Parameters + # mode<Integer>:: the file mode + # path<String>:: the name of the file to change mode + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # chmod "script/server", 0755 + # + # source://thor//lib/thor/actions/file_manipulation.rb#148 + def chmod(path, mode, config = T.unsafe(nil)); end + + # Comment all lines matching a given regex. It will leave the space + # which existed before the beginning of the line in tact and will insert + # a single space after the comment hash. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # flag<Regexp|String>:: the regexp or string used to decide which lines to comment + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # comment_lines 'config/initializers/session_store.rb', /cookie_store/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#312 + def comment_lines(path, flag, *args); end + + # ==== Examples + # + # copy_file "README", "doc/README" + # + # copy_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#21 + def copy_file(source, *args, &block); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # data<String|NilClass>:: the data to append to the file. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def create_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # source<String|NilClass>:: the relative path to the source root. + # config<Hash>:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def create_link(destination, *args); end + + # Returns the root for this thor class (also aliased as destination root). + # + # source://thor//lib/thor/actions.rb#99 + def destination_root; end + + # Sets the root for this thor class. Relatives path are added to the + # directory where the script was invoked and expanded. + # + # source://thor//lib/thor/actions.rb#106 + def destination_root=(root); end + + # Copies recursively the files from source directory to root directory. + # If any of the files finishes with .tt, it's considered to be a template + # and is placed in the destination without the extension .tt. If any + # empty directory is found, it's copied and all .empty_directory files are + # ignored. If any file name is wrapped within % signs, the text within + # the % signs will be executed as a method and replaced with the returned + # value. Let's suppose a doc directory with the following files: + # + # doc/ + # components/.empty_directory + # README + # rdoc.rb.tt + # %app_name%.rb + # + # When invoked as: + # + # directory "doc" + # + # It will create a doc directory in the destination with the following + # files (assuming that the `app_name` method returns the value "blog"): + # + # doc/ + # components/ + # README + # rdoc.rb + # blog.rb + # + # <b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can + # expand %something%, this `something` should be a public method in the class calling + # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # If :recursive => false, does not look for paths recursively. + # If :mode => :preserve, preserve the file mode from the source. + # If :exclude_pattern => /regexp/, prevents copying files that match that regexp. + # + # ==== Examples + # + # directory "doc" + # directory "doc", "docs", :recursive => false + # + # source://thor//lib/thor/actions/directory.rb#49 + def directory(source, *args, &block); end + + # Creates an empty directory. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # empty_directory "doc" + # + # source://thor//lib/thor/actions/empty_directory.rb#13 + def empty_directory(destination, config = T.unsafe(nil)); end + + # Receives a file or directory and search for it in the source paths. + # + # @raise [Error] + # + # source://thor//lib/thor/actions.rb#133 + def find_in_source_paths(file); end + + # Gets the content at the given address and places it at the given relative + # destination. If a block is given instead of destination, the content of + # the url is yielded and used as location. + # + # +get+ relies on open-uri, so passing application user input would provide + # a command injection attack vector. + # + # ==== Parameters + # source<String>:: the address of the given content. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # get "http://gist.github.com/103208", "doc/README" + # + # get "http://gist.github.com/103208" do |content| + # content.split("\n").first + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#79 + def get(source, *args, &block); end + + # Run a regular expression replacement on a file. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # flag<Regexp|String>:: the regexp or string to be replaced + # replacement<String>:: the replacement, can be also given as a block + # config<Hash>:: give :verbose => false to not log the status, and + # :force => true, to force the replacement regardless of runner behavior. + # + # ==== Example + # + # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' + # + # gsub_file 'README', /rake/, :green do |match| + # match << " no more. Use thor!" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#265 + def gsub_file(path, flag, *args, &block); end + + # Goes to the root and execute the given block. + # + # source://thor//lib/thor/actions.rb#200 + def in_root; end + + # Injects text right after the class definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # klass<String|Class>:: the class to be manipulated + # data<String>:: the data to append to the class, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n" + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do + # " filter_parameter :password\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#219 + def inject_into_class(path, klass, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def inject_into_file(destination, *args, &block); end + + # Injects text right after the module definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # module_name<String|Class>:: the module to be manipulated + # data<String>:: the data to append to the class, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n" + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do + # " def help; 'help'; end\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#242 + def inject_into_module(path, module_name, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def insert_into_file(destination, *args, &block); end + + # Do something in the root or on a provided subfolder. If a relative path + # is given it's referenced from the current root. The full path is yielded + # to the block you provide. The path is set back to the previous path when + # the method exits. + # + # Returns the value yielded by the block. + # + # ==== Parameters + # dir<String>:: the directory to move to. + # config<Hash>:: give :verbose => true to log and use padding. + # + # source://thor//lib/thor/actions.rb#170 + def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Links the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # link_file "README", "doc/README" + # + # link_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#51 + def link_file(source, *args); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to prepend to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#173 + def prepend_file(path, *args, &block); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to prepend to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#173 + def prepend_to_file(path, *args, &block); end + + # Returns the given path relative to the absolute root (ie, root where + # the script started). + # + # source://thor//lib/thor/actions.rb#114 + def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#329 + def remove_dir(path, config = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#329 + def remove_file(path, config = T.unsafe(nil)); end + + # Executes a command returning the contents of the command. + # + # ==== Parameters + # command<String>:: the command to be executed. + # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with + # to append an executable to command execution. + # + # ==== Example + # + # inside('vendor') do + # run('ln -s ~/edge rails') + # end + # + # source://thor//lib/thor/actions.rb#249 + def run(command, config = T.unsafe(nil)); end + + # Executes a ruby script (taking into account WIN32 platform quirks). + # + # ==== Parameters + # command<String>:: the command to be executed. + # config<Hash>:: give :verbose => false to not log the status. + # + # source://thor//lib/thor/actions.rb#286 + def run_ruby_script(command, config = T.unsafe(nil)); end + + # Holds source paths in instance so they can be manipulated. + # + # source://thor//lib/thor/actions.rb#127 + def source_paths; end + + # Gets an ERB template at the relative source, executes it and makes a copy + # at the relative destination. If the destination is not given it's assumed + # to be equal to the source removing .tt from the filename. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # template "README", "doc/README" + # + # template "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#115 + def template(source, *args, &block); end + + # Run a thor command. A hash of options can be given and it's converted to + # switches. + # + # ==== Parameters + # command<String>:: the command to be invoked + # args<Array>:: arguments to the command + # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. + # Other options are given as parameter to Thor. + # + # + # ==== Examples + # + # thor :install, "http://gist.github.com/103208" + # #=> thor install http://gist.github.com/103208 + # + # thor :list, :all => true, :substring => 'rails' + # #=> thor list --all --substring=rails + # + # source://thor//lib/thor/actions.rb#309 + def thor(command, *args); end + + # Uncomment all lines matching a given regex. It will leave the space + # which existed before the comment hash in tact but will remove any spacing + # between the comment hash and the beginning of the line. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # uncomment_lines 'config/initializers/session_store.rb', /active_record/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#293 + def uncomment_lines(path, flag, *args); end + + protected + + # source://thor//lib/thor/actions.rb#330 + def _cleanup_options_and_set(options, key); end + + # Allow current root to be shared between invocations. + # + # source://thor//lib/thor/actions.rb#326 + def _shared_configuration; end + + private + + # source://thor//lib/thor/actions/file_manipulation.rb#350 + def capture(*args); end + + # source://thor//lib/thor/actions/file_manipulation.rb#346 + def concat(string); end + + # Returns the value of attribute output_buffer. + # + # source://thor//lib/thor/actions/file_manipulation.rb#341 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://thor//lib/thor/actions/file_manipulation.rb#341 + def output_buffer=(_arg0); end + + # source://thor//lib/thor/actions/file_manipulation.rb#354 + def with_output_buffer(buf = T.unsafe(nil)); end + + class << self + # source://thor//lib/thor/actions.rb#12 + def included(base); end + end +end + +# Thor::Actions#capture depends on what kind of buffer is used in ERB. +# Thus CapturableERB fixes ERB to use String buffer. +# +# source://thor//lib/thor/actions/file_manipulation.rb#366 +class Thor::Actions::CapturableERB < ::ERB + # source://thor//lib/thor/actions/file_manipulation.rb#367 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# source://thor//lib/thor/actions.rb#17 +module Thor::Actions::ClassMethods + # Add runtime options that help actions execution. + # + # source://thor//lib/thor/actions.rb#48 + def add_runtime_options!; end + + # Hold source paths for one Thor instance. source_paths_for_search is the + # method responsible to gather source_paths from this current class, + # inherited paths and the source root. + # + # source://thor//lib/thor/actions.rb#22 + def source_paths; end + + # Returns the source paths in the following order: + # + # 1) This class source paths + # 2) Source root + # 3) Parents source paths + # + # source://thor//lib/thor/actions.rb#38 + def source_paths_for_search; end + + # Stores and return the source root for this class + # + # source://thor//lib/thor/actions.rb#27 + def source_root(path = T.unsafe(nil)); end +end + +# CreateFile is a subset of Template, which instead of rendering a file with +# ERB, it gets the content from the user. +# +# source://thor//lib/thor/actions/create_file.rb#32 +class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory + # @return [CreateFile] a new instance of CreateFile + # + # source://thor//lib/thor/actions/create_file.rb#35 + def initialize(base, destination, data, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/create_file.rb#33 + def data; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#45 + def identical?; end + + # source://thor//lib/thor/actions/create_file.rb#59 + def invoke!; end + + # Holds the content to be added to the file. + # + # source://thor//lib/thor/actions/create_file.rb#51 + def render; end + + protected + + # Shows the file collision menu to the user and gets the result. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#99 + def force_on_collision?; end + + # If force is true, run the action, otherwise check if it's not being + # skipped. If both are false, show the file_collision menu, if the menu + # returns true, force it, otherwise skip. + # + # source://thor//lib/thor/actions/create_file.rb#85 + def force_or_skip_or_conflict(force, skip, &block); end + + # Now on conflict we check if the file is identical or not. + # + # source://thor//lib/thor/actions/create_file.rb#72 + def on_conflict_behavior(&block); end +end + +# CreateLink is a subset of CreateFile, which instead of taking a block of +# data, just takes a source string from the user. +# +# source://thor//lib/thor/actions/create_link.rb#27 +class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile + # source://thor//lib/thor/actions/create_link.rb#28 + def data; end + + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#56 + def exists?; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#35 + def identical?; end + + # source://thor//lib/thor/actions/create_link.rb#40 + def invoke!; end +end + +# source://thor//lib/thor/actions/directory.rb#55 +class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory + # @return [Directory] a new instance of Directory + # + # source://thor//lib/thor/actions/directory.rb#58 + def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # source://thor//lib/thor/actions/directory.rb#64 + def invoke!; end + + # source://thor//lib/thor/actions/directory.rb#69 + def revoke!; end + + # Returns the value of attribute source. + # + # source://thor//lib/thor/actions/directory.rb#56 + def source; end + + protected + + # source://thor//lib/thor/actions/directory.rb#75 + def execute!; end + + # source://thor//lib/thor/actions/directory.rb#99 + def file_level_lookup(previous_lookup); end + + # source://thor//lib/thor/actions/directory.rb#103 + def files(lookup); end +end + +# source://thor//lib/thor/actions/empty_directory.rb#23 +class Thor::Actions::EmptyDirectory + # Initializes given the source and destination. + # + # ==== Parameters + # base<Thor::Base>:: A Thor::Base instance + # source<String>:: Relative path to the source of this file + # destination<String>:: Relative path to the destination of this file + # config<Hash>:: give :verbose => false to not log the status. + # + # @return [EmptyDirectory] a new instance of EmptyDirectory + # + # source://thor//lib/thor/actions/empty_directory.rb#34 + def initialize(base, destination, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def base; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def config; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def destination; end + + # Checks if the destination file already exists. + # + # ==== Returns + # Boolean:: true if the file exists, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#45 + def exists?; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def given_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#49 + def invoke!; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def relative_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#56 + def revoke!; end + + protected + + # Filenames in the encoded form are converted. If you have a file: + # + # %file_name%.rb + # + # It calls #file_name from the base and replaces %-string with the + # return value (should be String) of #file_name: + # + # user.rb + # + # The method referenced can be either public or private. + # + # source://thor//lib/thor/actions/empty_directory.rb#103 + def convert_encoded_instructions(filename); end + + # Sets the absolute destination value from a relative destination value. + # It also stores the given and relative destination. Let's suppose our + # script is being executed on "dest", it sets the destination root to + # "dest". The destination, given_destination and relative_destination + # are related in the following way: + # + # inside "bar" do + # empty_directory "baz" + # end + # + # destination #=> dest/bar/baz + # relative_destination #=> bar/baz + # given_destination #=> baz + # + # source://thor//lib/thor/actions/empty_directory.rb#85 + def destination=(destination); end + + # Receives a hash of options and just execute the block if some + # conditions are met. + # + # source://thor//lib/thor/actions/empty_directory.rb#113 + def invoke_with_conflict_check(&block); end + + # What to do when the destination file already exists. + # + # source://thor//lib/thor/actions/empty_directory.rb#132 + def on_conflict_behavior; end + + # source://thor//lib/thor/actions/empty_directory.rb#126 + def on_file_clash_behavior; end + + # Shortcut for pretend. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#67 + def pretend?; end + + # Shortcut to say_status shell method. + # + # source://thor//lib/thor/actions/empty_directory.rb#138 + def say_status(status, color); end +end + +# source://thor//lib/thor/actions/inject_into_file.rb#36 +class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory + # @return [InjectIntoFile] a new instance of InjectIntoFile + # + # source://thor//lib/thor/actions/inject_into_file.rb#39 + def initialize(base, destination, data, config); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def behavior; end + + # Returns the value of attribute flag. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def flag; end + + # source://thor//lib/thor/actions/inject_into_file.rb#52 + def invoke!; end + + # Returns the value of attribute replacement. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def replacement; end + + # source://thor//lib/thor/actions/inject_into_file.rb#72 + def revoke!; end + + protected + + # Adds the content to the file. + # + # source://thor//lib/thor/actions/inject_into_file.rb#108 + def replace!(regexp, string, force); end + + # source://thor//lib/thor/actions/inject_into_file.rb#88 + def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end +end + +# Injects the given content into a file. Different from gsub_file, this +# method is reversible. +# +# ==== Parameters +# destination<String>:: Relative path to the destination root +# data<String>:: Data to add to the file. Can be given as a block. +# config<Hash>:: give :verbose => false to not log the status and the flag +# for injection (:after or :before) or :force => true for +# insert two or more times the same content. +# +# ==== Examples +# +# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" +# +# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do +# gems = ask "Which gems would you like to add?" +# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") +# end +# +# source://thor//lib/thor/actions/inject_into_file.rb#24 +Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) + +# source://thor//lib/thor/error.rb#68 +class Thor::AmbiguousCommandError < ::Thor::Error; end + +# source://thor//lib/thor/error.rb#70 +Thor::AmbiguousTaskError = Thor::AmbiguousCommandError + +# source://thor//lib/thor/parser/argument.rb#2 +class Thor::Argument + # @raise [ArgumentError] + # @return [Argument] a new instance of Argument + # + # source://thor//lib/thor/parser/argument.rb#8 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute banner. + # + # source://thor//lib/thor/parser/argument.rb#5 + def banner; end + + # Returns the value of attribute default. + # + # source://thor//lib/thor/parser/argument.rb#5 + def default; end + + # Returns the value of attribute description. + # + # source://thor//lib/thor/parser/argument.rb#5 + def description; end + + # Returns the value of attribute enum. + # + # source://thor//lib/thor/parser/argument.rb#5 + def enum; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def human_name; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def name; end + + # Returns the value of attribute required. + # + # source://thor//lib/thor/parser/argument.rb#5 + def required; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#31 + def required?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#35 + def show_default?; end + + # Returns the value of attribute type. + # + # source://thor//lib/thor/parser/argument.rb#5 + def type; end + + # source://thor//lib/thor/parser/argument.rb#27 + def usage; end + + protected + + # source://thor//lib/thor/parser/argument.rb#55 + def default_banner; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#51 + def valid_type?(type); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/argument.rb#46 + def validate!; end +end + +# source://thor//lib/thor/parser/argument.rb#3 +Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/arguments.rb#2 +class Thor::Arguments + # Takes an array of Thor::Argument objects. + # + # @return [Arguments] a new instance of Arguments + # + # source://thor//lib/thor/parser/arguments.rb#26 + def initialize(arguments = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/arguments.rb#44 + def parse(args); end + + # source://thor//lib/thor/parser/arguments.rb#57 + def remaining; end + + private + + # Raises an error if @non_assigned_required array is not empty. + # + # @raise [RequiredArgumentMissingError] + # + # source://thor//lib/thor/parser/arguments.rb#170 + def check_requirement!; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#88 + def current_is_value?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#68 + def last?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#63 + def no_or_skip?(arg); end + + # Runs through the argument array getting all strings until no string is + # found or a switch is found. + # + # ["a", "b", "c"] + # + # And returns it as an array: + # + # ["a", "b", "c"] + # + # source://thor//lib/thor/parser/arguments.rb#122 + def parse_array(name); end + + # Runs through the argument array getting strings that contains ":" and + # mark it as a hash: + # + # [ "name:string", "age:integer" ] + # + # Becomes: + # + # { "name" => "string", "age" => "integer" } + # + # source://thor//lib/thor/parser/arguments.rb#101 + def parse_hash(name); end + + # Check if the peek is numeric format and return a Float or Integer. + # Check if the peek is included in enum if enum is provided. + # Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#133 + def parse_numeric(name); end + + # Parse string: + # for --string-arg, just return the current value in the pile + # for --no-string-arg, nil + # Check if the peek is included in enum if enum is provided. Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#154 + def parse_string(name); end + + # source://thor//lib/thor/parser/arguments.rb#72 + def peek; end + + # source://thor//lib/thor/parser/arguments.rb#76 + def shift; end + + # source://thor//lib/thor/parser/arguments.rb#80 + def unshift(arg); end + + class << self + # source://thor//lib/thor/parser/arguments.rb#19 + def parse(*args); end + + # Receives an array of args and returns two arrays, one with arguments + # and one with switches. + # + # source://thor//lib/thor/parser/arguments.rb#8 + def split(args); end + end +end + +# source://thor//lib/thor/parser/arguments.rb#3 +Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/shell.rb#4 +module Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + + mixes_in_class_methods ::Thor::Base::ClassMethods + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # It receives arguments in an Array and two hashes, one for options and + # other for configuration. + # + # Notice that it does not check if all required arguments were supplied. + # It should be done by the parser. + # + # ==== Parameters + # args<Array[Object]>:: An array of objects. The objects are applied to their + # respective accessors declared with <tt>argument</tt>. + # + # options<Hash>:: An options hash that will be available as self.options. + # The hash given is converted to a hash with indifferent + # access, magic predicates (options.skip?) and then frozen. + # + # config<Hash>:: Configuration for this Thor class. + # + # source://thor//lib/thor/base.rb#53 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Returns the value of attribute args. + # + # source://thor//lib/thor/base.rb#35 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://thor//lib/thor/base.rb#35 + def args=(_arg0); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/base.rb#35 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://thor//lib/thor/base.rb#35 + def options=(_arg0); end + + # Returns the value of attribute parent_options. + # + # source://thor//lib/thor/base.rb#35 + def parent_options; end + + # Sets the attribute parent_options + # + # @param value the value to set the attribute parent_options to. + # + # source://thor//lib/thor/base.rb#35 + def parent_options=(_arg0); end + + class << self + # source://thor//lib/thor/base.rb#100 + def included(base); end + + # Whenever a class inherits from Thor or Thor::Group, we should track the + # class and the file on Thor::Base. This is the method responsible for it. + # + # source://thor//lib/thor/base.rb#128 + def register_klass_file(klass); end + + # Returns the shell used in all Thor classes. If you are in a Unix platform + # it will use a colored log, otherwise it will use a basic one without color. + # + # source://thor//lib/thor/shell.rb#11 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#6 + def shell=(_arg0); end + + # Returns the files where the subclasses are kept. + # + # ==== Returns + # Hash[path<String> => Class] + # + # source://thor//lib/thor/base.rb#121 + def subclass_files; end + + # Returns the classes that inherits from Thor or Thor::Group. + # + # ==== Returns + # Array[Class] + # + # source://thor//lib/thor/base.rb#112 + def subclasses; end + end +end + +# source://thor//lib/thor/base.rb#137 +module Thor::Base::ClassMethods + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#383 + def all_commands; end + + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#383 + def all_tasks; end + + # If you want to use defaults that don't match the type of an option, + # either specify `check_default_type: false` or call `allow_incompatible_default_type!` + # + # source://thor//lib/thor/base.rb#173 + def allow_incompatible_default_type!; end + + # Adds an argument to the class and creates an attr_accessor for it. + # + # Arguments are different from options in several aspects. The first one + # is how they are parsed from the command line, arguments are retrieved + # from position: + # + # thor command NAME + # + # Instead of: + # + # thor command --name=NAME + # + # Besides, arguments are used inside your code as an accessor (self.argument), + # while options are all kept in a hash (self.options). + # + # Finally, arguments cannot have type :default or :boolean but can be + # optional (supplying :optional => :true or :required => false), although + # you cannot have a required argument after a non-required argument. If you + # try it, an error is raised. + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :optional - If the argument is optional or not. + # :type - The type of the argument, can be :string, :hash, :array, :numeric. + # :default - Default value for this argument. It cannot be required and have default values. + # :banner - String to show on usage notes. + # + # ==== Errors + # ArgumentError:: Raised if you supply a required argument after a non required one. + # + # source://thor//lib/thor/base.rb#245 + def argument(name, options = T.unsafe(nil)); end + + # Returns this class arguments, looking up in the ancestors chain. + # + # ==== Returns + # Array[Thor::Argument] + # + # source://thor//lib/thor/base.rb#277 + def arguments; end + + # source://thor//lib/thor/base.rb#146 + def attr_accessor(*_arg0); end + + # source://thor//lib/thor/base.rb#138 + def attr_reader(*_arg0); end + + # source://thor//lib/thor/base.rb#142 + def attr_writer(*_arg0); end + + # source://thor//lib/thor/base.rb#177 + def check_default_type; end + + # If you want to raise an error when the default value of an option does not match + # the type call check_default_type! + # This will be the default; for compatibility a deprecation warning is issued if necessary. + # + # source://thor//lib/thor/base.rb#167 + def check_default_type!; end + + # source://thor//lib/thor/base.rb#156 + def check_unknown_options; end + + # If you want to raise an error for unknown options, call check_unknown_options! + # This is disabled by default to allow dynamic invocations. + # + # source://thor//lib/thor/base.rb#152 + def check_unknown_options!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#160 + def check_unknown_options?(config); end + + # Adds an option to the set of class options + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc:: -- Description for the argument. + # :required:: -- If the argument is required or not. + # :default:: -- Default value for this argument. + # :group:: -- The group for this options. Use by class options to output options in different levels. + # :aliases:: -- Aliases for this option. <b>Note:</b> Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead. + # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner:: -- String to show on usage notes. + # :hide:: -- If you want to hide this option from the help. + # + # source://thor//lib/thor/base.rb#312 + def class_option(name, options = T.unsafe(nil)); end + + # Adds a bunch of options to the set of class options. + # + # class_options :foo => false, :bar => :required, :baz => :string + # + # If you prefer more detailed declaration, check class_option. + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#290 + def class_options(options = T.unsafe(nil)); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#372 + def commands; end + + # If true, option set will not suspend the execution of the command when + # a required option is not provided. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#191 + def disable_required_check?(command_name); end + + # A flag that makes the process exit with status 1 if any error happens. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#529 + def exit_on_failure?; end + + # Defines the group. This is used when thor list is invoked so you can specify + # that only commands from a pre-defined group will be shown. Defaults to standard. + # + # ==== Parameters + # name<String|Symbol> + # + # source://thor//lib/thor/base.rb#358 + def group(name = T.unsafe(nil)); end + + # @raise [InvocationError] + # + # source://thor//lib/thor/base.rb#519 + def handle_argument_error(command, error, args, arity); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#514 + def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#514 + def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end + + # Sets the namespace for the Thor or Thor::Group class. By default the + # namespace is retrieved from the class name. If your Thor class is named + # Scripts::MyScript, the help method, for example, will be called as: + # + # thor scripts:my_script -h + # + # If you change the namespace: + # + # namespace :my_scripts + # + # You change how your commands are invoked: + # + # thor my_scripts -h + # + # Finally, if you change your namespace to default: + # + # namespace :default + # + # Your commands can be invoked with a shortcut. Instead of: + # + # thor :my_command + # + # source://thor//lib/thor/base.rb#467 + def namespace(name = T.unsafe(nil)); end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#431 + def no_commands(&block); end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#441 + def no_commands?; end + + # source://thor//lib/thor/base.rb#437 + def no_commands_context; end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#431 + def no_tasks(&block); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names<Array>:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#507 + def public_command(*names); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names<Array>:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#507 + def public_task(*names); end + + # Removes a previous defined argument. If :undefine is given, undefine + # accessors as well. + # + # ==== Parameters + # names<Array>:: Arguments to be removed + # + # ==== Examples + # + # remove_argument :foo + # remove_argument :foo, :bar, :baz, :undefine => true + # + # source://thor//lib/thor/base.rb#327 + def remove_argument(*names); end + + # Removes a previous defined class option. + # + # ==== Parameters + # names<Array>:: Class options to be removed + # + # ==== Examples + # + # remove_class_option :foo + # remove_class_option :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#346 + def remove_class_option(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name<Symbol|String>:: The name of the command to be removed + # options<Hash>:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#401 + def remove_command(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name<Symbol|String>:: The name of the command to be removed + # options<Hash>:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#401 + def remove_task(*names); end + + # Parses the command and options from the given args, instantiate the class + # and invoke the command. This method is used when the arguments must be parsed + # from an array. If you are inside Ruby and want to use a Thor class, you + # can simply initialize it: + # + # script = MyScript.new(args, options, config) + # script.invoke(:command, first_arg, second_arg, third_arg) + # + # source://thor//lib/thor/base.rb#483 + def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end + + # If true, option parsing is suspended as soon as an unknown option or a + # regular argument is encountered. All remaining arguments are passed to + # the command as regular arguments. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#185 + def stop_on_unknown_option?(command_name); end + + # source://thor//lib/thor/base.rb#202 + def strict_args_position; end + + # If you want only strict string args (useful when cascading thor classes), + # call strict_args_position! This is disabled by default to allow dynamic + # invocations. + # + # source://thor//lib/thor/base.rb#198 + def strict_args_position!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#206 + def strict_args_position?(config); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#372 + def tasks; end + + protected + + # SIGNATURE: Sets the baseclass. This is where the superclass lookup + # finishes. + # + # source://thor//lib/thor/base.rb#678 + def baseclass; end + + # The basename of the program invoking the thor class. + # + # source://thor//lib/thor/base.rb#672 + def basename; end + + # Build an option and adds it to the given scope. + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described in both class_option and method_option. + # scope<Hash>:: Options hash that is being built up + # + # source://thor//lib/thor/base.rb#589 + def build_option(name, options, scope); end + + # Receives a hash of options, parse them and add to the scope. This is a + # fast way to set a bunch of options: + # + # build_options :foo => true, :bar => :required, :baz => :string + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#600 + def build_options(options, scope); end + + # Prints the class options per group. If an option does not belong to + # any group, it's printed as Class option. + # + # source://thor//lib/thor/base.rb#539 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#683 + def create_command(meth); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#683 + def create_task(meth); end + + # SIGNATURE: The hook invoked by start. + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/base.rb#693 + def dispatch(command, given_args, given_opts, config); end + + # Finds a command with the given name. If the command belongs to the current + # class, just return it, otherwise dup it and add the fresh copy to the + # current command hash. + # + # source://thor//lib/thor/base.rb#609 + def find_and_refresh_command(name); end + + # Finds a command with the given name. If the command belongs to the current + # class, just return it, otherwise dup it and add the fresh copy to the + # current command hash. + # + # source://thor//lib/thor/base.rb#609 + def find_and_refresh_task(name); end + + # Retrieves a value from superclass. If it reaches the baseclass, + # returns default. + # + # source://thor//lib/thor/base.rb#650 + def from_superclass(method, default = T.unsafe(nil)); end + + # Every time someone inherits from a Thor class, register the klass + # and file into baseclass. + # + # source://thor//lib/thor/base.rb#622 + def inherited(klass); end + + # SIGNATURE: Defines behavior when the initialize method is added to the + # class. + # + # source://thor//lib/thor/base.rb#689 + def initialize_added; end + + # Raises an error if the word given is a Thor reserved word. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#578 + def is_thor_reserved_word?(word, type); end + + # Fire this callback whenever a method is added. Added methods are + # tracked as commands by invoking the create_command method. + # + # source://thor//lib/thor/base.rb#630 + def method_added(meth); end + + # Receives a set of options and print them. + # + # source://thor//lib/thor/base.rb#557 + def print_options(shell, options, group_name = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#2 +class Thor::Command < ::Struct + # @return [Command] a new instance of Command + # + # source://thor//lib/thor/command.rb#5 + def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end + + # Returns the formatted usage by injecting given required arguments + # and required options into the given usage. + # + # source://thor//lib/thor/command.rb#41 + def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#14 + def hidden?; end + + # By default, a command invokes a method in the thor class. You can change this + # implementation to create custom commands. + # + # source://thor//lib/thor/command.rb#20 + def run(instance, args = T.unsafe(nil)); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#105 + def handle_argument_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#112 + def handle_no_method_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#95 + def local_method?(instance, name); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#78 + def not_debugging?(instance); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#91 + def private_method?(instance); end + + # Given a target, checks if this class name is a public method. + # + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#87 + def public_method?(instance); end + + # Add usage with required arguments + # + # source://thor//lib/thor/command.rb#68 + def required_arguments_for(klass, usage); end + + # source://thor//lib/thor/command.rb#82 + def required_options; end + + # source://thor//lib/thor/command.rb#100 + def sans_backtrace(backtrace, caller); end + + private + + # source://thor//lib/thor/command.rb#9 + def initialize_copy(other); end +end + +# source://thor//lib/thor/command.rb#3 +Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2 +module Thor::CoreExt; end + +# A hash with indifferent access and magic predicates. +# +# hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true +# +# hash[:foo] #=> 'bar' +# hash['foo'] #=> 'bar' +# hash.foo? #=> true +# +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11 +class Thor::CoreExt::HashWithIndifferentAccess < ::Hash + # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12 + def initialize(hash = T.unsafe(nil)); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19 + def [](key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23 + def []=(key, value); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27 + def delete(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31 + def except(*keys); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37 + def fetch(key, *args); end + + # @return [Boolean] + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + def key?(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 + def merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 + def merge!(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 + def replace(other_hash); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60 + def reverse_merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 + def reverse_merge!(other_hash); end + + # Convert to a Hash with String keys. + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73 + def to_hash; end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 + def values_at(*indices); end + + protected + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79 + def convert_key(key); end + + # Magic predicates. For instance: + # + # options.force? # => !!options['force'] + # options.shebang # => "/usr/lib/local/ruby" + # options.test_framework?(:rspec) # => options[:test_framework] == :rspec + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89 + def method_missing(method, *args); end +end + +# source://thor//lib/thor/error.rb#14 +module Thor::Correctable + # source://thor//lib/thor/error.rb#19 + def corrections; end + + # source://thor//lib/thor/error.rb#15 + def to_s; end +end + +# A dynamic command that handles method missing scenarios. +# +# source://thor//lib/thor/command.rb#128 +class Thor::DynamicCommand < ::Thor::Command + # @return [DynamicCommand] a new instance of DynamicCommand + # + # source://thor//lib/thor/command.rb#129 + def initialize(name, options = T.unsafe(nil)); end + + # source://thor//lib/thor/command.rb#133 + def run(instance, args = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#141 +Thor::DynamicTask = Thor::DynamicCommand + +# Thor::Error is raised when it's caused by wrong usage of thor classes. Those +# errors have their backtrace suppressed and are nicely shown to the user. +# +# Errors that are caused by the developer, like declaring a method which +# overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we +# ensure that developer errors are shown with full backtrace. +# +# source://thor//lib/thor/error.rb#31 +class Thor::Error < ::StandardError; end + +# Thor has a special class called Thor::Group. The main difference to Thor class +# is that it invokes all commands at once. It also include some methods that allows +# invocations to be done at the class method, which are not available to Thor +# commands. +# +# source://thor//lib/thor/group.rb#7 +class Thor::Group + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + protected + + # Shortcut to invoke with padding and block handling. Use internally by + # invoke and invoke_from_option class methods. + # + # source://thor//lib/thor/group.rb#265 + def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end + + class << self + # Overwrite class options help to allow invoked generators options to be + # shown recursively when invoking a generator. + # + # source://thor//lib/thor/group.rb#161 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # The description for this Thor::Group. If none is provided, but a source root + # exists, tries to find the USAGE one folder above it, otherwise searches + # in the superclass. + # + # ==== Parameters + # description<String>:: The description for this Thor::Group. + # + # source://thor//lib/thor/group.rb#16 + def desc(description = T.unsafe(nil)); end + + # Get invocations array and merge options from invocations. Those + # options are added to group_options hash. Options that already exists + # in base_options are not added twice. + # + # source://thor//lib/thor/group.rb#172 + def get_options_from_invocations(group_options, base_options); end + + # @raise [error] + # + # source://thor//lib/thor/group.rb#207 + def handle_argument_error(command, error, _args, arity); end + + # Prints help information. + # + # ==== Options + # short:: When true, shows only usage. + # + # source://thor//lib/thor/group.rb#29 + def help(shell); end + + # Stores invocation blocks used on invoke_from_option. + # + # source://thor//lib/thor/group.rb#45 + def invocation_blocks; end + + # Stores invocations for this class merging with superclass values. + # + # source://thor//lib/thor/group.rb#39 + def invocations; end + + # Invoke the given namespace or class given. It adds an instance + # method that will invoke the klass and command. You can give a block to + # configure how it will be invoked. + # + # The namespace/class given will have its options showed on the help + # usage. Check invoke_from_option for more information. + # + # source://thor//lib/thor/group.rb#56 + def invoke(*names, &block); end + + # Invoke a thor class based on the value supplied by the user to the + # given option named "name". A class option must be created before this + # method is invoked for each name given. + # + # ==== Examples + # + # class GemGenerator < Thor::Group + # class_option :test_framework, :type => :string + # invoke_from_option :test_framework + # end + # + # ==== Boolean options + # + # In some cases, you want to invoke a thor class if some option is true or + # false. This is automatically handled by invoke_from_option. Then the + # option name is used to invoke the generator. + # + # ==== Preparing for invocation + # + # In some cases you want to customize how a specified hook is going to be + # invoked. You can do that by overwriting the class method + # prepare_for_invocation. The class method must necessarily return a klass + # and an optional command. + # + # ==== Custom invocations + # + # You can also supply a block to customize how the option is going to be + # invoked. The block receives two parameters, an instance of the current + # class and the klass to be invoked. + # + # source://thor//lib/thor/group.rb#110 + def invoke_from_option(*names, &block); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_commands(*_arg0); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_tasks(*_arg0); end + + # Remove a previously added invocation. + # + # ==== Examples + # + # remove_invocation :test_framework + # + # source://thor//lib/thor/group.rb#149 + def remove_invocation(*names); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. + # + # source://thor//lib/thor/group.rb#238 + def banner; end + + # source://thor//lib/thor/group.rb#248 + def baseclass; end + + # source://thor//lib/thor/group.rb#252 + def create_command(meth); end + + # source://thor//lib/thor/group.rb#252 + def create_task(meth); end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor/group.rb#217 + def dispatch(command, given_args, given_opts, config); end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#243 + def self_command; end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#243 + def self_task; end + end +end + +# Shortcuts for help. +# +# source://thor//lib/thor/base.rb#17 +Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) + +# A command that is hidden in help messages but still invocable. +# +# source://thor//lib/thor/command.rb#120 +class Thor::HiddenCommand < ::Thor::Command + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#121 + def hidden?; end +end + +# source://thor//lib/thor/command.rb#125 +Thor::HiddenTask = Thor::HiddenCommand + +# source://thor//lib/thor/invocation.rb#2 +module Thor::Invocation + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # Make initializer aware of invocations and the initialization args. + # + # source://thor//lib/thor/invocation.rb#23 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Make the current command chain accessible with in a Thor-(sub)command + # + # source://thor//lib/thor/invocation.rb#30 + def current_command_chain; end + + # Receives a name and invokes it. The name can be a string (either "command" or + # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the + # command cannot be guessed by name, it can also be supplied as second argument. + # + # You can also supply the arguments, options and configuration values for + # the command to be invoked, if none is given, the same values used to + # initialize the invoker are used to initialize the invoked. + # + # When no name is given, it will invoke the default command of the current class. + # + # ==== Examples + # + # class A < Thor + # def foo + # invoke :bar + # invoke "b:hello", ["Erik"] + # end + # + # def bar + # invoke "b:hello", ["Erik"] + # end + # end + # + # class B < Thor + # def hello(name) + # puts "hello #{name}" + # end + # end + # + # You can notice that the method "foo" above invokes two commands: "bar", + # which belongs to the same class and "hello" which belongs to the class B. + # + # By using an invocation system you ensure that a command is invoked only once. + # In the example above, invoking "foo" will invoke "b:hello" just once, even + # if it's invoked later by "bar" method. + # + # When class A invokes class B, all arguments used on A initialization are + # supplied to B. This allows lazy parse of options. Let's suppose you have + # some rspec commands: + # + # class Rspec < Thor::Group + # class_option :mock_framework, :type => :string, :default => :rr + # + # def invoke_mock_framework + # invoke "rspec:#{options[:mock_framework]}" + # end + # end + # + # As you noticed, it invokes the given mock framework, which might have its + # own options: + # + # class Rspec::RR < Thor::Group + # class_option :style, :type => :string, :default => :mock + # end + # + # Since it's not rspec concern to parse mock framework options, when RR + # is invoked all options are parsed again, so RR can extract only the options + # that it's going to use. + # + # If you want Rspec::RR to be initialized with its own set of options, you + # have to do that explicitly: + # + # invoke "rspec:rr", [], :style => :foo + # + # Besides giving an instance, you can also give a class to invoke: + # + # invoke Rspec::RR, [], :style => :foo + # + # source://thor//lib/thor/invocation.rb#102 + def invoke(name = T.unsafe(nil), *args); end + + # Invoke all commands for the current instance. + # + # source://thor//lib/thor/invocation.rb#133 + def invoke_all; end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_command(command, *args); end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_task(command, *args); end + + # Invokes using shell padding. + # + # source://thor//lib/thor/invocation.rb#138 + def invoke_with_padding(*args); end + + protected + + # Initialize klass using values stored in the @_initializer. + # + # source://thor//lib/thor/invocation.rb#166 + def _parse_initialization_options(args, opts, config); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end + + # Configuration values that are shared between invocations. + # + # source://thor//lib/thor/invocation.rb#145 + def _shared_configuration; end + + class << self + # source://thor//lib/thor/invocation.rb#3 + def included(base); end + end +end + +# source://thor//lib/thor/invocation.rb#8 +module Thor::Invocation::ClassMethods + # This method is responsible for receiving a name and find the proper + # class and command for it. The key is an optional parameter which is + # available only in class methods invocations (i.e. in Thor::Group). + # + # source://thor//lib/thor/invocation.rb#12 + def prepare_for_invocation(key, name); end +end + +# Raised when a command was found, but not invoked properly. +# +# source://thor//lib/thor/error.rb#73 +class Thor::InvocationError < ::Thor::Error; end + +# source://thor//lib/thor/line_editor/basic.rb#2 +module Thor::LineEditor + class << self + # source://thor//lib/thor/line_editor.rb#10 + def best_available; end + + # source://thor//lib/thor/line_editor.rb#6 + def readline(prompt, options = T.unsafe(nil)); end + end +end + +# source://thor//lib/thor/line_editor/basic.rb#3 +class Thor::LineEditor::Basic + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/line_editor/basic.rb#10 + def initialize(prompt, options); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def options; end + + # Returns the value of attribute prompt. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def prompt; end + + # source://thor//lib/thor/line_editor/basic.rb#15 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#32 + def echo?; end + + # source://thor//lib/thor/line_editor/basic.rb#22 + def get_input; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#6 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#3 +class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic + # source://thor//lib/thor/line_editor/readline.rb#13 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#28 + def add_to_history?; end + + # source://thor//lib/thor/line_editor/readline.rb#42 + def completion_options; end + + # source://thor//lib/thor/line_editor/readline.rb#32 + def completion_proc; end + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#46 + def use_path_completion?; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#4 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#50 +class Thor::LineEditor::Readline::PathCompletion + # @return [PathCompletion] a new instance of PathCompletion + # + # source://thor//lib/thor/line_editor/readline.rb#54 + def initialize(text); end + + # source://thor//lib/thor/line_editor/readline.rb#58 + def matches; end + + private + + # source://thor//lib/thor/line_editor/readline.rb#68 + def absolute_matches; end + + # source://thor//lib/thor/line_editor/readline.rb#82 + def base_path; end + + # source://thor//lib/thor/line_editor/readline.rb#78 + def glob_pattern; end + + # source://thor//lib/thor/line_editor/readline.rb#64 + def relative_matches; end + + # Returns the value of attribute text. + # + # source://thor//lib/thor/line_editor/readline.rb#51 + def text; end +end + +# source://thor//lib/thor/error.rb#109 +class Thor::MalformattedArgumentError < ::Thor::InvocationError; end + +# source://thor//lib/thor/nested_context.rb#2 +class Thor::NestedContext + # @return [NestedContext] a new instance of NestedContext + # + # source://thor//lib/thor/nested_context.rb#3 + def initialize; end + + # source://thor//lib/thor/nested_context.rb#7 + def enter; end + + # @return [Boolean] + # + # source://thor//lib/thor/nested_context.rb#15 + def entered?; end + + private + + # source://thor//lib/thor/nested_context.rb#25 + def pop; end + + # source://thor//lib/thor/nested_context.rb#21 + def push; end +end + +# source://thor//lib/thor/error.rb#8 +class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker + # source://thor//lib/thor/error.rb#9 + def initialize(dictionary); end +end + +# source://thor//lib/thor/parser/option.rb#2 +class Thor::Option < ::Thor::Argument + # @return [Option] a new instance of Option + # + # source://thor//lib/thor/parser/option.rb#7 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute aliases. + # + # source://thor//lib/thor/parser/option.rb#3 + def aliases; end + + # source://thor//lib/thor/parser/option.rb#99 + def aliases_for_usage; end + + # source://thor//lib/thor/parser/option.rb#109 + def array?; end + + # source://thor//lib/thor/parser/option.rb#109 + def boolean?; end + + # Returns the value of attribute group. + # + # source://thor//lib/thor/parser/option.rb#3 + def group; end + + # source://thor//lib/thor/parser/option.rb#109 + def hash?; end + + # Returns the value of attribute hide. + # + # source://thor//lib/thor/parser/option.rb#3 + def hide; end + + # source://thor//lib/thor/parser/option.rb#79 + def human_name; end + + # Returns the value of attribute lazy_default. + # + # source://thor//lib/thor/parser/option.rb#3 + def lazy_default; end + + # source://thor//lib/thor/parser/option.rb#109 + def numeric?; end + + # Returns the value of attribute repeatable. + # + # source://thor//lib/thor/parser/option.rb#3 + def repeatable; end + + # source://thor//lib/thor/parser/option.rb#109 + def string?; end + + # source://thor//lib/thor/parser/option.rb#75 + def switch_name; end + + # source://thor//lib/thor/parser/option.rb#83 + def usage(padding = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/option.rb#159 + def dasherize(str); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#151 + def dasherized?; end + + # source://thor//lib/thor/parser/option.rb#155 + def undasherize(str); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/option.rb#117 + def validate!; end + + # source://thor//lib/thor/parser/option.rb#122 + def validate_default_type!; end + + class << self + # This parse quick options given as method_options. It makes several + # assumptions, but you can be more specific using the option method. + # + # parse :foo => "bar" + # #=> Option foo with default value bar + # + # parse [:foo, :baz] => "bar" + # #=> Option foo with default value bar and alias :baz + # + # parse :foo => :required + # #=> Required option foo without default value + # + # parse :foo => 2 + # #=> Option foo with default value 2 and type numeric + # + # parse :foo => :numeric + # #=> Option foo without default value and type numeric + # + # parse :foo => true + # #=> Option foo with default value true and type boolean + # + # The valid types are :boolean, :numeric, :hash, :array and :string. If none + # is given a default type is assumed. This default type accepts arguments as + # string (--foo=value) or booleans (just --foo). + # + # By default all options are optional, unless :required is given. + # + # source://thor//lib/thor/parser/option.rb#45 + def parse(key, value); end + end +end + +# source://thor//lib/thor/parser/option.rb#5 +Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/options.rb#2 +class Thor::Options < ::Thor::Arguments + # Takes a hash of Thor::Option and a hash with defaults. + # + # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters + # an unknown option or a regular argument. + # + # @return [Options] a new instance of Options + # + # source://thor//lib/thor/parser/options.rb#32 + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end + + # @raise [UnknownArgumentError] + # + # source://thor//lib/thor/parser/options.rb#141 + def check_unknown!; end + + # source://thor//lib/thor/parser/options.rb#88 + def parse(args); end + + # source://thor//lib/thor/parser/options.rb#64 + def peek; end + + # source://thor//lib/thor/parser/options.rb#60 + def remaining; end + + # source://thor//lib/thor/parser/options.rb#78 + def shift; end + + # source://thor//lib/thor/parser/options.rb#83 + def unshift(arg, is_value: T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/options.rb#151 + def assign_result!(option, result); end + + # Check if the current value in peek is a registered switch. + # + # Two booleans are returned. The first is true if the current value + # starts with a hyphen; the second is true if it is a registered switch. + # + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#165 + def current_is_switch?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#177 + def current_is_switch_formatted?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#187 + def current_is_value?; end + + # Check if the given argument is actually a shortcut. + # + # source://thor//lib/thor/parser/options.rb#206 + def normalize_switch(arg); end + + # Parse boolean values which can be given as --foo=true, --foo or --no-foo. + # + # source://thor//lib/thor/parser/options.rb#217 + def parse_boolean(switch); end + + # Parse the value at the peek analyzing if it requires an input or not. + # + # source://thor//lib/thor/parser/options.rb#235 + def parse_peek(switch, option); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#210 + def parsing_options?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#192 + def switch?(arg); end + + # source://thor//lib/thor/parser/options.rb#196 + def switch_option(arg); end + + class << self + # Receives a hash and makes it switches. + # + # source://thor//lib/thor/parser/options.rb#11 + def to_switches(options); end + end +end + +# source://thor//lib/thor/parser/options.rb#5 +Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#3 +Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#8 +Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/parser/options.rb#7 +Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#4 +Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) + +# Allow either -x -v or -xv style for single char args +# +# source://thor//lib/thor/parser/options.rb#6 +Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) + +# Adds a compatibility layer to your Thor classes which allows you to use +# rake package tasks. For example, to use rspec rake tasks, one can do: +# +# require 'thor/rake_compat' +# require 'rspec/core/rake_task' +# +# class Default < Thor +# include Thor::RakeCompat +# +# RSpec::Core::RakeTask.new(:spec) do |t| +# t.spec_opts = ['--options', './.rspec'] +# t.spec_files = FileList['spec/**/*_spec.rb'] +# end +# end +# +# source://thor//lib/thor/rake_compat.rb#20 +module Thor::RakeCompat + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL + + class << self + # @private + # + # source://thor//lib/thor/rake_compat.rb#27 + def included(base); end + + # source://thor//lib/thor/rake_compat.rb#23 + def rake_classes; end + end +end + +# source://thor//lib/thor/error.rb#106 +class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end + +# source://thor//lib/thor/util.rb#4 +module Thor::Sandbox; end + +# source://thor//lib/thor/shell.rb#23 +module Thor::Shell + # Add shell to initialize config values. + # + # ==== Configuration + # shell<Object>:: An instance of the shell to be used. + # + # ==== Examples + # + # class MyScript < Thor + # argument :first, :type => :numeric + # end + # + # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new + # + # source://thor//lib/thor/shell.rb#44 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://thor//lib/thor/shell.rb#59 + def ask(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def file_collision(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def no?(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_in_columns(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_table(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_wrapped(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_status(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def set_color(*args, &block); end + + # Holds the shell for the given Thor instance. If no shell is given, + # it gets a default shell from Thor::Base.shell. + # + # source://thor//lib/thor/shell.rb#52 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#25 + def shell=(_arg0); end + + # source://thor//lib/thor/shell.rb#59 + def terminal_width(*args, &block); end + + # Yields the given block with padding. + # + # source://thor//lib/thor/shell.rb#66 + def with_padding; end + + # source://thor//lib/thor/shell.rb#59 + def yes?(*args, &block); end + + protected + + # Allow shell to be shared between invocations. + # + # source://thor//lib/thor/shell.rb#77 + def _shared_configuration; end +end + +# source://thor//lib/thor/shell/basic.rb#3 +class Thor::Shell::Basic + # Initialize base, mute and padding to nil. + # + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/shell/basic.rb#11 + def initialize; end + + # Asks something to the user and receives a response. + # + # If a default value is specified it will be presented to the user + # and allows them to select that value with an empty response. This + # option is ignored when limited answers are supplied. + # + # If asked to limit the correct responses, you can pass in an + # array of acceptable answers. If one of those is not supplied, + # they will be shown a message stating that one of those answers + # must be given and re-asked the question. + # + # If asking for sensitive information, the :echo option can be set + # to false to mask user input from $stdin. + # + # If the required input is a path, then set the path option to + # true. This will enable tab completion for file paths relative + # to the current working directory on systems that support + # Readline. + # + # ==== Example + # ask("What is your name?") + # + # ask("What is the planet furthest from the sun?", :default => "Pluto") + # + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # + # ask("What is your password?", :echo => false) + # + # ask("Where should the file be saved?", :path => true) + # + # source://thor//lib/thor/shell/basic.rb#78 + def ask(statement, *args); end + + # Returns the value of attribute base. + # + # source://thor//lib/thor/shell/basic.rb#6 + def base; end + + # Sets the attribute base + # + # @param value the value to set the attribute base to. + # + # source://thor//lib/thor/shell/basic.rb#6 + def base=(_arg0); end + + # Called if something goes wrong during the execution. This is used by Thor + # internally and should not be used inside your scripts. If something went + # wrong, you can always raise an exception. If you raise a Thor::Error, it + # will be rescued and wrapped in the method below. + # + # source://thor//lib/thor/shell/basic.rb#342 + def error(statement); end + + # Deals with file collision and returns true if the file should be + # overwritten and false otherwise. If a block is given, it uses the block + # response as the content for the diff. + # + # ==== Parameters + # destination<String>:: the destination file to solve conflicts + # block<Proc>:: an optional block that returns the value to be used in diff and merge + # + # source://thor//lib/thor/shell/basic.rb#285 + def file_collision(destination); end + + # Sets the output padding while executing a block and resets it. + # + # source://thor//lib/thor/shell/basic.rb#41 + def indent(count = T.unsafe(nil)); end + + # Mute everything that's inside given block + # + # source://thor//lib/thor/shell/basic.rb#20 + def mute; end + + # Check if base is muted + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#29 + def mute?; end + + # Make a question the to user and returns true if the user replies "n" or + # "no". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#154 + def no?(statement, color = T.unsafe(nil)); end + + # Returns the value of attribute padding. + # + # source://thor//lib/thor/shell/basic.rb#7 + def padding; end + + # Sets the output padding, not allowing less than zero values. + # + # source://thor//lib/thor/shell/basic.rb#35 + def padding=(value); end + + # Prints values in columns + # + # ==== Parameters + # Array[String, String, ...] + # + # source://thor//lib/thor/shell/basic.rb#163 + def print_in_columns(array); end + + # Prints a table. + # + # ==== Parameters + # Array[Array[String, String, ...]] + # + # ==== Options + # indent<Integer>:: Indent the first column by indent value. + # colwidth<Integer>:: Force the first column to colwidth spaces wide. + # + # source://thor//lib/thor/shell/basic.rb#185 + def print_table(array, options = T.unsafe(nil)); end + + # Prints a long string, word-wrapping the text to the current width of the + # terminal display. Ideal for printing heredocs. + # + # ==== Parameters + # String + # + # ==== Options + # indent<Integer>:: Indent each line of the printed paragraph by indent value. + # + # source://thor//lib/thor/shell/basic.rb#247 + def print_wrapped(message, options = T.unsafe(nil)); end + + # Say (print) something to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say("I know you knew that.") + # + # source://thor//lib/thor/shell/basic.rb#96 + def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say (print) an error to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say_error("error: something went wrong") + # + # source://thor//lib/thor/shell/basic.rb#113 + def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say a status with the given color and appends the message. Since this + # method is used frequently by actions, it allows nil or false to be given + # in log_status, avoiding the message from being shown. If a Symbol is + # given in log_status, it's used as the color. + # + # source://thor//lib/thor/shell/basic.rb#128 + def say_status(status, message, log_status = T.unsafe(nil)); end + + # Apply color to the given string with optional bold. Disabled in the + # Thor::Shell::Basic class. + # + # source://thor//lib/thor/shell/basic.rb#349 + def set_color(string, *_arg1); end + + # source://thor//lib/thor/shell/basic.rb#326 + def terminal_width; end + + # Make a question the to user and returns true if the user replies "y" or + # "yes". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#147 + def yes?(statement, color = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/shell/basic.rb#486 + def answer_match(possibilities, answer, case_insensitive); end + + # source://thor//lib/thor/shell/basic.rb#443 + def as_unicode; end + + # source://thor//lib/thor/shell/basic.rb#473 + def ask_filtered(statement, color, options); end + + # source://thor//lib/thor/shell/basic.rb#456 + def ask_simply(statement, color, options); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#360 + def can_display_colors?; end + + # Calculate the dynamic width of the terminal + # + # source://thor//lib/thor/shell/basic.rb#415 + def dynamic_width; end + + # source://thor//lib/thor/shell/basic.rb#419 + def dynamic_width_stty; end + + # source://thor//lib/thor/shell/basic.rb#423 + def dynamic_width_tput; end + + # source://thor//lib/thor/shell/basic.rb#387 + def file_collision_help; end + + # source://thor//lib/thor/shell/basic.rb#507 + def git_merge_tool; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#377 + def is?(value); end + + # source://thor//lib/thor/shell/basic.rb#364 + def lookup_color(color); end + + # source://thor//lib/thor/shell/basic.rb#494 + def merge(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#503 + def merge_tool; end + + # source://thor//lib/thor/shell/basic.rb#355 + def prepare_message(message, *color); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#410 + def quiet?; end + + # source://thor//lib/thor/shell/basic.rb#399 + def show_diff(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#373 + def stderr; end + + # source://thor//lib/thor/shell/basic.rb#369 + def stdout; end + + # source://thor//lib/thor/shell/basic.rb#431 + def truncate(string, width); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#427 + def unix?; end +end + +# source://thor//lib/thor/shell/basic.rb#4 +Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/color.rb#9 +class Thor::Shell::Color < ::Thor::Shell::Basic + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # Pass foreground, background and bold options to this method as + # symbols. + # + # Example: + # + # set_color "Hi!", :red, :on_white, :bold + # + # The available colors are: + # + # :bold + # :black + # :red + # :green + # :yellow + # :blue + # :magenta + # :cyan + # :white + # :on_black + # :on_red + # :on_green + # :on_yellow + # :on_blue + # :on_magenta + # :on_cyan + # :on_white + # + # source://thor//lib/thor/shell/color.rb#79 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#107 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#103 + def are_colors_supported?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#99 + def can_display_colors?; end + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#144 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/color.rb#127 + def output_diff_line(diff); end + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/color.rb#114 + def show_diff(destination, content); end +end + +# Set the terminal's foreground ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#15 +Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#23 +Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) + +# The start of an ANSI bold sequence. +# +# source://thor//lib/thor/shell/color.rb#12 +Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# source://thor//lib/thor/shell/color.rb#10 +Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#27 +Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#19 +Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#25 +Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#32 +Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#40 +Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#44 +Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#36 +Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#42 +Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#34 +Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#46 +Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#38 +Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#17 +Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#29 +Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#21 +Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/html.rb#9 +class Thor::Shell::HTML < ::Thor::Shell::Basic + # Ask something to the user and receives a response. + # + # ==== Example + # ask("What is your name?") + # + # TODO: Implement #ask for Thor::Shell::HTML + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/shell/html.rb#70 + def ask(statement, color = T.unsafe(nil)); end + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # source://thor//lib/thor/shell/html.rb#51 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#76 + def can_display_colors?; end + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#113 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/html.rb#96 + def output_diff_line(diff); end + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/html.rb#83 + def show_diff(destination, content); end +end + +# Set the terminal's foreground HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#13 +Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#21 +Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) + +# The start of an HTML bold sequence. +# +# source://thor//lib/thor/shell/html.rb#10 +Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#25 +Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#17 +Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#23 +Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#30 +Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#38 +Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#42 +Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#34 +Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#40 +Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#32 +Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#44 +Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#36 +Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#15 +Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#27 +Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#19 +Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/shell.rb#24 +Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/base.rb#23 +Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) + +# Thor methods that should not be overwritten by the user. +# +# source://thor//lib/thor/base.rb#20 +Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/command.rb#117 +Thor::Task = Thor::Command + +# Raised when a command was not found. +# +# source://thor//lib/thor/error.rb#35 +class Thor::UndefinedCommandError < ::Thor::Error + include ::Thor::Correctable + + # @return [UndefinedCommandError] a new instance of UndefinedCommandError + # + # source://thor//lib/thor/error.rb#54 + def initialize(command, all_commands, namespace); end + + # Returns the value of attribute all_commands. + # + # source://thor//lib/thor/error.rb#52 + def all_commands; end + + # Returns the value of attribute command. + # + # source://thor//lib/thor/error.rb#52 + def command; end +end + +# source://thor//lib/thor/error.rb#36 +class Thor::UndefinedCommandError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#39 + def initialize(error); end + + # source://thor//lib/thor/error.rb#43 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#37 + def error; end + + # source://thor//lib/thor/error.rb#47 + def spell_checker; end +end + +# source://thor//lib/thor/error.rb#66 +Thor::UndefinedTaskError = Thor::UndefinedCommandError + +# source://thor//lib/thor/error.rb#76 +class Thor::UnknownArgumentError < ::Thor::Error + include ::Thor::Correctable + + # @return [UnknownArgumentError] a new instance of UnknownArgumentError + # + # source://thor//lib/thor/error.rb#96 + def initialize(switches, unknown); end + + # Returns the value of attribute switches. + # + # source://thor//lib/thor/error.rb#94 + def switches; end + + # Returns the value of attribute unknown. + # + # source://thor//lib/thor/error.rb#94 + def unknown; end +end + +# source://thor//lib/thor/error.rb#77 +class Thor::UnknownArgumentError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#80 + def initialize(error); end + + # source://thor//lib/thor/error.rb#84 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#78 + def error; end + + # source://thor//lib/thor/error.rb#89 + def spell_checker; end +end + +# This module holds several utilities: +# +# 1) Methods to convert thor namespaces to constants and vice-versa. +# +# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz" +# +# 2) Loading thor files and sandboxing: +# +# Thor::Util.load_thorfile("~/.thor/foo") +# +# source://thor//lib/thor/util.rb#17 +module Thor::Util + class << self + # Receives a string and convert it to camel case. camel_case returns CamelCase. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#104 + def camel_case(str); end + + # Returns a string that has had any glob characters escaped. + # The glob characters are `* ? { } [ ]`. + # + # ==== Examples + # + # Thor::Util.escape_globs('[apps]') # => '\[apps\]' + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#263 + def escape_globs(path); end + + # Returns a string that has had any HTML characters escaped. + # + # ==== Examples + # + # Thor::Util.escape_html('<div>') # => "<div>" + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#279 + def escape_html(string); end + + # Receives a namespace and search for it in the Thor::Base subclasses. + # + # ==== Parameters + # namespace<String>:: The namespace to search for. + # + # source://thor//lib/thor/util.rb#24 + def find_by_namespace(namespace); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace<String> + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace<String> + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Where to look for Thor files. + # + # source://thor//lib/thor/util.rb#212 + def globs_for(path); end + + # Receives a path and load the thor file in the path. The file is evaluated + # inside the sandbox to avoid namespacing conflicts. + # + # source://thor//lib/thor/util.rb#152 + def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Receives a constant and converts it to a Thor namespace. Since Thor + # commands can be added to a sandbox, this method is also responsible for + # removing the sandbox namespace. + # + # This method should not be used in general because it's used to deal with + # older versions of Thor. On current versions, if you need to get the + # namespace from a class, just call namespace on it. + # + # ==== Parameters + # constant<Object>:: The constant to be converted to the thor path. + # + # ==== Returns + # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" + # + # source://thor//lib/thor/util.rb#43 + def namespace_from_thor_class(constant); end + + # Given the contents, evaluate it inside the sandbox and returns the + # namespaces defined in the sandbox. + # + # ==== Parameters + # contents<String> + # + # ==== Returns + # Array[Object] + # + # source://thor//lib/thor/util.rb#58 + def namespaces_in_content(contents, file = T.unsafe(nil)); end + + # Return the path to the ruby interpreter taking into account multiple + # installations and windows extensions. + # + # source://thor//lib/thor/util.rb#220 + def ruby_command; end + + # Receives a string and convert it to snake case. SnakeCase returns snake_case. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#90 + def snake_case(str); end + + # Returns the thor classes declared inside the given class. + # + # source://thor//lib/thor/util.rb#74 + def thor_classes_in(klass); end + + # Returns the root where thor files are located, depending on the OS. + # + # source://thor//lib/thor/util.rb#191 + def thor_root; end + + # Returns the files in the thor root. On Windows thor_root will be something + # like this: + # + # C:\Documents and Settings\james\.thor + # + # If we don't #gsub the \ character, Dir.glob will fail. + # + # source://thor//lib/thor/util.rb#202 + def thor_root_glob; end + + # source://thor//lib/thor/util.rb#167 + def user_home; end + end +end diff --git a/sorbet/rbi/gems/tilt@2.2.0.rbi b/sorbet/rbi/gems/tilt@2.2.0.rbi new file mode 100644 index 0000000000..0b075b933d --- /dev/null +++ b/sorbet/rbi/gems/tilt@2.2.0.rbi @@ -0,0 +1,934 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tilt` gem. +# Please instead update this file by running `bin/tapioca gem tilt`. + +# Namespace for Tilt. This module is not intended to be included anywhere. +# +# source://tilt//lib/tilt/template.rb#2 +module Tilt + class << self + # @see Tilt::Mapping#[] + # + # source://tilt//lib/tilt.rb#69 + def [](file); end + + # @example + # tmpl = Tilt['index.erb'].new { '<%= Tilt.current_template %>' } + # tmpl.render == tmpl.to_s + # @note This is currently an experimental feature and might return nil + # in the future. + # @return the template object that is currently rendering. + # + # source://tilt//lib/tilt.rb#91 + def current_template; end + + # @return [Tilt::Mapping] the main mapping object + # + # source://tilt//lib/tilt.rb#98 + def default_mapping; end + + # Replace the default mapping with a finalized version of the default + # mapping. This can be done to improve performance after the template + # libraries you desire to use have already been loaded. Once this is + # is called, all attempts to modify the default mapping will fail. + # This also freezes Tilt itself. + # + # source://tilt//lib/tilt.rb#20 + def finalize!; end + + # @private + # + # source://tilt//lib/tilt.rb#39 + def lazy_map; end + + # @see Tilt::Mapping#new + # + # source://tilt//lib/tilt.rb#64 + def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Alias register as prefer for Tilt 1.x compatibility. + # + # @see Tilt::Mapping#register + # + # source://tilt//lib/tilt.rb#44 + def prefer(template_class, *extensions); end + + # @see Tilt::Mapping#register + # + # source://tilt//lib/tilt.rb#44 + def register(template_class, *extensions); end + + # @see Tilt::Mapping#register_lazy + # + # source://tilt//lib/tilt.rb#49 + def register_lazy(class_name, file, *extensions); end + + # @see Tilt::Mapping#register_pipeline + # + # source://tilt//lib/tilt.rb#54 + def register_pipeline(ext, options = T.unsafe(nil)); end + + # @return [Boolean] + # @see Tilt::Mapping#registered? + # + # source://tilt//lib/tilt.rb#59 + def registered?(ext); end + + # @see Tilt::Mapping#template_for + # + # source://tilt//lib/tilt.rb#74 + def template_for(file); end + + # @see Tilt::Mapping#templates_for + # + # source://tilt//lib/tilt.rb#79 + def templates_for(file); end + end +end + +# Private internal base class for both Mapping and FinalizedMapping, for the shared methods. +# +# source://tilt//lib/tilt/mapping.rb#6 +class Tilt::BaseMapping + # Looks up a template class based on file name and/or extension. + # + # @example + # mapping['views/hello.erb'] # => Tilt::ERBTemplate + # mapping['hello.erb'] # => Tilt::ERBTemplate + # mapping['erb'] # => Tilt::ERBTemplate + # @return [template class] + # + # source://tilt//lib/tilt/mapping.rb#32 + def [](file); end + + # Instantiates a new template class based on the file. + # + # @example + # mapping.new('index.mt') # => instance of MyEngine::Template + # @raise [RuntimeError] if there is no template class registered for the + # file name. + # @see Tilt::Template.new + # + # source://tilt//lib/tilt/mapping.rb#16 + def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Looks up a template class based on file name and/or extension. + # + # @example + # mapping['views/hello.erb'] # => Tilt::ERBTemplate + # mapping['hello.erb'] # => Tilt::ERBTemplate + # mapping['erb'] # => Tilt::ERBTemplate + # @return [template class] + # + # source://tilt//lib/tilt/mapping.rb#32 + def template_for(file); end + + # Looks up a list of template classes based on file name. If the file name + # has multiple extensions, it will return all template classes matching the + # extensions from the end. + # + # @example + # mapping.templates_for('views/index.haml.erb') + # # => [Tilt::ERBTemplate, Tilt::HamlTemplate] + # @return [Array<template class>] + # + # source://tilt//lib/tilt/mapping.rb#48 + def templates_for(file); end + + private + + # source://tilt//lib/tilt/mapping.rb#63 + def split(file); end +end + +# CSV Template implementation. See: +# http://ruby-doc.org/stdlib/libdoc/csv/rdoc/CSV.html +# +# == Example +# +# # Example of csv template +# tpl = <<-EOS +# # header +# csv << ['NAME', 'ID'] +# +# # data rows +# @people.each do |person| +# csv << [person[:name], person[:id]] +# end +# EOS +# +# @people = [ +# {:name => "Joshua Peek", :id => 1}, +# {:name => "Ryan Tomayko", :id => 2}, +# {:name => "Simone Carletti", :id => 3} +# ] +# +# template = Tilt::CSVTemplate.new { tpl } +# template.render(self) +# +# source://tilt//lib/tilt/csv.rb#32 +class Tilt::CSVTemplate < ::Tilt::Template + # source://tilt//lib/tilt/csv.rb#47 + def precompiled(locals); end + + # source://tilt//lib/tilt/csv.rb#39 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/csv.rb#35 + def prepare; end +end + +# Extremely simple template cache implementation. Calling applications +# create a Tilt::Cache instance and use #fetch with any set of hashable +# arguments (such as those to Tilt.new): +# +# cache = Tilt::Cache.new +# cache.fetch(path, line, options) { Tilt.new(path, line, options) } +# +# Subsequent invocations return the already loaded template object. +# +# @note Tilt::Cache is a thin wrapper around Hash. It has the following +# limitations: +# * Not thread-safe. +# * Size is unbounded. +# * Keys are not copied defensively, and should not be modified after +# being passed to #fetch. More specifically, the values returned by +# key#hash and key#eql? should not change. +# If this is too limiting for you, use a different cache implementation. +# +# source://tilt//lib/tilt.rb#122 +class Tilt::Cache + # @return [Cache] a new instance of Cache + # + # source://tilt//lib/tilt.rb#123 + def initialize; end + + # Clears the cache. + # + # source://tilt//lib/tilt.rb#140 + def clear; end + + # Caches a value for key, or returns the previously cached value. + # If a value has been previously cached for key then it is + # returned. Otherwise, block is yielded to and its return value + # which may be nil, is cached under key and returned. + # + # @yield + # @yieldreturn the value to cache for key + # + # source://tilt//lib/tilt.rb#133 + def fetch(*key); end +end + +# source://tilt//lib/tilt/commonmarker.rb#0 +class Tilt::CommonMarkerTemplate < ::Tilt::StaticTemplate + private + + # source://tilt//lib/tilt/commonmarker.rb#37 + def _prepare_output; end +end + +# @private +# +# source://tilt//lib/tilt/template.rb#4 +module Tilt::CompiledTemplates; end + +# source://tilt//lib/tilt.rb#10 +Tilt::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# ERB template implementation. See: +# http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html +# +# source://tilt//lib/tilt/erb.rb#8 +class Tilt::ERBTemplate < ::Tilt::Template + # @return [Boolean] + # + # source://tilt//lib/tilt/erb.rb#74 + def freeze_string_literals?; end + + # ERB generates a line to specify the character coding of the generated + # source in 1.9. Account for this in the line offset. + # + # source://tilt//lib/tilt/erb.rb#69 + def precompiled(locals); end + + # source://tilt//lib/tilt/erb.rb#58 + def precompiled_postamble(locals); end + + # source://tilt//lib/tilt/erb.rb#50 + def precompiled_preamble(locals); end + + # source://tilt//lib/tilt/erb.rb#45 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/erb.rb#25 + def prepare; end + + class << self + # source://tilt//lib/tilt/erb.rb#13 + def _default_output_variable; end + + # source://tilt//lib/tilt/erb.rb#16 + def default_output_variable; end + + # source://tilt//lib/tilt/erb.rb#20 + def default_output_variable=(name); end + end +end + +# source://tilt//lib/tilt/erb.rb#9 +Tilt::ERBTemplate::SUPPORTS_KVARGS = T.let(T.unsafe(nil), Array) + +# Erubi (a simplified version of Erubis) template implementation. +# See https://github.com/jeremyevans/erubi +# +# ErubiTemplate supports the following additional options, in addition +# to the options supported by the Erubi engine: +# +# :engine_class :: allows you to specify a custom engine class to use +# instead of the default (which is ::Erubi::Engine). +# +# source://tilt//lib/tilt/erubi.rb#14 +class Tilt::ErubiTemplate < ::Tilt::Template + # @return [Boolean] + # + # source://tilt//lib/tilt/erubi.rb#51 + def freeze_string_literals?; end + + # source://tilt//lib/tilt/erubi.rb#47 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/erubi.rb#15 + def prepare; end +end + +# source://tilt//lib/tilt/etanni.rb#5 +class Tilt::EtanniTemplate < ::Tilt::Template + # source://tilt//lib/tilt/etanni.rb#23 + def precompiled(locals); end + + # source://tilt//lib/tilt/etanni.rb#19 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/etanni.rb#6 + def prepare; end +end + +# Private internal class for finalized mappings, which are frozen and +# cannot be modified. +# +# source://tilt//lib/tilt/mapping.rb#373 +class Tilt::FinalizedMapping < ::Tilt::BaseMapping + # Set the template map to use. The template map should already + # be frozen, but this is an internal class, so it does not + # explicitly check for that. + # + # @return [FinalizedMapping] a new instance of FinalizedMapping + # + # source://tilt//lib/tilt/mapping.rb#374 + def initialize(template_map); end + + # Returns receiver, since instances are always frozen. + # + # source://tilt//lib/tilt/mapping.rb#385 + def clone(freeze: T.unsafe(nil)); end + + # Returns receiver, since instances are always frozen. + # + # source://tilt//lib/tilt/mapping.rb#380 + def dup; end + + # Returns an aarry of all extensions the template class will + # be used for. + # + # source://tilt//lib/tilt/mapping.rb#396 + def extensions_for(template_class); end + + # Return whether the given file extension has been registered. + # + # @return [Boolean] + # + # source://tilt//lib/tilt/mapping.rb#390 + def registered?(ext); end + + private + + # source://tilt//lib/tilt/mapping.rb#407 + def lookup(ext); end +end + +# Kramdown Markdown implementation. See: https://kramdown.gettalong.org/ +# +# source://tilt//lib/tilt/kramdown.rb#0 +class Tilt::KramdownTemplate < ::Tilt::StaticTemplate + private + + # source://tilt//lib/tilt/kramdown.rb#8 + def _prepare_output; end +end + +# @private +# +# source://tilt//lib/tilt/template.rb#11 +Tilt::LOCK = T.let(T.unsafe(nil), Thread::Mutex) + +# Tilt::Mapping associates file extensions with template implementations. +# +# mapping = Tilt::Mapping.new +# mapping.register(Tilt::RDocTemplate, 'rdoc') +# mapping['index.rdoc'] # => Tilt::RDocTemplate +# mapping.new('index.rdoc').render +# +# You can use {#register} to register a template class by file +# extension, {#registered?} to see if a file extension is mapped, +# {#[]} to lookup template classes, and {#new} to instantiate template +# objects. +# +# Mapping also supports *lazy* template implementations. Note that regularly +# registered template implementations *always* have preference over lazily +# registered template implementations. You should use {#register} if you +# depend on a specific template implementation and {#register_lazy} if there +# are multiple alternatives. +# +# mapping = Tilt::Mapping.new +# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md') +# mapping['index.md'] +# # => RDiscount::Template +# +# {#register_lazy} takes a class name, a filename, and a list of file +# extensions. When you try to lookup a template name that matches the +# file extension, Tilt will automatically try to require the filename and +# constantize the class name. +# +# Unlike {#register}, there can be multiple template implementations +# registered lazily to the same file extension. Tilt will attempt to load the +# template implementations in order (registered *last* would be tried first), +# returning the first which doesn't raise LoadError. +# +# If all of the registered template implementations fails, Tilt will raise +# the exception of the first, since that was the most preferred one. +# +# mapping = Tilt::Mapping.new +# mapping.register_lazy('Maruku::Template', 'maruku/template', 'md') +# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md') +# mapping['index.md'] +# # => RDiscount::Template +# +# In the previous example we say that RDiscount has a *higher priority* than +# Maruku. Tilt will first try to `require "rdiscount/template"`, falling +# back to `require "maruku/template"`. If none of these are successful, +# the first error will be raised. +# +# source://tilt//lib/tilt/mapping.rb#125 +class Tilt::Mapping < ::Tilt::BaseMapping + # @return [Mapping] a new instance of Mapping + # + # source://tilt//lib/tilt/mapping.rb#131 + def initialize; end + + # Finds the extensions the template class has been registered under. + # + # @param template_class [template class] + # + # source://tilt//lib/tilt/mapping.rb#287 + def extensions_for(template_class); end + + # Return a finalized mapping. A finalized mapping will only include + # support for template libraries already loaded, and will not + # allow registering new template libraries or lazy loading template + # libraries not yet loaded. Finalized mappings improve performance + # by not requiring synchronization and ensure that the mapping will + # not attempt to load additional files (useful when restricting + # file system access after template libraries in use are loaded). + # + # source://tilt//lib/tilt/mapping.rb#151 + def finalized; end + + # @private + # + # source://tilt//lib/tilt/mapping.rb#129 + def lazy_map; end + + # Registers a template implementation by file extension. There can only be + # one template implementation per file extension, and this method will + # override any existing mapping. + # + # @example + # mapping.register MyEngine::Template, 'mt' + # mapping['index.mt'] # => MyEngine::Template + # @param template_class + # @param extensions [Array<String>] List of extensions. + # @return [void] + # + # source://tilt//lib/tilt/mapping.rb#200 + def register(template_class, *extensions); end + + # Registers a lazy template implementation by file extension. You + # can have multiple lazy template implementations defined on the + # same file extension, in which case the template implementation + # defined *last* will be attempted loaded *first*. + # + # @example + # mapping.register_lazy 'MyEngine::Template', 'my_engine/template', 'mt' + # + # defined?(MyEngine::Template) # => false + # mapping['index.mt'] # => MyEngine::Template + # defined?(MyEngine::Template) # => true + # @param class_name [String] Class name of a template class. + # @param file [String] Filename where the template class is defined. + # @param extensions [Array<String>] List of extensions. + # @return [void] + # + # source://tilt//lib/tilt/mapping.rb#176 + def register_lazy(class_name, file, *extensions); end + + # Register a new template class using the given extension that + # represents a pipeline of multiple existing template, where the + # output from the previous template is used as input to the next + # template. + # + # This will register a template class that processes the input + # with the *erb* template processor, and takes the output of + # that and feeds it to the *scss* template processor, returning + # the output of the *scss* template processor as the result of + # the pipeline. + # + # @example + # mapping.register_pipeline('scss.erb') + # mapping.register_pipeline('scss.erb', 'erb'=>{:outvar=>'@foo'}) + # mapping.register_pipeline('scsserb', :extra_exts => 'scss.erb', + # :templates=>['erb', 'scss']) + # @option :templates + # @option :extra_exts + # @option String + # @param ext [String] Primary extension to register + # @param :templates [Hash] a customizable set of options + # @param :extra_exts [Hash] a customizable set of options + # @param String [Hash] a customizable set of options + # @return [void] + # + # source://tilt//lib/tilt/mapping.rb#238 + def register_pipeline(ext, options = T.unsafe(nil)); end + + # Checks if a file extension is registered (either eagerly or + # lazily) in this mapping. + # + # @example + # mapping.registered?('erb') # => true + # mapping.registered?('nope') # => false + # @param ext [String] File extension. + # @return [Boolean] + # + # source://tilt//lib/tilt/mapping.rb#280 + def registered?(ext); end + + # @private + # + # source://tilt//lib/tilt/mapping.rb#129 + def template_map; end + + # Unregisters an extension. This removes the both normal registrations + # and lazy registrations. + # + # @example + # mapping.register MyEngine::Template, 'mt' + # mapping['index.mt'] # => MyEngine::Template + # mapping.unregister('mt') + # mapping['index.mt'] # => nil + # @param extensions [Array<String>] List of extensions. + # @return nil + # + # source://tilt//lib/tilt/mapping.rb#260 + def unregister(*extensions); end + + private + + # The proper behavior (in MRI) for autoload? is to + # return `false` when the constant/file has been + # explicitly required. + # + # However, in JRuby it returns `true` even after it's + # been required. In that case it turns out that `defined?` + # returns `"constant"` if it exists and `nil` when it doesn't. + # This is actually a second bug: `defined?` should resolve + # autoload (aka. actually try to require the file). + # + # We use the second bug in order to resolve the first bug. + # + # @return [Boolean] + # + # source://tilt//lib/tilt/mapping.rb#360 + def constant_defined?(name); end + + # @private + # + # source://tilt//lib/tilt/mapping.rb#137 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://tilt//lib/tilt/mapping.rb#301 + def lazy?(ext); end + + # source://tilt//lib/tilt/mapping.rb#320 + def lazy_load(pattern); end + + # source://tilt//lib/tilt/mapping.rb#306 + def lookup(ext); end + + # source://tilt//lib/tilt/mapping.rb#310 + def register_defined_classes(class_names, pattern); end +end + +# source://tilt//lib/tilt/mapping.rb#126 +Tilt::Mapping::LOCK = T.let(T.unsafe(nil), Thread::Mutex) + +# Nokogiri template implementation. See: +# http://nokogiri.org/ +# +# source://tilt//lib/tilt/nokogiri.rb#8 +class Tilt::NokogiriTemplate < ::Tilt::Template + # source://tilt//lib/tilt/nokogiri.rb#12 + def evaluate(scope, locals); end + + # source://tilt//lib/tilt/nokogiri.rb#29 + def precompiled_postamble(locals); end + + # source://tilt//lib/tilt/nokogiri.rb#24 + def precompiled_preamble(locals); end + + # source://tilt//lib/tilt/nokogiri.rb#33 + def precompiled_template(locals); end +end + +# source://tilt//lib/tilt/nokogiri.rb#9 +Tilt::NokogiriTemplate::DOCUMENT_HEADER = T.let(T.unsafe(nil), Regexp) + +# Superclass used for pipeline templates. Should not be used directly. +# +# source://tilt//lib/tilt/pipeline.rb#6 +class Tilt::Pipeline < ::Tilt::Template + # source://tilt//lib/tilt/pipeline.rb#15 + def evaluate(scope, locals, &block); end + + # source://tilt//lib/tilt/pipeline.rb#7 + def prepare; end +end + +# Raw text (no template functionality). +# +# source://tilt//lib/tilt/plain.rb#0 +class Tilt::PlainTemplate < ::Tilt::StaticTemplate + private + + # source://tilt//lib/tilt/plain.rb#5 + def _prepare_output; end +end + +# RDoc template. See: https://github.com/ruby/rdoc +# +# It's suggested that your program run the following at load time when +# using this templae engine in a threaded environment: +# +# require 'rdoc' +# require 'rdoc/markup' +# require 'rdoc/markup/to_html' +# require 'rdoc/options' +# +# source://tilt//lib/tilt/rdoc.rb#0 +class Tilt::RDocTemplate < ::Tilt::StaticTemplate + private + + # source://tilt//lib/tilt/rdoc.rb#17 + def _prepare_output; end +end + +# source://tilt//lib/tilt/template.rb#416 +class Tilt::StaticTemplate < ::Tilt::Template + # Static templates never allow script. + # + # @return [Boolean] + # + # source://tilt//lib/tilt/template.rb#439 + def allows_script?; end + + # Raise NotImplementedError, since static templates + # do not support compiled methods. + # + # @raise [NotImplementedError] + # + # source://tilt//lib/tilt/template.rb#434 + def compiled_method(locals_keys, scope_class = T.unsafe(nil)); end + + # Static templates always return the prepared output. + # + # source://tilt//lib/tilt/template.rb#428 + def render(scope = T.unsafe(nil), locals = T.unsafe(nil)); end + + protected + + # source://tilt//lib/tilt/template.rb#445 + def prepare; end + + private + + # Do nothing, since compiled method cache is not used. + # + # source://tilt//lib/tilt/template.rb#452 + def set_compiled_method_cache; end + + class << self + # source://tilt//lib/tilt/template.rb#417 + def subclass(mime_type: T.unsafe(nil), &block); end + end +end + +# The template source is evaluated as a Ruby string. The #{} interpolation +# syntax can be used to generated dynamic output. +# +# source://tilt//lib/tilt/string.rb#7 +class Tilt::StringTemplate < ::Tilt::Template + # source://tilt//lib/tilt/string.rb#17 + def precompiled(locals); end + + # source://tilt//lib/tilt/string.rb#13 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/string.rb#8 + def prepare; end +end + +# @private +# +# source://tilt//lib/tilt/template.rb#8 +Tilt::TOPOBJECT = Tilt::CompiledTemplates + +# Base class for template implementations. Subclasses must implement +# the #prepare method and one of the #evaluate or #precompiled_template +# methods. +# +# source://tilt//lib/tilt/template.rb#16 +class Tilt::Template + # Create a new template with the file, line, and options specified. By + # default, template data is read from the file. When a block is given, + # it should read template data and return as a String. When file is nil, + # a block is required. + # + # All arguments are optional. + # + # @raise [ArgumentError] + # @return [Template] a new instance of Template + # + # source://tilt//lib/tilt/template.rb#61 + def initialize(file = T.unsafe(nil), line = T.unsafe(nil), options = T.unsafe(nil)); end + + # The basename of the template file. + # + # source://tilt//lib/tilt/template.rb#110 + def basename(suffix = T.unsafe(nil)); end + + # The compiled method for the locals keys and scope_class provided. + # Returns an UnboundMethod, which can be used to define methods + # directly on the scope class, which are much faster to call than + # Tilt's normal rendering. + # + # source://tilt//lib/tilt/template.rb#151 + def compiled_method(locals_keys, scope_class = T.unsafe(nil)); end + + # A path ending in .rb that the template code will be written to, then + # required, instead of being evaled. This is useful for determining + # coverage of compiled template code, or to use static analysis tools + # on the compiled template code. + # + # source://tilt//lib/tilt/template.rb#35 + def compiled_path; end + + # Set the prefix to use for compiled paths. + # + # source://tilt//lib/tilt/template.rb#137 + def compiled_path=(path); end + + # Template source; loaded from a file or given directly. + # + # source://tilt//lib/tilt/template.rb#18 + def data; end + + # The filename used in backtraces to describe the template. + # + # source://tilt//lib/tilt/template.rb#122 + def eval_file; end + + # The name of the file where the template data was loaded from. + # + # source://tilt//lib/tilt/template.rb#21 + def file; end + + # The line number in #file where template data was loaded from. + # + # source://tilt//lib/tilt/template.rb#24 + def line; end + + # An empty Hash that the template engine can populate with various + # metadata. + # + # source://tilt//lib/tilt/template.rb#128 + def metadata; end + + # The template file's basename with all extensions chomped off. + # + # source://tilt//lib/tilt/template.rb#115 + def name; end + + # A Hash of template engine specific options. This is passed directly + # to the underlying engine and is not used by the generic template + # interface. + # + # source://tilt//lib/tilt/template.rb#29 + def options; end + + # Render the template in the given scope with the locals specified. If a + # block is given, it is typically available within the template via + # +yield+. + # + # source://tilt//lib/tilt/template.rb#101 + def render(scope = T.unsafe(nil), locals = T.unsafe(nil), &block); end + + protected + + # The encoding of the source data. Defaults to the + # default_encoding-option if present. You may override this method + # in your template class if you have a better hint of the data's + # encoding. + # + # source://tilt//lib/tilt/template.rb#173 + def default_encoding; end + + # Execute the compiled template and return the result string. Template + # evaluation is guaranteed to be performed in the scope object with the + # locals specified and with support for yielding to the block. + # + # This method is only used by source generating templates. Subclasses that + # override render() may not support all features. + # + # source://tilt//lib/tilt/template.rb#196 + def evaluate(scope, locals, &block); end + + # Generates all template source by combining the preamble, template, and + # postamble and returns a two-tuple of the form: [source, offset], where + # source is the string containing (Ruby) source code for the template and + # offset is the integer line offset where line reporting should begin. + # + # Template subclasses may override this method when they need complete + # control over source generation or want to adjust the default line + # offset. In most cases, overriding the #precompiled_template method is + # easier and more appropriate. + # + # source://tilt//lib/tilt/template.rb#228 + def precompiled(local_keys); end + + # source://tilt//lib/tilt/template.rb#266 + def precompiled_postamble(local_keys); end + + # source://tilt//lib/tilt/template.rb#262 + def precompiled_preamble(local_keys); end + + # A string containing the (Ruby) source code for the template. The + # default Template#evaluate implementation requires either this + # method or the #precompiled method be overridden. When defined, + # the base Template guarantees correct file/line handling, locals + # support, custom scopes, proper encoding, and support for template + # compilation. + # + # @raise [NotImplementedError] + # + # source://tilt//lib/tilt/template.rb#258 + def precompiled_template(local_keys); end + + # Do whatever preparation is necessary to setup the underlying template + # engine. Called immediately after template data is loaded. Instance + # variables set in this method are available when #evaluate is called. + # + # Empty by default as some subclasses do not need separate preparation. + # + # source://tilt//lib/tilt/template.rb#184 + def prepare; end + + # @return [Boolean] + # + # source://tilt//lib/tilt/template.rb#175 + def skip_compiled_encoding_detection?; end + + private + + # source://tilt//lib/tilt/template.rb#407 + def binary(string); end + + # source://tilt//lib/tilt/template.rb#345 + def bind_compiled_method(method_source, offset, scope_class); end + + # source://tilt//lib/tilt/template.rb#322 + def compile_template_method(local_keys, scope_class = T.unsafe(nil)); end + + # source://tilt//lib/tilt/template.rb#370 + def eval_compiled_method(method_source, offset, scope_class); end + + # source://tilt//lib/tilt/template.rb#388 + def extract_encoding(script, &block); end + + # source://tilt//lib/tilt/template.rb#392 + def extract_magic_comment(script); end + + # @return [Boolean] + # + # source://tilt//lib/tilt/template.rb#403 + def freeze_string_literals?; end + + # source://tilt//lib/tilt/template.rb#374 + def load_compiled_method(path, method_source); end + + # source://tilt//lib/tilt/template.rb#301 + def local_extraction(local_keys); end + + # source://tilt//lib/tilt/template.rb#274 + def process_arg(arg); end + + # source://tilt//lib/tilt/template.rb#288 + def read_template_file; end + + # source://tilt//lib/tilt/template.rb#297 + def set_compiled_method_cache; end + + # source://tilt//lib/tilt/template.rb#382 + def unbind_compiled_method(method_name); end + + class << self + # Use `.metadata[:mime_type]` instead. + # + # source://tilt//lib/tilt/template.rb#45 + def default_mime_type; end + + # Use `.metadata[:mime_type] = val` instead. + # + # source://tilt//lib/tilt/template.rb#50 + def default_mime_type=(value); end + + # An empty Hash that the template engine can populate with various + # metadata. + # + # source://tilt//lib/tilt/template.rb#40 + def metadata; end + end +end + +# source://tilt//lib/tilt/template.rb#187 +Tilt::Template::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tilt//lib/tilt/template.rb#188 +Tilt::Template::USE_BIND_CALL = T.let(T.unsafe(nil), TrueClass) + +# Current version. +# +# source://tilt//lib/tilt.rb#8 +Tilt::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/toml-rb@2.2.0.rbi b/sorbet/rbi/gems/toml-rb@2.2.0.rbi new file mode 100644 index 0000000000..7590f2e081 --- /dev/null +++ b/sorbet/rbi/gems/toml-rb@2.2.0.rbi @@ -0,0 +1,418 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `toml-rb` gem. +# Please instead update this file by running `bin/tapioca gem toml-rb`. + +# source://toml-rb//lib/toml-rb/errors.rb#1 +module TomlRB + class << self + # Public: Returns a *TomlRB* string from a Ruby Hash. + # + # hash - Ruby Hash to be dumped into *TomlRB* + # + # + # Examples + # + # TomlRB.dump(title: 'TomlRB dump') + # # => "simple = true\n" + # + # hash = { + # "title"=>"wow!", + # "awesome"=> { + # "you"=>true, + # "others"=>false + # } + # } + # + # TomlRB.dump(hash) + # # => "title = \"wow!\"\n[awesome]\nothers = false\nyou = true\n" + # + # + # Returns a TomlRB string representing the hash. + # + # source://toml-rb//lib/toml-rb.rb#97 + def dump(hash); end + + # Public: Returns a hash from a *TomlRB* file. + # + # path - TomlRB File path + # :symbolize_keys - true|false (optional). + # + # + # Examples + # + # TomlRB.load_file('/tmp/simple.toml') + # # => {"group"=>{}} + # + # TomlRB.load_file('/tmp/simple.toml', symbolize_keys: true) + # # => {group: {}} + # + # + # Returns a Ruby hash representation of the content. + # Raises ValueOverwriteError if a key is overwritten. + # Raises ParseError if the content has invalid TomlRB. + # Raises Errno::ENOENT if the file cannot be found. + # Raises Errno::EACCES if the file cannot be accessed. + # + # source://toml-rb//lib/toml-rb.rb#70 + def load_file(path, symbolize_keys: T.unsafe(nil)); end + + # Public: Returns a hash from *TomlRB* content. + # + # content - TomlRB string to be parsed. + # :symbolize_keys - true | false (default: false). + # + # + # Examples + # + # TomlRB.parse('[group]') + # # => {"group"=>{}} + # + # TomlRB.parse('title = "TomlRB parser"') + # # => {"title"=>"TomlRB parser"} + # + # TomlRB.parse('[group]', symbolize_keys: true) + # # => {group: {}} + # + # TomlRB.parse('title = "TomlRB parser"', symbolize_keys: true) + # # => {title: "TomlRB parser"} + # + # + # Returns a Ruby hash representation of the content according to TomlRB spec. + # Raises ValueOverwriteError if a key is overwritten. + # Raises ParseError if the content has invalid TomlRB. + # + # source://toml-rb//lib/toml-rb.rb#46 + def parse(content, symbolize_keys: T.unsafe(nil)); end + end +end + +# source://toml-rb//lib/toml-rb/array.rb#2 +module TomlRB::ArrayParser + # source://toml-rb//lib/toml-rb/array.rb#3 + def value; end +end + +# source://toml-rb//lib/toml-rb.rb#0 +module TomlRB::Arrays + include ::Citrus::Grammar + include ::TomlRB::Helper + include ::TomlRB::Primitive + extend ::Citrus::GrammarMethods +end + +# Used in primitive.citrus +# +# source://toml-rb//lib/toml-rb/string.rb#3 +module TomlRB::BasicString + # source://toml-rb//lib/toml-rb/string.rb#15 + def value; end + + class << self + # Replace the unicode escaped characters with the corresponding character + # e.g. \u03B4 => ? + # + # source://toml-rb//lib/toml-rb/string.rb#23 + def decode_unicode(str); end + + # source://toml-rb//lib/toml-rb/string.rb#37 + def parse_error(m); end + + # source://toml-rb//lib/toml-rb/string.rb#27 + def transform_escaped_chars(str); end + end +end + +# source://toml-rb//lib/toml-rb/string.rb#4 +TomlRB::BasicString::SPECIAL_CHARS = T.let(T.unsafe(nil), Hash) + +# source://toml-rb//lib/toml-rb.rb#0 +module TomlRB::Document + include ::Citrus::Grammar + include ::TomlRB::Helper + include ::TomlRB::Primitive + include ::TomlRB::Arrays + extend ::Citrus::GrammarMethods +end + +# source://toml-rb//lib/toml-rb/dumper.rb#6 +class TomlRB::Dumper + # @return [Dumper] a new instance of Dumper + # + # source://toml-rb//lib/toml-rb/dumper.rb#9 + def initialize(hash); end + + # Returns the value of attribute toml_str. + # + # source://toml-rb//lib/toml-rb/dumper.rb#7 + def toml_str; end + + private + + # @return [Boolean] + # + # source://toml-rb//lib/toml-rb/dumper.rb#107 + def bare_key?(key); end + + # source://toml-rb//lib/toml-rb/dumper.rb#62 + def dump_nested_pairs(nested_pairs, prefix); end + + # source://toml-rb//lib/toml-rb/dumper.rb#48 + def dump_pairs(simple, nested, table_array, prefix = T.unsafe(nil)); end + + # source://toml-rb//lib/toml-rb/dumper.rb#55 + def dump_simple_pairs(simple_pairs); end + + # source://toml-rb//lib/toml-rb/dumper.rb#70 + def dump_table_array_pairs(table_array_pairs, prefix); end + + # source://toml-rb//lib/toml-rb/dumper.rb#84 + def print_prefix(prefix, extra_brackets = T.unsafe(nil)); end + + # source://toml-rb//lib/toml-rb/dumper.rb#111 + def quote_key(key); end + + # source://toml-rb//lib/toml-rb/dumper.rb#27 + def sort_pairs(hash); end + + # source://toml-rb//lib/toml-rb/dumper.rb#91 + def to_toml(obj); end + + # source://toml-rb//lib/toml-rb/dumper.rb#17 + def visit(hash, prefix, extra_brackets = T.unsafe(nil)); end +end + +# Parent class for all TomlRB errors +# +# source://toml-rb//lib/toml-rb/errors.rb#3 +class TomlRB::Error < ::StandardError; end + +# source://toml-rb//lib/toml-rb.rb#0 +module TomlRB::Helper + include ::Citrus::Grammar + extend ::Citrus::GrammarMethods +end + +# source://toml-rb//lib/toml-rb/inline_table.rb#2 +class TomlRB::InlineTable + # @return [InlineTable] a new instance of InlineTable + # + # source://toml-rb//lib/toml-rb/inline_table.rb#3 + def initialize(keyvalue_pairs); end + + # source://toml-rb//lib/toml-rb/inline_table.rb#7 + def accept_visitor(keyvalue); end + + # source://toml-rb//lib/toml-rb/inline_table.rb#11 + def value(symbolize_keys = T.unsafe(nil)); end +end + +# source://toml-rb//lib/toml-rb/inline_table.rb#21 +module TomlRB::InlineTableParser + # source://toml-rb//lib/toml-rb/inline_table.rb#22 + def value; end +end + +# source://toml-rb//lib/toml-rb/keyvalue.rb#4 +class TomlRB::Keyvalue + # @return [Keyvalue] a new instance of Keyvalue + # + # source://toml-rb//lib/toml-rb/keyvalue.rb#7 + def initialize(dotted_keys, value); end + + # source://toml-rb//lib/toml-rb/keyvalue.rb#39 + def accept_visitor(parser); end + + # source://toml-rb//lib/toml-rb/keyvalue.rb#13 + def assign(hash, fully_defined_keys, symbolize_keys = T.unsafe(nil)); end + + # source://toml-rb//lib/toml-rb/keyvalue.rb#29 + def dotted_key_merge(hash, update); end + + # Returns the value of attribute dotted_keys. + # + # source://toml-rb//lib/toml-rb/keyvalue.rb#5 + def dotted_keys; end + + # Returns the value of attribute symbolize_keys. + # + # source://toml-rb//lib/toml-rb/keyvalue.rb#5 + def symbolize_keys; end + + # Returns the value of attribute value. + # + # source://toml-rb//lib/toml-rb/keyvalue.rb#5 + def value; end + + private + + # source://toml-rb//lib/toml-rb/keyvalue.rb#45 + def visit_value(a_value); end +end + +# Used in document.citrus +# +# source://toml-rb//lib/toml-rb/keyvalue.rb#53 +module TomlRB::KeyvalueParser + # source://toml-rb//lib/toml-rb/keyvalue.rb#54 + def value; end +end + +# source://toml-rb//lib/toml-rb/string.rb#42 +module TomlRB::LiteralString + # source://toml-rb//lib/toml-rb/string.rb#43 + def value; end +end + +# source://toml-rb//lib/toml-rb/datetime.rb#23 +module TomlRB::LocalDateParser + # source://toml-rb//lib/toml-rb/datetime.rb#24 + def value; end +end + +# source://toml-rb//lib/toml-rb/datetime.rb#13 +module TomlRB::LocalDateTimeParser + # source://toml-rb//lib/toml-rb/datetime.rb#14 + def value; end +end + +# source://toml-rb//lib/toml-rb/datetime.rb#30 +module TomlRB::LocalTimeParser + # source://toml-rb//lib/toml-rb/datetime.rb#31 + def value; end +end + +# source://toml-rb//lib/toml-rb/string.rb#60 +module TomlRB::MultilineLiteral + # source://toml-rb//lib/toml-rb/string.rb#61 + def value; end +end + +# source://toml-rb//lib/toml-rb/string.rb#48 +module TomlRB::MultilineString + # source://toml-rb//lib/toml-rb/string.rb#49 + def value; end +end + +# source://toml-rb//lib/toml-rb/datetime.rb#2 +module TomlRB::OffsetDateTimeParser + # source://toml-rb//lib/toml-rb/datetime.rb#3 + def value; end +end + +# Error related to parsing. +# +# source://toml-rb//lib/toml-rb/errors.rb#6 +class TomlRB::ParseError < ::TomlRB::Error; end + +# source://toml-rb//lib/toml-rb/parser.rb#2 +class TomlRB::Parser + # @return [Parser] a new instance of Parser + # + # source://toml-rb//lib/toml-rb/parser.rb#5 + def initialize(content, symbolize_keys: T.unsafe(nil)); end + + # Returns the value of attribute hash. + # + # source://toml-rb//lib/toml-rb/parser.rb#3 + def hash; end + + # source://toml-rb//lib/toml-rb/parser.rb#35 + def visit_keyvalue(keyvalue); end + + # source://toml-rb//lib/toml-rb/parser.rb#30 + def visit_table(table); end + + # Read about the Visitor pattern + # http://en.wikipedia.org/wiki/Visitor_pattern + # + # source://toml-rb//lib/toml-rb/parser.rb#22 + def visit_table_array(table_array); end +end + +# source://toml-rb//lib/toml-rb.rb#0 +module TomlRB::Primitive + include ::Citrus::Grammar + include ::TomlRB::Helper + extend ::Citrus::GrammarMethods +end + +# source://toml-rb//lib/toml-rb/table.rb#2 +class TomlRB::Table + # @return [Table] a new instance of Table + # + # source://toml-rb//lib/toml-rb/table.rb#3 + def initialize(dotted_keys); end + + # source://toml-rb//lib/toml-rb/table.rb#21 + def accept_visitor(parser); end + + # source://toml-rb//lib/toml-rb/table.rb#25 + def full_key; end + + # source://toml-rb//lib/toml-rb/table.rb#7 + def navigate_keys(hash, visited_keys, symbolize_keys = T.unsafe(nil)); end + + private + + # Fail if the key was already defined with a ValueOverwriteError + # + # source://toml-rb//lib/toml-rb/table.rb#32 + def ensure_key_not_defined(visited_keys); end +end + +# source://toml-rb//lib/toml-rb/table_array.rb#2 +class TomlRB::TableArray + # @return [TableArray] a new instance of TableArray + # + # source://toml-rb//lib/toml-rb/table_array.rb#3 + def initialize(dotted_keys); end + + # source://toml-rb//lib/toml-rb/table_array.rb#35 + def accept_visitor(parser); end + + # source://toml-rb//lib/toml-rb/table_array.rb#39 + def full_key; end + + # source://toml-rb//lib/toml-rb/table_array.rb#7 + def navigate_keys(hash, symbolize_keys = T.unsafe(nil)); end +end + +# Used in document.citrus +# +# source://toml-rb//lib/toml-rb/table_array.rb#45 +module TomlRB::TableArrayParser + # source://toml-rb//lib/toml-rb/table_array.rb#46 + def value; end +end + +# Used in document.citrus +# +# source://toml-rb//lib/toml-rb/table.rb#39 +module TomlRB::TableParser + # source://toml-rb//lib/toml-rb/table.rb#40 + def value; end +end + +# Overwrite error +# +# source://toml-rb//lib/toml-rb/errors.rb#9 +class TomlRB::ValueOverwriteError < ::TomlRB::Error + # @return [ValueOverwriteError] a new instance of ValueOverwriteError + # + # source://toml-rb//lib/toml-rb/errors.rb#12 + def initialize(key); end + + # Returns the value of attribute key. + # + # source://toml-rb//lib/toml-rb/errors.rb#10 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://toml-rb//lib/toml-rb/errors.rb#10 + def key=(_arg0); end +end diff --git a/sorbet/rbi/gems/unf@0.1.4.rbi b/sorbet/rbi/gems/unf@0.1.4.rbi new file mode 100644 index 0000000000..c1e0b9c6b5 --- /dev/null +++ b/sorbet/rbi/gems/unf@0.1.4.rbi @@ -0,0 +1,38 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unf` gem. +# Please instead update this file by running `bin/tapioca gem unf`. + +# source://unf//lib/unf/version.rb#1 +module UNF; end + +# UTF-8 string normalizer class. Implementations may vary depending +# on the platform. +# +# source://unf//lib/unf/normalizer.rb#10 +class UNF::Normalizer + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Normalizer] a new instance of Normalizer + def initialize; end + + def normalize(_arg0, _arg1); end + + class << self + def new(*_arg0); end + + # A shortcut for instance.normalize(string, form). + # + # source://unf//lib/unf/normalizer.rb#24 + def normalize(string, form); end + + private + + def allocate; end + end +end + +# source://unf//lib/unf/version.rb#2 +UNF::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unf_ext@0.0.8.2.rbi b/sorbet/rbi/gems/unf_ext@0.0.8.2.rbi new file mode 100644 index 0000000000..7ddd4d2447 --- /dev/null +++ b/sorbet/rbi/gems/unf_ext@0.0.8.2.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unf_ext` gem. +# Please instead update this file by running `bin/tapioca gem unf_ext`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi b/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi new file mode 100644 index 0000000000..ccdfd066de --- /dev/null +++ b/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi @@ -0,0 +1,65 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-display_width` gem. +# Please instead update this file by running `bin/tapioca gem unicode-display_width`. + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#3 +module Unicode; end + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#4 +class Unicode::DisplayWidth + # @return [DisplayWidth] a new instance of DisplayWidth + # + # source://unicode-display_width//lib/unicode/display_width.rb#104 + def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#110 + def get_config(**kwargs); end + + # source://unicode-display_width//lib/unicode/display_width.rb#118 + def of(string, **kwargs); end + + class << self + # source://unicode-display_width//lib/unicode/display_width/index.rb#14 + def decompress_index(index, level); end + + # source://unicode-display_width//lib/unicode/display_width.rb#86 + def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#12 + def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end + + # Same as .width_no_overwrite - but with applying overwrites for each char + # + # source://unicode-display_width//lib/unicode/display_width.rb#57 + def width_all_features(string, ambiguous, overwrite, options); end + + # source://unicode-display_width//lib/unicode/display_width.rb#30 + def width_no_overwrite(string, ambiguous, options = T.unsafe(nil)); end + end +end + +# source://unicode-display_width//lib/unicode/display_width.rb#9 +Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#7 +Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#10 +Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Array) + +# source://unicode-display_width//lib/unicode/display_width/index.rb#11 +Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#8 +Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#8 +Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#6 +Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#5 +Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unparser@0.6.8.rbi b/sorbet/rbi/gems/unparser@0.6.8.rbi new file mode 100644 index 0000000000..9bf945c9fd --- /dev/null +++ b/sorbet/rbi/gems/unparser@0.6.8.rbi @@ -0,0 +1,4525 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unparser` gem. +# Please instead update this file by running `bin/tapioca gem unparser`. + +# Library namespace +# +# source://unparser//lib/unparser/equalizer.rb#3 +module Unparser + class << self + # Construct a parser buffer from string + # + # @param source [String] + # @return [Parser::Source::Buffer] + # + # source://unparser//lib/unparser.rb#147 + def buffer(source, identification = T.unsafe(nil)); end + + # Parse string into AST + # + # @param source [String] + # @return [Parser::AST::Node, nil] + # + # source://unparser//lib/unparser.rb#105 + def parse(source); end + + # Parse string into either syntax error or AST + # + # @param source [String] + # @return [Either<Parser::SyntaxError, (Parser::ASTNode, nil)>] + # + # source://unparser//lib/unparser.rb#114 + def parse_either(source); end + + # Parse string into AST, with comments + # + # @param source [String] + # @return [Parser::AST::Node] + # + # source://unparser//lib/unparser.rb#125 + def parse_with_comments(source); end + + # Parser instance that produces AST unparser understands + # + # @api private + # @return [Parser::Base] + # + # source://unparser//lib/unparser.rb#134 + def parser; end + + # Unparse an AST (and, optionally, comments) into a string + # + # @api public + # @param node [Parser::AST::Node, nil] + # @param comment_array [Array] + # @raise InvalidNodeError + # if the node passed is invalid + # @return [String] + # + # source://unparser//lib/unparser.rb#60 + def unparse(node, comment_array = T.unsafe(nil)); end + + # Unparse capturing errors + # + # This is mostly useful for writing testing tools against unparser. + # + # @param node [Parser::AST::Node, nil] + # @return [Either<Exception, String>] + # + # source://unparser//lib/unparser.rb#96 + def unparse_either(node); end + + # Unparse with validation + # + # @param node [Parser::AST::Node, nil] + # @param comment_array [Array] + # @return [Either<Validation,String>] + # + # source://unparser//lib/unparser.rb#78 + def unparse_validate(node, comment_array = T.unsafe(nil)); end + end +end + +# Namespace for AST processing tools +# +# source://unparser//lib/unparser/ast.rb#5 +module Unparser::AST + class << self + # Return local variables that get assigned in scope + # + # @api private + # @param node [Parser::AST::Node] + # @return [Set<Symbol>] + # + # source://unparser//lib/unparser/ast.rb#57 + def local_variable_assignments(node); end + + # Return local variables read + # + # @api private + # @param node [Parser::AST::Node] + # @return [Set<Symbol>] + # + # source://unparser//lib/unparser/ast.rb#72 + def local_variable_reads(node); end + + # Test for local variable inherited scope reset + # + # @api private + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://unparser//lib/unparser/ast.rb#33 + def not_close_scope?(node); end + + # Test for local variable scope reset + # + # @api private + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://unparser//lib/unparser/ast.rb#45 + def not_reset_scope?(node); end + end +end + +# Nodes that assign a local variable +# +# source://unparser//lib/unparser/ast.rb#14 +Unparser::AST::ASSIGN_NODES = T.let(T.unsafe(nil), Set) + +# source://unparser//lib/unparser/ast.rb#11 +Unparser::AST::CLOSE_NODES = T.let(T.unsafe(nil), Array) + +# AST enumerator +# +# source://unparser//lib/unparser/ast.rb#80 +class Unparser::AST::Enumerator + include ::Enumerable + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Return each node + # + # @api private + # @return [Enumerator<Parser::AST::Node>] if no block given + # @return [self] otherwise + # + # source://unparser//lib/unparser/ast.rb#106 + def each(&block); end + + # Return nodes selected by type + # + # @api private + # @param type [Symbol] + # @return [Enumerable<Parser::AST::Node>] + # + # source://unparser//lib/unparser/ast.rb#130 + def type(type); end + + # Return nodes selected by types + # + # @api private + # @param types [Enumerable<Symbol>] + # @return [Enumerable<Parser::AST::Node>] + # + # source://unparser//lib/unparser/ast.rb#118 + def types(types); end + + class << self + # Return new instance + # + # @api private + # @param node [Parser::AST::Node] + # @param controller [#call(node)] + # @return [Enumerator] + # + # source://unparser//lib/unparser/ast.rb#92 + def new(node, controller = T.unsafe(nil)); end + + private + + # Return frozne set of objects + # + # @api private + # @param enumerable [Enumerable] + # @return [Set] + # + # source://unparser//lib/unparser/ast.rb#142 + def set(enumerable); end + + # Return nodes of type + # + # @api private + # @param node [Parser::AST::Node] + # @param type [Symbol] + # @return [Enumerable<Parser::AST::Node]] Enumerable<Parser::AST::Node] + # + # source://unparser//lib/unparser/ast.rb#156 + def type(node, type); end + end +end + +# source://unparser//lib/unparser/ast.rb#6 +Unparser::AST::FIRST_CHILD = T.let(T.unsafe(nil), Proc) + +# source://unparser//lib/unparser/ast.rb#10 +Unparser::AST::INHERIT_NODES = T.let(T.unsafe(nil), Array) + +# Calculated local variable scope for a given node +# +# source://unparser//lib/unparser/ast/local_variable_scope.rb#7 +class Unparser::AST::LocalVariableScope + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + include ::Enumerable + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Initialize object + # + # @api private + # @param node [Parser::AST::Node] + # @return [undefined] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#18 + def initialize(node); end + + # Test if local variable was first at given assignment + # + # @api private + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#35 + def first_assignment?(node); end + + # Test if local variables where first assigned in body and read by conditional + # + # @api private + # @param body [Parser::AST::Node] + # @param condition [Parser::AST::Node] + # @return [Boolean] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#64 + def first_assignment_in?(left, right); end + + # Test if local variable is defined for given node + # + # @api private + # @param node [Parser::AST::Node] + # @param name [Symbol] + # @return [Boolean] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#51 + def local_variable_defined_for_node?(node, name); end + + private + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#76 + def match(needle); end +end + +# Local variable scope enumerator +# +# source://unparser//lib/unparser/ast/local_variable_scope.rb#85 +class Unparser::AST::LocalVariableScopeEnumerator + include ::Enumerable + + # Initialize object + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#94 + def initialize; end + + # Enumerate local variable scope scope + # + # @api private + # @return [self] if block given + # @return [Enumerator<Array<Symbol>>] ] + # otherwise + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#121 + def each(node, &block); end + + private + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#127 + def current; end + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#156 + def define(name); end + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#141 + def enter(node); end + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#152 + def leave(node); end + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#168 + def pop; end + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#164 + def push_inherit; end + + # source://unparser//lib/unparser/ast/local_variable_scope.rb#160 + def push_reset; end + + # @yield [node, current.dup, before] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#131 + def visit(node, &block); end + + class << self + # Enumerate each node with its local variable scope + # + # @api private + # @param node [Parser::AST::Node] + # @return [self] + # + # source://unparser//lib/unparser/ast/local_variable_scope.rb#106 + def each(node, &block); end + end +end + +# source://unparser//lib/unparser/ast.rb#9 +Unparser::AST::RESET_NODES = T.let(T.unsafe(nil), Array) + +# source://unparser//lib/unparser/ast.rb#7 +Unparser::AST::TAUTOLOGY = T.let(T.unsafe(nil), Proc) + +# Controlled AST walker walking the AST in deeth first search with pre order +# +# source://unparser//lib/unparser/ast.rb#164 +class Unparser::AST::Walker + include ::Unparser::Equalizer::Methods + + # Call walker with node + # + # @api private + # @param node [Parser::AST::Node] + # @return [undefined] + # + # source://unparser//lib/unparser/ast.rb#188 + def call(node); end + + class << self + # Call ast walker + # + # @api private + # @param node [Parser::AST::Node] + # @return [self] + # + # source://unparser//lib/unparser/ast.rb#175 + def call(node, controller = T.unsafe(nil), &block); end + end +end + +# Module to allow class and methods to be abstract +# +# Original code before vendoring and reduction from: https://github.com/dkubb/abstract_type. +# +# source://unparser//lib/unparser/abstract_type.rb#7 +module Unparser::AbstractType + mixes_in_class_methods ::Unparser::AbstractType::AbstractMethodDeclarations + + class << self + private + + # Define the new method on the abstract type + # + # Ensures that the instance cannot be of the abstract type + # and must be a descendant. + # + # @api private + # @param abstract_class [Class] + # @return [undefined] + # + # source://unparser//lib/unparser/abstract_type.rb#35 + def create_new_method(abstract_class); end + + # Hook called when module is included + # + # @api private + # @param descendant [Module] the module or class including AbstractType + # @return [undefined] + # + # source://unparser//lib/unparser/abstract_type.rb#17 + def included(descendant); end + end +end + +# source://unparser//lib/unparser/abstract_type.rb#47 +module Unparser::AbstractType::AbstractMethodDeclarations + # Create abstract instance methods + # + # @api public + # @example + # class Foo + # include AbstractType + # + # # Create an abstract instance method + # abstract_method :some_method + # end + # @param names [Array<#to_s>] + # @return [self] + # + # source://unparser//lib/unparser/abstract_type.rb#64 + def abstract_method(*names); end + + # Create abstract singleton methods + # + # @api private + # @example + # class Foo + # include AbstractType + # + # # Create an abstract instance method + # abstract_singleton_method :some_method + # end + # @param names [Array<#to_s>] + # @return [self] + # + # source://unparser//lib/unparser/abstract_type.rb#84 + def abstract_singleton_method(*names); end + + private + + # Create abstract instance method + # + # @api private + # @param name [#to_s] the name of the method to create + # @return [undefined] + # + # source://unparser//lib/unparser/abstract_type.rb#113 + def create_abstract_instance_method(name); end + + # Create abstract singleton method + # + # @api private + # @param name [#to_s] the name of the method to create + # @return [undefined] + # + # source://unparser//lib/unparser/abstract_type.rb#99 + def create_abstract_singleton_method(name); end +end + +# Allows objects to be made immutable +# +# Original code before vendoring and reduction from: https://github.com/dkubb/adamantium. +# +# source://unparser//lib/unparser/adamantium.rb#7 +module Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + + mixes_in_class_methods ::Unparser::Adamantium::ModuleMethods + mixes_in_class_methods ::Unparser::Adamantium::ClassMethods + + class << self + private + + # ModuleMethods + # + # source://unparser//lib/unparser/adamantium.rb#141 + def included(descendant); end + end +end + +# Methods mixed in to adamantium classes +# +# source://unparser//lib/unparser/adamantium.rb#70 +module Unparser::Adamantium::ClassMethods + # Instantiate a new frozen object + # + # @api public + # @return [Object] + # + # source://unparser//lib/unparser/adamantium.rb#77 + def new(*_arg0); end +end + +# source://unparser//lib/unparser/adamantium.rb#8 +module Unparser::Adamantium::InstanceMethods + # A noop #dup for immutable objects + # + # @api public + # @return [self] + # + # source://unparser//lib/unparser/adamantium.rb#14 + def dup; end + + # Freeze the object + # + # @api public + # @return [Object] + # + # source://unparser//lib/unparser/adamantium.rb#23 + def freeze; end + + private + + # source://unparser//lib/unparser/adamantium.rb#30 + def memoized_method_cache; end +end + +# Storage for memoized methods +# +# source://unparser//lib/unparser/adamantium.rb#37 +class Unparser::Adamantium::Memory + # Initialize the memory storage for memoized methods + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/adamantium.rb#44 + def initialize(values); end + + # Fetch the value from memory, or evaluate if it does not exist + # + # @api public + # @param name [Symbol] + # @yieldreturn [Object] the value to memoize + # + # source://unparser//lib/unparser/adamantium.rb#58 + def fetch(name); end +end + +# Build the memoized method +# +# source://unparser//lib/unparser/adamantium/method_builder.rb#6 +class Unparser::Adamantium::MethodBuilder + # Initialize an object to build a memoized method + # + # @api private + # @param descendant [Module] + # @param method_name [Symbol] + # @return [undefined] + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#47 + def initialize(descendant, method_name); end + + # Build a new memoized method + # + # @api public + # @example + # method_builder.call # => creates new method + # @return [UnboundMethod] + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#63 + def call; end + + private + + # source://unparser//lib/unparser/adamantium/method_builder.rb#72 + def assert_arity(arity); end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#83 + def create_memoized_method; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#78 + def remove_original_method; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#97 + def set_method_visibility; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#101 + def visibility; end +end + +# Raised when a block is passed to a memoized method +# +# source://unparser//lib/unparser/adamantium/method_builder.rb#25 +class Unparser::Adamantium::MethodBuilder::BlockNotAllowedError < ::ArgumentError + # Initialize a block not allowed exception + # + # @api private + # @param descendant [Module] + # @param method [Symbol] + # @return [BlockNotAllowedError] a new instance of BlockNotAllowedError + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#33 + def initialize(descendant, method); end +end + +# Raised when the method arity is invalid +# +# source://unparser//lib/unparser/adamantium/method_builder.rb#9 +class Unparser::Adamantium::MethodBuilder::InvalidArityError < ::ArgumentError + # Initialize an invalid arity exception + # + # @api private + # @param descendant [Module] + # @param method [Symbol] + # @param arity [Integer] + # @return [InvalidArityError] a new instance of InvalidArityError + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#18 + def initialize(descendant, method, arity); end +end + +# Methods mixed in to adamantium modules +# +# source://unparser//lib/unparser/adamantium.rb#84 +module Unparser::Adamantium::ModuleMethods + # Memoize a list of methods + # + # @api public + # @param methods [Array<#to_s>] a list of methods to memoize + # @return [self] + # + # source://unparser//lib/unparser/adamantium.rb#94 + def memoize(*methods); end + + # Test if method is memoized + # + # @param name [Symbol] + # @return [Bool] + # + # source://unparser//lib/unparser/adamantium.rb#104 + def memoized?(method_name); end + + # Return unmemoized instance method + # + # @api public + # @param name [Symbol] + # @raise [NameError] raised if the method is unknown + # @return [UnboundMethod] the memoized method + # + # source://unparser//lib/unparser/adamantium.rb#119 + def unmemoized_instance_method(method_name); end + + private + + # source://unparser//lib/unparser/adamantium.rb#127 + def memoize_method(method_name); end + + # source://unparser//lib/unparser/adamantium.rb#135 + def memoized_methods; end +end + +# Original code before vendoring and reduction from: https://github.com/mbj/anima. +# +# source://unparser//lib/unparser/anima.rb#5 +class Unparser::Anima < ::Module + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Initialize object + # + # + # @return [undefined] + # + # source://unparser//lib/unparser/anima.rb#18 + def initialize(*names); end + + # Return new anima with attributes added + # + # @example + # anima = Anima.new(:foo) + # anima.add(:bar) # equals Anima.new(:foo, :bar) + # @return [Anima] + # + # source://unparser//lib/unparser/anima.rb#31 + def add(*names); end + + # Return attribute names + # + # @return [Enumerable<Symbol>] + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def attribute_names(&block); end + + # Return names + # + # @return [AttributeSet] + # + # source://unparser//lib/unparser/anima.rb#11 + def attributes; end + + # Return attributes hash for instance + # + # @param object [Object] + # @return [Hash] + # + # source://unparser//lib/unparser/anima.rb#52 + def attributes_hash(object); end + + # Initialize instance + # + # @param object [Object] + # @param attribute_hash [Hash] + # @return [self] + # + # source://unparser//lib/unparser/anima.rb#73 + def initialize_instance(object, attribute_hash); end + + # Return new anima with attributes removed + # + # @example + # anima = Anima.new(:foo, :bar) + # anima.remove(:bar) # equals Anima.new(:foo) + # @return [Anima] + # + # source://unparser//lib/unparser/anima.rb#43 + def remove(*names); end + + private + + # Fail unless keys in +attribute_hash+ matches #attribute_names + # + # @param klass [Class] the class being initialized + # @param attribute_hash [Hash] the attributes to initialize +object+ with + # @raise [Error] + # @return [undefined] + # + # source://unparser//lib/unparser/anima.rb#164 + def assert_known_attributes(klass, attribute_hash); end + + # Infect the instance with anima + # + # @param scope [Class, Module] + # @return [undefined] + # + # source://unparser//lib/unparser/anima.rb#137 + def included(descendant); end + + # Return new instance + # + # @param attributes [Enumerable<Symbol>] + # @return [Anima] + # + # source://unparser//lib/unparser/anima.rb#180 + def new(attributes); end +end + +# An attribute +# +# source://unparser//lib/unparser/anima/attribute.rb#6 +class Unparser::Anima::Attribute + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Initialize attribute + # + # @param name [Symbol] + # @return [Attribute] a new instance of Attribute + # + # source://unparser//lib/unparser/anima/attribute.rb#12 + def initialize(name); end + + # Get attribute value from object + # + # @param object [Object] + # @return [Object] + # + # source://unparser//lib/unparser/anima/attribute.rb#42 + def get(object); end + + # Return instance variable name + # + # @return [Symbol] + # + # source://unparser//lib/unparser/anima/attribute.rb#25 + def instance_variable_name; end + + # Load attribute + # + # @param object [Object] + # @param attributes [Hash] + # @return [self] + # + # source://unparser//lib/unparser/anima/attribute.rb#33 + def load(object, attributes); end + + # Return attribute name + # + # @return [Symbol] + # + # source://unparser//lib/unparser/anima/attribute.rb#20 + def name; end + + # Set attribute value in object + # + # @param object [Object] + # @param value [Object] + # @return [self] + # + # source://unparser//lib/unparser/anima/attribute.rb#52 + def set(object, value); end +end + +# Abstract base class for anima errors +# +# source://unparser//lib/unparser/anima/error.rb#6 +class Unparser::Anima::Error < ::RuntimeError + # Initialize object + # + # @param klass [Class] the class being initialized + # @param missing [Enumerable<Symbol>] + # @param unknown [Enumerable<Symbol>] + # @return [undefined] + # + # source://unparser//lib/unparser/anima/error.rb#18 + def initialize(klass, missing, unknown); end +end + +# source://unparser//lib/unparser/anima/error.rb#7 +Unparser::Anima::Error::FORMAT = T.let(T.unsafe(nil), String) + +# Static instance methods for anima infected classes +# +# source://unparser//lib/unparser/anima.rb#82 +module Unparser::Anima::InstanceMethods + # Initialize an anima infected object + # + # + # @param attributes [#to_h] a hash that matches anima defined attributes + # @return [undefined] + # + # source://unparser//lib/unparser/anima.rb#91 + def initialize(attributes); end + + # Return a hash representation of an anima infected object + # + # @api public + # @example + # anima.to_h # => { :foo => : bar } + # @return [Hash] + # + # source://unparser//lib/unparser/anima.rb#104 + def to_h; end + + # Return updated instance + # + # @api public + # @example + # klass = Class.new do + # include Anima.new(:foo, :bar) + # end + # + # foo = klass.new(:foo => 1, :bar => 2) + # updated = foo.with(:foo => 3) + # updated.foo # => 3 + # updated.bar # => 2 + # @param attributes [Hash] + # @return [Anima] + # + # source://unparser//lib/unparser/anima.rb#125 + def with(attributes); end +end + +# Buffer used to emit into +# +# source://unparser//lib/unparser/buffer.rb#6 +class Unparser::Buffer + # Initialize object + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/buffer.rb#16 + def initialize; end + + # Append string + # + # @api private + # @param string [String] + # @return [self] + # + # source://unparser//lib/unparser/buffer.rb#29 + def append(string); end + + # Append a string without an indentation prefix + # + # @api private + # @param string [String] + # @return [self] + # + # source://unparser//lib/unparser/buffer.rb#45 + def append_without_prefix(string); end + + # Return content of buffer + # + # @api private + # @return [String] + # + # source://unparser//lib/unparser/buffer.rb#104 + def content; end + + # Test for a fresh line + # + # @api private + # @return [Boolean] + # + # source://unparser//lib/unparser/buffer.rb#94 + def fresh_line?; end + + # Increase indent + # + # @api private + # @return [self] + # + # source://unparser//lib/unparser/buffer.rb#55 + def indent; end + + # Write newline + # + # @api private + # @return [self] + # + # source://unparser//lib/unparser/buffer.rb#77 + def nl; end + + # source://unparser//lib/unparser/buffer.rb#81 + def root_indent; end + + # Decrease indent + # + # @api private + # @return [self] + # + # source://unparser//lib/unparser/buffer.rb#66 + def unindent; end + + # Write raw fragment to buffer + # + # Does not do indentation logic. + # + # @param fragment [String] + # @return [self] + # + # source://unparser//lib/unparser/buffer.rb#115 + def write(fragment); end + + private + + # source://unparser//lib/unparser/buffer.rb#124 + def prefix; end +end + +# source://unparser//lib/unparser/buffer.rb#122 +Unparser::Buffer::INDENT_SPACE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/buffer.rb#8 +Unparser::Buffer::NL = T.let(T.unsafe(nil), String) + +# Unparser specific AST builder defaulting to modern AST format +# +# source://unparser//lib/unparser.rb#23 +class Unparser::Builder < ::Parser::Builders::Default + # @return [Builder] a new instance of Builder + # + # source://unparser//lib/unparser.rb#26 + def initialize; end +end + +# Unparser CLI implementation +# +# source://unparser//lib/unparser/cli.rb#5 +class Unparser::CLI + # Initialize object + # + # @api private + # @param arguments [Array<String>] + # @return [undefined] + # + # source://unparser//lib/unparser/cli.rb#74 + def initialize(arguments); end + + # Add options + # + # + # @api private + # @param builder [OptionParser] + # @return [undefined] + # + # source://unparser//lib/unparser/cli.rb#102 + def add_options(builder); end + + # Return exit status + # + # @api private + # @return [Integer] + # + # source://unparser//lib/unparser/cli.rb#132 + def exit_status; end + + private + + # source://unparser//lib/unparser/cli.rb#155 + def effective_targets; end + + # source://unparser//lib/unparser/cli.rb#143 + def process_target(target); end + + # source://unparser//lib/unparser/cli.rb#170 + def targets(file_name); end + + class << self + # Run CLI + # + # @api private + # @param arguments [Array<String>] + # @return [Integer] the exit status + # + # source://unparser//lib/unparser/cli.rb#63 + def run(*arguments); end + end +end + +# source://unparser//lib/unparser/cli.rb#8 +Unparser::CLI::EXIT_FAILURE = T.let(T.unsafe(nil), Integer) + +# source://unparser//lib/unparser/cli.rb#7 +Unparser::CLI::EXIT_SUCCESS = T.let(T.unsafe(nil), Integer) + +# source://unparser//lib/unparser/cli.rb#10 +class Unparser::CLI::Target + include ::Unparser::AbstractType + extend ::Unparser::AbstractType::AbstractMethodDeclarations + + class << self + # source://unparser//lib/unparser/abstract_type.rb#36 + def new(*args, &block); end + end +end + +# Path target +# +# source://unparser//lib/unparser/cli.rb#14 +class Unparser::CLI::Target::Path < ::Unparser::CLI::Target + include ::Unparser::Equalizer::Methods + + # Literal for this target + # + # @return [Validation] + # + # source://unparser//lib/unparser/cli.rb#27 + def literal_validation; end + + # Validation for this target + # + # @return [Validation] + # + # source://unparser//lib/unparser/cli.rb#20 + def validation; end +end + +# String target +# +# source://unparser//lib/unparser/cli.rb#33 +class Unparser::CLI::Target::String + include ::Unparser::Equalizer::Methods + + # Literal for this target + # + # @return [Validation] + # + # source://unparser//lib/unparser/cli.rb#46 + def literal_validation; end + + # Validation for this target + # + # @return [Validation] + # + # source://unparser//lib/unparser/cli.rb#39 + def validation; end +end + +# Class to colorize strings +# +# source://unparser//lib/unparser/color.rb#5 +class Unparser::Color + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Format text with color + # + # @param text [String] + # @return [String] + # + # source://unparser//lib/unparser/color.rb#13 + def format(text); end +end + +# source://unparser//lib/unparser/color.rb#41 +Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color) + +# source://unparser//lib/unparser/color.rb#17 +Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped) + +# source://unparser//lib/unparser/color.rb#40 +Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color) + +# Holds the comments that remain to be emitted +# +# source://unparser//lib/unparser/comments.rb#6 +class Unparser::Comments + # Initialize object + # + # @api private + # @param comments [Array] + # @return [undefined] + # + # source://unparser//lib/unparser/comments.rb#30 + def initialize(comments); end + + # Consume part or all of the node + # + # @api private + # @param node [Parser::AST::Node] + # @param source_part [Symbol] + # @return [undefined] + # + # source://unparser//lib/unparser/comments.rb#44 + def consume(node, source_part = T.unsafe(nil)); end + + # Proxy to singleton + # + # NOTICE: + # Delegating to stateless helpers is a pattern I saw many times in our code. + # Maybe we should make another helper module? include SingletonDelegator.new(:source_range) ? + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/comments.rb#18 + def source_range(*arguments); end + + # Take all remaining comments + # + # @api private + # @return [Array] + # + # source://unparser//lib/unparser/comments.rb#68 + def take_all; end + + # Take comments appear in the source before the specified part of the node + # + # @api private + # @param node [Parser::AST::Node] + # @param source_part [Symbol] + # @return [Array] + # + # source://unparser//lib/unparser/comments.rb#81 + def take_before(node, source_part); end + + # Take end-of-line comments + # + # @api private + # @return [Array] + # + # source://unparser//lib/unparser/comments.rb#55 + def take_eol_comments; end + + private + + # source://unparser//lib/unparser/comments.rb#119 + def take_up_to_line(line); end + + # source://unparser//lib/unparser/comments.rb#114 + def take_while; end + + # source://unparser//lib/unparser/comments.rb#123 + def unshift_documents(comments); end + + class << self + # Return source location part + # + # FIXME: This method should not be needed. It does to much inline signalling. + # + # :reek:ManualDispatch + # + # @api private + # @param node [Parser::AST::Node] + # @param part [Symbol] + # @return [Parser::Source::Range] if present + # @return [nil] otherwise + # + # source://unparser//lib/unparser/comments.rb#107 + def source_range(node, part); end + end +end + +# A mixin to define a composition +# +# Original code before vendoring and reduction from: https://github.com/mbj/concord. +# +# source://unparser//lib/unparser/concord.rb#7 +class Unparser::Concord < ::Module + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Initialize object + # + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/concord.rb#30 + def initialize(*names); end + + # Return names + # + # @api private + # @return [Enumerable<Symbol>] + # + # source://unparser//lib/unparser/concord.rb#19 + def names; end + + private + + # Define equalizer + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/concord.rb#48 + def define_equalizer; end + + # Define initialize method + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/concord.rb#72 + def define_initialize; end + + # Define readers + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/concord.rb#58 + def define_readers; end + + # Return instance variable names + # + # @api private + # @return [String] + # + # source://unparser//lib/unparser/concord.rb#92 + def instance_variable_names; end +end + +# The maximum number of objects the hosting class is composed of +# +# source://unparser//lib/unparser/concord.rb#11 +Unparser::Concord::MAX_NR_OF_OBJECTS = T.let(T.unsafe(nil), Integer) + +# Mixin for public attribute readers +# +# source://unparser//lib/unparser/concord.rb#97 +class Unparser::Concord::Public < ::Unparser::Concord + # Hook called when module is included + # + # @api private + # @param descendant [Class, Module] + # @return [undefined] + # + # source://unparser//lib/unparser/concord.rb#107 + def included(descendant); end +end + +# All unparser constants maybe included in other libraries. +# +# source://unparser//lib/unparser/constants.rb#5 +module Unparser::Constants; end + +# All binary operators of the ruby language +# +# source://unparser//lib/unparser/constants.rb#13 +Unparser::Constants::BINARY_OPERATORS = T.let(T.unsafe(nil), Set) + +# source://unparser//lib/unparser/constants.rb#63 +Unparser::Constants::KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://unparser//lib/unparser/constants.rb#45 +Unparser::Constants::K_ALIAS = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#44 +Unparser::Constants::K_AND = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#23 +Unparser::Constants::K_BEGIN = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#37 +Unparser::Constants::K_BREAK = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#24 +Unparser::Constants::K_CASE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#25 +Unparser::Constants::K_CLASS = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#21 +Unparser::Constants::K_DEF = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#28 +Unparser::Constants::K_DEFINE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#33 +Unparser::Constants::K_DEFINED = T.let(T.unsafe(nil), String) + +# Keywords +# +# source://unparser//lib/unparser/constants.rb#20 +Unparser::Constants::K_DO = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#59 +Unparser::Constants::K_EEND = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#46 +Unparser::Constants::K_ELSE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#47 +Unparser::Constants::K_ELSIF = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#58 +Unparser::Constants::K_ENCODING = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#22 +Unparser::Constants::K_END = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#27 +Unparser::Constants::K_ENSURE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#41 +Unparser::Constants::K_FALSE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#60 +Unparser::Constants::K_FILE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#48 +Unparser::Constants::K_FOR = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#43 +Unparser::Constants::K_IF = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#51 +Unparser::Constants::K_IN = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#29 +Unparser::Constants::K_MODULE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#40 +Unparser::Constants::K_NEXT = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#49 +Unparser::Constants::K_NIL = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#50 +Unparser::Constants::K_NOT = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#52 +Unparser::Constants::K_OR = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#35 +Unparser::Constants::K_POSTEXE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#34 +Unparser::Constants::K_PREEXE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#39 +Unparser::Constants::K_REDO = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#30 +Unparser::Constants::K_RESCUE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#38 +Unparser::Constants::K_RETRY = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#31 +Unparser::Constants::K_RETURN = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#26 +Unparser::Constants::K_SELF = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#36 +Unparser::Constants::K_SUPER = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#61 +Unparser::Constants::K_THEN = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#42 +Unparser::Constants::K_TRUE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#32 +Unparser::Constants::K_UNDEF = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#53 +Unparser::Constants::K_UNLESS = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#56 +Unparser::Constants::K_UNTIL = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#54 +Unparser::Constants::K_WHEN = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#55 +Unparser::Constants::K_WHILE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/constants.rb#57 +Unparser::Constants::K_YIELD = T.let(T.unsafe(nil), String) + +# All unary operators of the ruby language +# +# source://unparser//lib/unparser/constants.rb#8 +Unparser::Constants::UNARY_OPERATORS = T.let(T.unsafe(nil), Set) + +# DSL to help defining emitters +# +# source://unparser//lib/unparser/dsl.rb#5 +module Unparser::DSL + private + + # source://unparser//lib/unparser/dsl.rb#32 + def children(*names); end + + # source://unparser//lib/unparser/dsl.rb#17 + def define_child(name, index); end + + # source://unparser//lib/unparser/dsl.rb#24 + def define_group(name, range); end + + # source://unparser//lib/unparser/dsl.rb#9 + def define_remaining_children(names); end +end + +# Class to create diffs from source code +# +# source://unparser//lib/unparser/diff.rb#5 +class Unparser::Diff + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Colorized unified source diff between old and new + # + # @return [String] if there is a diff + # @return [nil] otherwise + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def colorized_diff(&block); end + + # Unified source diff between old and new + # + # @return [String] if there is exactly one diff + # @return [nil] otherwise + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def diff(&block); end + + private + + # source://unparser//lib/unparser/diff.rb#62 + def diffs; end + + # source://unparser//lib/unparser/diff.rb#66 + def hunks; end + + # source://unparser//lib/unparser/diff.rb#81 + def max_length; end + + # source://unparser//lib/unparser/diff.rb#72 + def minimized_hunk; end + + class << self + # Build new object from source strings + # + # @param old [String] + # @param new [String] + # @return [Diff] + # + # source://unparser//lib/unparser/diff.rb#46 + def build(old, new); end + + private + + # source://unparser//lib/unparser/diff.rb#85 + def colorize_line(line); end + + # Break up source into lines + # + # @param source [String] + # @return [Array<String>] + # + # source://unparser//lib/unparser/diff.rb#55 + def lines(source); end + end +end + +# source://unparser//lib/unparser/diff.rb#8 +Unparser::Diff::ADDITION = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/diff.rb#9 +Unparser::Diff::DELETION = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/diff.rb#10 +Unparser::Diff::NEWLINE = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser.rb#34 +Unparser::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://unparser//lib/unparser.rb#33 +Unparser::EMPTY_STRING = T.let(T.unsafe(nil), String) + +# RequireBLock +# +# source://unparser//lib/unparser/either.rb#21 +class Unparser::Either + include ::Unparser::RequireBlock + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # Test for left constructor + # + # @return [Boolean] + # + # source://unparser//lib/unparser/either.rb#42 + def left?; end + + # Test for right constructor + # + # @return [Boolean] + # + # source://unparser//lib/unparser/either.rb#49 + def right?; end + + class << self + # Execute block and wrap error in left + # + # @param exception [Class<Exception>] + # @return [Either<Exception, Object>] + # + # source://unparser//lib/unparser/either.rb#33 + def wrap_error(*exceptions); end + end +end + +# source://unparser//lib/unparser/either.rb#56 +class Unparser::Either::Left < ::Unparser::Either + # Evaluate applicative block + # + # @return [Either::Left<Object>] + # + # source://unparser//lib/unparser/either.rb#64 + def bind(&block); end + + # Evaluate left side of branch + # + # @param left [#call] + # @param _right [#call] + # + # source://unparser//lib/unparser/either.rb#98 + def either(left, _right); end + + # Evaluate functor block + # + # @return [Either::Left<Object>] + # + # source://unparser//lib/unparser/either.rb#57 + def fmap(&block); end + + # Unwrap value from left + # + # @return [Object] + # + # source://unparser//lib/unparser/either.rb#71 + def from_left; end + + # Unwrap value from right + # + # @return [Object] + # + # source://unparser//lib/unparser/either.rb#79 + def from_right; end + + # Map over left value + # + # @return [Either::Right<Object>] + # + # source://unparser//lib/unparser/either.rb#90 + def lmap; end +end + +# Left +# +# source://unparser//lib/unparser/either.rb#106 +class Unparser::Either::Right < ::Unparser::Either + # Evaluate applicative block + # + # @return [Either<Object>] + # @yield [value] + # + # source://unparser//lib/unparser/either.rb#114 + def bind; end + + # Evaluate right side of branch + # + # @param _left [#call] + # @param right [#call] + # + # source://unparser//lib/unparser/either.rb#148 + def either(_left, right); end + + # Evaluate functor block + # + # @return [Either::Right<Object>] + # + # source://unparser//lib/unparser/either.rb#107 + def fmap; end + + # Unwrap value from left + # + # @return [Object] + # + # source://unparser//lib/unparser/either.rb#122 + def from_left; end + + # Unwrap value from right + # + # @return [Object] + # + # source://unparser//lib/unparser/either.rb#133 + def from_right; end + + # Map over left value + # + # @return [Either::Right<Object>] + # + # source://unparser//lib/unparser/either.rb#140 + def lmap(&block); end +end + +# Emitter base class +# +# source://unparser//lib/unparser/emitter.rb#7 +class Unparser::Emitter + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Constants + include ::Unparser::AbstractType + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + extend ::Unparser::AbstractType::AbstractMethodDeclarations + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/anima.rb#146 + def buffer; end + + # source://unparser//lib/unparser/anima.rb#146 + def comments; end + + # Dispatch node write as statement + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/abstract_type.rb#114 + def dispatch(*_arg0); end + + # source://unparser//lib/unparser/emitter.rb#59 + def emit_mlhs; end + + # source://unparser//lib/unparser/anima.rb#146 + def local_variable_scope; end + + # source://unparser//lib/unparser/anima.rb#146 + def node; end + + # LocalVariableRoot + # + # source://unparser//lib/unparser/emitter.rb#38 + def node_type; end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + + # Return emitter + # + # + # @api private + # @return [Emitter] + # + # source://unparser//lib/unparser/emitter.rb#70 + def emitter(buffer:, comments:, node:, local_variable_scope:); end + + # source://unparser//lib/unparser/abstract_type.rb#36 + def new(*args, &block); end + + private + + # Register emitter for type + # + # @api private + # @param types [Symbol] + # @return [undefined] + # + # source://unparser//lib/unparser/emitter.rb#50 + def handle(*types); end + end +end + +# Emitter for alias nodes +# +# source://unparser//lib/unparser/emitter/alias.rb#6 +class Unparser::Emitter::Alias < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/alias.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def source; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Arguments emitter +# +# source://unparser//lib/unparser/emitter/args.rb#6 +class Unparser::Emitter::Args < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/args.rb#7 + def emit_block_arguments; end + + # source://unparser//lib/unparser/emitter/args.rb#15 + def emit_def_arguments; end + + # source://unparser//lib/unparser/emitter/args.rb#19 + def emit_lambda_arguments; end + + private + + # source://unparser//lib/unparser/emitter/args.rb#26 + def emit_shadowargs; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def normal_arguments(&block); end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def shadowargs(&block); end +end + +# Argument emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#84 +class Unparser::Emitter::Argument < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#91 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Array literal emitter +# +# source://unparser//lib/unparser/emitter/array.rb#6 +class Unparser::Emitter::Array < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/array.rb#9 + def emit_heredoc_reminders; end + + private + + # source://unparser//lib/unparser/emitter/array.rb#15 + def dispatch; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def emitters(&block); end +end + +# Emitter for array patterns +# +# source://unparser//lib/unparser/emitter/array_pattern.rb#6 +class Unparser::Emitter::ArrayPattern < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/array_pattern.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/emitter/array_pattern.rb#20 + def emit_member(node); end +end + +# Base class for assignment emitters +# +# source://unparser//lib/unparser/emitter/assignment.rb#7 +class Unparser::Emitter::Assignment < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/assignment.rb#14 + def emit_heredoc_reminders; end + + # source://unparser//lib/unparser/abstract_type.rb#114 + def emit_left(*_arg0); end + + # source://unparser//lib/unparser/emitter/assignment.rb#10 + def symbol_name; end + + private + + # source://unparser//lib/unparser/emitter/assignment.rb#22 + def dispatch; end + + # source://unparser//lib/unparser/emitter/assignment.rb#27 + def emit_right; end +end + +# source://unparser//lib/unparser/emitter/assignment.rb#8 +Unparser::Emitter::Assignment::BINARY_OPERATOR = T.let(T.unsafe(nil), Array) + +# Constant assignment emitter +# +# source://unparser//lib/unparser/emitter/assignment.rb#57 +class Unparser::Emitter::Assignment::Constant < ::Unparser::Emitter::Assignment + private + + # source://unparser//lib/unparser/dsl.rb#18 + def base; end + + # source://unparser//lib/unparser/emitter/assignment.rb#65 + def emit_left; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def right; end +end + +# Variable assignment emitter +# +# source://unparser//lib/unparser/emitter/assignment.rb#42 +class Unparser::Emitter::Assignment::Variable < ::Unparser::Emitter::Assignment + private + + # source://unparser//lib/unparser/emitter/assignment.rb#50 + def emit_left; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def right; end +end + +# Emitter for begin nodes +# +# source://unparser//lib/unparser/emitter/begin.rb#7 +class Unparser::Emitter::Begin < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/begin.rb#11 + def emit_heredoc_reminders; end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/begin.rb#19 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Non send binary operator / keyword emitter +# +# source://unparser//lib/unparser/emitter/binary.rb#6 +class Unparser::Emitter::Binary < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/binary.rb#11 + def dispatch; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def writer(&block); end +end + +# Base class for and and or op-assign +# +# source://unparser//lib/unparser/emitter/op_assign.rb#7 +class Unparser::Emitter::BinaryAssign < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/op_assign.rb#17 + def emit_heredoc_reminders; end + + private + + # source://unparser//lib/unparser/emitter/op_assign.rb#24 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def expression; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# source://unparser//lib/unparser/emitter/op_assign.rb#10 +Unparser::Emitter::BinaryAssign::MAP = T.let(T.unsafe(nil), Hash) + +# Block emitter +# +# source://unparser//lib/unparser/emitter/block.rb#7 +class Unparser::Emitter::Block < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def arguments; end + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/block.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/emitter/block.rb#75 + def emit_block_arguments; end + + # source://unparser//lib/unparser/emitter/block.rb#67 + def emit_lambda_arguments; end + + # source://unparser//lib/unparser/emitter/block.rb#61 + def emit_send_target; end + + # source://unparser//lib/unparser/emitter/block.rb#49 + def emit_target; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/block.rb#24 + def need_do?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/block.rb#71 + def numblock?; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def target_writer(&block); end + + # source://unparser//lib/unparser/emitter/block.rb#36 + def write_close; end + + # source://unparser//lib/unparser/emitter/block.rb#28 + def write_open; end +end + +# Block pass node emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#123 +class Unparser::Emitter::BlockPass < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#130 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for toplevel constant reference nodes +# +# source://unparser//lib/unparser/emitter/cbase.rb#6 +class Unparser::Emitter::CBase < ::Unparser::Emitter + private + + # Perform dispatch + # + # @api private + # @return [undefined] + # + # source://unparser//lib/unparser/emitter/cbase.rb#17 + def dispatch; end +end + +# Emitter for case nodes +# +# source://unparser//lib/unparser/emitter/case.rb#6 +class Unparser::Emitter::Case < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def condition; end + + # source://unparser//lib/unparser/emitter/case.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/emitter/case.rb#35 + def emit_condition; end + + # source://unparser//lib/unparser/emitter/case.rb#22 + def emit_else; end + + # source://unparser//lib/unparser/emitter/case.rb#30 + def emit_whens; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def whens(&block); end +end + +# Emitter for case guards +# +# source://unparser//lib/unparser/emitter/case_guard.rb#6 +class Unparser::Emitter::CaseGuard < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def condition; end + + # source://unparser//lib/unparser/emitter/case_guard.rb#19 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/case_guard.rb#10 +Unparser::Emitter::CaseGuard::MAP = T.let(T.unsafe(nil), Hash) + +# Emitter for case matches +# +# source://unparser//lib/unparser/emitter/case_match.rb#6 +class Unparser::Emitter::CaseMatch < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/case_match.rb#20 + def dispatch; end + + # source://unparser//lib/unparser/emitter/case_match.rb#16 + def else_branch; end + + # source://unparser//lib/unparser/emitter/case_match.rb#30 + def emit_else_branch; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def patterns(&block); end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Emitter for class nodes +# +# source://unparser//lib/unparser/emitter/class.rb#6 +class Unparser::Emitter::Class < ::Unparser::Emitter + include ::Unparser::Emitter::LocalVariableRoot + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def local_variable_scope(&block); end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/class.rb#15 + def dispatch; end + + # source://unparser//lib/unparser/emitter/class.rb#23 + def emit_superclass; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def superclass; end +end + +# Emitter for constant access +# +# source://unparser//lib/unparser/emitter/variable.rb#21 +class Unparser::Emitter::Const < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/variable.rb#28 + def dispatch; end + + # source://unparser//lib/unparser/emitter/variable.rb#33 + def emit_scope; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def scope; end +end + +# Emitter for const pattern node +# +# source://unparser//lib/unparser/emitter/const_pattern.rb#6 +class Unparser::Emitter::ConstPattern < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def const; end + + # source://unparser//lib/unparser/emitter/const_pattern.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def pattern; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Dynamic string emitter +# +# source://unparser//lib/unparser/emitter/dstr.rb#6 +class Unparser::Emitter::DStr < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/dstr.rb#10 + def emit_heredoc_reminders; end + + private + + # source://unparser//lib/unparser/emitter/dstr.rb#16 + def dispatch; end +end + +# Dynamic symbol literal emitter +# +# source://unparser//lib/unparser/emitter/dsym.rb#6 +class Unparser::Emitter::DSym < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/dsym.rb#11 + def dispatch; end + + # source://unparser//lib/unparser/emitter/dsym.rb#34 + def emit_begin_child(component); end + + # source://unparser//lib/unparser/emitter/dsym.rb#24 + def emit_str_child(value); end +end + +# Emitter for def node +# +# source://unparser//lib/unparser/emitter/def.rb#6 +class Unparser::Emitter::Def < ::Unparser::Emitter + include ::Unparser::Emitter::LocalVariableRoot + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def local_variable_scope(&block); end + + private + + # source://unparser//lib/unparser/abstract_type.rb#114 + def body(*_arg0); end + + # source://unparser//lib/unparser/emitter/def.rb#17 + def dispatch; end + + # source://unparser//lib/unparser/emitter/def.rb#25 + def emit_arguments; end + + # source://unparser//lib/unparser/abstract_type.rb#114 + def emit_name(*_arg0); end +end + +# Instance def emitter +# +# source://unparser//lib/unparser/emitter/def.rb#34 +class Unparser::Emitter::Def::Instance < ::Unparser::Emitter::Def + private + + # source://unparser//lib/unparser/dsl.rb#18 + def arguments; end + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/def.rb#41 + def emit_name; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for defines on singleton +# +# source://unparser//lib/unparser/emitter/def.rb#48 +class Unparser::Emitter::Def::Singleton < ::Unparser::Emitter::Def + private + + # source://unparser//lib/unparser/dsl.rb#18 + def arguments; end + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/def.rb#56 + def emit_name; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def subject; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/def.rb#63 + def subject_without_parens?; end +end + +# Emitter for defined? nodes +# +# source://unparser//lib/unparser/emitter/defined.rb#6 +class Unparser::Emitter::Defined < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/defined.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def subject; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/find_pattern.rb#6 +class Unparser::Emitter::FindPattern < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/find_pattern.rb#11 + def dispatch; end +end + +# Emitter for flip flops +# +# source://unparser//lib/unparser/emitter/flipflop.rb#6 +class Unparser::Emitter::FlipFlop < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/flipflop.rb#17 + def symbol_name; end + + private + + # source://unparser//lib/unparser/emitter/flipflop.rb#27 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def left; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def right; end +end + +# source://unparser//lib/unparser/emitter/flipflop.rb#7 +Unparser::Emitter::FlipFlop::MAP = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/emitter/flipflop.rb#12 +Unparser::Emitter::FlipFlop::SYMBOLS = T.let(T.unsafe(nil), Hash) + +# Emiter for float literals +# +# source://unparser//lib/unparser/emitter/float.rb#6 +class Unparser::Emitter::Float < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/float.rb#16 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def value; end +end + +# source://unparser//lib/unparser/emitter/float.rb#11 +Unparser::Emitter::Float::INFINITY = T.let(T.unsafe(nil), Float) + +# source://unparser//lib/unparser/emitter/float.rb#12 +Unparser::Emitter::Float::NEG_INFINITY = T.let(T.unsafe(nil), Float) + +# Emitter control flow modifiers +# +# source://unparser//lib/unparser/emitter/flow_modifier.rb#6 +class Unparser::Emitter::FlowModifier < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/flow_modifier.rb#17 + def emit_heredoc_reminders; end + + private + + # source://unparser//lib/unparser/emitter/flow_modifier.rb#25 + def dispatch; end + + # source://unparser//lib/unparser/emitter/flow_modifier.rb#36 + def emit_arguments; end +end + +# source://unparser//lib/unparser/emitter/flow_modifier.rb#7 +Unparser::Emitter::FlowModifier::MAP = T.let(T.unsafe(nil), Hash) + +# Emitter for for nodes +# +# source://unparser//lib/unparser/emitter/for.rb#6 +class Unparser::Emitter::For < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def assignment; end + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/dsl.rb#18 + def condition; end + + # source://unparser//lib/unparser/emitter/for.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/emitter/for.rb#20 + def emit_condition; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for forwarding arguments +# +# source://unparser//lib/unparser/emitter/argument.rb#6 +class Unparser::Emitter::ForwardArg < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#20 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/argument.rb#7 +Unparser::Emitter::ForwardArg::MAP = T.let(T.unsafe(nil), Hash) + +# Emitter for Hash literals +# +# source://unparser//lib/unparser/emitter/hash.rb#6 +class Unparser::Emitter::Hash < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/hash.rb#9 + def emit_heredoc_reminders; end + + private + + # source://unparser//lib/unparser/emitter/hash.rb#15 + def dispatch; end + + # source://unparser//lib/unparser/emitter/hash.rb#31 + def emit_hash_body; end + + # source://unparser//lib/unparser/emitter/hash.rb#27 + def emit_heredoc_reminder_member(node); end +end + +# Emitter for hash patterns +# +# source://unparser//lib/unparser/emitter/hash_pattern.rb#6 +class Unparser::Emitter::HashPattern < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/hash_pattern.rb#10 + def emit_const_pattern; end + + private + + # source://unparser//lib/unparser/emitter/hash_pattern.rb#18 + def dispatch; end + + # source://unparser//lib/unparser/emitter/hash_pattern.rb#24 + def emit_hash_body; end + + # source://unparser//lib/unparser/emitter/hash_pattern.rb#41 + def emit_match_var(node); end + + # source://unparser//lib/unparser/emitter/hash_pattern.rb#28 + def emit_member(node); end + + # source://unparser//lib/unparser/emitter/hash_pattern.rb#46 + def emit_pair(node); end + + # source://unparser//lib/unparser/emitter/hash_pattern.rb#62 + def write_symbol_body(symbol); end +end + +# Base class for pre and postexe emitters +# +# source://unparser//lib/unparser/emitter/hookexe.rb#6 +class Unparser::Emitter::Hookexe < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/hookexe.rb#19 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/hookexe.rb#8 +Unparser::Emitter::Hookexe::MAP = T.let(T.unsafe(nil), Hash) + +# Emitter if nodes +# +# source://unparser//lib/unparser/emitter/if.rb#6 +class Unparser::Emitter::If < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/if.rb#11 + def emit_ternary; end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def condition; end + + # source://unparser//lib/unparser/emitter/if.rb#21 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def else_branch; end + + # source://unparser//lib/unparser/emitter/if.rb#59 + def emit_condition; end + + # source://unparser//lib/unparser/emitter/if.rb#71 + def emit_else_branch; end + + # source://unparser//lib/unparser/emitter/if.rb#63 + def emit_if_branch; end + + # source://unparser//lib/unparser/emitter/if.rb#43 + def emit_normal; end + + # source://unparser//lib/unparser/emitter/if.rb#37 + def emit_postcondition; end + + # source://unparser//lib/unparser/dsl.rb#18 + def if_branch; end + + # source://unparser//lib/unparser/emitter/if.rb#55 + def keyword; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/if.rb#29 + def postcondition?; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/if.rb#51 + def unless?; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/in_match.rb#6 +class Unparser::Emitter::InMatch < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/in_match.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def pattern; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/in_pattern.rb#6 +class Unparser::Emitter::InPattern < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def branch; end + + # source://unparser//lib/unparser/emitter/in_pattern.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def else_branch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end + + # source://unparser//lib/unparser/dsl.rb#18 + def unless_guard; end +end + +# Emitter for send to index references +# +# source://unparser//lib/unparser/emitter/index.rb#6 +class Unparser::Emitter::Index < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/index.rb#10 + def dispatch; end + + # source://unparser//lib/unparser/emitter/index.rb#15 + def emit_receiver; end +end + +# Emitter for assign to index nodes +# +# source://unparser//lib/unparser/emitter/index.rb#34 +class Unparser::Emitter::Index::Assign < ::Unparser::Emitter::Index + # source://unparser//lib/unparser/emitter/index.rb#47 + def dispatch; end + + # source://unparser//lib/unparser/emitter/index.rb#43 + def emit_heredoc_reminders; end + + # source://unparser//lib/unparser/emitter/index.rb#54 + def emit_mlhs; end + + private + + # source://unparser//lib/unparser/emitter/index.rb#61 + def emit_operation(indices); end +end + +# source://unparser//lib/unparser/emitter/index.rb#39 +Unparser::Emitter::Index::Assign::NO_VALUE_PARENT = T.let(T.unsafe(nil), Set) + +# source://unparser//lib/unparser/emitter/index.rb#38 +Unparser::Emitter::Index::Assign::VALUE_RANGE = T.let(T.unsafe(nil), Range) + +# source://unparser//lib/unparser/emitter/index.rb#19 +class Unparser::Emitter::Index::Reference < ::Unparser::Emitter::Index + private + + # source://unparser//lib/unparser/emitter/index.rb#26 + def emit_operation; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def indices(&block); end +end + +# Emitter for explicit begins +# +# source://unparser//lib/unparser/emitter/kwbegin.rb#6 +class Unparser::Emitter::KWBegin < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/kwbegin.rb#11 + def dispatch; end + + # source://unparser//lib/unparser/emitter/kwbegin.rb#25 + def emit_multiple_body; end +end + +# Optional keyword argument emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#41 +class Unparser::Emitter::KeywordOptional < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#48 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def value; end +end + +# Emitter for splats +# +# source://unparser//lib/unparser/emitter/splat.rb#6 +class Unparser::Emitter::KwSplat < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/splat.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def subject; end +end + +# Keyword argument emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#56 +class Unparser::Emitter::Kwarg < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#63 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/kwargs.rb#5 +class Unparser::Emitter::Kwargs < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/kwargs.rb#8 + def dispatch; end +end + +# Emitter for lambda nodes +# +# source://unparser//lib/unparser/emitter/lambda.rb#6 +class Unparser::Emitter::Lambda < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/lambda.rb#11 + def dispatch; end +end + +# source://unparser//lib/unparser/emitter.rb#20 +module Unparser::Emitter::LocalVariableRoot + # Return local variable root + # + # @api private + # @return [Parser::AST::Node] + # + # source://unparser//lib/unparser/emitter.rb#27 + def local_variable_scope; end + + class << self + # @private + # + # source://unparser//lib/unparser/emitter.rb#31 + def included(descendant); end + end +end + +# Emitter for multiple assignment nodes +# +# source://unparser//lib/unparser/emitter/masgn.rb#6 +class Unparser::Emitter::MASGN < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/masgn.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def source; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Emitter for multiple assignment left hand side +# +# source://unparser//lib/unparser/emitter/mlhs.rb#6 +class Unparser::Emitter::MLHS < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/mlhs.rb#15 + def dispatch; end + + # source://unparser//lib/unparser/emitter/mlhs.rb#31 + def emit_many; end + + # source://unparser//lib/unparser/emitter/mlhs.rb#23 + def emit_one_child_mlhs; end +end + +# source://unparser//lib/unparser/emitter/mlhs.rb#9 +Unparser::Emitter::MLHS::NO_COMMA = T.let(T.unsafe(nil), Array) + +# Base class for special match node emitters +# +# source://unparser//lib/unparser/emitter/match.rb#8 +class Unparser::Emitter::Match < ::Unparser::Emitter; end + +# Emitter for match current line +# +# source://unparser//lib/unparser/emitter/match.rb#25 +class Unparser::Emitter::Match::CurrentLine < ::Unparser::Emitter::Match + private + + # source://unparser//lib/unparser/emitter/match.rb#32 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def regexp; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for match with local variable assignment +# +# source://unparser//lib/unparser/emitter/match.rb#9 +class Unparser::Emitter::Match::Lvasgn < ::Unparser::Emitter::Match + private + + # source://unparser//lib/unparser/emitter/match.rb#16 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def lvasgn; end + + # source://unparser//lib/unparser/dsl.rb#18 + def regexp; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/match_alt.rb#6 +class Unparser::Emitter::MatchAlt < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/match_alt.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def left; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def right; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/match_as.rb#6 +class Unparser::Emitter::MatchAs < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/match_as.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def left; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def right; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/match_pattern.rb#6 +class Unparser::Emitter::MatchPattern < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/match_pattern.rb#23 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def pattern; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Modern ast format emits `match_pattern` +# node on single line pre 3.0, but 3.0+ uses `match_pattern_p` +# +# source://unparser//lib/unparser/emitter/match_pattern.rb#14 +Unparser::Emitter::MatchPattern::SYMBOL = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/emitter/match_pattern_p.rb#5 +class Unparser::Emitter::MatchPatternP < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/match_pattern_p.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def pattern; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Emiter for match rest nodes +# +# source://unparser//lib/unparser/emitter/match_rest.rb#6 +class Unparser::Emitter::MatchRest < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/match_rest.rb#11 + def dispatch; end + + # source://unparser//lib/unparser/emitter/match_rest.rb#16 + def emit_array_pattern; end + + # source://unparser//lib/unparser/emitter/match_rest.rb#21 + def emit_hash_pattern; end + + private + + # source://unparser//lib/unparser/emitter/match_rest.rb#28 + def emit_match_var; end + + # source://unparser//lib/unparser/dsl.rb#18 + def match_var; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for in pattern nodes +# +# source://unparser//lib/unparser/emitter/match_var.rb#6 +class Unparser::Emitter::MatchVar < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/match_var.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for module nodes +# +# source://unparser//lib/unparser/emitter/module.rb#6 +class Unparser::Emitter::Module < ::Unparser::Emitter + include ::Unparser::Emitter::LocalVariableRoot + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def local_variable_scope(&block); end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/module.rb#15 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter.rb#18 +Unparser::Emitter::NO_INDENT = T.let(T.unsafe(nil), Array) + +# Emitter for nth_ref nodes (regexp captures) +# +# source://unparser//lib/unparser/emitter/variable.rb#42 +class Unparser::Emitter::NthRef < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/variable.rb#50 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/variable.rb#43 +Unparser::Emitter::NthRef::PREFIX = T.let(T.unsafe(nil), String) + +# Emitter for op assign +# +# source://unparser//lib/unparser/emitter/op_assign.rb#33 +class Unparser::Emitter::OpAssign < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/op_assign.rb#40 + def dispatch; end + + # source://unparser//lib/unparser/emitter/op_assign.rb#46 + def emit_operator; end + + # source://unparser//lib/unparser/dsl.rb#18 + def operator; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end + + # source://unparser//lib/unparser/dsl.rb#18 + def value; end +end + +# Optional argument emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#27 +class Unparser::Emitter::Optarg < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#34 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def value; end +end + +# Emitter for key value pairs in hash literals or kwargs +# +# source://unparser//lib/unparser/emitter/pair.rb#6 +class Unparser::Emitter::Pair < ::Unparser::Emitter + private + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/pair.rb#28 + def colon?(key); end + + # source://unparser//lib/unparser/emitter/pair.rb#17 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def key; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def value; end +end + +# source://unparser//lib/unparser/emitter/pair.rb#7 +Unparser::Emitter::Pair::BAREWORD = T.let(T.unsafe(nil), Regexp) + +# Emitter for pin nodes +# +# source://unparser//lib/unparser/emitter/pin.rb#6 +class Unparser::Emitter::Pin < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/pin.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def target; end +end + +# Emitter for postconditions +# +# source://unparser//lib/unparser/emitter/repetition.rb#7 +class Unparser::Emitter::Post < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/dsl.rb#18 + def condition; end + + # source://unparser//lib/unparser/emitter/repetition.rb#19 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/repetition.rb#10 +Unparser::Emitter::Post::MAP = T.let(T.unsafe(nil), Hash) + +# Base class for primitive emitters +# +# source://unparser//lib/unparser/emitter/primitive.rb#6 +class Unparser::Emitter::Primitive < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def value; end +end + +# Emitter for complex literals +# +# source://unparser//lib/unparser/emitter/primitive.rb#24 +class Unparser::Emitter::Primitive::Complex < ::Unparser::Emitter::Primitive + private + + # source://unparser//lib/unparser/emitter/primitive.rb#39 + def dispatch; end + + # source://unparser//lib/unparser/emitter/primitive.rb#44 + def emit_imaginary; end + + # source://unparser//lib/unparser/emitter/primitive.rb#48 + def imaginary_node; end +end + +# source://unparser//lib/unparser/emitter/primitive.rb#30 +Unparser::Emitter::Primitive::Complex::MAP = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/emitter/primitive.rb#28 +Unparser::Emitter::Primitive::Complex::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) + +# Emitter for primitives based on Object#inspect +# +# source://unparser//lib/unparser/emitter/primitive.rb#11 +class Unparser::Emitter::Primitive::Inspect < ::Unparser::Emitter::Primitive + private + + # source://unparser//lib/unparser/emitter/primitive.rb#17 + def dispatch; end +end + +# Emiter for numeric literals +# +# source://unparser//lib/unparser/emitter/primitive.rb#80 +class Unparser::Emitter::Primitive::Numeric < ::Unparser::Emitter::Primitive + private + + # source://unparser//lib/unparser/emitter/primitive.rb#86 + def dispatch; end +end + +# Emitter for rational literals +# +# source://unparser//lib/unparser/emitter/primitive.rb#56 +class Unparser::Emitter::Primitive::Rational < ::Unparser::Emitter::Primitive + private + + # source://unparser//lib/unparser/emitter/primitive.rb#65 + def dispatch; end + + # source://unparser//lib/unparser/emitter/primitive.rb#73 + def write_rational(value); end +end + +# source://unparser//lib/unparser/emitter/primitive.rb#60 +Unparser::Emitter::Primitive::Rational::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) + +# Progarg emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#98 +class Unparser::Emitter::Procarg < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#105 + def dispatch; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/argument.rb#115 + def needs_parens?; end +end + +# source://unparser//lib/unparser/emitter/argument.rb#101 +Unparser::Emitter::Procarg::PARENS = T.let(T.unsafe(nil), Array) + +# Registry for node emitters +# +# source://unparser//lib/unparser/emitter.rb#16 +Unparser::Emitter::REGISTRY = T.let(T.unsafe(nil), Hash) + +# Range emitters +# +# source://unparser//lib/unparser/emitter/range.rb#6 +class Unparser::Emitter::Range < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/range.rb#17 + def symbol_name; end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def begin_node; end + + # source://unparser//lib/unparser/emitter/range.rb#27 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def end_node; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/range.rb#12 +Unparser::Emitter::Range::SYMBOLS = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/emitter/range.rb#7 +Unparser::Emitter::Range::TOKENS = T.let(T.unsafe(nil), Hash) + +# Emitter for regexp literals +# +# source://unparser//lib/unparser/emitter/regexp.rb#6 +class Unparser::Emitter::Regexp < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def body(&block); end + + # source://unparser//lib/unparser/emitter/regexp.rb#13 + def dispatch; end + + # source://unparser//lib/unparser/emitter/regexp.rb#24 + def emit_body(node); end + + # source://unparser//lib/unparser/emitter/regexp.rb#20 + def emit_options; end +end + +# Emitter for while and until nodes +# +# source://unparser//lib/unparser/emitter/repetition.rb#27 +class Unparser::Emitter::Repetition < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/dsl.rb#18 + def condition; end + + # source://unparser//lib/unparser/emitter/repetition.rb#39 + def dispatch; end + + # source://unparser//lib/unparser/emitter/repetition.rb#51 + def emit_keyword; end + + # source://unparser//lib/unparser/emitter/repetition.rb#55 + def emit_normal; end + + # source://unparser//lib/unparser/emitter/repetition.rb#66 + def emit_postcontrol; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/repetition.rb#47 + def postcontrol?; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/emitter/repetition.rb#28 +Unparser::Emitter::Repetition::MAP = T.let(T.unsafe(nil), Hash) + +# Emitter for rescue nodes +# +# source://unparser//lib/unparser/emitter/rescue.rb#6 +class Unparser::Emitter::Rescue < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/rescue.rb#11 + def dispatch; end +end + +# Rest argument emitter +# +# source://unparser//lib/unparser/emitter/argument.rb#70 +class Unparser::Emitter::Restarg < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/argument.rb#77 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Root emitter a special case +# +# source://unparser//lib/unparser/emitter/root.rb#6 +class Unparser::Emitter::Root < ::Unparser::Emitter + include ::Unparser::Emitter::LocalVariableRoot + + # source://unparser//lib/unparser/concord.rb#60 + def buffer; end + + # source://unparser//lib/unparser/concord.rb#60 + def comments; end + + # source://unparser//lib/unparser/emitter/root.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def local_variable_scope(&block); end + + # source://unparser//lib/unparser/concord.rb#60 + def node; end +end + +# source://unparser//lib/unparser/emitter/root.rb#10 +Unparser::Emitter::Root::END_NL = T.let(T.unsafe(nil), Array) + +# Emitter for sclass nodes +# +# source://unparser//lib/unparser/emitter/class.rb#33 +class Unparser::Emitter::SClass < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/emitter/class.rb#40 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def object; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for send +# +# source://unparser//lib/unparser/emitter/send.rb#6 +class Unparser::Emitter::Send < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/send.rb#13 + def emit_heredoc_reminders; end + + # source://unparser//lib/unparser/emitter/send.rb#9 + def emit_mlhs; end + + private + + # source://unparser//lib/unparser/emitter/send.rb#19 + def dispatch; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def writer(&block); end +end + +# Emitter for simple nodes that generate a single token +# +# source://unparser//lib/unparser/emitter/simple.rb#6 +class Unparser::Emitter::Simple < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/simple.rb#28 + def dispatch; end +end + +# source://unparser//lib/unparser/emitter/simple.rb#7 +Unparser::Emitter::Simple::MAP = T.let(T.unsafe(nil), Hash) + +# Emitter for splats +# +# source://unparser//lib/unparser/emitter/splat.rb#20 +class Unparser::Emitter::Splat < ::Unparser::Emitter + # source://unparser//lib/unparser/emitter/splat.rb#25 + def emit_mlhs; end + + private + + # source://unparser//lib/unparser/emitter/splat.rb#32 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def subject; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def subject_emitter(&block); end +end + +# Emitter for super nodes +# +# source://unparser//lib/unparser/emitter/super.rb#7 +class Unparser::Emitter::Super < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/super.rb#12 + def dispatch; end +end + +# Emitter for undef nodes +# +# source://unparser//lib/unparser/emitter/undef.rb#6 +class Unparser::Emitter::Undef < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/undef.rb#11 + def dispatch; end +end + +# Emitter for various variable accesses +# +# source://unparser//lib/unparser/emitter/variable.rb#7 +class Unparser::Emitter::Variable < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/variable.rb#14 + def dispatch; end + + # source://unparser//lib/unparser/dsl.rb#18 + def name; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# Emitter for when nodes +# +# source://unparser//lib/unparser/emitter/case.rb#44 +class Unparser::Emitter::When < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def captures(&block); end + + # source://unparser//lib/unparser/emitter/case.rb#51 + def dispatch; end + + # source://unparser//lib/unparser/emitter/case.rb#57 + def emit_captures; end +end + +# Dynamic execute string literal emitter +# +# source://unparser//lib/unparser/emitter/xstr.rb#6 +class Unparser::Emitter::XStr < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/xstr.rb#12 + def dispatch; end + + # source://unparser//lib/unparser/emitter/xstr.rb#65 + def emit_begin(component); end + + # source://unparser//lib/unparser/emitter/xstr.rb#24 + def emit_heredoc; end + + # source://unparser//lib/unparser/emitter/xstr.rb#51 + def emit_string(value); end + + # source://unparser//lib/unparser/emitter/xstr.rb#39 + def emit_xstr; end + + # source://unparser//lib/unparser/emitter/xstr.rb#55 + def escape_xstr(input); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/emitter/xstr.rb#20 + def heredoc?; end +end + +# Emitter for yield node +# +# source://unparser//lib/unparser/emitter/yield.rb#7 +class Unparser::Emitter::Yield < ::Unparser::Emitter + private + + # source://unparser//lib/unparser/emitter/yield.rb#12 + def dispatch; end +end + +# Define equality, equivalence and inspection methods +# +# Original code before vendoring and reduction from: https://github.com/dkubb/equalizer. +# +# source://unparser//lib/unparser/equalizer.rb#19 +class Unparser::Equalizer < ::Module + # Initialize an Equalizer with the given keys + # + # Will use the keys with which it is initialized to define #cmp?, + # #hash, and #inspect + # + # + # @api private + # @param keys [Array<Symbol>] + # @return [undefined] + # + # source://unparser//lib/unparser/equalizer.rb#20 + def initialize(*keys); end + + private + + # source://unparser//lib/unparser/equalizer.rb#39 + def define_cmp_method; end + + # source://unparser//lib/unparser/equalizer.rb#49 + def define_hash_method; end + + # source://unparser//lib/unparser/equalizer.rb#56 + def define_inspect_method; end + + # source://unparser//lib/unparser/equalizer.rb#33 + def define_methods; end + + # source://unparser//lib/unparser/equalizer.rb#29 + def included(descendant); end +end + +# The comparison methods +# +# source://unparser//lib/unparser/equalizer.rb#66 +module Unparser::Equalizer::Methods + # Compare the object with other object for equivalency + # + # @api public + # @example + # object == other # => true or false + # @param other [Object] the other object to compare with + # @return [Boolean] + # + # source://unparser//lib/unparser/equalizer.rb#93 + def ==(other); end + + # Compare the object with other object for equality + # + # @api public + # @example + # object.eql?(other) # => true or false + # @param other [Object] the other object to compare with + # @return [Boolean] + # + # source://unparser//lib/unparser/equalizer.rb#78 + def eql?(other); end +end + +# source://unparser//lib/unparser/generation.rb#5 +module Unparser::Generation + # source://unparser//lib/unparser/generation.rb#10 + def emit_heredoc_reminders; end + + # source://unparser//lib/unparser/generation.rb#12 + def symbol_name; end + + # source://unparser//lib/unparser/generation.rb#14 + def write_to_buffer; end + + private + + # source://unparser//lib/unparser/generation.rb#247 + def children; end + + # source://unparser//lib/unparser/generation.rb#239 + def conditional_parentheses(flag, &block); end + + # source://unparser//lib/unparser/generation.rb#21 + def delimited(nodes, delimiter = T.unsafe(nil), &block); end + + # source://unparser//lib/unparser/generation.rb#123 + def emit_body(node, indent: T.unsafe(nil)); end + + # source://unparser//lib/unparser/generation.rb#196 + def emit_body_ensure_rescue(node); end + + # source://unparser//lib/unparser/generation.rb#145 + def emit_body_inner(node); end + + # source://unparser//lib/unparser/generation.rb#158 + def emit_body_member(node); end + + # source://unparser//lib/unparser/generation.rb#180 + def emit_body_rescue(node); end + + # source://unparser//lib/unparser/generation.rb#77 + def emit_comments(comments); end + + # source://unparser//lib/unparser/generation.rb#69 + def emit_comments_before(source_part = T.unsafe(nil)); end + + # source://unparser//lib/unparser/generation.rb#166 + def emit_ensure(node); end + + # source://unparser//lib/unparser/generation.rb#60 + def emit_eof_comments; end + + # source://unparser//lib/unparser/generation.rb#54 + def emit_eol_comments; end + + # source://unparser//lib/unparser/generation.rb#27 + def emit_join(nodes, emit_node, emit_delimiter); end + + # source://unparser//lib/unparser/generation.rb#115 + def emit_optional_body(node, indent: T.unsafe(nil)); end + + # source://unparser//lib/unparser/generation.rb#188 + def emit_optional_body_ensure_rescue(node); end + + # source://unparser//lib/unparser/generation.rb#206 + def emit_rescue_postcontrol(node); end + + # source://unparser//lib/unparser/generation.rb#212 + def emit_rescue_regular(node); end + + # source://unparser//lib/unparser/generation.rb#220 + def emitter(node); end + + # source://unparser//lib/unparser/generation.rb#235 + def first_child; end + + # source://unparser//lib/unparser/generation.rb#106 + def indented; end + + # source://unparser//lib/unparser/generation.rb#93 + def k_end; end + + # source://unparser//lib/unparser/generation.rb#39 + def nl; end + + # source://unparser//lib/unparser/generation.rb#100 + def parentheses(open = T.unsafe(nil), close = T.unsafe(nil)); end + + # source://unparser//lib/unparser/generation.rb#224 + def visit(node); end + + # source://unparser//lib/unparser/generation.rb#228 + def visit_deep(node); end + + # source://unparser//lib/unparser/generation.rb#44 + def with_comments; end + + # source://unparser//lib/unparser/generation.rb#89 + def write(*strings); end + + # source://unparser//lib/unparser/generation.rb#216 + def writer_with(klass, node); end + + # source://unparser//lib/unparser/generation.rb#50 + def ws; end +end + +# source://unparser//lib/unparser/generation.rb#6 +Unparser::Generation::EXTRA_NL = T.let(T.unsafe(nil), Array) + +# Error raised when unparser encounters an invalid AST +# +# source://unparser//lib/unparser.rb#39 +class Unparser::InvalidNodeError < ::RuntimeError + # @return [InvalidNodeError] a new instance of InvalidNodeError + # + # source://unparser//lib/unparser.rb#42 + def initialize(message, node); end + + # Returns the value of attribute node. + # + # source://unparser//lib/unparser.rb#40 + def node; end +end + +# source://unparser//lib/unparser/node_details.rb#4 +module Unparser::NodeDetails + include ::Unparser::NodeHelpers + include ::Unparser::Constants + + private + + # source://unparser//lib/unparser/node_details.rb#17 + def children; end + + class << self + # @private + # + # source://unparser//lib/unparser/node_details.rb#7 + def included(descendant); end + end +end + +# source://unparser//lib/unparser/node_details/send.rb#5 +class Unparser::NodeDetails::Send + include ::Unparser::NodeHelpers + include ::Unparser::Constants + include ::Unparser::NodeDetails + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def arguments(&block); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/node_details/send.rb#37 + def arguments?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def assignment?(&block); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/node_details/send.rb#33 + def assignment_operator?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/node_details/send.rb#21 + def binary_syntax_allowed?; end + + # source://unparser//lib/unparser/node_details/send.rb#41 + def non_assignment_selector; end + + # source://unparser//lib/unparser/dsl.rb#18 + def receiver; end + + # source://unparser//lib/unparser/dsl.rb#18 + def selector; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/node_details/send.rb#17 + def selector_binary_operator?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/node_details/send.rb#29 + def selector_unary_operator?; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def string_selector(&block); end + + private + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end +end + +# source://unparser//lib/unparser/node_details/send.rb#8 +Unparser::NodeDetails::Send::ASSIGN_SUFFIX = T.let(T.unsafe(nil), String) + +# source://unparser//lib/unparser/node_details/send.rb#9 +Unparser::NodeDetails::Send::NON_ASSIGN_RANGE = T.let(T.unsafe(nil), Range) + +# source://unparser//lib/unparser/node_helpers.rb#4 +module Unparser::NodeHelpers + # Helper for building nodes + # + # @api private + # @param type [Symbol] + # @param children [Array] + # @return [Parser::AST::Node] + # + # source://unparser//lib/unparser/node_helpers.rb#26 + def n(type, children = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/node_helpers.rb#30 + def n?(type, node); end + + # Helper for building nodes + # + # @api private + # @param type [Symbol] + # @param children [Parser::AST::Node] + # @return [Parser::AST::Node] + # + # source://unparser//lib/unparser/node_helpers.rb#14 + def s(type, *children); end + + # source://unparser//lib/unparser/node_helpers.rb#71 + def unwrap_single_begin(node); end + + private + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_arg?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_args?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_array?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_array_pattern?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_begin?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_block?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_cbase?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_const?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_dstr?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_empty_else?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_ensure?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_hash?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_hash_pattern?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_if?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_in_pattern?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_int?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_kwarg?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_kwargs?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_kwsplat?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_lambda?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_match_rest?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_pair?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_rescue?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_send?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_shadowarg?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_splat?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_str?(node); end + + # source://unparser//lib/unparser/node_helpers.rb#65 + def n_sym?(node); end +end + +# source://unparser//lib/unparser/either.rb#4 +module Unparser::RequireBlock + private + + # Raise error unless block is provided + # + # @raise [MissingBlockError] if no block is given + # @return [self] + # + # source://unparser//lib/unparser/either.rb#14 + def require_block; end +end + +# source://unparser//lib/unparser/emitter.rb#4 +class Unparser::UnknownNodeError < ::ArgumentError; end + +# Validation of unparser results +# +# source://unparser//lib/unparser/validation.rb#5 +class Unparser::Validation + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + + # source://unparser//lib/unparser/anima.rb#146 + def generated_node; end + + # source://unparser//lib/unparser/anima.rb#146 + def generated_source; end + + # source://unparser//lib/unparser/anima.rb#146 + def identification; end + + # source://unparser//lib/unparser/anima.rb#146 + def original_node; end + + # source://unparser//lib/unparser/anima.rb#146 + def original_source; end + + # Return error report + # + # @api private + # @return [String] + # + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def report(&block); end + + # Test if source could be unparsed successfully + # + # + # @api private + # @return [Boolean] + # + # source://unparser//lib/unparser/validation.rb#21 + def success?; end + + private + + # source://unparser//lib/unparser/validation.rb#108 + def make_report(label, attribute_name); end + + # source://unparser//lib/unparser/validation.rb#120 + def node_diff_report; end + + # source://unparser//lib/unparser/validation.rb#112 + def report_exception(exception); end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + + # Create validator from node + # + # @param original_node [Parser::AST::Node] + # @return [Validator] + # + # source://unparser//lib/unparser/validation.rb#81 + def from_node(original_node); end + + # Create validator from file + # + # @param path [Pathname] + # @return [Validator] + # + # source://unparser//lib/unparser/validation.rb#102 + def from_path(path); end + + # Create validator from string + # + # @param original_source [String] + # @return [Validator] + # + # source://unparser//lib/unparser/validation.rb#55 + def from_string(original_source); end + + private + + # source://unparser//lib/unparser/validation.rb#135 + def const_unit(_value); end + end +end + +# source://unparser//lib/unparser/validation.rb#138 +class Unparser::Validation::Literal < ::Unparser::Validation + # source://unparser//lib/unparser/validation.rb#143 + def report; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/validation.rb#139 + def success?; end + + private + + # source://unparser//lib/unparser/validation.rb#158 + def source_diff_report; end +end + +# source://unparser//lib/unparser/writer.rb#4 +module Unparser::Writer + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + + mixes_in_class_methods ::Unparser::DSL + + class << self + # @private + # + # source://unparser//lib/unparser/writer.rb#7 + def included(descendant); end + end +end + +# source://unparser//lib/unparser/writer/binary.rb#5 +class Unparser::Writer::Binary + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Writer + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/anima.rb#146 + def buffer; end + + # source://unparser//lib/unparser/anima.rb#146 + def comments; end + + # source://unparser//lib/unparser/writer/binary.rb#54 + def dispatch; end + + # source://unparser//lib/unparser/writer/binary.rb#46 + def emit_operator; end + + # source://unparser//lib/unparser/anima.rb#146 + def local_variable_scope; end + + # source://unparser//lib/unparser/anima.rb#146 + def node; end + + # source://unparser//lib/unparser/writer/binary.rb#50 + def symbol_name; end + + private + + # source://unparser//lib/unparser/writer/binary.rb#62 + def effective_symbol; end + + # source://unparser//lib/unparser/writer/binary.rb#74 + def emit_with(map); end + + # source://unparser//lib/unparser/writer/binary.rb#80 + def keyword_symbol; end + + # source://unparser//lib/unparser/dsl.rb#18 + def left; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def left_emitter(&block); end + + # source://unparser//lib/unparser/writer/binary.rb#84 + def operator_symbol; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def right; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def right_emitter(&block); end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + end +end + +# source://unparser//lib/unparser/writer/binary.rb#22 +Unparser::Writer::Binary::KEYWORD_SYMBOLS = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/writer/binary.rb#16 +Unparser::Writer::Binary::KEYWORD_TOKENS = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/writer/binary.rb#34 +Unparser::Writer::Binary::MAP = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/writer/binary.rb#42 +Unparser::Writer::Binary::NEED_KEYWORD = T.let(T.unsafe(nil), Array) + +# source://unparser//lib/unparser/writer/binary.rb#28 +Unparser::Writer::Binary::OPERATOR_SYMBOLS = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/writer/binary.rb#10 +Unparser::Writer::Binary::OPERATOR_TOKENS = T.let(T.unsafe(nil), Hash) + +# source://unparser//lib/unparser/writer/dynamic_string.rb#5 +class Unparser::Writer::DynamicString + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Writer + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/anima.rb#146 + def buffer; end + + # source://unparser//lib/unparser/anima.rb#146 + def comments; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#32 + def dispatch; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#25 + def emit_heredoc_reminder; end + + # source://unparser//lib/unparser/anima.rb#146 + def local_variable_scope; end + + # source://unparser//lib/unparser/anima.rb#146 + def node; end + + private + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#159 + def breakpoint?(child, current); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#63 + def classify(node); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#71 + def classify_str(node); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#193 + def emit_body(children); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#149 + def emit_dstr; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#132 + def emit_dynamic(child); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#145 + def emit_dynamic_component(node); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#54 + def emit_heredoc_body; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#59 + def emit_heredoc_footer; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#50 + def emit_heredoc_header; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#116 + def emit_normal_heredoc_body; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#185 + def emit_segment(children, index); end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#128 + def escape_dynamic(string); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#46 + def heredoc?; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#42 + def heredoc_header; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#95 + def heredoc_pattern?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#105 + def heredoc_pattern_2?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#99 + def heredoc_pattern_3?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#111 + def nl_last_child?; end + + # source://unparser//lib/unparser/writer/dynamic_string.rb#169 + def segments; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#87 + def str_empty?(node); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#83 + def str_nl?(node); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/dynamic_string.rb#91 + def str_ws?(node); end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + end +end + +# source://unparser//lib/unparser/writer/dynamic_string.rb#21 +Unparser::Writer::DynamicString::FLAT_INTERPOLATION = T.let(T.unsafe(nil), Set) + +# source://unparser//lib/unparser/writer/dynamic_string.rb#8 +Unparser::Writer::DynamicString::PATTERNS_2 = T.let(T.unsafe(nil), Array) + +# source://unparser//lib/unparser/writer/dynamic_string.rb#14 +Unparser::Writer::DynamicString::PATTERNS_3 = T.let(T.unsafe(nil), Array) + +# Writer for rescue bodies +# +# source://unparser//lib/unparser/writer/resbody.rb#6 +class Unparser::Writer::Resbody + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Writer + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/anima.rb#146 + def buffer; end + + # source://unparser//lib/unparser/anima.rb#146 + def comments; end + + # source://unparser//lib/unparser/writer/resbody.rb#11 + def emit_postcontrol; end + + # source://unparser//lib/unparser/writer/resbody.rb#16 + def emit_regular; end + + # source://unparser//lib/unparser/anima.rb#146 + def local_variable_scope; end + + # source://unparser//lib/unparser/anima.rb#146 + def node; end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def assignment; end + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/writer/resbody.rb#32 + def emit_assignment; end + + # source://unparser//lib/unparser/writer/resbody.rb#25 + def emit_exception; end + + # source://unparser//lib/unparser/dsl.rb#18 + def exception; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + end +end + +# source://unparser//lib/unparser/writer/rescue.rb#5 +class Unparser::Writer::Rescue + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Writer + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/anima.rb#146 + def buffer; end + + # source://unparser//lib/unparser/anima.rb#146 + def comments; end + + # source://unparser//lib/unparser/writer/rescue.rb#23 + def emit_heredoc_reminders; end + + # source://unparser//lib/unparser/writer/rescue.rb#27 + def emit_postcontrol; end + + # source://unparser//lib/unparser/writer/rescue.rb#12 + def emit_regular; end + + # source://unparser//lib/unparser/anima.rb#146 + def local_variable_scope; end + + # source://unparser//lib/unparser/anima.rb#146 + def node; end + + private + + # source://unparser//lib/unparser/dsl.rb#18 + def body; end + + # source://unparser//lib/unparser/writer/rescue.rb#34 + def else_node; end + + # source://unparser//lib/unparser/writer/rescue.rb#38 + def emit_rescue_body(node); end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def rescue_bodies(&block); end + + # source://unparser//lib/unparser/dsl.rb#18 + def rescue_body; end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + end +end + +# Writer for send +# +# source://unparser//lib/unparser/writer/send.rb#6 +class Unparser::Writer::Send + include ::Unparser::NodeHelpers + include ::Unparser::Generation + include ::Unparser::Constants + include ::Unparser::Adamantium + include ::Unparser::Adamantium::InstanceMethods + include ::Unparser::Writer + include ::Unparser::Anima::InstanceMethods + include ::Unparser::Equalizer::Methods + extend ::Unparser::Adamantium::ModuleMethods + extend ::Unparser::Adamantium::ClassMethods + extend ::Unparser::DSL + + # source://unparser//lib/unparser/anima.rb#146 + def buffer; end + + # source://unparser//lib/unparser/anima.rb#146 + def comments; end + + # source://unparser//lib/unparser/writer/send.rb#21 + def dispatch; end + + # source://unparser//lib/unparser/writer/send.rb#33 + def emit_heredoc_reminders; end + + # source://unparser//lib/unparser/writer/send.rb#25 + def emit_mlhs; end + + # source://unparser//lib/unparser/writer/send.rb#29 + def emit_selector; end + + # source://unparser//lib/unparser/anima.rb#146 + def local_variable_scope; end + + # source://unparser//lib/unparser/anima.rb#146 + def node; end + + private + + # source://unparser//lib/unparser/writer/send.rb#73 + def arguments; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/send.rb#85 + def avoid_clash?; end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def details(&block); end + + # source://unparser//lib/unparser/adamantium/method_builder.rb#87 + def effective_writer(&block); end + + # source://unparser//lib/unparser/writer/send.rb#45 + def effective_writer_class; end + + # source://unparser//lib/unparser/writer/send.rb#65 + def emit_arguments; end + + # source://unparser//lib/unparser/writer/send.rb#81 + def emit_heredoc_reminder(argument); end + + # source://unparser//lib/unparser/writer/send.rb#77 + def emit_normal_arguments; end + + # source://unparser//lib/unparser/writer/send.rb#61 + def emit_operator; end + + # source://unparser//lib/unparser/writer/send.rb#106 + def emit_send_regular(node); end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/send.rb#89 + def local_variable_clash?; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/send.rb#93 + def parses_as_constant?; end + + # source://unparser//lib/unparser/dsl.rb#18 + def receiver; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def selector; end + + # @return [Boolean] + # + # source://unparser//lib/unparser/writer/send.rb#57 + def write_as_attribute_assignment?; end + + class << self + # source://unparser//lib/unparser/anima.rb#140 + def anima; end + end +end + +# Writer for send as attribute assignment +# +# source://unparser//lib/unparser/writer/send/attribute_assignment.rb#7 +class Unparser::Writer::Send::AttributeAssignment < ::Unparser::Writer::Send + # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#10 + def dispatch; end + + # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#22 + def emit_send_mlhs; end + + private + + # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#34 + def emit_attribute; end + + # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#29 + def emit_receiver; end + + # source://unparser//lib/unparser/dsl.rb#18 + def first_argument; end + + # source://unparser//lib/unparser/dsl.rb#18 + def receiver; end + + # source://unparser//lib/unparser/dsl.rb#11 + def remaining_children; end + + # source://unparser//lib/unparser/dsl.rb#18 + def selector; end +end + +# Writer for binary sends +# +# source://unparser//lib/unparser/writer/send/binary.rb#7 +class Unparser::Writer::Send::Binary < ::Unparser::Writer::Send + # source://unparser//lib/unparser/writer/send/binary.rb#8 + def dispatch; end + + private + + # source://unparser//lib/unparser/writer/send/binary.rb#16 + def emit_operator; end + + # source://unparser//lib/unparser/writer/send/binary.rb#20 + def emit_right; end +end + +# source://unparser//lib/unparser/writer/send.rb#9 +Unparser::Writer::Send::INDEX_ASSIGN = T.let(T.unsafe(nil), Symbol) + +# source://unparser//lib/unparser/writer/send.rb#10 +Unparser::Writer::Send::INDEX_REFERENCE = T.let(T.unsafe(nil), Symbol) + +# source://unparser//lib/unparser/writer/send.rb#12 +Unparser::Writer::Send::OPERATORS = T.let(T.unsafe(nil), Hash) + +# Writer for "regular" receiver.selector(arguments...) case +# +# source://unparser//lib/unparser/writer/send/regular.rb#7 +class Unparser::Writer::Send::Regular < ::Unparser::Writer::Send + # source://unparser//lib/unparser/writer/send/regular.rb#8 + def dispatch; end + + # source://unparser//lib/unparser/writer/send/regular.rb#18 + def emit_arguments_without_heredoc_body; end + + # source://unparser//lib/unparser/writer/send/regular.rb#22 + def emit_receiver; end + + # source://unparser//lib/unparser/writer/send/regular.rb#14 + def emit_send_mlhs; end +end + +# Writer for unary sends +# +# source://unparser//lib/unparser/writer/send/unary.rb#7 +class Unparser::Writer::Send::Unary < ::Unparser::Writer::Send + # source://unparser//lib/unparser/writer/send/unary.rb#15 + def dispatch; end +end + +# source://unparser//lib/unparser/writer/send/unary.rb#8 +Unparser::Writer::Send::Unary::MAP = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/vcr@6.2.0.rbi b/sorbet/rbi/gems/vcr@6.2.0.rbi new file mode 100644 index 0000000000..11f1607570 --- /dev/null +++ b/sorbet/rbi/gems/vcr@6.2.0.rbi @@ -0,0 +1,3036 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `vcr` gem. +# Please instead update this file by running `bin/tapioca gem vcr`. + +# The main entry point for VCR. +# +# @note This module is extended onto itself; thus, the methods listed +# here as instance methods are available directly off of VCR. +# +# source://vcr//lib/vcr/util/logger.rb#1 +module VCR + include ::VCR::VariableArgsBlockCaller + include ::VCR::Errors + extend ::VCR::VariableArgsBlockCaller + extend ::VCR::Errors + extend ::VCR + + # @private + # + # source://vcr//lib/vcr.rb#385 + def cassette_persisters; end + + # @private + # + # source://vcr//lib/vcr.rb#380 + def cassette_serializers; end + + # @return [Enumerable] list of all cassettes currently being used + # + # source://vcr//lib/vcr.rb#362 + def cassettes(context = T.unsafe(nil)); end + + # @deprecated Use #configure instead. + # @see #configure + # + # source://vcr//lib/vcr/deprecations.rb#4 + def config; end + + # @return [VCR::Configuration] the VCR configuration. + # + # source://vcr//lib/vcr.rb#239 + def configuration; end + + # Used to configure VCR. + # + # @example + # VCR.configure do |c| + # c.some_config_option = true + # end + # @return [void] + # @yield the configuration block + # @yieldparam config [VCR::Configuration] the configuration object + # + # source://vcr//lib/vcr.rb#234 + def configure; end + + # Sets up `Before` and `After` cucumber hooks in order to + # use VCR with particular cucumber tags. + # + # @example + # VCR.cucumber_tags do |t| + # t.tags "tag1", "tag2" + # t.tag "@some_other_tag", :record => :new_episodes + # end + # @return [void] + # @see VCR::CucumberTags#tags + # @yield the cucumber tags configuration block + # @yieldparam t [VCR::CucumberTags] Cucumber tags config object + # + # source://vcr//lib/vcr.rb#256 + def cucumber_tags(&block); end + + # The currently active cassette. + # + # @return [nil, VCR::Cassette] The current cassette or nil if there is + # no current cassette. + # + # source://vcr//lib/vcr.rb#48 + def current_cassette; end + + # Ejects the current cassette. The cassette will no longer be used. + # In addition, any newly recorded HTTP interactions will be written to + # disk. + # + # @option options + # @param options [Hash] Eject options. + # @return [VCR::Cassette, nil] the ejected cassette if there was one + # + # source://vcr//lib/vcr.rb#159 + def eject_cassette(options = T.unsafe(nil)); end + + # @private + # @return [Boolean] + # + # source://vcr//lib/vcr.rb#408 + def fibers_available?; end + + # @private + # + # source://vcr//lib/vcr.rb#345 + def http_interactions; end + + # Inserts the named cassette using the given cassette options. + # New HTTP interactions, if allowed by the cassette's `:record` option, will + # be recorded to the cassette. The cassette's existing HTTP interactions + # will be used to stub requests, unless prevented by the cassette's + # `:record` option. + # + # @example + # VCR.insert_cassette('twitter', :record => :new_episodes) + # + # # ...later, after making an HTTP request: + # + # VCR.eject_cassette + # @note If you use this method you _must_ call `eject_cassette` when you + # are done. It is generally recommended that you use {#use_cassette} + # unless your code-under-test cannot be run as a block. + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [#to_s] The name of the cassette. VCR will sanitize + # this to ensure it is a valid file name. + # @param options [Hash] The cassette options. The given options will + # be merged with the configured default_cassette_options. + # @raise [ArgumentError] when the given cassette is already being used. + # @raise [VCR::Errors::TurnedOffError] when VCR has been turned off + # without using the :ignore_cassettes option. + # @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option + # is used and the ERB template requires variables that you did not provide. + # @return [VCR::Cassette] the inserted cassette + # + # source://vcr//lib/vcr.rb#132 + def insert_cassette(name, options = T.unsafe(nil)); end + + # @private + # + # source://vcr//lib/vcr.rb#375 + def library_hooks; end + + # @private + # + # source://vcr//lib/vcr.rb#398 + def link_context(from_thread, to_key); end + + # @private + # @return [Boolean] + # + # source://vcr//lib/vcr.rb#351 + def real_http_connections_allowed?; end + + # @private + # + # source://vcr//lib/vcr.rb#390 + def record_http_interaction(interaction); end + + # @private + # + # source://vcr//lib/vcr.rb#370 + def request_ignorer; end + + # @return [RequestMatcherRegistry] the request matcher registry + # + # source://vcr//lib/vcr.rb#357 + def request_matchers; end + + # Turns VCR off, so that it no longer handles every HTTP request. + # + # @option options + # @param options [Hash] hash of options + # @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use + # @raise [ArgumentError] if you pass an invalid option + # @return [void] + # + # source://vcr//lib/vcr.rb#290 + def turn_off!(options = T.unsafe(nil)); end + + # Turns on VCR, if it has previously been turned off. + # + # @return [void] + # @see #turn_off! + # @see #turned_off + # @see #turned_on? + # @see #turned_on + # + # source://vcr//lib/vcr.rb#327 + def turn_on!; end + + # Turns VCR off for the duration of a block. + # + # @param options [Hash] hash of options + # @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use + # @raise [ArgumentError] if you pass an invalid option + # @return [void] + # @see #turn_off! + # @see #turn_on! + # @see #turned_on? + # @see #turned_on + # + # source://vcr//lib/vcr.rb#270 + def turned_off(options = T.unsafe(nil)); end + + # Turns on VCR, for the duration of a block. + # + # @param options [Hash] hash of options + # @return [void] + # @see #turn_off! + # @see #turned_off + # @see #turned_on? + # + # source://vcr//lib/vcr.rb#311 + def turned_on(options = T.unsafe(nil)); end + + # @note Normally VCR is _always_ turned on; it will only be off if you have + # explicitly turned it off. + # @return [Boolean] whether or not VCR is turned on + # @see #turn_on! + # @see #turn_off! + # @see #turned_off + # + # source://vcr//lib/vcr.rb#337 + def turned_on?; end + + # @private + # + # source://vcr//lib/vcr.rb#403 + def unlink_context(key); end + + # Inserts a cassette using the given name and options, runs the given + # block, and ejects the cassette. + # + # @example + # VCR.use_cassette('twitter', :record => :new_episodes) do + # # make an HTTP request + # end + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [#to_s] The name of the cassette. VCR will sanitize + # this to ensure it is a valid file name. + # @param options [Hash] The cassette options. The given options will + # be merged with the configured default_cassette_options. + # @raise [ArgumentError] when the given cassette is already being used. + # @raise [VCR::Errors::TurnedOffError] when VCR has been turned off + # without using the :ignore_cassettes option. + # @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option + # is used and the ERB template requires variables that you did not provide. + # @return [void] + # @see #insert_cassette + # @see #eject_cassette + # @yield Block to run while this cassette is in use. + # @yieldparam cassette [(optional) VCR::Cassette] the cassette that has + # been inserted. + # + # source://vcr//lib/vcr.rb#184 + def use_cassette(name, options = T.unsafe(nil), &block); end + + # Inserts multiple cassettes the given names + # + # @example + # cassettes = [ + # { name: 'github' }, + # { name: 'apple', options: { erb: true } } + # ] + # VCR.use_cassettes(cassettes) do + # # make multiple HTTP requests + # end + # + # source://vcr//lib/vcr.rb#213 + def use_cassettes(cassettes, &block); end + + # @note This string also has singleton methods: + # + # * `major` [Integer] The major version. + # * `minor` [Integer] The minor version. + # * `patch` [Integer] The patch version. + # * `parts` [Array<Integer>] List of the version parts. + # @return [String] the current VCR version. + # + # source://vcr//lib/vcr/version.rb#11 + def version; end + + private + + # source://vcr//lib/vcr.rb#448 + def context_cassettes; end + + # source://vcr//lib/vcr.rb#427 + def context_value(name); end + + # source://vcr//lib/vcr.rb#413 + def current_context; end + + # source://vcr//lib/vcr.rb#435 + def dup_context(context); end + + # source://vcr//lib/vcr.rb#417 + def get_context(thread_key, fiber_key = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://vcr//lib/vcr.rb#444 + def ignore_cassettes?; end + + # source://vcr//lib/vcr.rb#452 + def initialize_fibers; end + + # source://vcr//lib/vcr.rb#461 + def initialize_ivars; end + + # source://vcr//lib/vcr.rb#431 + def set_context_value(name, value); end + + class << self + # @private + # + # source://vcr//lib/vcr/deprecations.rb#10 + def const_missing(const); end + end +end + +# The media VCR uses to store HTTP interactions for later re-use. +# +# source://vcr//lib/vcr/cassette/http_interaction_list.rb#2 +class VCR::Cassette + include ::VCR::Logger::Mixin + + # @param name [#to_s] The name of the cassette. VCR will sanitize + # this to ensure it is a valid file name. + # @param options [Hash] The cassette options. The given options will + # be merged with the configured default_cassette_options. + # @return [Cassette] a new instance of Cassette + # @see VCR#insert_cassette + # + # source://vcr//lib/vcr/cassette.rb#58 + def initialize(name, options = T.unsafe(nil)); end + + # @return [Boolean, nil] Should outdated interactions be recorded back to file + # + # source://vcr//lib/vcr/cassette.rb#47 + def clean_outdated_http_interactions; end + + # @return [Boolean] Should unused requests be dropped from the cassette? + # + # source://vcr//lib/vcr/cassette.rb#50 + def drop_unused_requests; end + + # Ejects the current cassette. The cassette will no longer be used. + # In addition, any newly recorded HTTP interactions will be written to + # disk. + # + # @note This is not intended to be called directly. Use `VCR.eject_cassette` instead. + # @see VCR#eject_cassette + # + # source://vcr//lib/vcr/cassette.rb#78 + def eject(options = T.unsafe(nil)); end + + # @return [Boolean, Hash] The cassette's ERB option. The file will be treated as an + # ERB template if this has a truthy value. A hash, if provided, will be used as local + # variables for the ERB template. + # + # source://vcr//lib/vcr/cassette.rb#41 + def erb; end + + # @note VCR will take care of sanitizing the cassette name to make it a valid file name. + # @raise [NotImplementedError] if the configured cassette persister + # does not support resolving file paths. + # @return [String] The file for this cassette. + # + # source://vcr//lib/vcr/cassette.rb#132 + def file; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#102 + def http_interactions; end + + # @return [Boolean] false unless wrapped with LinkedCassette + # + # source://vcr//lib/vcr/cassette.rb#171 + def linked?; end + + # @return [Array<Symbol, #call>] List of request matchers. Used to find a response from an + # existing HTTP interaction to play back. + # + # source://vcr//lib/vcr/cassette.rb#36 + def match_requests_on; end + + # @return [#to_s] The name of the cassette. Used to determine the cassette's file name. + # @see #file + # + # source://vcr//lib/vcr/cassette.rb#21 + def name; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#124 + def new_recorded_interactions; end + + # @example + # + # VCR.use_cassette("some cassette") do |cassette| + # Timecop.freeze(cassette.originally_recorded_at || Time.now) do + # # ... + # end + # end + # @return [Time, nil] The `recorded_at` time of the first HTTP interaction + # or nil if the cassette has no prior HTTP interactions. + # + # source://vcr//lib/vcr/cassette.rb#166 + def originally_recorded_at; end + + # @return [Integer, nil] How frequently (in seconds) the cassette should be re-recorded. + # + # source://vcr//lib/vcr/cassette.rb#44 + def re_record_interval; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#116 + def record_http_interaction(interaction); end + + # @return [Symbol] The record mode. Determines whether the cassette records HTTP interactions, + # plays them back, or does both. + # + # source://vcr//lib/vcr/cassette.rb#25 + def record_mode; end + + # @return [Boolean] The cassette's record_on_error mode. When the code that uses the cassette + # raises an error (for example a test failure) and record_on_error is set to false, no + # cassette will be recorded. This is useful when you are TDD'ing an API integration: when + # an error is raised that often means your request is invalid, so you don't want the cassette + # to be recorded. + # + # source://vcr//lib/vcr/cassette.rb#32 + def record_on_error; end + + # @return [Boolean] Whether or not the cassette is recording. + # + # source://vcr//lib/vcr/cassette.rb#140 + def recording?; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#87 + def run_failed!; end + + # @private + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#92 + def run_failed?; end + + # @return [Hash] The hash that will be serialized when the cassette is written to disk. + # + # source://vcr//lib/vcr/cassette.rb#149 + def serializable_hash; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#97 + def should_write_recorded_interactions_to_disk?; end + + # @return [Array<Symbol>] If set, {VCR::Configuration#before_record} and + # {VCR::Configuration#before_playback} hooks with a corresponding tag will apply. + # + # source://vcr//lib/vcr/cassette.rb#54 + def tags; end + + private + + # source://vcr//lib/vcr/cassette.rb#177 + def assert_valid_options!; end + + # source://vcr//lib/vcr/cassette.rb#205 + def assign_tags; end + + # source://vcr//lib/vcr/cassette.rb#324 + def deserialized_hash; end + + # source://vcr//lib/vcr/cassette.rb#191 + def extract_options; end + + # source://vcr//lib/vcr/cassette.rb#300 + def interactions_to_record; end + + # source://vcr//lib/vcr/cassette.rb#316 + def invoke_hook(type, interactions); end + + # source://vcr//lib/vcr/cassette.rb#337 + def log_prefix; end + + # source://vcr//lib/vcr/cassette.rb#278 + def merged_interactions; end + + # source://vcr//lib/vcr/cassette.rb#213 + def previously_recorded_interactions; end + + # source://vcr//lib/vcr/cassette.rb#231 + def raise_error_unless_valid_record_mode; end + + # source://vcr//lib/vcr/cassette.rb#274 + def raw_cassette_bytes; end + + # source://vcr//lib/vcr/cassette.rb#341 + def request_summary(request); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#270 + def should_assert_no_unused_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#237 + def should_re_record?(record_mode); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#262 + def should_remove_matching_existing_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#266 + def should_remove_unused_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#258 + def should_stub_requests?; end + + # source://vcr//lib/vcr/cassette.rb#227 + def storage_key; end + + # source://vcr//lib/vcr/cassette.rb#295 + def up_to_date_interactions(interactions); end + + # source://vcr//lib/vcr/cassette.rb#308 + def write_recorded_interactions_to_disk; end + + class << self + # @private + # + # source://vcr//lib/vcr/deprecations.rb#17 + def const_missing(const); end + end +end + +# @private +# +# source://vcr//lib/vcr/cassette/erb_renderer.rb#6 +class VCR::Cassette::ERBRenderer + # @return [ERBRenderer] a new instance of ERBRenderer + # + # source://vcr//lib/vcr/cassette/erb_renderer.rb#7 + def initialize(raw_template, erb, cassette_name = T.unsafe(nil)); end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#11 + def render; end + + private + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#52 + def binding_for_variables; end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#34 + def erb_variables; end + + # @raise [Errors::MissingERBVariableError] + # + # source://vcr//lib/vcr/cassette/erb_renderer.rb#21 + def handle_name_error(e); end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#38 + def template; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/erb_renderer.rb#30 + def use_erb?; end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#48 + def variables_object; end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers.rb#49 +module VCR::Cassette::EncodingErrorHandling + # source://vcr//lib/vcr/cassette/serializers.rb#50 + def handle_encoding_errors; end +end + +# @private +# +# source://vcr//lib/vcr/cassette/http_interaction_list.rb#4 +class VCR::Cassette::HTTPInteractionList + include ::VCR::Logger::Mixin + + # @return [HTTPInteractionList] a new instance of HTTPInteractionList + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#18 + def initialize(interactions, request_matchers, allow_playback_repeats = T.unsafe(nil), parent_list = T.unsafe(nil), log_prefix = T.unsafe(nil)); end + + # Returns the value of attribute allow_playback_repeats. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def allow_playback_repeats; end + + # Checks if there are no unused interactions left. + # + # @raise [VCR::Errors::UnusedHTTPInteractionError] if not all interactions were played back. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#65 + def assert_no_unused_interactions!; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#48 + def has_interaction_matching?(request); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#54 + def has_used_interaction_matching?(request); end + + # Returns the value of attribute interactions. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def interactions; end + + # Returns the value of attribute parent_list. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def parent_list; end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#58 + def remaining_unused_interaction_count; end + + # Returns the value of attribute request_matchers. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def request_matchers; end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#31 + def response_for(request); end + + private + + # @return [Boolean] Whether or not there are unused interactions left in the list. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#79 + def has_unused_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#96 + def interaction_matches_request?(request, interaction); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#107 + def log_prefix; end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#87 + def matching_interaction_index_for(request); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#91 + def matching_used_interaction_for(request); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#83 + def request_summary(request); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/http_interaction_list.rb#8 +module VCR::Cassette::HTTPInteractionList::NullList + extend ::VCR::Cassette::HTTPInteractionList::NullList + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#11 + def has_interaction_matching?(*a); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#12 + def has_used_interaction_matching?(*a); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#13 + def remaining_unused_interaction_count(*a); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#10 + def response_for(*a); end +end + +# Keeps track of the cassette persisters in a hash-like object. +# +# source://vcr//lib/vcr/cassette/persisters.rb#4 +class VCR::Cassette::Persisters + # @private + # @return [Persisters] a new instance of Persisters + # + # source://vcr//lib/vcr/cassette/persisters.rb#8 + def initialize; end + + # Gets the named persister. + # + # @param name [Symbol] the name of the persister + # @raise [ArgumentError] if there is not a persister for the given name + # @return the named persister + # + # source://vcr//lib/vcr/cassette/persisters.rb#17 + def [](name); end + + # Registers a persister. + # + # @param name [Symbol] the name of the persister + # @param value [#[], #[]=] the persister object. It must implement `[]` and `[]=`. + # + # source://vcr//lib/vcr/cassette/persisters.rb#31 + def []=(name, value); end +end + +# The only built-in cassette persister. Persists cassettes to the file system. +# +# source://vcr//lib/vcr/cassette/persisters/file_system.rb#7 +module VCR::Cassette::Persisters::FileSystem + extend ::VCR::Cassette::Persisters::FileSystem + + # Gets the cassette for the given storage key (file name). + # + # @param file_name [String] the file name + # @return [String] the cassette content + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#23 + def [](file_name); end + + # Sets the cassette for the given storage key (file name). + # + # @param file_name [String] the file name + # @param content [String] the content to store + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#33 + def []=(file_name, content); end + + # @private + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#41 + def absolute_path_to_file(file_name); end + + # @private + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#11 + def storage_location; end + + # @private + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#14 + def storage_location=(dir); end + + private + + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#47 + def absolute_path_for(path); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#63 + def downcase_cassette_names?; end + + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#51 + def sanitized_file_name_from(file_name); end +end + +# Keeps track of the cassette serializers in a hash-like object. +# +# source://vcr//lib/vcr/cassette/serializers.rb#4 +class VCR::Cassette::Serializers + # @private + # @return [Serializers] a new instance of Serializers + # + # source://vcr//lib/vcr/cassette/serializers.rb#12 + def initialize; end + + # Gets the named serializer. + # + # @param name [Symbol] the name of the serializer + # @raise [ArgumentError] if there is not a serializer for the given name + # @return the named serializer + # + # source://vcr//lib/vcr/cassette/serializers.rb#21 + def [](name); end + + # Registers a serializer. + # + # @param name [Symbol] the name of the serializer + # @param value [#file_extension, #serialize, #deserialize] the serializer object. It must implement + # `file_extension()`, `serialize(Hash)` and `deserialize(String)`. + # + # source://vcr//lib/vcr/cassette/serializers.rb#39 + def []=(name, value); end +end + +# The compressed serializer. This serializer wraps the YAML serializer +# to write compressed cassettes to disk. +# +# Cassettes containing responses with JSON data often compress at greater +# than 10:1. The tradeoff is that cassettes will not diff nicely or be +# easily inspectable or editable. +# +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/compressed.rb#15 +module VCR::Cassette::Serializers::Compressed + extend ::VCR::Cassette::Serializers::Compressed + + # Deserializes the given compressed cassette data. + # + # @param string [String] the compressed YAML cassette data + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/compressed.rb#38 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "zz" + # + # source://vcr//lib/vcr/cassette/serializers/compressed.rb#21 + def file_extension; end + + # Serializes the given hash using YAML and Zlib. + # + # @param hash [Hash] the object to serialize + # @return [String] the compressed cassette data + # + # source://vcr//lib/vcr/cassette/serializers/compressed.rb#29 + def serialize(hash); end +end + +# The JSON serializer. +# +# @see Psych +# @see Syck +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/json.rb#11 +module VCR::Cassette::Serializers::JSON + extend ::VCR::Cassette::Serializers::JSON + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using `JSON`. + # + # @param string [String] the JSON string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/json.rb#44 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "json" + # + # source://vcr//lib/vcr/cassette/serializers/json.rb#26 + def file_extension; end + + # Serializes the given hash using `JSON`. + # + # @param hash [Hash] the object to serialize + # @return [String] the JSON string + # + # source://vcr//lib/vcr/cassette/serializers/json.rb#34 + def serialize(hash); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/json.rb#17 +VCR::Cassette::Serializers::JSON::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/json.rb#21 +VCR::Cassette::Serializers::JSON::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# The Psych serializer. Psych is the new YAML engine in ruby 1.9. +# +# @see JSON +# @see Syck +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/psych.rb#11 +module VCR::Cassette::Serializers::Psych + extend ::VCR::Cassette::Serializers::Psych + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using Psych. + # + # @param string [String] the YAML string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/psych.rb#45 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "yml" + # + # source://vcr//lib/vcr/cassette/serializers/psych.rb#25 + def file_extension; end + + # Serializes the given hash using Psych. + # + # @param hash [Hash] the object to serialize + # @return [String] the YAML string + # + # source://vcr//lib/vcr/cassette/serializers/psych.rb#33 + def serialize(hash); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/psych.rb#17 +VCR::Cassette::Serializers::Psych::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/psych.rb#20 +VCR::Cassette::Serializers::Psych::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# The Syck serializer. Syck is the legacy YAML engine in ruby 1.8 and 1.9. +# +# @see JSON +# @see Psych +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/syck.rb#11 +module VCR::Cassette::Serializers::Syck + extend ::VCR::Cassette::Serializers::Syck + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using Syck. + # + # @param string [String] the YAML string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/syck.rb#43 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "yml" + # + # source://vcr//lib/vcr/cassette/serializers/syck.rb#25 + def file_extension; end + + # Serializes the given hash using Syck. + # + # @param hash [Hash] the object to serialize + # @return [String] the YAML string + # + # source://vcr//lib/vcr/cassette/serializers/syck.rb#33 + def serialize(hash); end + + private + + # source://vcr//lib/vcr/cassette/serializers/syck.rb#53 + def using_syck; end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/syck.rb#17 +VCR::Cassette::Serializers::Syck::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/syck.rb#20 +VCR::Cassette::Serializers::Syck::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# The YAML serializer. This will use either Psych or Syck, which ever your +# ruby interpreter defaults to. You can also force VCR to use Psych or Syck by +# using one of those serializers. +# +# @see JSON +# @see Psych +# @see Syck +# +# source://vcr//lib/vcr/cassette/serializers/yaml.rb#13 +module VCR::Cassette::Serializers::YAML + extend ::VCR::Cassette::Serializers::YAML + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using YAML. + # + # @param string [String] the YAML string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/yaml.rb#47 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "yml" + # + # source://vcr//lib/vcr/cassette/serializers/yaml.rb#27 + def file_extension; end + + # Serializes the given hash using YAML. + # + # @param hash [Hash] the object to serialize + # @return [String] the YAML string + # + # source://vcr//lib/vcr/cassette/serializers/yaml.rb#35 + def serialize(hash); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/yaml.rb#19 +VCR::Cassette::Serializers::YAML::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/yaml.rb#22 +VCR::Cassette::Serializers::YAML::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers.rb#59 +module VCR::Cassette::SyntaxErrorHandling + # source://vcr//lib/vcr/cassette/serializers.rb#60 + def handle_syntax_errors; end +end + +# The supported record modes. +# +# * :all -- Record every HTTP interactions; do not play any back. +# * :none -- Do not record any HTTP interactions; play them back. +# * :new_episodes -- Playback previously recorded HTTP interactions and record new ones. +# * :once -- Record the HTTP interactions if the cassette has not already been recorded; +# otherwise, playback the HTTP interactions. +# +# source://vcr//lib/vcr/cassette.rb#17 +VCR::Cassette::VALID_RECORD_MODES = T.let(T.unsafe(nil), Array) + +# Mutex to synchronize access to cassettes in a threaded environment +# +# source://vcr//lib/vcr.rb#27 +VCR::CassetteMutex = T.let(T.unsafe(nil), Thread::Mutex) + +# Stores the VCR configuration. +# +# source://vcr//lib/vcr/configuration.rb#7 +class VCR::Configuration + include ::VCR::VariableArgsBlockCaller + include ::VCR::Hooks + include ::VCR::Configuration::DefinedHooks + include ::VCR::Logger::Mixin + extend ::VCR::Hooks::ClassMethods + + # @return [Configuration] a new instance of Configuration + # + # source://vcr//lib/vcr/configuration.rb#490 + def initialize; end + + # Adds a callback that will be called with each HTTP request after it is complete. + # + # @example + # VCR.configure do |c| + # c.after_http_request(:ignored?) do |request, response| + # puts "Request: #{request.method} #{request.uri}" + # puts "Response: #{response.status.code}" + # end + # end + # @param filters [optional splat of #to_proc] one or more filters to apply. + # The objects provided will be converted to procs using `#to_proc`. If provided, + # the callback will only be invoked if these procs all return `true`. + # @see #before_http_request + # @see #around_http_request + # @yield the callback + # @yieldparam request [VCR::Request::Typed] the request that is being made + # @yieldparam response [VCR::Response] the response from the request + # + # source://vcr//lib/vcr/configuration.rb#366 + def after_http_request(*filters); end + + # Determines how VCR treats HTTP requests that are made when + # no VCR cassette is in use. When set to `true`, requests made + # when there is no VCR cassette in use will be allowed. When set + # to `false` (the default), an {VCR::Errors::UnhandledHTTPRequestError} + # will be raised for any HTTP request made when there is no + # cassette in use. + # + # @overload allow_http_connections_when_no_cassette? + # @overload allow_http_connections_when_no_cassette= + # + # source://vcr//lib/vcr/configuration.rb#129 + def allow_http_connections_when_no_cassette=(_arg0); end + + # @private (documented above) + # @return [Boolean] + # + # source://vcr//lib/vcr/configuration.rb#131 + def allow_http_connections_when_no_cassette?; end + + # Adds a callback that will be executed around each HTTP request. + # + # @example + # VCR.configure do |c| + # c.around_http_request(lambda {|r| r.uri =~ /api.geocoder.com/}) do |request| + # # extract an address like "1700 E Pine St, Seattle, WA" + # # from a query like "address=1700+E+Pine+St%2C+Seattle%2C+WA" + # address = CGI.unescape(URI(request.uri).query.split('=').last) + # VCR.use_cassette("geocoding/#{address}", &request) + # end + # end + # @note This method can only be used on ruby interpreters that support + # fibers (i.e. 1.9+). On 1.8 you can use separate `before_http_request` and + # `after_http_request` hooks. + # @note You _must_ call `request.proceed` or pass the request as a proc on to a + # method that yields to a block (i.e. `some_method(&request)`). + # @param filters [optional splat of #to_proc] one or more filters to apply. + # The objects provided will be converted to procs using `#to_proc`. If provided, + # the callback will only be invoked if these procs all return `true`. + # @raise [VCR::Errors::NotSupportedError] if the fiber library cannot be loaded. + # @see #before_http_request + # @see #after_http_request + # @yield the callback + # @yieldparam request [VCR::Request::FiberAware] the request that is being made + # + # source://vcr//lib/vcr/configuration.rb#395 + def around_http_request(*filters, &block); end + + # Adds a callback that will be called before a previously recorded + # HTTP interaction is loaded for playback. + # + # @example + # VCR.configure do |c| + # # Don't playback transient 5xx errors + # c.before_playback do |interaction| + # interaction.ignore! if interaction.response.status.code >= 500 + # end + # + # # Change a response header for playback + # c.before_playback(:twilio) do |interaction| + # interaction.response.headers['X-Foo-Bar'] = 'Bazz' + # end + # end + # @param tag [(optional) Symbol] Used to apply this hook to only cassettes that match + # the given tag. + # @see #before_record + # @yield the callback + # @yieldparam interaction [VCR::HTTPInteraction::HookAware] The interaction that is being + # loaded. + # @yieldparam cassette [(optional) VCR::Cassette] The current cassette. + # + # source://vcr//lib/vcr/configuration.rb#325 + def before_playback(tag = T.unsafe(nil), &block); end + + # Adds a callback that will be called before the recorded HTTP interactions + # are serialized and written to disk. + # + # @example + # VCR.configure do |c| + # # Don't record transient 5xx errors + # c.before_record do |interaction| + # interaction.ignore! if interaction.response.status.code >= 500 + # end + # + # # Modify the response body for cassettes tagged with :twilio + # c.before_record(:twilio) do |interaction| + # interaction.response.body.downcase! + # end + # end + # @param tag [(optional) Symbol] Used to apply this hook to only cassettes that match + # the given tag. + # @see #before_playback + # @yield the callback + # @yieldparam interaction [VCR::HTTPInteraction::HookAware] The interaction that will be + # serialized and written to disk. + # @yieldparam cassette [(optional) VCR::Cassette] The current cassette. + # + # source://vcr//lib/vcr/configuration.rb#297 + def before_record(tag = T.unsafe(nil), &block); end + + # Gets the directory to read cassettes from and write cassettes to. + # + # @return [String] the directory to read cassettes from and write cassettes to + # + # source://vcr//lib/vcr/configuration.rb#15 + def cassette_library_dir; end + + # Sets the directory to read cassettes from and writes cassettes to. + # + # @example + # VCR.configure do |c| + # c.cassette_library_dir = 'spec/cassettes' + # end + # @note This is only necessary if you use the `:file_system` + # cassette persister (the default). + # @param dir [String] the directory to read cassettes from and write cassettes to + # @return [void] + # + # source://vcr//lib/vcr/configuration.rb#30 + def cassette_library_dir=(dir); end + + # Gets the registry of cassette persisters. Use it to register a custom persister. + # + # @example + # VCR.configure do |c| + # c.cassette_persisters[:my_custom_persister] = my_custom_persister + # end + # @note Custom persisters must implement the following interface: + # + # * `persister[storage_key]` # returns previously persisted content + # * `persister[storage_key] = content` # persists given content + # @return [VCR::Cassette::Persisters] the cassette persister registry object. + # + # source://vcr//lib/vcr/configuration.rb#269 + def cassette_persisters; end + + # Gets the registry of cassette serializers. Use it to register a custom serializer. + # + # @example + # VCR.configure do |c| + # c.cassette_serializers[:my_custom_serializer] = my_custom_serializer + # end + # @note Custom serializers must implement the following interface: + # + # * `file_extension # => String` + # * `serialize(Hash) # => String` + # * `deserialize(String) # => Hash` + # @return [VCR::Cassette::Serializers] the cassette serializer registry object. + # + # source://vcr//lib/vcr/configuration.rb#253 + def cassette_serializers; end + + # Configures RSpec to use a VCR cassette for any example + # tagged with `:vcr`. + # + # source://vcr//lib/vcr/configuration.rb#418 + def configure_rspec_metadata!; end + + # An object to log debug output to. + # + # @example + # VCR.configure do |c| + # c.debug_logger = $stderr + # end + # @example + # VCR.configure do |c| + # c.debug_logger = File.open('vcr.log', 'w') + # end + # @overload debug_logger + # @overload debug_logger= + # + # source://vcr//lib/vcr/configuration.rb#440 + def debug_logger; end + + # @private (documented above) + # + # source://vcr//lib/vcr/configuration.rb#442 + def debug_logger=(value); end + + # Default options to apply to every cassette. + # + # @example + # VCR.configure do |c| + # c.default_cassette_options = { :record => :new_episodes } + # end + # @note {VCR#insert_cassette} for the list of valid options. + # @overload default_cassette_options + # @overload default_cassette_options= + # + # source://vcr//lib/vcr/configuration.rb#46 + def default_cassette_options; end + + # Sets the default options that apply to every cassette. + # + # source://vcr//lib/vcr/configuration.rb#49 + def default_cassette_options=(overrides); end + + # Sets up a {#before_record} and a {#before_playback} hook that will + # insert a placeholder string in the cassette in place of another string. + # You can use this as a generic way to interpolate a variable into the + # cassette for a unique string. It's particularly useful for unique + # sensitive strings like API keys and passwords. + # + # @example + # VCR.configure do |c| + # # Put "<GITHUB_API_KEY>" in place of the actual API key in + # # our cassettes so we don't have to commit to source control. + # c.filter_sensitive_data('<GITHUB_API_KEY>') { GithubClient.api_key } + # + # # Put a "<USER_ID>" placeholder variable in our cassettes tagged with + # # :user_cassette since it can be different for different test runs. + # c.define_cassette_placeholder('<USER_ID>', :user_cassette) { User.last.id } + # end + # @param placeholder [String] The placeholder string. + # @param tag [Symbol] Set this to apply this only to cassettes + # with a matching tag; otherwise it will apply to every cassette. + # @yield block that determines what string to replace + # @yieldparam interaction [(optional) VCR::HTTPInteraction::HookAware] the HTTP interaction + # @yieldreturn the string to replace + # + # source://vcr//lib/vcr/configuration.rb#225 + def define_cassette_placeholder(placeholder, tag = T.unsafe(nil), &block); end + + # Sets up a {#before_record} and a {#before_playback} hook that will + # insert a placeholder string in the cassette in place of another string. + # You can use this as a generic way to interpolate a variable into the + # cassette for a unique string. It's particularly useful for unique + # sensitive strings like API keys and passwords. + # + # @example + # VCR.configure do |c| + # # Put "<GITHUB_API_KEY>" in place of the actual API key in + # # our cassettes so we don't have to commit to source control. + # c.filter_sensitive_data('<GITHUB_API_KEY>') { GithubClient.api_key } + # + # # Put a "<USER_ID>" placeholder variable in our cassettes tagged with + # # :user_cassette since it can be different for different test runs. + # c.define_cassette_placeholder('<USER_ID>', :user_cassette) { User.last.id } + # end + # @param placeholder [String] The placeholder string. + # @param tag [Symbol] Set this to apply this only to cassettes + # with a matching tag; otherwise it will apply to every cassette. + # @yield block that determines what string to replace + # @yieldparam interaction [(optional) VCR::HTTPInteraction::HookAware] the HTTP interaction + # @yieldreturn the string to replace + # + # source://vcr//lib/vcr/configuration.rb#225 + def filter_sensitive_data(placeholder, tag = T.unsafe(nil), &block); end + + # Configures which libraries VCR will hook into to intercept HTTP requests. + # + # @example + # VCR.configure do |c| + # c.hook_into :webmock, :typhoeus + # end + # @param hooks [Array<Symbol>] List of libraries. Valid values are + # `:webmock`, `:typhoeus`, `:excon` and `:faraday`. + # @raise [ArgumentError] when given an unsupported library name. + # @raise [VCR::Errors::LibraryVersionTooLowError] when the version + # of a library you are using is too low for VCR to support. + # + # source://vcr//lib/vcr/configuration.rb#65 + def hook_into(*hooks); end + + # Specifies host(s) that VCR should ignore. + # + # @param hosts [Array<String>] List of hosts to ignore + # @see #ignore_localhost= + # @see #ignore_request + # + # source://vcr//lib/vcr/configuration.rb#75 + def ignore_host(*hosts); end + + # Specifies host(s) that VCR should ignore. + # + # @param hosts [Array<String>] List of hosts to ignore + # @see #ignore_localhost= + # @see #ignore_request + # + # source://vcr//lib/vcr/configuration.rb#75 + def ignore_hosts(*hosts); end + + # Sets whether or not VCR should ignore localhost requests. + # + # @param value [Boolean] the value to set + # @see #ignore_hosts + # @see #ignore_request + # + # source://vcr//lib/vcr/configuration.rb#94 + def ignore_localhost=(value); end + + # Defines what requests to ignore using a block. + # + # @example + # VCR.configure do |c| + # c.ignore_request do |request| + # uri = URI(request.uri) + # # ignore only localhost requests to port 7500 + # uri.host == 'localhost' && uri.port == 7500 + # end + # end + # @yield the callback + # @yieldparam request [VCR::Request] the HTTP request + # @yieldreturn [Boolean] whether or not to ignore the request + # + # source://vcr//lib/vcr/configuration.rb#112 + def ignore_request(&block); end + + # Logger object that provides logging APIs and helper methods. + # + # @private + # + # source://vcr//lib/vcr/configuration.rb#454 + def logger; end + + # @param http_message [#body, #headers] the `VCR::Request` or `VCR::Response` object being serialized + # @return [Boolean] whether or not the body of the given HTTP message should + # be base64 encoded during serialization in order to preserve the bytes exactly. + # @see #preserve_exact_body_bytes + # + # source://vcr//lib/vcr/configuration.rb#484 + def preserve_exact_body_bytes_for?(http_message); end + + # Sets a parser for VCR to use when parsing query strings for request + # comparisons. The new parser must implement a method `call` that returns + # an object which is both equalivant and consistent when given an HTTP + # query string of possibly differing value ordering. + # + # * `#== # => Boolean` + # + # The `#==` method must return true if both objects represent the + # same query string. + # + # This defaults to `CGI.parse` from the ruby standard library. + # + # @overload query_parser + # @overload query_parser= + # + # source://vcr//lib/vcr/configuration.rb#151 + def query_parser; end + + # Sets a parser for VCR to use when parsing query strings for request + # comparisons. The new parser must implement a method `call` that returns + # an object which is both equalivant and consistent when given an HTTP + # query string of possibly differing value ordering. + # + # * `#== # => Boolean` + # + # The `#==` method must return true if both objects represent the + # same query string. + # + # This defaults to `CGI.parse` from the ruby standard library. + # + # @overload query_parser + # @overload query_parser= + # + # source://vcr//lib/vcr/configuration.rb#151 + def query_parser=(_arg0); end + + # Registers a request matcher for later use. + # + # @example + # VCR.configure do |c| + # c.register_request_matcher :port do |request_1, request_2| + # URI(request_1.uri).port == URI(request_2.uri).port + # end + # end + # + # VCR.use_cassette("my_cassette", :match_requests_on => [:method, :host, :port]) do + # # ... + # end + # @param name [Symbol] the name of the request matcher + # @yield the request matcher + # @yieldparam request_1 [VCR::Request] One request + # @yieldparam request_2 [VCR::Request] The other request + # @yieldreturn [Boolean] whether or not these two requests should be considered + # equivalent + # + # source://vcr//lib/vcr/configuration.rb#198 + def register_request_matcher(name, &block); end + + # @deprecated Use #hook_into instead. + # @see #hook_into + # + # source://vcr//lib/vcr/deprecations.rb#26 + def stub_with(*adapters); end + + # Specifies host(s) that VCR should stop ignoring. + # + # @param hosts [Array<String>] List of hosts to unignore + # @see #ignore_hosts + # + # source://vcr//lib/vcr/configuration.rb#84 + def unignore_host(*hosts); end + + # Specifies host(s) that VCR should stop ignoring. + # + # @param hosts [Array<String>] List of hosts to unignore + # @see #ignore_hosts + # + # source://vcr//lib/vcr/configuration.rb#84 + def unignore_hosts(*hosts); end + + # Sets a parser for VCR to use when parsing URIs. The new parser + # must implement a method `parse` that returns an instance of the + # URI object. This URI object must implement the following + # interface: + # + # * `scheme # => String` + # * `host # => String` + # * `port # => Fixnum` + # * `path # => String` + # * `query # => String` + # * `#port=` + # * `#query=` + # * `#to_s # => String` + # * `#== # => Boolean` + # + # The `#==` method must return true if both URI objects represent the + # same URI. + # + # This defaults to `URI` from the ruby standard library. + # + # @overload uri_parser + # @overload uri_parser= + # + # source://vcr//lib/vcr/configuration.rb#177 + def uri_parser; end + + # Sets a parser for VCR to use when parsing URIs. The new parser + # must implement a method `parse` that returns an instance of the + # URI object. This URI object must implement the following + # interface: + # + # * `scheme # => String` + # * `host # => String` + # * `port # => Fixnum` + # * `path # => String` + # * `query # => String` + # * `#port=` + # * `#query=` + # * `#to_s # => String` + # * `#== # => Boolean` + # + # The `#==` method must return true if both URI objects represent the + # same URI. + # + # This defaults to `URI` from the ruby standard library. + # + # @overload uri_parser + # @overload uri_parser= + # + # source://vcr//lib/vcr/configuration.rb#177 + def uri_parser=(_arg0); end + + private + + # source://vcr//lib/vcr/configuration.rb#529 + def create_fiber_for(fiber_errors, hook_declaration, proc); end + + # source://vcr//lib/vcr/configuration.rb#511 + def load_library_hook(hook); end + + # source://vcr//lib/vcr/configuration.rb#582 + def log_prefix; end + + # source://vcr//lib/vcr/configuration.rb#564 + def register_built_in_hooks; end + + # source://vcr//lib/vcr/configuration.rb#559 + def request_filter_from(object); end + + # source://vcr//lib/vcr/configuration.rb#519 + def resume_fiber(fiber, fiber_errors, response, hook_declaration); end + + # source://vcr//lib/vcr/configuration.rb#548 + def start_new_fiber_for(request, fibers, fiber_errors, hook_declaration, proc); end + + # source://vcr//lib/vcr/configuration.rb#554 + def tag_filter_from(tag); end +end + +# source://vcr//lib/vcr/configuration.rb#0 +module VCR::Configuration::DefinedHooks + # source://vcr//lib/vcr/util/hooks.rb#55 + def after_http_request(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def after_library_hooks_loaded(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def before_http_request(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def before_playback(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def before_record(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def preserve_exact_body_bytes(*filters, &hook); end +end + +# Provides integration with Cucumber using tags. +# +# source://vcr//lib/vcr/test_frameworks/cucumber.rb#3 +class VCR::CucumberTags + # @private + # @return [CucumberTags] a new instance of CucumberTags + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#19 + def initialize(main_object); end + + # Adds `Before` and `After` cucumber hooks for the named tags that + # will cause a VCR cassette to be used for scenarios with matching tags. + # + # @param tag_names [Array<String,Hash>] the cucumber scenario tags. If + # the last argument is a hash it is treated as cassette options. + # - `:use_scenario_name => true` to automatically name the + # cassette according to the scenario name. + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#30 + def tag(*tag_names); end + + # Adds `Before` and `After` cucumber hooks for the named tags that + # will cause a VCR cassette to be used for scenarios with matching tags. + # + # @param tag_names [Array<String,Hash>] the cucumber scenario tags. If + # the last argument is a hash it is treated as cassette options. + # - `:use_scenario_name => true` to automatically name the + # cassette according to the scenario name. + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#30 + def tags(*tag_names); end + + class << self + # @private + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#11 + def add_tag(tag); end + + # @private + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#6 + def tags; end + end +end + +# Constructs a cassette name from a Cucumber 2 scenario outline +# +# @private +# +# source://vcr//lib/vcr/test_frameworks/cucumber.rb#84 +class VCR::CucumberTags::ScenarioNameBuilder + # @return [ScenarioNameBuilder] a new instance of ScenarioNameBuilder + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#85 + def initialize(test_case); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#90 + def cassette_name; end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#100 + def examples_table(*_arg0); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#103 + def examples_table_row(row); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#94 + def feature(feature); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#100 + def scenario(*_arg0); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#94 + def scenario_outline(feature); end +end + +# @private +# +# source://vcr//lib/vcr/deprecations.rb#33 +module VCR::Deprecations; end + +# source://vcr//lib/vcr/deprecations.rb#34 +module VCR::Deprecations::Middleware; end + +# @private +# +# source://vcr//lib/vcr/deprecations.rb#36 +module VCR::Deprecations::Middleware::Faraday + # source://vcr//lib/vcr/deprecations.rb#37 + def initialize(*args); end +end + +# Namespace for VCR errors. +# +# source://vcr//lib/vcr/errors.rb#3 +module VCR::Errors; end + +# Error raised when an `around_http_request` hook is used improperly. +# +# @see VCR::Configuration#around_http_request +# +# source://vcr//lib/vcr/errors.rb#36 +class VCR::Errors::AroundHTTPRequestHookError < ::VCR::Errors::Error; end + +# Error raised when VCR is turned off while a cassette is in use. +# +# @see VCR#turn_off! +# @see VCR#turned_off +# +# source://vcr//lib/vcr/errors.rb#10 +class VCR::Errors::CassetteInUseError < ::VCR::Errors::Error; end + +# Error raised when you attempt to eject a cassette inserted by another +# thread. +# +# source://vcr//lib/vcr/errors.rb#56 +class VCR::Errors::EjectLinkedCassetteError < ::VCR::Errors::Error; end + +# Base class for all VCR errors. +# +# source://vcr//lib/vcr/errors.rb#5 +class VCR::Errors::Error < ::StandardError; end + +# Error raised when a VCR 1.x cassette is used with VCR 2. +# +# source://vcr//lib/vcr/errors.rb#32 +class VCR::Errors::InvalidCassetteFormatError < ::VCR::Errors::Error; end + +# Error raised when the version of one of the libraries that VCR hooks into +# is too low for VCR to support. +# +# @see VCR::Configuration#hook_into +# +# source://vcr//lib/vcr/errors.rb#26 +class VCR::Errors::LibraryVersionTooLowError < ::VCR::Errors::Error; end + +# Error raised when an cassette ERB template is rendered and a +# variable is missing. +# +# @see VCR#insert_cassette +# @see VCR#use_cassette +# +# source://vcr//lib/vcr/errors.rb#21 +class VCR::Errors::MissingERBVariableError < ::VCR::Errors::Error; end + +# Error raised when you attempt to use a VCR feature that is not +# supported on your ruby interpreter. +# +# @see VCR::Configuration#around_http_request +# +# source://vcr//lib/vcr/errors.rb#41 +class VCR::Errors::NotSupportedError < ::VCR::Errors::Error; end + +# Error raised when a VCR cassette is inserted while VCR is turned off. +# +# @see VCR#insert_cassette +# @see VCR#use_cassette +# +# source://vcr//lib/vcr/errors.rb#15 +class VCR::Errors::TurnedOffError < ::VCR::Errors::Error; end + +# Error raised when an HTTP request is made that VCR is unable to handle. +# +# @note VCR will raise this to force you to do something about the +# HTTP request. The idea is that you want to handle _every_ HTTP +# request in your test suite. The error message will give you +# suggestions for how to deal with the request. +# +# source://vcr//lib/vcr/errors.rb#64 +class VCR::Errors::UnhandledHTTPRequestError < ::VCR::Errors::Error + # Constructs the error. + # + # @param request [VCR::Request] the unhandled request. + # @return [UnhandledHTTPRequestError] a new instance of UnhandledHTTPRequestError + # + # source://vcr//lib/vcr/errors.rb#70 + def initialize(request); end + + # The HTTP request. + # + # source://vcr//lib/vcr/errors.rb#65 + def request; end + + private + + # source://vcr//lib/vcr/errors.rb#136 + def cassettes_description; end + + # source://vcr//lib/vcr/errors.rb#148 + def cassettes_list; end + + # source://vcr//lib/vcr/errors.rb#81 + def construct_message; end + + # source://vcr//lib/vcr/errors.rb#90 + def current_cassettes; end + + # source://vcr//lib/vcr/errors.rb#118 + def current_matchers; end + + # source://vcr//lib/vcr/errors.rb#183 + def format_bullet_point(lines, index); end + + # source://vcr//lib/vcr/errors.rb#189 + def format_foot_note(url, index); end + + # source://vcr//lib/vcr/errors.rb#128 + def formatted_headers; end + + # source://vcr//lib/vcr/errors.rb#168 + def formatted_suggestions; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/errors.rb#295 + def has_used_interaction_matching?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/errors.rb#114 + def match_request_on_body?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/errors.rb#110 + def match_request_on_headers?; end + + # source://vcr//lib/vcr/errors.rb#299 + def match_requests_on_suggestion; end + + # source://vcr//lib/vcr/errors.rb#277 + def no_cassette_suggestions; end + + # source://vcr//lib/vcr/errors.rb#283 + def record_mode_suggestion; end + + # source://vcr//lib/vcr/errors.rb#77 + def relish_version_slug; end + + # source://vcr//lib/vcr/errors.rb#94 + def request_description; end + + # source://vcr//lib/vcr/errors.rb#259 + def suggestion_for(key); end + + # source://vcr//lib/vcr/errors.rb#266 + def suggestions; end +end + +# List of suggestions for how to configure VCR to handle the request. +# +# source://vcr//lib/vcr/errors.rb#194 +VCR::Errors::UnhandledHTTPRequestError::ALL_SUGGESTIONS = T.let(T.unsafe(nil), Hash) + +# Error raised when you ask VCR to decode a compressed response +# body but the content encoding isn't one of the known ones. +# +# @see VCR::Response#decompress +# +# source://vcr//lib/vcr/errors.rb#46 +class VCR::Errors::UnknownContentEncodingError < ::VCR::Errors::Error; end + +# Error raised when a request matcher is requested that is not registered. +# +# source://vcr//lib/vcr/errors.rb#29 +class VCR::Errors::UnregisteredMatcherError < ::VCR::Errors::Error; end + +# Error raised when you eject a cassette before all previously +# recorded HTTP interactions are played back. +# +# @note Only applicable when :allow_episode_skipping is false. +# @see VCR::HTTPInteractionList#assert_no_unused_interactions! +# +# source://vcr//lib/vcr/errors.rb#52 +class VCR::Errors::UnusedHTTPInteractionError < ::VCR::Errors::Error; end + +# Represents a single interaction over HTTP, containing a request and a response. +# +# @attr request [Request] the request +# @attr response [Response] the response +# @attr recorded_at [Time] when this HTTP interaction was recorded +# +# source://vcr//lib/vcr/structs.rb#501 +class VCR::HTTPInteraction < ::Struct + # @return [HTTPInteraction] a new instance of HTTPInteraction + # + # source://vcr//lib/vcr/structs.rb#502 + def initialize(*args); end + + # @return [HookAware] an instance with additional capabilities + # suitable for use in `before_record` and `before_playback` hooks. + # + # source://vcr//lib/vcr/structs.rb#532 + def hook_aware; end + + # Builds a serializable hash from the HTTP interaction data. + # + # @return [Hash] hash that represents this HTTP interaction + # and can be easily serialized. + # @see HTTPInteraction.from_hash + # + # source://vcr//lib/vcr/structs.rb#512 + def to_hash; end + + class << self + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [HTTPInteraction] the HTTP interaction + # + # source://vcr//lib/vcr/structs.rb#524 + def from_hash(hash); end + end +end + +# Decorates an {HTTPInteraction} with additional methods useful +# for a `before_record` or `before_playback` hook. +# +# source://vcr//lib/vcr/structs.rb#538 +class VCR::HTTPInteraction::HookAware + # @return [HookAware] a new instance of HookAware + # + # source://vcr//lib/vcr/structs.rb#539 + def initialize(http_interaction); end + + # Replaces a string in any part of the HTTP interaction (headers, request body, + # response body, etc) with the given replacement text. + # + # @param text [#to_s] the text to replace + # @param replacement_text [#to_s] the text to put in its place + # + # source://vcr//lib/vcr/structs.rb#563 + def filter!(text, replacement_text); end + + # Flags the HTTP interaction so that VCR ignores it. This is useful in + # a {VCR::Configuration#before_record} or {VCR::Configuration#before_playback} + # hook so that VCR does not record or play it back. + # + # @see #ignored? + # + # source://vcr//lib/vcr/structs.rb#548 + def ignore!; end + + # @return [Boolean] whether or not this HTTP interaction should be ignored. + # @see #ignore! + # + # source://vcr//lib/vcr/structs.rb#554 + def ignored?; end + + private + + # source://vcr//lib/vcr/structs.rb#584 + def filter_hash!(hash, text, replacement_text); end + + # source://vcr//lib/vcr/structs.rb#571 + def filter_object!(object, text, replacement_text); end +end + +# @private +# +# source://vcr//lib/vcr/util/hooks.rb#5 +module VCR::Hooks + include ::VCR::VariableArgsBlockCaller + + mixes_in_class_methods ::VCR::Hooks::ClassMethods + + # source://vcr//lib/vcr/util/hooks.rb#34 + def clear_hooks; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/util/hooks.rb#44 + def has_hooks_for?(hook_type); end + + # source://vcr//lib/vcr/util/hooks.rb#38 + def hooks; end + + # source://vcr//lib/vcr/util/hooks.rb#28 + def invoke_hook(hook_type, *args); end + + class << self + # @private + # + # source://vcr//lib/vcr/util/hooks.rb#19 + def included(klass); end + end +end + +# @private +# +# source://vcr//lib/vcr/util/hooks.rb#49 +module VCR::Hooks::ClassMethods + # source://vcr//lib/vcr/util/hooks.rb#50 + def define_hook(hook_type, prepend = T.unsafe(nil)); end +end + +# @private +# +# source://vcr//lib/vcr/util/hooks.rb#9 +class VCR::Hooks::FilteredHook < ::Struct + include ::VCR::VariableArgsBlockCaller + + # source://vcr//lib/vcr/util/hooks.rb#12 + def conditionally_invoke(*args); end + + # Returns the value of attribute filters + # + # @return [Object] the current value of filters + def filters; end + + # Sets the attribute filters + # + # @param value [Object] the value to set the attribute filters to. + # @return [Object] the newly set value + def filters=(_); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook + def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value + def hook=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://vcr//lib/vcr/util/internet_connection.rb#26 +module VCR::InternetConnection + extend ::VCR::InternetConnection + + # @return [Boolean] + # + # source://vcr//lib/vcr/util/internet_connection.rb#31 + def available?; end +end + +# source://vcr//lib/vcr/util/internet_connection.rb#29 +VCR::InternetConnection::EXAMPLE_HOST = T.let(T.unsafe(nil), String) + +# @private +# +# source://vcr//lib/vcr/library_hooks.rb#3 +class VCR::LibraryHooks + # @return [Boolean] + # + # source://vcr//lib/vcr/library_hooks.rb#6 + def disabled?(hook); end + + # Returns the value of attribute exclusive_hook. + # + # source://vcr//lib/vcr/library_hooks.rb#4 + def exclusive_hook; end + + # Sets the attribute exclusive_hook + # + # @param value the value to set the attribute exclusive_hook to. + # + # source://vcr//lib/vcr/library_hooks.rb#4 + def exclusive_hook=(_arg0); end + + # source://vcr//lib/vcr/library_hooks.rb#10 + def exclusively_enabled(hook); end +end + +# A Cassette wrapper for linking cassettes from another thread +# +# source://vcr//lib/vcr/linked_cassette.rb#7 +class VCR::LinkedCassette < ::SimpleDelegator + # Prevents cassette ejection by raising EjectLinkedCassetteError + # + # @raise [Errors::EjectLinkedCassetteError] + # + # source://vcr//lib/vcr/linked_cassette.rb#62 + def eject(*args); end + + # @return [Boolean] true + # + # source://vcr//lib/vcr/linked_cassette.rb#68 + def linked?; end + + class << self + # Create a new CassetteList + # + # @param cassettes [Array] context-owned cassettes + # @param linked_cassettes [Array] context-unowned (linked) cassettes + # + # source://vcr//lib/vcr/linked_cassette.rb#57 + def list(cassettes, linked_cassettes); end + end +end + +# An enumerable lazily wrapping a list of cassettes that a context is using +# +# source://vcr//lib/vcr/linked_cassette.rb#8 +class VCR::LinkedCassette::CassetteList + include ::Enumerable + + # Creates a new list of context-owned cassettes and linked cassettes + # + # @param cassettes [Array] context-owned cassettes + # @param linked_cassettes [Array] context-unowned (linked) cassettes + # @return [CassetteList] a new instance of CassetteList + # + # source://vcr//lib/vcr/linked_cassette.rb#14 + def initialize(cassettes, linked_cassettes); end + + # Yields linked cassettes first, and then context-owned cassettes + # + # source://vcr//lib/vcr/linked_cassette.rb#20 + def each; end + + # Provide last implementation, which is not provided by Enumerable + # + # source://vcr//lib/vcr/linked_cassette.rb#31 + def last; end + + # Provide size implementation, which is not provided by Enumerable + # + # source://vcr//lib/vcr/linked_cassette.rb#40 + def size; end + + protected + + # source://vcr//lib/vcr/linked_cassette.rb#45 + def wrap(cassette); end +end + +# Provides log message formatting helper methods. +# +# @private +# +# source://vcr//lib/vcr/util/logger.rb#4 +class VCR::Logger + # @return [Logger] a new instance of Logger + # + # source://vcr//lib/vcr/util/logger.rb#5 + def initialize(stream); end + + # source://vcr//lib/vcr/util/logger.rb#9 + def log(message, log_prefix, indentation_level = T.unsafe(nil)); end + + # source://vcr//lib/vcr/util/logger.rb#15 + def request_summary(request, request_matchers); end + + # source://vcr//lib/vcr/util/logger.rb#22 + def response_summary(response); end +end + +# Provides common logger helper methods that simply delegate to +# the underlying logger object. +# +# @private +# +# source://vcr//lib/vcr/util/logger.rb#45 +module VCR::Logger::Mixin + # source://vcr//lib/vcr/util/logger.rb#46 + def log(message, indentation_level = T.unsafe(nil)); end + + # source://vcr//lib/vcr/util/logger.rb#50 + def request_summary(*args); end + + # source://vcr//lib/vcr/util/logger.rb#54 + def response_summary(*args); end +end + +# A null-object version of the Logger. Used when +# a `debug_logger` has not been set. +# +# @note We used to use a null object for the `debug_logger` itself, +# but some users noticed a negative perf impact from having the +# logger formatting logic still executing in that case, so we +# moved the null object interface up a layer to here. +# @private +# +# source://vcr//lib/vcr/util/logger.rb#34 +module VCR::Logger::Null + private + + # source://vcr//lib/vcr/util/logger.rb#37 + def log(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#38 + def request_summary(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#39 + def response_summary(*_arg0); end + + class << self + # source://vcr//lib/vcr/util/logger.rb#37 + def log(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#38 + def request_summary(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#39 + def response_summary(*_arg0); end + end +end + +# The main thread in which VCR was loaded +# +# source://vcr//lib/vcr.rb#30 +VCR::MainThread = T.let(T.unsafe(nil), Thread) + +# Contains middlewares for use with different libraries. +# +# source://vcr//lib/vcr.rb#39 +module VCR::Middleware; end + +# Object yielded by VCR's {Rack} middleware that allows you to configure +# the cassette dynamically based on the rack env. +# +# source://vcr//lib/vcr/middleware/rack.rb#5 +class VCR::Middleware::CassetteArguments + # @private + # @return [CassetteArguments] a new instance of CassetteArguments + # + # source://vcr//lib/vcr/middleware/rack.rb#7 + def initialize; end + + # Sets (and gets) the cassette name. + # + # @param name [#to_s] the cassette name + # @return [#to_s] the cassette name + # + # source://vcr//lib/vcr/middleware/rack.rb#16 + def name(name = T.unsafe(nil)); end + + # Sets (and gets) the cassette options. + # + # @param options [Hash] the cassette options + # @return [Hash] the cassette options + # + # source://vcr//lib/vcr/middleware/rack.rb#25 + def options(options = T.unsafe(nil)); end +end + +# Faraday middleware that VCR uses to record and replay HTTP requests made through +# Faraday. +# +# @note You can either insert this middleware into the Faraday middleware stack +# yourself or configure {VCR::Configuration#hook_into} to hook into `:faraday`. +# +# source://vcr//lib/vcr/middleware/faraday.rb#15 +class VCR::Middleware::Faraday + include ::VCR::Deprecations::Middleware::Faraday + + # Constructs a new instance of the Faraday middleware. + # + # @param app [#call] the faraday app + # @return [Faraday] a new instance of Faraday + # + # source://vcr//lib/vcr/middleware/faraday.rb#21 + def initialize(app); end + + # Handles the HTTP request being made through Faraday + # + # @param env [Hash] the Faraday request env hash + # + # source://vcr//lib/vcr/middleware/faraday.rb#29 + def call(env); end + + # Close any persistent connections. + # + # source://vcr//lib/vcr/middleware/faraday.rb#35 + def close; end +end + +# @private +# +# source://vcr//lib/vcr/middleware/faraday.rb#40 +class VCR::Middleware::Faraday::RequestHandler < ::VCR::RequestHandler + # @return [RequestHandler] a new instance of RequestHandler + # + # source://vcr//lib/vcr/middleware/faraday.rb#42 + def initialize(app, env); end + + # Returns the value of attribute app. + # + # source://vcr//lib/vcr/middleware/faraday.rb#41 + def app; end + + # Returns the value of attribute env. + # + # source://vcr//lib/vcr/middleware/faraday.rb#41 + def env; end + + # source://vcr//lib/vcr/middleware/faraday.rb#47 + def handle; end + + private + + # source://vcr//lib/vcr/middleware/faraday.rb#129 + def collect_chunks; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/middleware/faraday.rb#61 + def delay_finishing?; end + + # source://vcr//lib/vcr/middleware/faraday.rb#124 + def invoke_after_request_hook(response); end + + # source://vcr//lib/vcr/middleware/faraday.rb#94 + def on_ignored_request; end + + # source://vcr//lib/vcr/middleware/faraday.rb#113 + def on_recordable_request; end + + # source://vcr//lib/vcr/middleware/faraday.rb#100 + def on_stubbed_by_vcr_request; end + + # source://vcr//lib/vcr/middleware/faraday.rb#73 + def raw_body_from(body); end + + # source://vcr//lib/vcr/middleware/faraday.rb#81 + def response_for(response); end + + # source://vcr//lib/vcr/middleware/faraday.rb#139 + def restore_body_from_chunks(request); end + + # source://vcr//lib/vcr/middleware/faraday.rb#65 + def vcr_request; end +end + +# Rack middleware that uses a VCR cassette for each incoming HTTP request. +# +# @example +# app = Rack::Builder.new do +# use VCR::Middleware::Rack do |cassette, env| +# cassette.name "rack/#{env['SERVER_NAME']}" +# cassette.options :record => :new_episodes +# end +# +# run MyRackApp +# end +# @note This will record/replay _outbound_ HTTP requests made by your rack app. +# +# source://vcr//lib/vcr/middleware/rack.rb#43 +class VCR::Middleware::Rack + include ::VCR::VariableArgsBlockCaller + + # Constructs a new instance of VCR's rack middleware. + # + # @param app [#call] the rack app + # @raise [ArgumentError] if no configuration block is provided + # @return [Rack] a new instance of Rack + # @yield the cassette configuration block + # @yieldparam cassette [CassetteArguments] the cassette configuration object + # @yieldparam env [(optional) Hash] the rack env hash + # + # source://vcr//lib/vcr/middleware/rack.rb#53 + def initialize(app, &block); end + + # Implements the rack middleware interface. + # + # @param env [Hash] the rack env hash + # @return [Array(Integer, Hash, #each)] the rack response + # + # source://vcr//lib/vcr/middleware/rack.rb#62 + def call(env); end + + private + + # source://vcr//lib/vcr/middleware/rack.rb#72 + def cassette_arguments(env); end +end + +# @private +# +# source://vcr//lib/vcr/structs.rb#7 +module VCR::Normalizers; end + +# @private +# +# source://vcr//lib/vcr/structs.rb#9 +module VCR::Normalizers::Body + mixes_in_class_methods ::VCR::Normalizers::Body::ClassMethods + + # source://vcr//lib/vcr/structs.rb#61 + def initialize(*args); end + + private + + # source://vcr//lib/vcr/structs.rb#92 + def base_body_hash(body); end + + # source://vcr//lib/vcr/structs.rb#78 + def serializable_body; end + + class << self + # @private + # + # source://vcr//lib/vcr/structs.rb#10 + def included(klass); end + end +end + +# @private +# +# source://vcr//lib/vcr/structs.rb#15 +module VCR::Normalizers::Body::ClassMethods + # source://vcr//lib/vcr/structs.rb#16 + def body_from(hash_or_string); end + + # source://vcr//lib/vcr/structs.rb#29 + def force_encode_string(string, encoding); end + + # source://vcr//lib/vcr/structs.rb#34 + def try_encode_string(string, encoding); end +end + +# @private +# +# source://vcr//lib/vcr/structs.rb#103 +module VCR::Normalizers::Header + # source://vcr//lib/vcr/structs.rb#104 + def initialize(*args); end + + private + + # source://vcr//lib/vcr/structs.rb#153 + def convert_to_raw_strings(array); end + + # source://vcr//lib/vcr/structs.rb#146 + def delete_header(key); end + + # source://vcr//lib/vcr/structs.rb#139 + def edit_header(key, value = T.unsafe(nil)); end + + # source://vcr//lib/vcr/structs.rb#134 + def get_header(key); end + + # source://vcr//lib/vcr/structs.rb#129 + def header_key(key); end + + # source://vcr//lib/vcr/structs.rb#111 + def normalize_headers; end +end + +# @private +# +# source://vcr//lib/vcr/util/internet_connection.rb#8 +module VCR::Ping + private + + # source://vcr//lib/vcr/util/internet_connection.rb#9 + def pingecho(host, timeout = T.unsafe(nil), service = T.unsafe(nil)); end + + class << self + # source://vcr//lib/vcr/util/internet_connection.rb#9 + def pingecho(host, timeout = T.unsafe(nil), service = T.unsafe(nil)); end + end +end + +# Integrates VCR with RSpec. +# +# source://vcr//lib/vcr.rb#35 +module VCR::RSpec; end + +# @private +# +# source://vcr//lib/vcr/test_frameworks/rspec.rb#5 +module VCR::RSpec::Metadata + extend ::VCR::RSpec::Metadata + + # source://vcr//lib/vcr/test_frameworks/rspec.rb#30 + def configure!; end + + # source://vcr//lib/vcr/test_frameworks/rspec.rb#8 + def vcr_cassette_name_for(metadata); end +end + +# The request of an {HTTPInteraction}. +# +# @attr method [Symbol] the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete) +# @attr uri [String] the request URI +# @attr body [String, nil] the request body +# @attr headers [Hash{String => Array<String>}] the request headers +# +# source://vcr//lib/vcr/structs.rb#176 +class VCR::Request < ::Struct + include ::VCR::Normalizers::Header + include ::VCR::Normalizers::Body + extend ::VCR::Normalizers::Body::ClassMethods + + # @return [Request] a new instance of Request + # + # source://vcr//lib/vcr/structs.rb#180 + def initialize(*args); end + + # the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete) + # + # @return [Symbol] the current value of method + # + # source://vcr//lib/vcr/structs.rb#228 + def method(*args); end + + # Parses the URI using the configured `uri_parser`. + # + # @return [#schema, #host, #port, #path, #query] A parsed URI object. + # + # source://vcr//lib/vcr/structs.rb#223 + def parsed_uri; end + + # Builds a serializable hash from the request data. + # + # @return [Hash] hash that represents this request and can be easily + # serialized. + # @see Request.from_hash + # + # source://vcr//lib/vcr/structs.rb#197 + def to_hash; end + + private + + # source://vcr//lib/vcr/structs.rb#315 + def without_standard_port(uri); end + + class << self + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [Request] the request + # + # source://vcr//lib/vcr/structs.rb#210 + def from_hash(hash); end + end +end + +# Provides fiber-awareness for the {VCR::Configuration#around_http_request} hook. +# +# source://vcr//lib/vcr/structs.rb#296 +class VCR::Request::FiberAware + # Yields the fiber so the request can proceed. + # + # @return [VCR::Response] the response from the request + # + # source://vcr//lib/vcr/structs.rb#297 + def proceed; end + + # Builds a proc that allows the request to proceed when called. + # This allows you to treat the request as a proc and pass it on + # to a method that yields (at which point the request will proceed). + # + # @return [Proc] the proc + # + # source://vcr//lib/vcr/structs.rb#306 + def to_proc; end +end + +# Decorates a {Request} with its current type. +# +# source://vcr//lib/vcr/structs.rb#235 +class VCR::Request::Typed + # @param request [Request] the request + # @param type [Symbol] the type. Should be one of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`. + # @return [Typed] a new instance of Typed + # + # source://vcr//lib/vcr/structs.rb#240 + def initialize(request, type); end + + # @return [Boolean] whether or not this request is being stubbed by an + # external library (such as WebMock). + # @see #stubbed_by_vcr? + # @see #stubbed? + # + # source://vcr//lib/vcr/structs.rb#261 + def externally_stubbed?; end + + # @return [Boolean] whether or not this request is being ignored + # + # source://vcr//lib/vcr/structs.rb#246 + def ignored?; end + + # @note VCR allows `:ignored` and `:recordable` requests to be made for real. + # @return [Boolean] whether or not this request will be made for real. + # + # source://vcr//lib/vcr/structs.rb#277 + def real?; end + + # @return [Boolean] whether or not this request will be recorded. + # + # source://vcr//lib/vcr/structs.rb#266 + def recordable?; end + + # @return [Boolean] whether or not this request will be stubbed. + # It may be stubbed by an external library or by VCR. + # @see #stubbed_by_vcr? + # @see #externally_stubbed? + # + # source://vcr//lib/vcr/structs.rb#285 + def stubbed?; end + + # @return [Boolean] whether or not this request is being stubbed by VCR + # @see #externally_stubbed? + # @see #stubbed? + # + # source://vcr//lib/vcr/structs.rb#253 + def stubbed_by_vcr?; end + + # @return [Symbol] One of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`. + # + # source://vcr//lib/vcr/structs.rb#236 + def type; end + + # @return [Boolean] whether or not VCR knows how to handle this request. + # + # source://vcr//lib/vcr/structs.rb#271 + def unhandled?; end +end + +# @private +# +# source://vcr//lib/vcr/request_handler.rb#3 +class VCR::RequestHandler + include ::VCR::Logger::Mixin + + # source://vcr//lib/vcr/request_handler.rb#6 + def handle; end + + private + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#62 + def disabled?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#54 + def externally_stubbed?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#66 + def has_response_stub?(consume_stub); end + + # source://vcr//lib/vcr/request_handler.rb#49 + def invoke_after_request_hook(vcr_response); end + + # source://vcr//lib/vcr/request_handler.rb#43 + def invoke_before_request_hook; end + + # source://vcr//lib/vcr/request_handler.rb#78 + def library_name; end + + # source://vcr//lib/vcr/request_handler.rb#110 + def log_prefix; end + + # Subclasses can implement these + # + # source://vcr//lib/vcr/request_handler.rb#84 + def on_externally_stubbed_request; end + + # source://vcr//lib/vcr/request_handler.rb#87 + def on_ignored_request; end + + # source://vcr//lib/vcr/request_handler.rb#93 + def on_recordable_request; end + + # source://vcr//lib/vcr/request_handler.rb#90 + def on_stubbed_by_vcr_request; end + + # @raise [VCR::Errors::UnhandledHTTPRequestError] + # + # source://vcr//lib/vcr/request_handler.rb#96 + def on_unhandled_request; end + + # source://vcr//lib/vcr/request_handler.rb#100 + def request_summary; end + + # source://vcr//lib/vcr/request_handler.rb#33 + def request_type(consume_stub = T.unsafe(nil)); end + + # source://vcr//lib/vcr/request_handler.rb#29 + def set_typed_request_for_after_hook(request_type); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#58 + def should_ignore?; end + + # source://vcr//lib/vcr/request_handler.rb#74 + def stubbed_response; end +end + +# @private +# +# source://vcr//lib/vcr/request_ignorer.rb#6 +class VCR::RequestIgnorer + include ::VCR::VariableArgsBlockCaller + include ::VCR::Hooks + include ::VCR::RequestIgnorer::DefinedHooks + extend ::VCR::Hooks::ClassMethods + + # @return [RequestIgnorer] a new instance of RequestIgnorer + # + # source://vcr//lib/vcr/request_ignorer.rb#13 + def initialize; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_ignorer.rb#40 + def ignore?(request); end + + # source://vcr//lib/vcr/request_ignorer.rb#32 + def ignore_hosts(*hosts); end + + # source://vcr//lib/vcr/request_ignorer.rb#20 + def ignore_localhost=(value); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_ignorer.rb#28 + def localhost_ignored?; end + + # source://vcr//lib/vcr/request_ignorer.rb#36 + def unignore_hosts(*hosts); end + + private + + # source://vcr//lib/vcr/request_ignorer.rb#46 + def ignored_hosts; end +end + +# source://vcr//lib/vcr/request_ignorer.rb#0 +module VCR::RequestIgnorer::DefinedHooks + # source://vcr//lib/vcr/util/hooks.rb#55 + def ignore_request(*filters, &hook); end +end + +# source://vcr//lib/vcr/request_ignorer.rb#11 +VCR::RequestIgnorer::LOCALHOST_ALIASES = T.let(T.unsafe(nil), Array) + +# Keeps track of the different request matchers. +# +# source://vcr//lib/vcr/request_matcher_registry.rb#5 +class VCR::RequestMatcherRegistry + # @private + # @return [RequestMatcherRegistry] a new instance of RequestMatcherRegistry + # + # source://vcr//lib/vcr/request_matcher_registry.rb#49 + def initialize; end + + # @private + # + # source://vcr//lib/vcr/request_matcher_registry.rb#64 + def [](matcher); end + + # @private + # + # source://vcr//lib/vcr/request_matcher_registry.rb#55 + def register(name, &block); end + + # Builds a dynamic request matcher that matches on a URI while ignoring the + # named query parameters. This is useful for dealing with non-deterministic + # URIs (i.e. that have a timestamp or request signature parameter). + # + # @example + # without_timestamp = VCR.request_matchers.uri_without_param(:timestamp) + # + # # use it directly... + # VCR.use_cassette('example', :match_requests_on => [:method, without_timestamp]) { } + # + # # ...or register it as a named matcher + # VCR.configure do |c| + # c.register_request_matcher(:uri_without_timestamp, &without_timestamp) + # end + # + # VCR.use_cassette('example', :match_requests_on => [:method, :uri_without_timestamp]) { } + # @param ignores [Array<#to_s>] The names of the query parameters to ignore + # @return [#call] the request matcher + # + # source://vcr//lib/vcr/request_matcher_registry.rb#91 + def uri_without_param(*ignores); end + + # Builds a dynamic request matcher that matches on a URI while ignoring the + # named query parameters. This is useful for dealing with non-deterministic + # URIs (i.e. that have a timestamp or request signature parameter). + # + # @example + # without_timestamp = VCR.request_matchers.uri_without_param(:timestamp) + # + # # use it directly... + # VCR.use_cassette('example', :match_requests_on => [:method, without_timestamp]) { } + # + # # ...or register it as a named matcher + # VCR.configure do |c| + # c.register_request_matcher(:uri_without_timestamp, &without_timestamp) + # end + # + # VCR.use_cassette('example', :match_requests_on => [:method, :uri_without_timestamp]) { } + # @param ignores [Array<#to_s>] The names of the query parameters to ignore + # @return [#call] the request matcher + # + # source://vcr//lib/vcr/request_matcher_registry.rb#91 + def uri_without_params(*ignores); end + + private + + # source://vcr//lib/vcr/request_matcher_registry.rb#105 + def raise_unregistered_matcher_error(name); end + + # source://vcr//lib/vcr/request_matcher_registry.rb#111 + def register_built_ins; end + + # source://vcr//lib/vcr/request_matcher_registry.rb#132 + def try_to_register_body_as_json; end + + # source://vcr//lib/vcr/request_matcher_registry.rb#98 + def uri_without_param_matchers; end +end + +# The default request matchers used for any cassette that does not +# specify request matchers. +# +# source://vcr//lib/vcr/request_matcher_registry.rb#9 +VCR::RequestMatcherRegistry::DEFAULT_MATCHERS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/request_matcher_registry.rb#12 +class VCR::RequestMatcherRegistry::Matcher < ::Struct + # @return [Boolean] + # + # source://vcr//lib/vcr/request_matcher_registry.rb#13 + def matches?(request_1, request_2); end +end + +# @private +# +# source://vcr//lib/vcr/request_matcher_registry.rb#19 +class VCR::RequestMatcherRegistry::URIWithoutParamsMatcher < ::Struct + # source://vcr//lib/vcr/request_matcher_registry.rb#39 + def call(request_1, request_2); end + + # source://vcr//lib/vcr/request_matcher_registry.rb#20 + def partial_uri_from(request); end + + # source://vcr//lib/vcr/request_matcher_registry.rb#43 + def to_proc; end +end + +# The response of an {HTTPInteraction}. +# +# @attr status [ResponseStatus] the status of the response +# @attr headers [Hash{String => Array<String>}] the response headers +# @attr body [String] the response body +# @attr http_version [nil, String] the HTTP version +# @attr adapter_metadata [Hash] Additional metadata used by a specific VCR adapter. +# +# source://vcr//lib/vcr/structs.rb#331 +class VCR::Response < ::Struct + include ::VCR::Normalizers::Header + include ::VCR::Normalizers::Body + extend ::VCR::Normalizers::Body::ClassMethods + + # @return [Response] a new instance of Response + # + # source://vcr//lib/vcr/structs.rb#335 + def initialize(*args); end + + # Checks if the type of encoding is one of "gzip" or "deflate". + # + # @return [Boolean] + # + # source://vcr//lib/vcr/structs.rb#382 + def compressed?; end + + # The type of encoding. + # + # @return [String] encoding type + # + # source://vcr//lib/vcr/structs.rb#377 + def content_encoding; end + + # Decodes the compressed body and deletes evidence that it was ever compressed. + # + # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding + # is not a known encoding. + # @return self + # + # source://vcr//lib/vcr/structs.rb#396 + def decompress; end + + # Recompresses the decompressed body according to adapter metadata. + # + # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding + # stored in the adapter metadata is unknown + # + # source://vcr//lib/vcr/structs.rb#410 + def recompress; end + + # Builds a serializable hash from the response data. + # + # @return [Hash] hash that represents this response + # and can be easily serialized. + # @see Response.from_hash + # + # source://vcr//lib/vcr/structs.rb#345 + def to_hash; end + + # Updates the Content-Length response header so that it is + # accurate for the response body. + # + # source://vcr//lib/vcr/structs.rb#370 + def update_content_length_header; end + + # Checks if VCR decompressed the response body + # + # @return [Boolean] + # + # source://vcr//lib/vcr/structs.rb#387 + def vcr_decompressed?; end + + class << self + # Decode string compressed with gzip or deflate + # + # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding + # is not a known encoding. + # + # source://vcr//lib/vcr/structs.rb#449 + def decompress(body, type); end + + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [Response] the response + # + # source://vcr//lib/vcr/structs.rb#360 + def from_hash(hash); end + end +end + +# source://vcr//lib/vcr/structs.rb#440 +VCR::Response::HAVE_ZLIB = T.let(T.unsafe(nil), TrueClass) + +# The response status of an {HTTPInteraction}. +# +# @attr code [Integer] the HTTP status code +# @attr message [String] the HTTP status message (e.g. "OK" for a status of 200) +# +# source://vcr//lib/vcr/structs.rb#480 +class VCR::ResponseStatus < ::Struct + # Builds a serializable hash from the response status data. + # + # @return [Hash] hash that represents this response status + # and can be easily serialized. + # @see ResponseStatus.from_hash + # + # source://vcr//lib/vcr/structs.rb#481 + def to_hash; end + + class << self + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [ResponseStatus] the response status + # + # source://vcr//lib/vcr/structs.rb#491 + def from_hash(hash); end + end +end + +# @private +# +# source://vcr//lib/vcr/util/variable_args_block_caller.rb#3 +module VCR::VariableArgsBlockCaller + # source://vcr//lib/vcr/util/variable_args_block_caller.rb#4 + def call_block(block, *args); end +end + +# @private +# +# source://vcr//lib/vcr/util/version_checker.rb#3 +class VCR::VersionChecker + # @return [VersionChecker] a new instance of VersionChecker + # + # source://vcr//lib/vcr/util/version_checker.rb#4 + def initialize(library_name, library_version, min_version); end + + # source://vcr//lib/vcr/util/version_checker.rb#13 + def check_version!; end + + private + + # source://vcr//lib/vcr/util/version_checker.rb#29 + def compare_version; end + + # source://vcr//lib/vcr/util/version_checker.rb#43 + def parse_version(version); end + + # @raise [Errors::LibraryVersionTooLowError] + # + # source://vcr//lib/vcr/util/version_checker.rb#23 + def raise_too_low_error; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/util/version_checker.rb#19 + def too_low?; end + + # source://vcr//lib/vcr/util/version_checker.rb#39 + def version_requirement; end +end diff --git a/sorbet/rbi/gems/webmock@3.19.1.rbi b/sorbet/rbi/gems/webmock@3.19.1.rbi new file mode 100644 index 0000000000..0c7f6228df --- /dev/null +++ b/sorbet/rbi/gems/webmock@3.19.1.rbi @@ -0,0 +1,1820 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `webmock` gem. +# Please instead update this file by running `bin/tapioca gem webmock`. + +# source://webmock//lib/webmock/http_lib_adapters/net_http_response.rb#18 +module Net::WebMockHTTPResponse + # source://webmock//lib/webmock/http_lib_adapters/net_http_response.rb#19 + def read_body(dest = T.unsafe(nil), &block); end +end + +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#208 +class StubSocket + # @return [StubSocket] a new instance of StubSocket + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#212 + def initialize(*args); end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#220 + def close; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#216 + def closed?; end + + # Returns the value of attribute continue_timeout. + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + def continue_timeout; end + + # Sets the attribute continue_timeout + # + # @param value the value to set the attribute continue_timeout to. + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + def continue_timeout=(_arg0); end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#228 + def io; end + + # Returns the value of attribute read_timeout. + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + def read_timeout; end + + # Sets the attribute read_timeout + # + # @param value the value to set the attribute read_timeout to. + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + def read_timeout=(_arg0); end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#225 + def readuntil(*args); end + + # Returns the value of attribute write_timeout. + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + def write_timeout; end + + # Sets the attribute write_timeout + # + # @param value the value to set the attribute write_timeout to. + # + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#210 + def write_timeout=(_arg0); end +end + +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#232 +class StubSocket::StubIO + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#237 + def cipher; end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#234 + def peer_cert; end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#235 + def peeraddr; end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#233 + def setsockopt(*args); end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#236 + def ssl_version; end +end + +# source://webmock//lib/webmock/deprecation.rb#3 +module WebMock + include ::WebMock::API + extend ::WebMock::API + + def after_request(*args, &block); end + def allow_net_connect!(*args, &block); end + def disable_net_connect!(*args, &block); end + def net_connect_allowed?(*args, &block); end + def registered_request?(*args, &block); end + def reset_callbacks(*args, &block); end + def reset_webmock(*args, &block); end + + class << self + # source://webmock//lib/webmock/webmock.rb#143 + def after_request(options = T.unsafe(nil), &block); end + + # source://webmock//lib/webmock/webmock.rb#46 + def allow_net_connect!(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/webmock.rb#30 + def disable!(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/webmock.rb#51 + def disable_net_connect!(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/webmock.rb#51 + def disallow_net_connect!(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/webmock.rb#38 + def enable!(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/webmock.rb#46 + def enable_net_connect!(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/webmock.rb#155 + def globally_stub_request(order = T.unsafe(nil), &block); end + + # source://webmock//lib/webmock/webmock.rb#109 + def hide_body_diff!; end + + # source://webmock//lib/webmock/webmock.rb#117 + def hide_stubbing_instructions!; end + + # @private + # + # source://webmock//lib/webmock/webmock.rb#5 + def included(clazz); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/webmock.rb#63 + def net_connect_allowed?(uri = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/webmock.rb#85 + def net_connect_explicit_allowed?(allowed, uri = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/webmock.rb#75 + def net_http_connect_on_start?(uri); end + + # source://webmock//lib/webmock/webmock.rb#151 + def print_executed_requests; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/webmock.rb#147 + def registered_request?(request_signature); end + + # source://webmock//lib/webmock/api.rb#14 + def request(method, uri); end + + # source://webmock//lib/webmock/webmock.rb#129 + def reset!; end + + # source://webmock//lib/webmock/webmock.rb#139 + def reset_callbacks; end + + # source://webmock//lib/webmock/webmock.rb#134 + def reset_webmock; end + + # source://webmock//lib/webmock/webmock.rb#105 + def show_body_diff!; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/webmock.rb#113 + def show_body_diff?; end + + # source://webmock//lib/webmock/webmock.rb#121 + def show_stubbing_instructions!; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/webmock.rb#125 + def show_stubbing_instructions?; end + + # source://webmock//lib/webmock/webmock.rb#26 + def version; end + end +end + +# source://webmock//lib/webmock/api.rb#4 +module WebMock::API + extend ::WebMock::API + + # source://webmock//lib/webmock/api.rb#14 + def a_request(method, uri); end + + # source://webmock//lib/webmock/api.rb#31 + def assert_not_requested(*args, &block); end + + # source://webmock//lib/webmock/api.rb#22 + def assert_requested(*args, &block); end + + # source://webmock//lib/webmock/api.rb#59 + def hash_excluding(*args); end + + # Similar to RSpec::Mocks::ArgumentMatchers#hash_including() + # + # Matches a hash that includes the specified key(s) or key/value pairs. + # Ignores any additional keys. + # + # @example + # + # object.should_receive(:message).with(hash_including(:key => val)) + # object.should_receive(:message).with(hash_including(:key)) + # object.should_receive(:message).with(hash_including(:key, :key2 => val2)) + # + # source://webmock//lib/webmock/api.rb#51 + def hash_including(*args); end + + # source://webmock//lib/webmock/api.rb#31 + def refute_requested(*args, &block); end + + # source://webmock//lib/webmock/api.rb#67 + def remove_request_stub(stub); end + + # source://webmock//lib/webmock/api.rb#71 + def reset_executed_requests!; end + + # source://webmock//lib/webmock/api.rb#7 + def stub_http_request(method, uri); end + + # source://webmock//lib/webmock/api.rb#7 + def stub_request(method, uri); end + + private + + # this is a based on RSpec::Mocks::ArgumentMatchers#anythingize_lonely_keys + # + # source://webmock//lib/webmock/api.rb#104 + def anythingize_lonely_keys(*args); end + + # source://webmock//lib/webmock/api.rb#95 + def assert_request_not_requested(request, options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/api.rb#86 + def assert_request_requested(request, options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/api.rb#77 + def convert_uri_method_and_options_to_request_and_options(method, uri, options, &block); end + + class << self + # source://webmock//lib/webmock/api.rb#14 + def request(method, uri); end + end +end + +# source://webmock//lib/webmock/assertion_failure.rb#4 +class WebMock::AssertionFailure + class << self + # Returns the value of attribute error_class. + # + # source://webmock//lib/webmock/assertion_failure.rb#7 + def error_class; end + + # Sets the attribute error_class + # + # @param value the value to set the attribute error_class to. + # + # source://webmock//lib/webmock/assertion_failure.rb#7 + def error_class=(_arg0); end + + # @raise [@error_class] + # + # source://webmock//lib/webmock/assertion_failure.rb#8 + def failure(message); end + end +end + +# source://webmock//lib/webmock/request_pattern.rb#252 +class WebMock::BodyPattern + include ::WebMock::RSpecMatcherDetector + + # @return [BodyPattern] a new instance of BodyPattern + # + # source://webmock//lib/webmock/request_pattern.rb#270 + def initialize(pattern); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#280 + def matches?(body, content_type = T.unsafe(nil)); end + + # Returns the value of attribute pattern. + # + # source://webmock//lib/webmock/request_pattern.rb#268 + def pattern; end + + # source://webmock//lib/webmock/request_pattern.rb#297 + def to_s; end + + private + + # source://webmock//lib/webmock/request_pattern.rb#319 + def assert_non_multipart_body(content_type); end + + # source://webmock//lib/webmock/request_pattern.rb#303 + def body_as_hash(body, content_type); end + + # source://webmock//lib/webmock/request_pattern.rb#314 + def body_format(content_type); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#378 + def empty_string?(string); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#358 + def matching_body_array?(query_parameters, pattern, content_type); end + + # Compare two hashes for equality + # + # For two hashes to match they must have the same length and all + # values must match when compared using `#===`. + # + # The following hashes are examples of matches: + # + # {a: /\d+/} and {a: '123'} + # + # {a: '123'} and {a: '123'} + # + # {a: {b: /\d+/}} and {a: {b: '123'}} + # + # {a: {b: 'wow'}} and {a: {b: 'wow'}} + # + # @param query_parameters [Hash] typically the result of parsing + # JSON, XML or URL encoded parameters. + # @param pattern [Hash] which contains keys with a string, hash or + # regular expression value to use for comparison. + # @return [Boolean] true if the paramaters match the comparison + # hash, false if not. + # + # source://webmock//lib/webmock/request_pattern.rb#348 + def matching_body_hashes?(query_parameters, pattern, content_type); end + + # source://webmock//lib/webmock/request_pattern.rb#370 + def matching_values(actual, expected, content_type); end + + # source://webmock//lib/webmock/request_pattern.rb#382 + def normalize_hash(hash); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#386 + def url_encoded_body?(content_type); end +end + +# source://webmock//lib/webmock/request_pattern.rb#255 +WebMock::BodyPattern::BODY_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://webmock//lib/webmock/callback_registry.rb#4 +class WebMock::CallbackRegistry + class << self + # source://webmock//lib/webmock/callback_registry.rb#7 + def add_callback(options, block); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/callback_registry.rb#32 + def any_callbacks?; end + + # source://webmock//lib/webmock/callback_registry.rb#11 + def callbacks; end + + # source://webmock//lib/webmock/callback_registry.rb#15 + def invoke_callbacks(options, request_signature, response); end + + # source://webmock//lib/webmock/callback_registry.rb#28 + def reset; end + end +end + +# source://webmock//lib/webmock/config.rb#4 +class WebMock::Config + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Config] a new instance of Config + # + # source://webmock//lib/webmock/config.rb#7 + def initialize; end + + # Returns the value of attribute allow. + # + # source://webmock//lib/webmock/config.rb#14 + def allow; end + + # Sets the attribute allow + # + # @param value the value to set the attribute allow to. + # + # source://webmock//lib/webmock/config.rb#14 + def allow=(_arg0); end + + # Returns the value of attribute allow_localhost. + # + # source://webmock//lib/webmock/config.rb#13 + def allow_localhost; end + + # Sets the attribute allow_localhost + # + # @param value the value to set the attribute allow_localhost to. + # + # source://webmock//lib/webmock/config.rb#13 + def allow_localhost=(_arg0); end + + # Returns the value of attribute allow_net_connect. + # + # source://webmock//lib/webmock/config.rb#12 + def allow_net_connect; end + + # Sets the attribute allow_net_connect + # + # @param value the value to set the attribute allow_net_connect to. + # + # source://webmock//lib/webmock/config.rb#12 + def allow_net_connect=(_arg0); end + + # Returns the value of attribute net_http_connect_on_start. + # + # source://webmock//lib/webmock/config.rb#15 + def net_http_connect_on_start; end + + # Sets the attribute net_http_connect_on_start + # + # @param value the value to set the attribute net_http_connect_on_start to. + # + # source://webmock//lib/webmock/config.rb#15 + def net_http_connect_on_start=(_arg0); end + + # Returns the value of attribute query_values_notation. + # + # source://webmock//lib/webmock/config.rb#17 + def query_values_notation; end + + # Sets the attribute query_values_notation + # + # @param value the value to set the attribute query_values_notation to. + # + # source://webmock//lib/webmock/config.rb#17 + def query_values_notation=(_arg0); end + + # Returns the value of attribute show_body_diff. + # + # source://webmock//lib/webmock/config.rb#18 + def show_body_diff; end + + # Sets the attribute show_body_diff + # + # @param value the value to set the attribute show_body_diff to. + # + # source://webmock//lib/webmock/config.rb#18 + def show_body_diff=(_arg0); end + + # Returns the value of attribute show_stubbing_instructions. + # + # source://webmock//lib/webmock/config.rb#16 + def show_stubbing_instructions; end + + # Sets the attribute show_stubbing_instructions + # + # @param value the value to set the attribute show_stubbing_instructions to. + # + # source://webmock//lib/webmock/config.rb#16 + def show_stubbing_instructions=(_arg0); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://webmock//lib/webmock/deprecation.rb#4 +class WebMock::Deprecation + class << self + # source://webmock//lib/webmock/deprecation.rb#6 + def warning(message); end + end +end + +# source://webmock//lib/webmock/response.rb#149 +class WebMock::DynamicResponse < ::WebMock::Response + # @return [DynamicResponse] a new instance of DynamicResponse + # + # source://webmock//lib/webmock/response.rb#152 + def initialize(responder); end + + # source://webmock//lib/webmock/response.rb#156 + def evaluate(request_signature); end + + # Returns the value of attribute responder. + # + # source://webmock//lib/webmock/response.rb#150 + def responder; end + + # Sets the attribute responder + # + # @param value the value to set the attribute responder to. + # + # source://webmock//lib/webmock/response.rb#150 + def responder=(_arg0); end +end + +# source://webmock//lib/webmock/util/hash_validator.rb#4 +class WebMock::HashValidator + # @return [HashValidator] a new instance of HashValidator + # + # source://webmock//lib/webmock/util/hash_validator.rb#5 + def initialize(hash); end + + # This code is based on https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/hash/keys.rb + # + # source://webmock//lib/webmock/util/hash_validator.rb#10 + def validate_keys(*valid_keys); end +end + +# source://webmock//lib/webmock/request_pattern.rb#391 +class WebMock::HeadersPattern + # @return [HeadersPattern] a new instance of HeadersPattern + # + # source://webmock//lib/webmock/request_pattern.rb#392 + def initialize(pattern); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#396 + def matches?(headers); end + + # source://webmock//lib/webmock/request_pattern.rb#412 + def pp_to_s; end + + # source://webmock//lib/webmock/request_pattern.rb#408 + def to_s; end + + private + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#418 + def empty_headers?(headers); end +end + +# source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter.rb#4 +class WebMock::HttpLibAdapter + class << self + # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter.rb#5 + def adapter_for(lib); end + end +end + +# source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#4 +class WebMock::HttpLibAdapterRegistry + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [HttpLibAdapterRegistry] a new instance of HttpLibAdapterRegistry + # + # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#9 + def initialize; end + + # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#17 + def each_adapter(&block); end + + # Returns the value of attribute http_lib_adapters. + # + # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#7 + def http_lib_adapters; end + + # Sets the attribute http_lib_adapters + # + # @param value the value to set the attribute http_lib_adapters to. + # + # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#7 + def http_lib_adapters=(_arg0); end + + # source://webmock//lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb#13 + def register(lib, adapter); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#10 +module WebMock::HttpLibAdapters; end + +# source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#15 +class WebMock::HttpLibAdapters::ExconAdapter < ::WebMock::HttpLibAdapter + class << self + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#37 + def add_excon_stub; end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#120 + def body_from(params); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#110 + def build_request(params); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#81 + def connection_params_from(hash); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#33 + def disable!; end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#29 + def enable!; end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#54 + def handle_request(params); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#140 + def mock_response(real); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#74 + def new_excon_connection(params); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#148 + def perform_callbacks(request, response, options = T.unsafe(nil)); end + + # @raise [Excon::Errors::Timeout] + # + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#129 + def real_response(mock); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#47 + def remove_excon_stub; end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#87 + def request_params_from(hash); end + + # source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#96 + def to_query(hash); end + end +end + +# source://webmock//lib/webmock/http_lib_adapters/excon_adapter.rb#16 +WebMock::HttpLibAdapters::ExconAdapter::PARAMS_TO_DELETE = T.let(T.unsafe(nil), Array) + +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#11 +class WebMock::HttpLibAdapters::NetHttpAdapter < ::WebMock::HttpLibAdapter + class << self + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#23 + def disable!; end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#16 + def enable!; end + end +end + +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#14 +WebMock::HttpLibAdapters::NetHttpAdapter::OriginalNetHTTP = Net::HTTP + +# source://webmock//lib/webmock/matchers/hash_argument_matcher.rb#4 +module WebMock::Matchers; end + +# this is a based on RSpec::Mocks::ArgumentMatchers::AnyArgMatcher +# +# source://webmock//lib/webmock/matchers/any_arg_matcher.rb#6 +class WebMock::Matchers::AnyArgMatcher + # @return [AnyArgMatcher] a new instance of AnyArgMatcher + # + # source://webmock//lib/webmock/matchers/any_arg_matcher.rb#7 + def initialize(ignore); end + + # source://webmock//lib/webmock/matchers/any_arg_matcher.rb#10 + def ==(other); end +end + +# Base class for Hash matchers +# https://github.com/rspec/rspec-mocks/blob/master/lib/rspec/mocks/argument_matchers.rb +# +# source://webmock//lib/webmock/matchers/hash_argument_matcher.rb#7 +class WebMock::Matchers::HashArgumentMatcher + # @return [HashArgumentMatcher] a new instance of HashArgumentMatcher + # + # source://webmock//lib/webmock/matchers/hash_argument_matcher.rb#8 + def initialize(expected); end + + # source://webmock//lib/webmock/matchers/hash_argument_matcher.rb#12 + def ==(_actual, &block); end + + class << self + # source://webmock//lib/webmock/matchers/hash_argument_matcher.rb#18 + def from_rspec_matcher(matcher); end + end +end + +# this is a based on RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher +# https://github.com/rspec/rspec-mocks/blob/master/lib/rspec/mocks/argument_matchers.rb +# +# source://webmock//lib/webmock/matchers/hash_excluding_matcher.rb#7 +class WebMock::Matchers::HashExcludingMatcher < ::WebMock::Matchers::HashArgumentMatcher + # source://webmock//lib/webmock/matchers/hash_excluding_matcher.rb#8 + def ==(actual); end + + # source://webmock//lib/webmock/matchers/hash_excluding_matcher.rb#12 + def inspect; end +end + +# this is a based on RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher +# https://github.com/rspec/rspec-mocks/blob/master/lib/rspec/mocks/argument_matchers.rb +# +# source://webmock//lib/webmock/matchers/hash_including_matcher.rb#7 +class WebMock::Matchers::HashIncludingMatcher < ::WebMock::Matchers::HashArgumentMatcher + # source://webmock//lib/webmock/matchers/hash_including_matcher.rb#8 + def ==(actual); end + + # source://webmock//lib/webmock/matchers/hash_including_matcher.rb#14 + def inspect; end +end + +# source://webmock//lib/webmock/request_pattern.rb#95 +class WebMock::MethodPattern + # @return [MethodPattern] a new instance of MethodPattern + # + # source://webmock//lib/webmock/request_pattern.rb#96 + def initialize(pattern); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#100 + def matches?(method); end + + # source://webmock//lib/webmock/request_pattern.rb#104 + def to_s; end +end + +# source://webmock//lib/webmock/errors.rb#5 +class WebMock::NetConnectNotAllowedError < ::Exception + # @return [NetConnectNotAllowedError] a new instance of NetConnectNotAllowedError + # + # source://webmock//lib/webmock/errors.rb#6 + def initialize(request_signature); end +end + +# source://webmock//lib/webmock/http_lib_adapters/net_http.rb#242 +module WebMock::NetHTTPUtility + class << self + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#281 + def check_right_http_connection; end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#272 + def get_uri(net_http, path = T.unsafe(nil)); end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#285 + def puts_warning_for_right_http_if_needed; end + + # source://webmock//lib/webmock/http_lib_adapters/net_http.rb#244 + def request_signature_from_request(net_http, request, body = T.unsafe(nil)); end + end +end + +# source://webmock//lib/webmock/request_pattern.rb#5 +module WebMock::RSpecMatcherDetector + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#10 + def rSpecHashExcludingMatcher?(matcher); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#6 + def rSpecHashIncludingMatcher?(matcher); end +end + +# source://webmock//lib/webmock/rack_response.rb#4 +class WebMock::RackResponse < ::WebMock::Response + # @return [RackResponse] a new instance of RackResponse + # + # source://webmock//lib/webmock/rack_response.rb#5 + def initialize(app); end + + # source://webmock//lib/webmock/rack_response.rb#21 + def body_from_rack_response(response); end + + # source://webmock//lib/webmock/rack_response.rb#28 + def build_rack_env(request); end + + # source://webmock//lib/webmock/rack_response.rb#9 + def evaluate(request); end + + # source://webmock//lib/webmock/rack_response.rb#63 + def session; end + + # source://webmock//lib/webmock/rack_response.rb#67 + def session_options; end +end + +# source://webmock//lib/webmock/request_body_diff.rb#7 +class WebMock::RequestBodyDiff + # @return [RequestBodyDiff] a new instance of RequestBodyDiff + # + # source://webmock//lib/webmock/request_body_diff.rb#9 + def initialize(request_signature, request_stub); end + + # source://webmock//lib/webmock/request_body_diff.rb#14 + def body_diff; end + + private + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_body_diff.rb#57 + def parseable_json?(body_pattern); end + + # Returns the value of attribute request_signature. + # + # source://webmock//lib/webmock/request_body_diff.rb#20 + def request_signature; end + + # source://webmock//lib/webmock/request_body_diff.rb#33 + def request_signature_body_hash; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_body_diff.rb#25 + def request_signature_diffable?; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_body_diff.rb#49 + def request_signature_parseable_json?; end + + # Returns the value of attribute request_stub. + # + # source://webmock//lib/webmock/request_body_diff.rb#20 + def request_stub; end + + # source://webmock//lib/webmock/request_body_diff.rb#43 + def request_stub_body; end + + # source://webmock//lib/webmock/request_body_diff.rb#37 + def request_stub_body_hash; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_body_diff.rb#29 + def request_stub_diffable?; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_body_diff.rb#53 + def request_stub_parseable_json?; end +end + +# source://webmock//lib/webmock/request_execution_verifier.rb#4 +class WebMock::RequestExecutionVerifier + # @return [RequestExecutionVerifier] a new instance of RequestExecutionVerifier + # + # source://webmock//lib/webmock/request_execution_verifier.rb#8 + def initialize(request_pattern = T.unsafe(nil), expected_times_executed = T.unsafe(nil), at_least_times_executed = T.unsafe(nil), at_most_times_executed = T.unsafe(nil)); end + + # Returns the value of attribute at_least_times_executed. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def at_least_times_executed; end + + # Sets the attribute at_least_times_executed + # + # @param value the value to set the attribute at_least_times_executed to. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def at_least_times_executed=(_arg0); end + + # Returns the value of attribute at_most_times_executed. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def at_most_times_executed; end + + # Sets the attribute at_most_times_executed + # + # @param value the value to set the attribute at_most_times_executed to. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def at_most_times_executed=(_arg0); end + + # source://webmock//lib/webmock/request_execution_verifier.rb#38 + def description; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_execution_verifier.rb#28 + def does_not_match?; end + + # Returns the value of attribute expected_times_executed. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def expected_times_executed; end + + # Sets the attribute expected_times_executed + # + # @param value the value to set the attribute expected_times_executed to. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def expected_times_executed=(_arg0); end + + # source://webmock//lib/webmock/request_execution_verifier.rb#42 + def failure_message; end + + # source://webmock//lib/webmock/request_execution_verifier.rb#46 + def failure_message_when_negated; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_execution_verifier.rb#15 + def matches?; end + + # Returns the value of attribute request_pattern. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def request_pattern; end + + # Sets the attribute request_pattern + # + # @param value the value to set the attribute request_pattern to. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def request_pattern=(_arg0); end + + # Returns the value of attribute times_executed. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def times_executed; end + + # Sets the attribute times_executed + # + # @param value the value to set the attribute times_executed to. + # + # source://webmock//lib/webmock/request_execution_verifier.rb#6 + def times_executed=(_arg0); end + + private + + # source://webmock//lib/webmock/request_execution_verifier.rb#56 + def failure_message_phrase(is_negated = T.unsafe(nil)); end + + # source://webmock//lib/webmock/request_execution_verifier.rb#62 + def quantity_phrase(is_negated = T.unsafe(nil)); end + + # source://webmock//lib/webmock/request_execution_verifier.rb#74 + def times(times); end + + class << self + # source://webmock//lib/webmock/request_execution_verifier.rb#50 + def executed_requests_message; end + end +end + +# source://webmock//lib/webmock/request_pattern.rb#15 +class WebMock::RequestPattern + # @return [RequestPattern] a new instance of RequestPattern + # + # source://webmock//lib/webmock/request_pattern.rb#19 + def initialize(method, uri, options = T.unsafe(nil)); end + + # Returns the value of attribute body_pattern. + # + # source://webmock//lib/webmock/request_pattern.rb#17 + def body_pattern; end + + # Returns the value of attribute headers_pattern. + # + # source://webmock//lib/webmock/request_pattern.rb#17 + def headers_pattern; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#35 + def matches?(request_signature); end + + # Returns the value of attribute method_pattern. + # + # source://webmock//lib/webmock/request_pattern.rb#17 + def method_pattern; end + + # source://webmock//lib/webmock/request_pattern.rb#45 + def to_s; end + + # Returns the value of attribute uri_pattern. + # + # source://webmock//lib/webmock/request_pattern.rb#17 + def uri_pattern; end + + # @raise [ArgumentError] + # + # source://webmock//lib/webmock/request_pattern.rb#28 + def with(options = T.unsafe(nil), &block); end + + private + + # source://webmock//lib/webmock/request_pattern.rb#57 + def assign_options(options); end + + # source://webmock//lib/webmock/request_pattern.rb#80 + def create_uri_pattern(uri); end + + # source://webmock//lib/webmock/request_pattern.rb#66 + def set_basic_auth_as_headers!(options); end + + # source://webmock//lib/webmock/request_pattern.rb#74 + def validate_basic_auth!(basic_auth); end +end + +# source://webmock//lib/webmock/request_registry.rb#5 +class WebMock::RequestRegistry + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [RequestRegistry] a new instance of RequestRegistry + # + # source://webmock//lib/webmock/request_registry.rb#10 + def initialize; end + + # Returns the value of attribute requested_signatures. + # + # source://webmock//lib/webmock/request_registry.rb#8 + def requested_signatures; end + + # Sets the attribute requested_signatures + # + # @param value the value to set the attribute requested_signatures to. + # + # source://webmock//lib/webmock/request_registry.rb#8 + def requested_signatures=(_arg0); end + + # source://webmock//lib/webmock/request_registry.rb#14 + def reset!; end + + # source://webmock//lib/webmock/request_registry.rb#18 + def times_executed(request_pattern); end + + # source://webmock//lib/webmock/request_registry.rb#24 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://webmock//lib/webmock/request_signature.rb#5 +class WebMock::RequestSignature + # @return [RequestSignature] a new instance of RequestSignature + # + # source://webmock//lib/webmock/request_signature.rb#10 + def initialize(method, uri, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_signature.rb#34 + def ==(other); end + + # Returns the value of attribute body. + # + # source://webmock//lib/webmock/request_signature.rb#7 + def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://webmock//lib/webmock/request_signature.rb#7 + def body=(_arg0); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_signature.rb#34 + def eql?(other); end + + # source://webmock//lib/webmock/request_signature.rb#30 + def hash; end + + # Returns the value of attribute headers. + # + # source://webmock//lib/webmock/request_signature.rb#8 + def headers; end + + # source://webmock//lib/webmock/request_signature.rb#26 + def headers=(headers); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_signature.rb#43 + def json_headers?; end + + # Returns the value of attribute method. + # + # source://webmock//lib/webmock/request_signature.rb#7 + def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://webmock//lib/webmock/request_signature.rb#7 + def method=(_arg0); end + + # source://webmock//lib/webmock/request_signature.rb#16 + def to_s; end + + # Returns the value of attribute uri. + # + # source://webmock//lib/webmock/request_signature.rb#7 + def uri; end + + # Sets the attribute uri + # + # @param value the value to set the attribute uri to. + # + # source://webmock//lib/webmock/request_signature.rb#7 + def uri=(_arg0); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_signature.rb#39 + def url_encoded?; end + + private + + # source://webmock//lib/webmock/request_signature.rb#49 + def assign_options(options); end +end + +# source://webmock//lib/webmock/request_signature_snippet.rb#6 +class WebMock::RequestSignatureSnippet + # @return [RequestSignatureSnippet] a new instance of RequestSignatureSnippet + # + # source://webmock//lib/webmock/request_signature_snippet.rb#10 + def initialize(request_signature); end + + # Returns the value of attribute request_signature. + # + # source://webmock//lib/webmock/request_signature_snippet.rb#8 + def request_signature; end + + # Returns the value of attribute request_stub. + # + # source://webmock//lib/webmock/request_signature_snippet.rb#8 + def request_stub; end + + # source://webmock//lib/webmock/request_signature_snippet.rb#22 + def request_stubs; end + + # source://webmock//lib/webmock/request_signature_snippet.rb#15 + def stubbing_instructions; end + + private + + # source://webmock//lib/webmock/request_signature_snippet.rb#35 + def add_body_diff(stub, text); end + + # source://webmock//lib/webmock/request_signature_snippet.rb#54 + def pretty_print_to_string(string_to_print); end + + # source://webmock//lib/webmock/request_signature_snippet.rb#45 + def request_params; end + + # source://webmock//lib/webmock/request_signature_snippet.rb#40 + def signature_stub_body_diff(stub); end +end + +# source://webmock//lib/webmock/request_stub.rb#4 +class WebMock::RequestStub + # @return [RequestStub] a new instance of RequestStub + # + # source://webmock//lib/webmock/request_stub.rb#8 + def initialize(method, uri); end + + # source://webmock//lib/webmock/request_stub.rb#65 + def and_raise(*exceptions); end + + # source://webmock//lib/webmock/request_stub.rb#19 + def and_return(*response_hashes, &block); end + + # @raise [ArgumentError] + # + # source://webmock//lib/webmock/request_stub.rb#29 + def and_return_json(*response_hashes); end + + # source://webmock//lib/webmock/request_stub.rb#73 + def and_timeout; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_stub.rb#90 + def has_responses?; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_stub.rb#108 + def matches?(request_signature); end + + # Returns the value of attribute request_pattern. + # + # source://webmock//lib/webmock/request_stub.rb#6 + def request_pattern; end + + # Sets the attribute request_pattern + # + # @param value the value to set the attribute request_pattern to. + # + # source://webmock//lib/webmock/request_stub.rb#6 + def request_pattern=(_arg0); end + + # source://webmock//lib/webmock/request_stub.rb#79 + def response; end + + # source://webmock//lib/webmock/request_stub.rb#94 + def then; end + + # source://webmock//lib/webmock/request_stub.rb#98 + def times(number); end + + # source://webmock//lib/webmock/request_stub.rb#61 + def to_rack(app, options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/request_stub.rb#65 + def to_raise(*exceptions); end + + # source://webmock//lib/webmock/request_stub.rb#19 + def to_return(*response_hashes, &block); end + + # @raise [ArgumentError] + # + # source://webmock//lib/webmock/request_stub.rb#29 + def to_return_json(*response_hashes); end + + # source://webmock//lib/webmock/request_stub.rb#112 + def to_s; end + + # source://webmock//lib/webmock/request_stub.rb#73 + def to_timeout; end + + # source://webmock//lib/webmock/request_stub.rb#14 + def with(params = T.unsafe(nil), &block); end + + class << self + # source://webmock//lib/webmock/request_stub.rb#116 + def from_request_signature(signature); end + end +end + +# source://webmock//lib/webmock/response.rb#17 +class WebMock::Response + # @return [Response] a new instance of Response + # + # source://webmock//lib/webmock/response.rb#18 + def initialize(options = T.unsafe(nil)); end + + # source://webmock//lib/webmock/response.rb#97 + def ==(other); end + + # source://webmock//lib/webmock/response.rb#40 + def body; end + + # source://webmock//lib/webmock/response.rb#44 + def body=(body); end + + # source://webmock//lib/webmock/response.rb#88 + def evaluate(request_signature); end + + # source://webmock//lib/webmock/response.rb#58 + def exception; end + + # source://webmock//lib/webmock/response.rb#62 + def exception=(exception); end + + # source://webmock//lib/webmock/response.rb#29 + def headers; end + + # source://webmock//lib/webmock/response.rb#33 + def headers=(headers); end + + # source://webmock//lib/webmock/response.rb#78 + def options=(options); end + + # @raise [@exception] + # + # source://webmock//lib/webmock/response.rb#70 + def raise_error_if_any; end + + # source://webmock//lib/webmock/response.rb#74 + def should_timeout; end + + # source://webmock//lib/webmock/response.rb#50 + def status; end + + # source://webmock//lib/webmock/response.rb#54 + def status=(status); end + + private + + # source://webmock//lib/webmock/response.rb#115 + def assert_valid_body!; end + + # source://webmock//lib/webmock/response.rb#128 + def read_raw_response(io); end + + # source://webmock//lib/webmock/response.rb#107 + def stringify_body!; end +end + +# source://webmock//lib/webmock/response.rb#145 +class WebMock::Response::InvalidBody < ::StandardError; end + +# source://webmock//lib/webmock/response.rb#7 +class WebMock::ResponseFactory + class << self + # source://webmock//lib/webmock/response.rb#8 + def response_for(options); end + end +end + +# source://webmock//lib/webmock/responses_sequence.rb#5 +class WebMock::ResponsesSequence + # @return [ResponsesSequence] a new instance of ResponsesSequence + # + # source://webmock//lib/webmock/responses_sequence.rb#9 + def initialize(responses); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/responses_sequence.rb#15 + def end?; end + + # source://webmock//lib/webmock/responses_sequence.rb#19 + def next_response; end + + # Returns the value of attribute times_to_repeat. + # + # source://webmock//lib/webmock/responses_sequence.rb#7 + def times_to_repeat; end + + # Sets the attribute times_to_repeat + # + # @param value the value to set the attribute times_to_repeat to. + # + # source://webmock//lib/webmock/responses_sequence.rb#7 + def times_to_repeat=(_arg0); end + + private + + # source://webmock//lib/webmock/responses_sequence.rb#31 + def increase_position; end +end + +# source://webmock//lib/webmock/stub_registry.rb#5 +class WebMock::StubRegistry + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [StubRegistry] a new instance of StubRegistry + # + # source://webmock//lib/webmock/stub_registry.rb#10 + def initialize; end + + # source://webmock//lib/webmock/stub_registry.rb#14 + def global_stubs; end + + # source://webmock//lib/webmock/stub_registry.rb#22 + def register_global_stub(order = T.unsafe(nil), &block); end + + # source://webmock//lib/webmock/stub_registry.rb#50 + def register_request_stub(stub); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/stub_registry.rb#61 + def registered_request?(request_signature); end + + # source://webmock//lib/webmock/stub_registry.rb#55 + def remove_request_stub(stub); end + + # Returns the value of attribute request_stubs. + # + # source://webmock//lib/webmock/stub_registry.rb#8 + def request_stubs; end + + # Sets the attribute request_stubs + # + # @param value the value to set the attribute request_stubs to. + # + # source://webmock//lib/webmock/stub_registry.rb#8 + def request_stubs=(_arg0); end + + # source://webmock//lib/webmock/stub_registry.rb#18 + def reset!; end + + # source://webmock//lib/webmock/stub_registry.rb#65 + def response_for_request(request_signature); end + + private + + # source://webmock//lib/webmock/stub_registry.rb#79 + def evaluate_response_for_request(response, request_signature); end + + # source://webmock//lib/webmock/stub_registry.rb#72 + def request_stub_for(request_signature); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://webmock//lib/webmock/stub_request_snippet.rb#4 +class WebMock::StubRequestSnippet + # @return [StubRequestSnippet] a new instance of StubRequestSnippet + # + # source://webmock//lib/webmock/stub_request_snippet.rb#5 + def initialize(request_stub); end + + # source://webmock//lib/webmock/stub_request_snippet.rb#9 + def body_pattern; end + + # source://webmock//lib/webmock/stub_request_snippet.rb#13 + def to_s(with_response = T.unsafe(nil)); end +end + +# source://webmock//lib/webmock/request_pattern.rb#177 +class WebMock::URIAddressablePattern < ::WebMock::URIPattern + # source://webmock//lib/webmock/request_pattern.rb#178 + def add_query_params(query_params); end + + private + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#203 + def matches_with_variations?(uri); end + + # source://webmock//lib/webmock/request_pattern.rb#199 + def pattern_inspect; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#189 + def pattern_matches?(uri); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#215 + def template_matches_uri?(template, uri); end +end + +# source://webmock//lib/webmock/request_pattern.rb#161 +class WebMock::URICallablePattern < ::WebMock::URIPattern + private + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#164 + def pattern_matches?(uri); end +end + +# source://webmock//lib/webmock/request_pattern.rb#110 +class WebMock::URIPattern + include ::WebMock::RSpecMatcherDetector + + # @return [URIPattern] a new instance of URIPattern + # + # source://webmock//lib/webmock/request_pattern.rb#113 + def initialize(pattern); end + + # source://webmock//lib/webmock/request_pattern.rb#125 + def add_query_params(query_params); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#140 + def matches?(uri); end + + # source://webmock//lib/webmock/request_pattern.rb#144 + def to_s; end + + private + + # source://webmock//lib/webmock/request_pattern.rb#152 + def pattern_inspect; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#156 + def query_params_matches?(uri); end +end + +# source://webmock//lib/webmock/request_pattern.rb#169 +class WebMock::URIRegexpPattern < ::WebMock::URIPattern + private + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#172 + def pattern_matches?(uri); end +end + +# source://webmock//lib/webmock/request_pattern.rb#222 +class WebMock::URIStringPattern < ::WebMock::URIPattern + # source://webmock//lib/webmock/request_pattern.rb#223 + def add_query_params(query_params); end + + private + + # source://webmock//lib/webmock/request_pattern.rb#246 + def pattern_inspect; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/request_pattern.rb#234 + def pattern_matches?(uri); end +end + +# source://webmock//lib/webmock/util/query_mapper.rb#3 +module WebMock::Util; end + +# source://webmock//lib/webmock/util/hash_counter.rb#7 +class WebMock::Util::HashCounter + # @return [HashCounter] a new instance of HashCounter + # + # source://webmock//lib/webmock/util/hash_counter.rb#10 + def initialize; end + + # source://webmock//lib/webmock/util/hash_counter.rb#38 + def each(&block); end + + # source://webmock//lib/webmock/util/hash_counter.rb#24 + def get(key); end + + # Returns the value of attribute hash. + # + # source://webmock//lib/webmock/util/hash_counter.rb#8 + def hash; end + + # Sets the attribute hash + # + # @param value the value to set the attribute hash to. + # + # source://webmock//lib/webmock/util/hash_counter.rb#8 + def hash=(_arg0); end + + # source://webmock//lib/webmock/util/hash_counter.rb#17 + def put(key, num = T.unsafe(nil)); end + + # source://webmock//lib/webmock/util/hash_counter.rb#30 + def select(&block); end +end + +# source://webmock//lib/webmock/util/hash_keys_stringifier.rb#5 +class WebMock::Util::HashKeysStringifier + class << self + # source://webmock//lib/webmock/util/hash_keys_stringifier.rb#7 + def stringify_keys!(arg, options = T.unsafe(nil)); end + end +end + +# source://webmock//lib/webmock/util/headers.rb#9 +class WebMock::Util::Headers + class << self + # source://webmock//lib/webmock/util/headers.rb#61 + def basic_auth_header(*credentials); end + + # source://webmock//lib/webmock/util/headers.rb#57 + def decode_userinfo_from_header(header); end + + # source://webmock//lib/webmock/util/headers.rb#15 + def normalize_headers(headers); end + + # source://webmock//lib/webmock/util/headers.rb#65 + def normalize_name(name); end + + # source://webmock//lib/webmock/util/headers.rb#42 + def pp_headers_string(headers); end + + # source://webmock//lib/webmock/util/headers.rb#28 + def sorted_headers_string(headers); end + end +end + +# source://webmock//lib/webmock/util/headers.rb#13 +WebMock::Util::Headers::JOIN = T.let(T.unsafe(nil), String) + +# source://webmock//lib/webmock/util/headers.rb#12 +WebMock::Util::Headers::NONSTANDARD_HEADER_DELIMITER = T.let(T.unsafe(nil), String) + +# source://webmock//lib/webmock/util/headers.rb#11 +WebMock::Util::Headers::STANDARD_HEADER_DELIMITER = T.let(T.unsafe(nil), String) + +# source://webmock//lib/webmock/util/json.rb#12 +class WebMock::Util::JSON + class << self + # Ensure that ":" and "," are always followed by a space + # + # source://webmock//lib/webmock/util/json.rb#28 + def convert_json_to_yaml(json); end + + # source://webmock//lib/webmock/util/json.rb#15 + def parse(json); end + + # source://webmock//lib/webmock/util/json.rb#23 + def unescape(str); end + end +end + +# source://webmock//lib/webmock/util/json.rb#13 +class WebMock::Util::JSON::ParseError < ::StandardError; end + +# source://webmock//lib/webmock/util/query_mapper.rb#4 +class WebMock::Util::QueryMapper + class << self + # source://webmock//lib/webmock/util/query_mapper.rb#81 + def collect_query_hash(query_array, empty_accumulator, options); end + + # source://webmock//lib/webmock/util/query_mapper.rb#74 + def collect_query_parts(query); end + + # source://webmock//lib/webmock/util/query_mapper.rb#221 + def dehash(hash); end + + # source://webmock//lib/webmock/util/query_mapper.rb#106 + def fill_accumulator_for_dot(accumulator, key, value); end + + # source://webmock//lib/webmock/util/query_mapper.rb#95 + def fill_accumulator_for_flat(accumulator, key, value); end + + # source://webmock//lib/webmock/util/query_mapper.rb#102 + def fill_accumulator_for_flat_array(accumulator, key, value); end + + # source://webmock//lib/webmock/util/query_mapper.rb#125 + def fill_accumulator_for_subscript(accumulator, key, value); end + + # source://webmock//lib/webmock/util/query_mapper.rb#63 + def normalize_query_hash(query_hash, empty_accumulator, options); end + + # Converts the query component to a Hash value. + # + # @example + # WebMock::Util::QueryMapper.query_to_values("?one=1&two=2&three=3") + # #=> {"one" => "1", "two" => "2", "three" => "3"} + # WebMock::Util::QueryMapper("?one[two][three]=four").query_values + # #=> {"one" => {"two" => {"three" => "four"}}} + # WebMock::Util::QueryMapper.query_to_values("?one.two.three=four", + # :notation => :dot + # ) + # #=> {"one" => {"two" => {"three" => "four"}}} + # WebMock::Util::QueryMapper.query_to_values("?one[two][three]=four", + # :notation => :flat + # ) + # #=> {"one[two][three]" => "four"} + # WebMock::Util::QueryMapper.query_to_values("?one.two.three=four", + # :notation => :flat + # ) + # #=> {"one.two.three" => "four"} + # WebMock::Util::QueryMapper( + # "?one[two][three][]=four&one[two][three][]=five" + # ) + # #=> {"one" => {"two" => {"three" => ["four", "five"]}}} + # WebMock::Util::QueryMapper.query_to_values( + # "?one=two&one=three").query_values(:notation => :flat_array) + # #=> [['one', 'two'], ['one', 'three']] + # @option [Symbol] + # @param [Symbol] [Hash] a customizable set of options + # @return [Hash, Array] The query string parsed as a Hash or Array object. + # + # source://webmock//lib/webmock/util/query_mapper.rb#42 + def query_to_values(query, options = T.unsafe(nil)); end + + # new_query_values have form [['key1', 'value1'], ['key2', 'value2']] + # + # source://webmock//lib/webmock/util/query_mapper.rb#247 + def to_query(parent, value, options = T.unsafe(nil)); end + + # Sets the query component for this URI from a Hash object. + # This method produces a query string using the :subscript notation. + # An empty Hash will result in a nil query. + # + # @param new_query_values [Hash, #to_hash, Array] The new query values. + # + # source://webmock//lib/webmock/util/query_mapper.rb#179 + def values_to_query(new_query_values, options = T.unsafe(nil)); end + end +end + +# source://webmock//lib/webmock/util/uri.rb#7 +class WebMock::Util::URI + class << self + # source://webmock//lib/webmock/util/uri.rb#67 + def encode_unsafe_chars_in_userinfo(userinfo); end + + # source://webmock//lib/webmock/util/uri.rb#28 + def heuristic_parse(uri); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/util/uri.rb#71 + def is_uri_localhost?(uri); end + + # source://webmock//lib/webmock/util/uri.rb#32 + def normalize_uri(uri); end + + # source://webmock//lib/webmock/util/uri.rb#78 + def sort_query_values(query_values); end + + # source://webmock//lib/webmock/util/uri.rb#59 + def strip_default_port_from_uri_string(uri_string); end + + # source://webmock//lib/webmock/util/uri.rb#89 + def uris_encoded_and_unencoded(uris); end + + # source://webmock//lib/webmock/util/uri.rb#83 + def uris_with_inferred_port_and_without(uris); end + + # source://webmock//lib/webmock/util/uri.rb#98 + def uris_with_scheme_and_without(uris); end + + # source://webmock//lib/webmock/util/uri.rb#104 + def uris_with_trailing_slash_and_without(uris); end + + # source://webmock//lib/webmock/util/uri.rb#38 + def variations_of_uri_as_strings(uri_object, only_with_scheme: T.unsafe(nil)); end + end +end + +# source://webmock//lib/webmock/util/uri.rb#12 +WebMock::Util::URI::ADDRESSABLE_URIS = T.let(T.unsafe(nil), Hash) + +# source://webmock//lib/webmock/util/uri.rb#8 +module WebMock::Util::URI::CharacterClasses; end + +# source://webmock//lib/webmock/util/uri.rb#9 +WebMock::Util::URI::CharacterClasses::USERINFO = T.let(T.unsafe(nil), String) + +# source://webmock//lib/webmock/util/uri.rb#16 +WebMock::Util::URI::NORMALIZED_URIS = T.let(T.unsafe(nil), Hash) + +# source://webmock//lib/webmock/util/values_stringifier.rb#3 +class WebMock::Util::ValuesStringifier + class << self + # source://webmock//lib/webmock/util/values_stringifier.rb#4 + def stringify_values(value); end + end +end + +# source://webmock//lib/webmock/version.rb#4 +WebMock::VERSION = T.let(T.unsafe(nil), String) + +# source://webmock//lib/webmock/util/version_checker.rb#28 +class WebMock::VersionChecker + # @return [VersionChecker] a new instance of VersionChecker + # + # source://webmock//lib/webmock/util/version_checker.rb#29 + def initialize(library_name, library_version, min_patch_level, max_minor_version = T.unsafe(nil), unsupported_versions = T.unsafe(nil)); end + + # source://webmock//lib/webmock/util/version_checker.rb#45 + def check_version!; end + + private + + # source://webmock//lib/webmock/util/version_checker.rb#109 + def colorize(text, color_code); end + + # source://webmock//lib/webmock/util/version_checker.rb#86 + def compare_version; end + + # source://webmock//lib/webmock/util/version_checker.rb#105 + def parse_version(version); end + + # @return [Boolean] + # + # source://webmock//lib/webmock/util/version_checker.rb#57 + def too_high?; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/util/version_checker.rb#53 + def too_low?; end + + # @return [Boolean] + # + # source://webmock//lib/webmock/util/version_checker.rb#61 + def unsupported_version?; end + + # source://webmock//lib/webmock/util/version_checker.rb#98 + def version_requirement; end + + # source://webmock//lib/webmock/util/version_checker.rb#70 + def warn_about_too_high; end + + # source://webmock//lib/webmock/util/version_checker.rb#65 + def warn_about_too_low; end + + # source://webmock//lib/webmock/util/version_checker.rb#76 + def warn_about_unsupported_version; end + + # source://webmock//lib/webmock/util/version_checker.rb#82 + def warn_in_red(text); end +end diff --git a/sorbet/rbi/gems/webrick@1.8.1.rbi b/sorbet/rbi/gems/webrick@1.8.1.rbi new file mode 100644 index 0000000000..cc9e52da56 --- /dev/null +++ b/sorbet/rbi/gems/webrick@1.8.1.rbi @@ -0,0 +1,2606 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `webrick` gem. +# Please instead update this file by running `bin/tapioca gem webrick`. + +# AccessLog provides logging to various files in various formats. +# +# Multiple logs may be written to at the same time: +# +# access_log = [ +# [$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT], +# [$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT], +# ] +# +# server = WEBrick::HTTPServer.new :AccessLog => access_log +# +# Custom log formats may be defined. WEBrick::AccessLog provides a subset +# of the formatting from Apache's mod_log_config +# http://httpd.apache.org/docs/mod/mod_log_config.html#formats. See +# AccessLog::setup_params for a list of supported options +# +# source://webrick//lib/webrick/accesslog.rb#30 +module WEBrick::AccessLog + private + + # Escapes control characters in +data+ + # + # source://webrick//lib/webrick/accesslog.rb#151 + def escape(data); end + + # Formats +params+ according to +format_string+ which is described in + # setup_params. + # + # source://webrick//lib/webrick/accesslog.rb#123 + def format(format_string, params); end + + # This format specification is a subset of mod_log_config of Apache: + # + # %a:: Remote IP address + # %b:: Total response size + # %e{variable}:: Given variable in ENV + # %f:: Response filename + # %h:: Remote host name + # %{header}i:: Given request header + # %l:: Remote logname, always "-" + # %m:: Request method + # %{attr}n:: Given request attribute from <tt>req.attributes</tt> + # %{header}o:: Given response header + # %p:: Server's request port + # %{format}p:: The canonical port of the server serving the request or the + # actual port or the client's actual port. Valid formats are + # canonical, local or remote. + # %q:: Request query string + # %r:: First line of the request + # %s:: Request status + # %t:: Time the request was received + # %T:: Time taken to process the request + # %u:: Remote user from auth + # %U:: Unparsed URI + # %%:: Literal % + # + # source://webrick//lib/webrick/accesslog.rb#95 + def setup_params(config, req, res); end + + class << self + # Escapes control characters in +data+ + # + # source://webrick//lib/webrick/accesslog.rb#151 + def escape(data); end + + # Formats +params+ according to +format_string+ which is described in + # setup_params. + # + # source://webrick//lib/webrick/accesslog.rb#123 + def format(format_string, params); end + + # This format specification is a subset of mod_log_config of Apache: + # + # %a:: Remote IP address + # %b:: Total response size + # %e{variable}:: Given variable in ENV + # %f:: Response filename + # %h:: Remote host name + # %{header}i:: Given request header + # %l:: Remote logname, always "-" + # %m:: Request method + # %{attr}n:: Given request attribute from <tt>req.attributes</tt> + # %{header}o:: Given response header + # %p:: Server's request port + # %{format}p:: The canonical port of the server serving the request or the + # actual port or the client's actual port. Valid formats are + # canonical, local or remote. + # %q:: Request query string + # %r:: First line of the request + # %s:: Request status + # %t:: Time the request was received + # %T:: Time taken to process the request + # %u:: Remote user from auth + # %U:: Unparsed URI + # %%:: Literal % + # + # source://webrick//lib/webrick/accesslog.rb#95 + def setup_params(config, req, res); end + end +end + +# A generic logging class +# +# source://webrick//lib/webrick/log.rb#17 +class WEBrick::BasicLog + # Initializes a new logger for +log_file+ that outputs messages at +level+ + # or higher. +log_file+ can be a filename, an IO-like object that + # responds to #<< or nil which outputs to $stderr. + # + # If no level is given INFO is chosen by default + # + # @return [BasicLog] a new instance of BasicLog + # + # source://webrick//lib/webrick/log.rb#50 + def initialize(log_file = T.unsafe(nil), level = T.unsafe(nil)); end + + # Synonym for log(INFO, obj.to_s) + # + # source://webrick//lib/webrick/log.rb#84 + def <<(obj); end + + # Closes the logger (also closes the log device associated to the logger) + # + # source://webrick//lib/webrick/log.rb#66 + def close; end + + # Shortcut for logging a DEBUG message + # + # source://webrick//lib/webrick/log.rb#97 + def debug(msg); end + + # Will the logger output DEBUG messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#108 + def debug?; end + + # Shortcut for logging an ERROR message + # + # source://webrick//lib/webrick/log.rb#91 + def error(msg); end + + # Will the logger output ERROR messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#102 + def error?; end + + # Shortcut for logging a FATAL message + # + # source://webrick//lib/webrick/log.rb#89 + def fatal(msg); end + + # Will the logger output FATAL messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#100 + def fatal?; end + + # Shortcut for logging an INFO message + # + # source://webrick//lib/webrick/log.rb#95 + def info(msg); end + + # Will the logger output INFO messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#106 + def info?; end + + # log-level, messages above this level will be logged + # + # source://webrick//lib/webrick/log.rb#41 + def level; end + + # log-level, messages above this level will be logged + # + # source://webrick//lib/webrick/log.rb#41 + def level=(_arg0); end + + # Logs +data+ at +level+ if the given level is above the current log + # level. + # + # source://webrick//lib/webrick/log.rb#75 + def log(level, data); end + + # Shortcut for logging a WARN message + # + # source://webrick//lib/webrick/log.rb#93 + def warn(msg); end + + # Will the logger output WARN messages? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/log.rb#104 + def warn?; end + + private + + # Formats +arg+ for the logger + # + # * If +arg+ is an Exception, it will format the error message and + # the back trace. + # * If +arg+ responds to #to_str, it will return it. + # * Otherwise it will return +arg+.inspect. + # + # source://webrick//lib/webrick/log.rb#119 + def format(arg); end +end + +# -- +# Updates WEBrick::GenericServer with SSL functionality +# +# source://webrick//lib/webrick/server.rb#56 +class WEBrick::GenericServer + # Creates a new generic server from +config+. The default configuration + # comes from +default+. + # + # @return [GenericServer] a new instance of GenericServer + # + # source://webrick//lib/webrick/server.rb#88 + def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end + + # Retrieves +key+ from the configuration + # + # source://webrick//lib/webrick/server.rb#121 + def [](key); end + + # The server configuration + # + # source://webrick//lib/webrick/server.rb#66 + def config; end + + # Updates +listen+ to enable SSL when the SSL configuration is active. + # + # source://webrick//lib/webrick/server.rb#129 + def listen(address, port); end + + # Sockets listening for connections. + # + # source://webrick//lib/webrick/server.rb#82 + def listeners; end + + # The server logger. This is independent from the HTTP access log. + # + # source://webrick//lib/webrick/server.rb#71 + def logger; end + + # You must subclass GenericServer and implement \#run which accepts a TCP + # client socket + # + # source://webrick//lib/webrick/server.rb#244 + def run(sock); end + + # Shuts down the server and all listening sockets. New listeners must be + # provided to restart the server. + # + # source://webrick//lib/webrick/server.rb#234 + def shutdown; end + + # Starts the server and runs the +block+ for each connection. This method + # does not return until the server is stopped from a signal handler or + # another thread using #stop or #shutdown. + # + # If the block raises a subclass of StandardError the exception is logged + # and ignored. If an IOError or Errno::EBADF exception is raised the + # exception is ignored. If an Exception subclass is raised the exception + # is logged and re-raised which stops the server. + # + # To completely shut down a server call #shutdown from ensure: + # + # server = WEBrick::GenericServer.new + # # or WEBrick::HTTPServer.new + # + # begin + # server.start + # ensure + # server.shutdown + # end + # + # @raise [ServerError] + # + # source://webrick//lib/webrick/server.rb#154 + def start(&block); end + + # The server status. One of :Stop, :Running or :Shutdown + # + # source://webrick//lib/webrick/server.rb#61 + def status; end + + # Stops the server from accepting new connections. + # + # source://webrick//lib/webrick/server.rb#222 + def stop; end + + # Tokens control the number of outstanding clients. The + # <code>:MaxClients</code> configuration sets this. + # + # source://webrick//lib/webrick/server.rb#77 + def tokens; end + + private + + # Accepts a TCP client socket from the TCP server socket +svr+ and returns + # the client socket. + # + # source://webrick//lib/webrick/server.rb#256 + def accept_client(svr); end + + # source://webrick//lib/webrick/server.rb#347 + def alarm_shutdown_pipe; end + + # Calls the callback +callback_name+ from the configuration with +args+ + # + # source://webrick//lib/webrick/server.rb#334 + def call_callback(callback_name, *args); end + + # source://webrick//lib/webrick/server.rb#359 + def cleanup_listener; end + + # source://webrick//lib/webrick/server.rb#342 + def cleanup_shutdown_pipe(shutdown_pipe); end + + # source://webrick//lib/webrick/server.rb#338 + def setup_shutdown_pipe; end + + # Starts a server thread for the client socket +sock+ that runs the given + # +block+. + # + # Sets the socket to the <code>:WEBrickSocket</code> thread local variable + # in the thread. + # + # If any errors occur in the block they are logged and handled. + # + # source://webrick//lib/webrick/server.rb#288 + def start_thread(sock, &block); end +end + +# source://webrick//lib/webrick/htmlutils.rb#13 +module WEBrick::HTMLUtils + private + + # Escapes &, ", > and < in +string+ + # + # source://webrick//lib/webrick/htmlutils.rb#18 + def escape(string); end + + class << self + # Escapes &, ", > and < in +string+ + # + # source://webrick//lib/webrick/htmlutils.rb#18 + def escape(string); end + end +end + +# HTTPAuth provides both basic and digest authentication. +# +# To enable authentication for requests in WEBrick you will need a user +# database and an authenticator. To start, here's an Htpasswd database for +# use with a DigestAuth authenticator: +# +# config = { :Realm => 'DigestAuth example realm' } +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' +# htpasswd.auth_type = WEBrick::HTTPAuth::DigestAuth +# htpasswd.set_passwd config[:Realm], 'username', 'password' +# htpasswd.flush +# +# The +:Realm+ is used to provide different access to different groups +# across several resources on a server. Typically you'll need only one +# realm for a server. +# +# This database can be used to create an authenticator: +# +# config[:UserDB] = htpasswd +# +# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config +# +# To authenticate a request call #authenticate with a request and response +# object in a servlet: +# +# def do_GET req, res +# @authenticator.authenticate req, res +# end +# +# For digest authentication the authenticator must not be created every +# request, it must be passed in as an option via WEBrick::HTTPServer#mount. +# +# source://webrick//lib/webrick/httpauth/authenticator.rb#12 +module WEBrick::HTTPAuth + private + + # source://webrick//lib/webrick/httpauth.rb#57 + def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end + + # Simple wrapper for providing basic authentication for a request. When + # called with a request +req+, response +res+, authentication +realm+ and + # +block+ the block will be called with a +username+ and +password+. If + # the block returns true the request is allowed to continue, otherwise an + # HTTPStatus::Unauthorized error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#79 + def basic_auth(req, res, realm, &block); end + + # Simple wrapper for providing basic authentication for a proxied request. + # When called with a request +req+, response +res+, authentication +realm+ + # and +block+ the block will be called with a +username+ and +password+. + # If the block returns true the request is allowed to continue, otherwise + # an HTTPStatus::ProxyAuthenticationRequired error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#91 + def proxy_basic_auth(req, res, realm, &block); end + + class << self + # source://webrick//lib/webrick/httpauth.rb#57 + def _basic_auth(req, res, realm, req_field, res_field, err_type, block); end + + # Simple wrapper for providing basic authentication for a request. When + # called with a request +req+, response +res+, authentication +realm+ and + # +block+ the block will be called with a +username+ and +password+. If + # the block returns true the request is allowed to continue, otherwise an + # HTTPStatus::Unauthorized error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#79 + def basic_auth(req, res, realm, &block); end + + # Simple wrapper for providing basic authentication for a proxied request. + # When called with a request +req+, response +res+, authentication +realm+ + # and +block+ the block will be called with a +username+ and +password+. + # If the block returns true the request is allowed to continue, otherwise + # an HTTPStatus::ProxyAuthenticationRequired error is raised. + # + # source://webrick//lib/webrick/httpauth.rb#91 + def proxy_basic_auth(req, res, realm, &block); end + end +end + +# Module providing generic support for both Digest and Basic +# authentication schemes. +# +# source://webrick//lib/webrick/httpauth/authenticator.rb#18 +module WEBrick::HTTPAuth::Authenticator + # The logger for this authenticator + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#43 + def logger; end + + # The realm this authenticator covers + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#33 + def realm; end + + # The user database for this authenticator + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#38 + def userdb; end + + private + + # Initializes the authenticator from +config+ + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#52 + def check_init(config); end + + # Ensures +req+ has credentials that can be authenticated. + # + # source://webrick//lib/webrick/httpauth/authenticator.rb#72 + def check_scheme(req); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#91 + def error(fmt, *args); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#97 + def info(fmt, *args); end + + # source://webrick//lib/webrick/httpauth/authenticator.rb#85 + def log(meth, fmt, *args); end +end + +# source://webrick//lib/webrick/httpauth/authenticator.rb#23 +WEBrick::HTTPAuth::Authenticator::AuthException = WEBrick::HTTPStatus::Unauthorized + +# Basic Authentication for WEBrick +# +# Use this class to add basic authentication to a WEBrick servlet. +# +# Here is an example of how to set up a BasicAuth: +# +# config = { :Realm => 'BasicAuth example realm' } +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file', password_hash: :bcrypt +# htpasswd.set_passwd config[:Realm], 'username', 'password' +# htpasswd.flush +# +# config[:UserDB] = htpasswd +# +# basic_auth = WEBrick::HTTPAuth::BasicAuth.new config +# +# source://webrick//lib/webrick/httpauth/basicauth.rb#35 +class WEBrick::HTTPAuth::BasicAuth + include ::WEBrick::HTTPAuth::Authenticator + + # Creates a new BasicAuth instance. + # + # See WEBrick::Config::BasicAuth for default configuration entries + # + # You must supply the following configuration entries: + # + # :Realm:: The name of the realm being protected. + # :UserDB:: A database of usernames and passwords. + # A WEBrick::HTTPAuth::Htpasswd instance should be used. + # + # @return [BasicAuth] a new instance of BasicAuth + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#61 + def initialize(config, default = T.unsafe(nil)); end + + # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if + # the authentication was not correct. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#70 + def authenticate(req, res); end + + # Returns a challenge response which asks for authentication information + # + # @raise [@auth_exception] + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#103 + def challenge(req, res); end + + # Returns the value of attribute logger. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def logger; end + + # Returns the value of attribute realm. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def realm; end + + # Returns the value of attribute userdb. + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#48 + def userdb; end + + class << self + # Used by UserDB to create a basic password entry + # + # source://webrick//lib/webrick/httpauth/basicauth.rb#43 + def make_passwd(realm, user, pass); end + end +end + +# RFC 2617 Digest Access Authentication for WEBrick +# +# Use this class to add digest authentication to a WEBrick servlet. +# +# Here is an example of how to set up DigestAuth: +# +# config = { :Realm => 'DigestAuth example realm' } +# +# htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' +# htdigest.set_passwd config[:Realm], 'username', 'password' +# htdigest.flush +# +# config[:UserDB] = htdigest +# +# digest_auth = WEBrick::HTTPAuth::DigestAuth.new config +# +# When using this as with a servlet be sure not to create a new DigestAuth +# object in the servlet's #initialize. By default WEBrick creates a new +# servlet instance for every request and the DigestAuth object must be +# used across requests. +# +# source://webrick//lib/webrick/httpauth/digestauth.rb#46 +class WEBrick::HTTPAuth::DigestAuth + include ::WEBrick::HTTPAuth::Authenticator + + # Creates a new DigestAuth instance. Be sure to use the same DigestAuth + # instance for multiple requests as it saves state between requests in + # order to perform authentication. + # + # See WEBrick::Config::DigestAuth for default configuration entries + # + # You must supply the following configuration entries: + # + # :Realm:: The name of the realm being protected. + # :UserDB:: A database of usernames and passwords. + # A WEBrick::HTTPAuth::Htdigest instance should be used. + # + # @return [DigestAuth] a new instance of DigestAuth + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#87 + def initialize(config, default = T.unsafe(nil)); end + + # Digest authentication algorithm + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#59 + def algorithm; end + + # Authenticates a +req+ and returns a 401 Unauthorized using +res+ if + # the authentication was not correct. + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#121 + def authenticate(req, res); end + + # Returns a challenge response which asks for authentication information + # + # @raise [@auth_exception] + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#134 + def challenge(req, res, stale = T.unsafe(nil)); end + + # Quality of protection. RFC 2617 defines "auth" and "auth-int" + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#64 + def qop; end + + private + + # source://webrick//lib/webrick/httpauth/digestauth.rb#163 + def _authenticate(req, res); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#306 + def check_nonce(req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#349 + def check_opaque(opaque_struct, req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#365 + def check_uri(req, auth_req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#299 + def generate_next_nonce(req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#332 + def generate_opaque(req); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#376 + def hexdigest(*args); end + + # source://webrick//lib/webrick/httpauth/digestauth.rb#291 + def split_param_value(string); end + + class << self + # Used by UserDB to create a digest password entry + # + # source://webrick//lib/webrick/httpauth/digestauth.rb#69 + def make_passwd(realm, user, pass); end + end +end + +# Htdigest accesses apache-compatible digest password files. Passwords are +# matched to a realm where they are valid. For security, the path for a +# digest password database should be stored outside of the paths available +# to the HTTP server. +# +# Htdigest is intended for use with WEBrick::HTTPAuth::DigestAuth and +# stores passwords using cryptographic hashes. +# +# htpasswd = WEBrick::HTTPAuth::Htdigest.new 'my_password_file' +# htpasswd.set_passwd 'my realm', 'username', 'password' +# htpasswd.flush +# +# source://webrick//lib/webrick/httpauth/htdigest.rb#31 +class WEBrick::HTTPAuth::Htdigest + include ::WEBrick::HTTPAuth::UserDB + + # Open a digest password database at +path+ + # + # @return [Htdigest] a new instance of Htdigest + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#37 + def initialize(path); end + + # Removes a password from the database for +user+ in +realm+. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#113 + def delete_passwd(realm, user); end + + # Iterate passwords in the database. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#122 + def each; end + + # Flush the password database. If +output+ is given the database will + # be written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#72 + def flush(output = T.unsafe(nil)); end + + # Retrieves a password from the database for +user+ in +realm+. If + # +reload_db+ is true the database will be reloaded first. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#91 + def get_passwd(realm, user, reload_db); end + + # Reloads passwords from the database + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#50 + def reload; end + + # Sets a password in the database for +user+ in +realm+ to +pass+. + # + # source://webrick//lib/webrick/httpauth/htdigest.rb#101 + def set_passwd(realm, user, pass); end +end + +# Htgroup accesses apache-compatible group files. Htgroup can be used to +# provide group-based authentication for users. Currently Htgroup is not +# directly integrated with any authenticators in WEBrick. For security, +# the path for a digest password database should be stored outside of the +# paths available to the HTTP server. +# +# Example: +# +# htgroup = WEBrick::HTTPAuth::Htgroup.new 'my_group_file' +# htgroup.add 'superheroes', %w[spiderman batman] +# +# htgroup.members('superheroes').include? 'magneto' # => false +# +# source://webrick//lib/webrick/httpauth/htgroup.rb#30 +class WEBrick::HTTPAuth::Htgroup + # Open a group database at +path+ + # + # @return [Htgroup] a new instance of Htgroup + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#35 + def initialize(path); end + + # Add an Array of +members+ to +group+ + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#92 + def add(group, members); end + + # Flush the group database. If +output+ is given the database will be + # written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#64 + def flush(output = T.unsafe(nil)); end + + # Retrieve the list of members from +group+ + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#84 + def members(group); end + + # Reload groups from the database + # + # source://webrick//lib/webrick/httpauth/htgroup.rb#46 + def reload; end +end + +# Htpasswd accesses apache-compatible password files. Passwords are +# matched to a realm where they are valid. For security, the path for a +# password database should be stored outside of the paths available to the +# HTTP server. +# +# Htpasswd is intended for use with WEBrick::HTTPAuth::BasicAuth. +# +# To create an Htpasswd database with a single user: +# +# htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' +# htpasswd.set_passwd 'my realm', 'username', 'password' +# htpasswd.flush +# +# source://webrick//lib/webrick/httpauth/htpasswd.rb#32 +class WEBrick::HTTPAuth::Htpasswd + include ::WEBrick::HTTPAuth::UserDB + + # Open a password database at +path+ + # + # @return [Htpasswd] a new instance of Htpasswd + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#38 + def initialize(path, password_hash: T.unsafe(nil)); end + + # Removes a password from the database for +user+ in +realm+. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#144 + def delete_passwd(realm, user); end + + # Iterate passwords in the database. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#151 + def each; end + + # Flush the password database. If +output+ is given the database will + # be written there instead of to the original path. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#103 + def flush(output = T.unsafe(nil)); end + + # Retrieves a password from the database for +user+ in +realm+. If + # +reload_db+ is true the database will be reloaded first. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#122 + def get_passwd(realm, user, reload_db); end + + # Reload passwords from the database + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#68 + def reload; end + + # Sets a password in the database for +user+ in +realm+ to +pass+. + # + # source://webrick//lib/webrick/httpauth/htpasswd.rb#130 + def set_passwd(realm, user, pass); end +end + +# source://webrick//lib/webrick/httpauth/authenticator.rb#114 +WEBrick::HTTPAuth::ProxyAuthenticator::AuthException = WEBrick::HTTPStatus::ProxyAuthenticationRequired + +# Basic authentication for proxy servers. See BasicAuth for details. +# +# source://webrick//lib/webrick/httpauth/basicauth.rb#112 +class WEBrick::HTTPAuth::ProxyBasicAuth < ::WEBrick::HTTPAuth::BasicAuth + include ::WEBrick::HTTPAuth::ProxyAuthenticator +end + +# Digest authentication for proxy servers. See DigestAuth for details. +# +# source://webrick//lib/webrick/httpauth/digestauth.rb#386 +class WEBrick::HTTPAuth::ProxyDigestAuth < ::WEBrick::HTTPAuth::DigestAuth + include ::WEBrick::HTTPAuth::ProxyAuthenticator + + private + + # source://webrick//lib/webrick/httpauth/digestauth.rb#390 + def check_uri(req, auth_req); end +end + +# User database mixin for HTTPAuth. This mixin dispatches user record +# access to the underlying auth_type for this database. +# +# source://webrick//lib/webrick/httpauth/userdb.rb#18 +module WEBrick::HTTPAuth::UserDB + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#26 + def auth_type; end + + # The authentication type. + # + # WEBrick::HTTPAuth::BasicAuth or WEBrick::HTTPAuth::DigestAuth are + # built-in. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#26 + def auth_type=(_arg0); end + + # Retrieves a password in +realm+ for +user+ for the auth_type of this + # database. +reload_db+ is a dummy value. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#48 + def get_passwd(realm, user, reload_db = T.unsafe(nil)); end + + # Creates an obscured password in +realm+ with +user+ and +password+ + # using the auth_type of this database. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#32 + def make_passwd(realm, user, pass); end + + # Sets a password in +realm+ with +user+ and +password+ for the + # auth_type of this database. + # + # source://webrick//lib/webrick/httpauth/userdb.rb#40 + def set_passwd(realm, user, pass); end +end + +# -- +# Adds SSL functionality to WEBrick::HTTPRequest +# +# source://webrick//lib/webrick/httprequest.rb#25 +class WEBrick::HTTPRequest + # Creates a new HTTP request. WEBrick::Config::HTTP is the default + # configuration. + # + # @return [HTTPRequest] a new instance of HTTPRequest + # + # source://webrick//lib/webrick/httprequest.rb#153 + def initialize(config); end + + # Retrieves +header_name+ + # + # source://webrick//lib/webrick/httprequest.rb#318 + def [](header_name); end + + # The Accept header value + # + # source://webrick//lib/webrick/httprequest.rb#100 + def accept; end + + # The Accept-Charset header value + # + # source://webrick//lib/webrick/httprequest.rb#105 + def accept_charset; end + + # The Accept-Encoding header value + # + # source://webrick//lib/webrick/httprequest.rb#110 + def accept_encoding; end + + # The Accept-Language header value + # + # source://webrick//lib/webrick/httprequest.rb#115 + def accept_language; end + + # The socket address of the server + # + # source://webrick//lib/webrick/httprequest.rb#127 + def addr; end + + # Hash of request attributes + # + # source://webrick//lib/webrick/httprequest.rb#137 + def attributes; end + + # Returns the request body. + # + # source://webrick//lib/webrick/httprequest.rb#255 + def body(&block); end + + # Prepares the HTTPRequest object for use as the + # source for IO.copy_stream + # + # source://webrick//lib/webrick/httprequest.rb#265 + def body_reader; end + + # The content-length header + # + # source://webrick//lib/webrick/httprequest.rb#304 + def content_length; end + + # The content-type header + # + # source://webrick//lib/webrick/httprequest.rb#311 + def content_type; end + + # Generate HTTP/1.1 100 continue response if the client expects it, + # otherwise does nothing. + # + # source://webrick//lib/webrick/httprequest.rb#245 + def continue; end + + # The parsed request cookies + # + # source://webrick//lib/webrick/httprequest.rb#95 + def cookies; end + + # Iterates over the request headers + # + # source://webrick//lib/webrick/httprequest.rb#328 + def each; end + + # Consumes any remaining body and updates keep-alive status + # + # source://webrick//lib/webrick/httprequest.rb#390 + def fixup; end + + # The parsed header of the request + # + # source://webrick//lib/webrick/httprequest.rb#90 + def header; end + + # The host this request is for + # + # source://webrick//lib/webrick/httprequest.rb#340 + def host; end + + # The HTTP version of the request + # + # source://webrick//lib/webrick/httprequest.rb#51 + def http_version; end + + # Is this a keep-alive connection? + # + # source://webrick//lib/webrick/httprequest.rb#142 + def keep_alive; end + + # Should the connection this request was made on be kept alive? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httprequest.rb#375 + def keep_alive?; end + + # This method provides the metavariables defined by the revision 3 + # of "The WWW Common Gateway Interface Version 1.1" + # To browse the current document of CGI Version 1.1, see below: + # http://tools.ietf.org/html/rfc3875 + # + # source://webrick//lib/webrick/httprequest.rb#407 + def meta_vars; end + + # Parses a request from +socket+. This is called internally by + # WEBrick::HTTPServer. + # + # source://webrick//lib/webrick/httprequest.rb#193 + def parse(socket = T.unsafe(nil)); end + + # The request path + # + # source://webrick//lib/webrick/httprequest.rb#63 + def path; end + + # The path info (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#73 + def path_info; end + + # The path info (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#73 + def path_info=(_arg0); end + + # The socket address of the client + # + # source://webrick//lib/webrick/httprequest.rb#132 + def peeraddr; end + + # The port this request is for + # + # source://webrick//lib/webrick/httprequest.rb#347 + def port; end + + # Request query as a Hash + # + # source://webrick//lib/webrick/httprequest.rb#294 + def query; end + + # The query from the URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#78 + def query_string; end + + # The query from the URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#78 + def query_string=(_arg0); end + + # The raw header of the request + # + # source://webrick//lib/webrick/httprequest.rb#85 + def raw_header; end + + # for IO.copy_stream. + # + # source://webrick//lib/webrick/httprequest.rb#278 + def readpartial(size, buf = T.unsafe(nil)); end + + # The client's IP address + # + # source://webrick//lib/webrick/httprequest.rb#361 + def remote_ip; end + + # The complete request line such as: + # + # GET / HTTP/1.1 + # + # source://webrick//lib/webrick/httprequest.rb#36 + def request_line; end + + # The request method, GET, POST, PUT, etc. + # + # source://webrick//lib/webrick/httprequest.rb#41 + def request_method; end + + # The local time this request was received + # + # source://webrick//lib/webrick/httprequest.rb#147 + def request_time; end + + # The parsed URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#58 + def request_uri; end + + # The script name (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#68 + def script_name; end + + # The script name (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#68 + def script_name=(_arg0); end + + # The server name this request is for + # + # source://webrick//lib/webrick/httprequest.rb#354 + def server_name; end + + # Is this an SSL request? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httprequest.rb#368 + def ssl?; end + + # source://webrick//lib/webrick/httprequest.rb#379 + def to_s; end + + # The unparsed URI of the request + # + # source://webrick//lib/webrick/httprequest.rb#46 + def unparsed_uri; end + + # The remote user (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#122 + def user; end + + # The remote user (CGI variable) + # + # source://webrick//lib/webrick/httprequest.rb#122 + def user=(_arg0); end + + private + + # source://webrick//lib/webrick/httprequest.rb#566 + def _read_data(io, method, *arg); end + + # source://webrick//lib/webrick/httprequest.rb#506 + def parse_host_request_line(host); end + + # source://webrick//lib/webrick/httprequest.rb#586 + def parse_query; end + + # source://webrick//lib/webrick/httprequest.rb#484 + def parse_uri(str, scheme = T.unsafe(nil)); end + + # source://webrick//lib/webrick/httprequest.rb#511 + def read_body(socket, block); end + + # source://webrick//lib/webrick/httprequest.rb#535 + def read_chunk_size(socket); end + + # source://webrick//lib/webrick/httprequest.rb#546 + def read_chunked(socket, block); end + + # source://webrick//lib/webrick/httprequest.rb#582 + def read_data(io, size); end + + # source://webrick//lib/webrick/httprequest.rb#471 + def read_header(socket); end + + # source://webrick//lib/webrick/httprequest.rb#578 + def read_line(io, size = T.unsafe(nil)); end + + # @raise [HTTPStatus::EOFError] + # + # source://webrick//lib/webrick/httprequest.rb#451 + def read_request_line(socket); end + + # It's said that all X-Forwarded-* headers will contain more than one + # (comma-separated) value if the original request already contained one of + # these headers. Since we could use these values as Host header, we choose + # the initial(first) value. (apr_table_mergen() adds new value after the + # existing value with ", " prefix) + # + # source://webrick//lib/webrick/httprequest.rb#614 + def setup_forwarded_info; end +end + +# same as Mongrel, Thin and Puma +# +# source://webrick//lib/webrick/httprequest.rb#449 +WEBrick::HTTPRequest::MAX_HEADER_LENGTH = T.let(T.unsafe(nil), Integer) + +# An HTTP response. This is filled in by the service or do_* methods of a +# WEBrick HTTP Servlet. +# +# source://webrick//lib/webrick/httpresponse.rb#24 +class WEBrick::HTTPResponse + # Creates a new HTTP response object. WEBrick::Config::HTTP is the + # default configuration. + # + # @return [HTTPResponse] a new instance of HTTPResponse + # + # source://webrick//lib/webrick/httpresponse.rb#117 + def initialize(config); end + + # Retrieves the response header +field+ + # + # source://webrick//lib/webrick/httpresponse.rb#155 + def [](field); end + + # Sets the response header +field+ to +value+ + # + # source://webrick//lib/webrick/httpresponse.rb#162 + def []=(field, value); end + + # Body may be: + # * a String; + # * an IO-like object that responds to +#read+ and +#readpartial+; + # * a Proc-like object that responds to +#call+. + # + # In the latter case, either #chunked= should be set to +true+, + # or <code>header['content-length']</code> explicitly provided. + # Example: + # + # server.mount_proc '/' do |req, res| + # res.chunked = true + # # or + # # res.header['content-length'] = 10 + # res.body = proc { |out| out.write(Time.now.to_s) } + # end + # + # source://webrick//lib/webrick/httpresponse.rb#70 + def body; end + + # Body may be: + # * a String; + # * an IO-like object that responds to +#read+ and +#readpartial+; + # * a Proc-like object that responds to +#call+. + # + # In the latter case, either #chunked= should be set to +true+, + # or <code>header['content-length']</code> explicitly provided. + # Example: + # + # server.mount_proc '/' do |req, res| + # res.chunked = true + # # or + # # res.header['content-length'] = 10 + # res.body = proc { |out| out.write(Time.now.to_s) } + # end + # + # source://webrick//lib/webrick/httpresponse.rb#70 + def body=(_arg0); end + + # Enables chunked transfer encoding. + # + # source://webrick//lib/webrick/httpresponse.rb#214 + def chunked=(val); end + + # Will this response body be returned using chunked transfer-encoding? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpresponse.rb#207 + def chunked?; end + + # Configuration for this response + # + # source://webrick//lib/webrick/httpresponse.rb#101 + def config; end + + # The content-length header + # + # source://webrick//lib/webrick/httpresponse.rb#170 + def content_length; end + + # Sets the content-length header to +len+ + # + # source://webrick//lib/webrick/httpresponse.rb#179 + def content_length=(len); end + + # The content-type header + # + # source://webrick//lib/webrick/httpresponse.rb#186 + def content_type; end + + # Sets the content-type header to +type+ + # + # source://webrick//lib/webrick/httpresponse.rb#193 + def content_type=(type); end + + # Response cookies + # + # source://webrick//lib/webrick/httpresponse.rb#46 + def cookies; end + + # Iterates over each header in the response + # + # source://webrick//lib/webrick/httpresponse.rb#200 + def each; end + + # Filename of the static file in this response. Only used by the + # FileHandler servlet. + # + # source://webrick//lib/webrick/httpresponse.rb#91 + def filename; end + + # Filename of the static file in this response. Only used by the + # FileHandler servlet. + # + # source://webrick//lib/webrick/httpresponse.rb#91 + def filename=(_arg0); end + + # Response header + # + # source://webrick//lib/webrick/httpresponse.rb#41 + def header; end + + # HTTP Response version + # + # source://webrick//lib/webrick/httpresponse.rb#31 + def http_version; end + + # Is this a keep-alive response? + # + # source://webrick//lib/webrick/httpresponse.rb#96 + def keep_alive; end + + # Is this a keep-alive response? + # + # source://webrick//lib/webrick/httpresponse.rb#96 + def keep_alive=(_arg0); end + + # Will this response's connection be kept alive? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpresponse.rb#221 + def keep_alive?; end + + # source://webrick//lib/webrick/httpresponse.rb#325 + def make_body_tempfile; end + + # Response reason phrase ("OK") + # + # source://webrick//lib/webrick/httpresponse.rb#51 + def reason_phrase; end + + # Response reason phrase ("OK") + # + # source://webrick//lib/webrick/httpresponse.rb#51 + def reason_phrase=(_arg0); end + + # source://webrick//lib/webrick/httpresponse.rb#343 + def remove_body_tempfile; end + + # Request HTTP version for this response + # + # source://webrick//lib/webrick/httpresponse.rb#85 + def request_http_version; end + + # Request HTTP version for this response + # + # source://webrick//lib/webrick/httpresponse.rb#85 + def request_http_version=(_arg0); end + + # Request method for this response + # + # source://webrick//lib/webrick/httpresponse.rb#75 + def request_method; end + + # Request method for this response + # + # source://webrick//lib/webrick/httpresponse.rb#75 + def request_method=(_arg0); end + + # Request URI for this response + # + # source://webrick//lib/webrick/httpresponse.rb#80 + def request_uri; end + + # Request URI for this response + # + # source://webrick//lib/webrick/httpresponse.rb#80 + def request_uri=(_arg0); end + + # Sends the body on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#378 + def send_body(socket); end + + # Sends the headers on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#355 + def send_header(socket); end + + # Sends the response on +socket+ + # + # source://webrick//lib/webrick/httpresponse.rb#238 + def send_response(socket); end + + # Bytes sent in this response + # + # source://webrick//lib/webrick/httpresponse.rb#106 + def sent_size; end + + # Creates an error page for exception +ex+ with an optional +backtrace+ + # + # source://webrick//lib/webrick/httpresponse.rb#405 + def set_error(ex, backtrace = T.unsafe(nil)); end + + # Redirects to +url+ with a WEBrick::HTTPStatus::Redirect +status+. + # + # Example: + # + # res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect + # + # source://webrick//lib/webrick/httpresponse.rb#395 + def set_redirect(status, url); end + + # Sets up the headers for sending + # + # source://webrick//lib/webrick/httpresponse.rb#255 + def setup_header; end + + # Response status code (200) + # + # source://webrick//lib/webrick/httpresponse.rb#36 + def status; end + + # Sets the response's status to the +status+ code + # + # source://webrick//lib/webrick/httpresponse.rb#147 + def status=(status); end + + # The response's HTTP status line + # + # source://webrick//lib/webrick/httpresponse.rb#140 + def status_line; end + + # Set the response body proc as an streaming/upgrade response. + # + # source://webrick//lib/webrick/httpresponse.rb#111 + def upgrade; end + + # Sets the response to be a streaming/upgrade response. + # This will disable keep-alive and chunked transfer encoding. + # + # source://webrick//lib/webrick/httpresponse.rb#229 + def upgrade!(protocol); end + + # Set the response body proc as an streaming/upgrade response. + # + # source://webrick//lib/webrick/httpresponse.rb#111 + def upgrade=(_arg0); end + + private + + # preserved for compatibility with some 3rd-party handlers + # + # source://webrick//lib/webrick/httpresponse.rb#581 + def _write_data(socket, data); end + + # source://webrick//lib/webrick/httpresponse.rb#432 + def check_header(header_value); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpresponse.rb#443 + def error_body(backtrace, ex, host, port); end + + # source://webrick//lib/webrick/httpresponse.rb#473 + def send_body_io(socket); end + + # source://webrick//lib/webrick/httpresponse.rb#535 + def send_body_proc(socket); end + + # source://webrick//lib/webrick/httpresponse.rb#513 + def send_body_string(socket); end +end + +# source://webrick//lib/webrick/httpresponse.rb#555 +class WEBrick::HTTPResponse::ChunkedWrapper + # @return [ChunkedWrapper] a new instance of ChunkedWrapper + # + # source://webrick//lib/webrick/httpresponse.rb#556 + def initialize(socket, resp); end + + # source://webrick//lib/webrick/httpresponse.rb#574 + def <<(*buf); end + + # source://webrick//lib/webrick/httpresponse.rb#561 + def write(buf); end +end + +# An HTTP Server +# +# source://webrick//lib/webrick/httpserver.rb#44 +class WEBrick::HTTPServer < ::WEBrick::GenericServer + # Creates a new HTTP server according to +config+ + # + # An HTTP server uses the following attributes: + # + # :AccessLog:: An array of access logs. See WEBrick::AccessLog + # :BindAddress:: Local address for the server to bind to + # :DocumentRoot:: Root path to serve files from + # :DocumentRootOptions:: Options for the default HTTPServlet::FileHandler + # :HTTPVersion:: The HTTP version of this server + # :Port:: Port to listen on + # :RequestCallback:: Called with a request and response before each + # request is serviced. + # :RequestTimeout:: Maximum time to wait between requests + # :ServerAlias:: Array of alternate names for this server for virtual + # hosting + # :ServerName:: Name for this server for virtual hosting + # + # @return [HTTPServer] a new instance of HTTPServer + # + # source://webrick//lib/webrick/httpserver.rb#46 + def initialize(config = T.unsafe(nil), default = T.unsafe(nil)); end + + # Logs +req+ and +res+ in the access logs. +config+ is used for the + # server name. + # + # source://webrick//lib/webrick/httpserver.rb#220 + def access_log(config, req, res); end + + # Creates the HTTPRequest used when handling the HTTP + # request. Can be overridden by subclasses. + # + # source://webrick//lib/webrick/httpserver.rb#230 + def create_request(with_webrick_config); end + + # Creates the HTTPResponse used when handling the HTTP + # request. Can be overridden by subclasses. + # + # source://webrick//lib/webrick/httpserver.rb#237 + def create_response(with_webrick_config); end + + # The default OPTIONS request handler says GET, HEAD, POST and OPTIONS + # requests are allowed. + # + # source://webrick//lib/webrick/httpserver.rb#147 + def do_OPTIONS(req, res); end + + # Finds the appropriate virtual host to handle +req+ + # + # source://webrick//lib/webrick/httpserver.rb#207 + def lookup_server(req); end + + # Mounts +servlet+ on +dir+ passing +options+ to the servlet at creation + # time + # + # source://webrick//lib/webrick/httpserver.rb#155 + def mount(dir, servlet, *options); end + + # Mounts +proc+ or +block+ on +dir+ and calls it with a + # WEBrick::HTTPRequest and WEBrick::HTTPResponse + # + # @raise [HTTPServerError] + # + # source://webrick//lib/webrick/httpserver.rb#164 + def mount_proc(dir, proc = T.unsafe(nil), &block); end + + # Processes requests on +sock+ + # + # source://webrick//lib/webrick/httpserver.rb#69 + def run(sock); end + + # Finds a servlet for +path+ + # + # source://webrick//lib/webrick/httpserver.rb#182 + def search_servlet(path); end + + # Services +req+ and fills in +res+ + # + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpserver.rb#125 + def service(req, res); end + + # Unmounts +dir+ + # + # source://webrick//lib/webrick/httpserver.rb#173 + def umount(dir); end + + # Unmounts +dir+ + # + # source://webrick//lib/webrick/httpserver.rb#173 + def unmount(dir); end + + # Adds +server+ as a virtual host. + # + # source://webrick//lib/webrick/httpserver.rb#193 + def virtual_host(server); end +end + +# Mount table for the path a servlet is mounted on in the directory space +# of the server. Users of WEBrick can only access this indirectly via +# WEBrick::HTTPServer#mount, WEBrick::HTTPServer#unmount and +# WEBrick::HTTPServer#search_servlet +# +# source://webrick//lib/webrick/httpserver.rb#247 +class WEBrick::HTTPServer::MountTable + # @return [MountTable] a new instance of MountTable + # + # source://webrick//lib/webrick/httpserver.rb#248 + def initialize; end + + # source://webrick//lib/webrick/httpserver.rb#253 + def [](dir); end + + # source://webrick//lib/webrick/httpserver.rb#258 + def []=(dir, val); end + + # source://webrick//lib/webrick/httpserver.rb#265 + def delete(dir); end + + # source://webrick//lib/webrick/httpserver.rb#272 + def scan(path); end + + private + + # source://webrick//lib/webrick/httpserver.rb#279 + def compile; end + + # source://webrick//lib/webrick/httpserver.rb#287 + def normalize(dir); end +end + +# AbstractServlet allows HTTP server modules to be reused across multiple +# servers and allows encapsulation of functionality. +# +# By default a servlet will respond to GET, HEAD (through an alias to GET) +# and OPTIONS requests. +# +# By default a new servlet is initialized for every request. A servlet +# instance can be reused by overriding ::get_instance in the +# AbstractServlet subclass. +# +# == A Simple Servlet +# +# class Simple < WEBrick::HTTPServlet::AbstractServlet +# def do_GET request, response +# status, content_type, body = do_stuff_with request +# +# response.status = status +# response['Content-Type'] = content_type +# response.body = body +# end +# +# def do_stuff_with request +# return 200, 'text/plain', 'you got a page' +# end +# end +# +# This servlet can be mounted on a server at a given path: +# +# server.mount '/simple', Simple +# +# == Servlet Configuration +# +# Servlets can be configured via initialize. The first argument is the +# HTTP server the servlet is being initialized for. +# +# class Configurable < Simple +# def initialize server, color, size +# super server +# @color = color +# @size = size +# end +# +# def do_stuff_with request +# content = "<p " \ +# %q{style="color: #{@color}; font-size: #{@size}"} \ +# ">Hello, World!" +# +# return 200, "text/html", content +# end +# end +# +# This servlet must be provided two arguments at mount time: +# +# server.mount '/configurable', Configurable, 'red', '2em' +# +# source://webrick//lib/webrick/httpservlet/abstract.rb#76 +class WEBrick::HTTPServlet::AbstractServlet + # Initializes a new servlet for +server+ using +options+ which are + # stored as-is in +@options+. +@logger+ is also provided. + # + # @return [AbstractServlet] a new instance of AbstractServlet + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#91 + def initialize(server, *options); end + + # Raises a NotFound exception + # + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#115 + def do_GET(req, res); end + + # Dispatches to do_GET + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#122 + def do_HEAD(req, res); end + + # Returns the allowed HTTP request methods + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#129 + def do_OPTIONS(req, res); end + + # Dispatches to a +do_+ method based on +req+ if such a method is + # available. (+do_GET+ for a GET request). Raises a MethodNotAllowed + # exception if the method is not implemented. + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#102 + def service(req, res); end + + private + + # Redirects to a path ending in / + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#140 + def redirect_to_directory_uri(req, res); end + + class << self + # Factory for servlet instances that will handle a request from +server+ + # using +options+ from the mount point. By default a new servlet + # instance is created for every call. + # + # source://webrick//lib/webrick/httpservlet/abstract.rb#83 + def get_instance(server, *options); end + end +end + +# Servlet for handling CGI scripts +# +# Example: +# +# server.mount('/cgi/my_script', WEBrick::HTTPServlet::CGIHandler, +# '/path/to/my_script') +# +# source://webrick//lib/webrick/httpservlet/cgihandler.rb#28 +class WEBrick::HTTPServlet::CGIHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new CGI script servlet for the script at +name+ + # + # @return [CGIHandler] a new instance of CGIHandler + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#36 + def initialize(server, name); end + + # :stopdoc: + # + # @raise [HTTPStatus::InternalServerError] + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 + def do_GET(req, res); end + + # :stopdoc: + # + # @raise [HTTPStatus::InternalServerError] + # + # source://webrick//lib/webrick/httpservlet/cgihandler.rb#50 + def do_POST(req, res); end +end + +# source://webrick//lib/webrick/httpservlet/cgihandler.rb#31 +WEBrick::HTTPServlet::CGIHandler::CGIRunnerArray = T.let(T.unsafe(nil), Array) + +# Servlet for serving a single file. You probably want to use the +# FileHandler servlet instead as it handles directories and fancy indexes. +# +# Example: +# +# server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler, +# '/path/to/my_page.txt') +# +# This servlet handles If-Modified-Since and Range requests. +# +# source://webrick//lib/webrick/httpservlet/filehandler.rb#32 +class WEBrick::HTTPServlet::DefaultFileHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a DefaultFileHandler instance for the file at +local_path+. + # + # @return [DefaultFileHandler] a new instance of DefaultFileHandler + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#37 + def initialize(server, local_path); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#44 + def do_GET(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#118 + def make_partial_content(req, res, filename, filesize); end + + # returns a lambda for webrick/httpresponse.rb send_body_proc + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#90 + def multipart_body(body, parts, boundary, mtype, filesize); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#64 + def not_modified?(req, res, mtime, etag); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#155 + def prepare_range(range, filesize); end +end + +# ERBHandler evaluates an ERB file and returns the result. This handler +# is automatically used if there are .rhtml files in a directory served by +# the FileHandler. +# +# ERBHandler supports GET and POST methods. +# +# The ERB file is evaluated with the local variables +servlet_request+ and +# +servlet_response+ which are a WEBrick::HTTPRequest and +# WEBrick::HTTPResponse respectively. +# +# Example .rhtml file: +# +# Request to <%= servlet_request.request_uri %> +# +# Query params <%= servlet_request.query.inspect %> +# +# source://webrick//lib/webrick/httpservlet/erbhandler.rb#36 +class WEBrick::HTTPServlet::ERBHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new ERBHandler on +server+ that will evaluate and serve the + # ERB file +name+ + # + # @return [ERBHandler] a new instance of ERBHandler + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#42 + def initialize(server, name); end + + # Handles GET requests + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 + def do_GET(req, res); end + + # Handles GET requests + # + # Handles POST requests + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#50 + def do_POST(req, res); end + + private + + # Evaluates +erb+ providing +servlet_request+ and +servlet_response+ as + # local variables. + # + # source://webrick//lib/webrick/httpservlet/erbhandler.rb#79 + def evaluate(erb, servlet_request, servlet_response); end +end + +# Serves a directory including fancy indexing and a variety of other +# options. +# +# Example: +# +# server.mount('/assets', WEBrick::HTTPServlet::FileHandler, +# '/path/to/assets') +# +# source://webrick//lib/webrick/httpservlet/filehandler.rb#175 +class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a FileHandler servlet on +server+ that serves files starting + # at directory +root+ + # + # +options+ may be a Hash containing keys from + # WEBrick::Config::FileHandler or +true+ or +false+. + # + # If +options+ is true or false then +:FancyIndexing+ is enabled or + # disabled respectively. + # + # @return [FileHandler] a new instance of FileHandler + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#203 + def initialize(server, root, options = T.unsafe(nil), default = T.unsafe(nil)); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#245 + def do_GET(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#257 + def do_OPTIONS(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#251 + def do_POST(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#224 + def service(req, res); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#215 + def set_filesystem_encoding(str); end + + private + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#416 + def call_callback(callback_name, req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#369 + def check_filename(req, res, name); end + + # @raise [HTTPStatus::NotFound] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#309 + def exec_handler(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#322 + def get_handler(req, res); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#428 + def nondisclosure_name?(name); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#286 + def prevent_directory_traversal(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#394 + def search_file(req, res, basename); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#385 + def search_index_file(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#437 + def set_dir_list(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#335 + def set_filename(req, res); end + + # source://webrick//lib/webrick/httpservlet/filehandler.rb#376 + def shift_path_info(req, res, path_info, base = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#277 + def trailing_pathsep?(path); end + + # @return [Boolean] + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#422 + def windows_ambiguous_name?(name); end + + class << self + # Allow custom handling of requests for files with +suffix+ by class + # +handler+ + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#182 + def add_handler(suffix, handler); end + + # Remove custom handling of requests for files with +suffix+ + # + # source://webrick//lib/webrick/httpservlet/filehandler.rb#189 + def remove_handler(suffix); end + end +end + +# Mounts a proc at a path that accepts a request and response. +# +# Instead of mounting this servlet with WEBrick::HTTPServer#mount use +# WEBrick::HTTPServer#mount_proc: +# +# server.mount_proc '/' do |req, res| +# res.body = 'it worked!' +# res.status = 200 +# end +# +# source://webrick//lib/webrick/httpservlet/prochandler.rb#29 +class WEBrick::HTTPServlet::ProcHandler < ::WEBrick::HTTPServlet::AbstractServlet + # @return [ProcHandler] a new instance of ProcHandler + # + # source://webrick//lib/webrick/httpservlet/prochandler.rb#34 + def initialize(proc); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_GET(request, response); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_POST(request, response); end + + # source://webrick//lib/webrick/httpservlet/prochandler.rb#38 + def do_PUT(request, response); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httpservlet/prochandler.rb#30 + def get_instance(server, *options); end +end + +# This module is used to manager HTTP status codes. +# +# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more +# information. +# +# source://webrick//lib/webrick/httpstatus.rb#21 +module WEBrick::HTTPStatus + private + + # Is +code+ a client error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#170 + def client_error?(code); end + + # Is +code+ an error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#164 + def error?(code); end + + # Is +code+ an informational status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#146 + def info?(code); end + + # Returns the description corresponding to the HTTP status +code+ + # + # WEBrick::HTTPStatus.reason_phrase 404 + # => "Not Found" + # + # source://webrick//lib/webrick/httpstatus.rb#140 + def reason_phrase(code); end + + # Is +code+ a redirection status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#158 + def redirect?(code); end + + # Is +code+ a server error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#176 + def server_error?(code); end + + # Is +code+ a successful status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#152 + def success?(code); end + + class << self + # Returns the status class corresponding to +code+ + # + # WEBrick::HTTPStatus[302] + # => WEBrick::HTTPStatus::NotFound + # + # source://webrick//lib/webrick/httpstatus.rb#186 + def [](code); end + + # Is +code+ a client error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#170 + def client_error?(code); end + + # Is +code+ an error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#164 + def error?(code); end + + # Is +code+ an informational status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#146 + def info?(code); end + + # Returns the description corresponding to the HTTP status +code+ + # + # WEBrick::HTTPStatus.reason_phrase 404 + # => "Not Found" + # + # source://webrick//lib/webrick/httpstatus.rb#140 + def reason_phrase(code); end + + # Is +code+ a redirection status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#158 + def redirect?(code); end + + # Is +code+ a server error status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#176 + def server_error?(code); end + + # Is +code+ a successful status? + # + # @return [Boolean] + # + # source://webrick//lib/webrick/httpstatus.rb#152 + def success?(code); end + end +end + +# Root of the HTTP status class hierarchy +# +# source://webrick//lib/webrick/httpstatus.rb#25 +class WEBrick::HTTPStatus::Status < ::StandardError + # Returns the HTTP status code + # + # source://webrick//lib/webrick/httpstatus.rb#31 + def code; end + + # Returns the HTTP status description + # + # source://webrick//lib/webrick/httpstatus.rb#34 + def reason_phrase; end + + # Returns the HTTP status code + # + # source://webrick//lib/webrick/httpstatus.rb#31 + def to_i; end + + class << self + # source://webrick//lib/webrick/httpstatus.rb#27 + def code; end + + # source://webrick//lib/webrick/httpstatus.rb#27 + def reason_phrase; end + end +end + +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# source://webrick//lib/webrick/httputils.rb#25 +module WEBrick::HTTPUtils + private + + # source://webrick//lib/webrick/httputils.rb#454 + def _escape(str, regex); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httputils.rb#452 + def _make_regex(str); end + + # source://webrick//lib/webrick/httputils.rb#453 + def _make_regex!(str); end + + # source://webrick//lib/webrick/httputils.rb#460 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # source://webrick//lib/webrick/httputils.rb#234 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#478 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#519 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#492 + def escape_form(str); end + + # Escapes path +str+ + # + # source://webrick//lib/webrick/httputils.rb#508 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # source://webrick//lib/webrick/httputils.rb#123 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # source://webrick//lib/webrick/httputils.rb#145 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # source://webrick//lib/webrick/httputils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # source://webrick//lib/webrick/httputils.rb#406 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # source://webrick//lib/webrick/httputils.rb#156 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # source://webrick//lib/webrick/httputils.rb#382 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # source://webrick//lib/webrick/httputils.rb#213 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # source://webrick//lib/webrick/httputils.rb#195 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # source://webrick//lib/webrick/httputils.rb#244 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # source://webrick//lib/webrick/httputils.rb#186 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#485 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#501 + def unescape_form(str); end + + class << self + # source://webrick//lib/webrick/httputils.rb#454 + def _escape(str, regex); end + + # :stopdoc: + # + # source://webrick//lib/webrick/httputils.rb#452 + def _make_regex(str); end + + # source://webrick//lib/webrick/httputils.rb#453 + def _make_regex!(str); end + + # source://webrick//lib/webrick/httputils.rb#460 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # source://webrick//lib/webrick/httputils.rb#234 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#478 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#519 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#492 + def escape_form(str); end + + # Escapes path +str+ + # + # source://webrick//lib/webrick/httputils.rb#508 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # source://webrick//lib/webrick/httputils.rb#123 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # source://webrick//lib/webrick/httputils.rb#145 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # source://webrick//lib/webrick/httputils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # source://webrick//lib/webrick/httputils.rb#406 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # source://webrick//lib/webrick/httputils.rb#156 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # source://webrick//lib/webrick/httputils.rb#382 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # source://webrick//lib/webrick/httputils.rb#213 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # source://webrick//lib/webrick/httputils.rb#195 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # source://webrick//lib/webrick/httputils.rb#244 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # source://webrick//lib/webrick/httputils.rb#186 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#485 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # source://webrick//lib/webrick/httputils.rb#501 + def unescape_form(str); end + end +end + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# source://webrick//lib/webrick/httputils.rb#253 +class WEBrick::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # + # source://webrick//lib/webrick/httputils.rb#278 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # source://webrick//lib/webrick/httputils.rb#311 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # source://webrick//lib/webrick/httputils.rb#297 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # source://webrick//lib/webrick/httputils.rb#331 + def append_data(data); end + + # Yields each entry in this FormData + # + # source://webrick//lib/webrick/httputils.rb#346 + def each_data; end + + # The filename of the form data part + # + # source://webrick//lib/webrick/httputils.rb#265 + def filename; end + + # The filename of the form data part + # + # source://webrick//lib/webrick/httputils.rb#265 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # source://webrick//lib/webrick/httputils.rb#358 + def list; end + + # The name of the form data part + # + # source://webrick//lib/webrick/httputils.rb#260 + def name; end + + # The name of the form data part + # + # source://webrick//lib/webrick/httputils.rb#260 + def name=(_arg0); end + + # source://webrick//lib/webrick/httputils.rb#267 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # + # A FormData will behave like an Array + # + # source://webrick//lib/webrick/httputils.rb#358 + def to_ary; end + + # This FormData's body + # + # source://webrick//lib/webrick/httputils.rb#374 + def to_s; end + + protected + + # source://webrick//lib/webrick/httputils.rb#267 + def next_data; end +end + +# source://webrick//lib/webrick/utils.rb#17 +module WEBrick::Utils + private + + # Creates TCP server sockets bound to +address+:+port+ and returns them. + # + # It will create IPV4 and IPV6 sockets on all interfaces. + # + # source://webrick//lib/webrick/utils.rb#56 + def create_listeners(address, port); end + + # The server hostname + # + # source://webrick//lib/webrick/utils.rb#47 + def getservername; end + + # Generates a random string of length +len+ + # + # source://webrick//lib/webrick/utils.rb#79 + def random_string(len); end + + # Sets the close on exec flag for +io+ + # + # source://webrick//lib/webrick/utils.rb#27 + def set_close_on_exec(io); end + + # Sets IO operations on +io+ to be non-blocking + # + # source://webrick//lib/webrick/utils.rb#20 + def set_non_blocking(io); end + + # Changes the process's uid and gid to the ones of +user+ + # + # source://webrick//lib/webrick/utils.rb#34 + def su(user); end + + # Executes the passed block and raises +exception+ if execution takes more + # than +seconds+. + # + # If +seconds+ is zero or nil, simply executes the block + # + # source://webrick//lib/webrick/utils.rb#253 + def timeout(seconds, exception = T.unsafe(nil)); end + + class << self + # Creates TCP server sockets bound to +address+:+port+ and returns them. + # + # It will create IPV4 and IPV6 sockets on all interfaces. + # + # source://webrick//lib/webrick/utils.rb#56 + def create_listeners(address, port); end + + # The server hostname + # + # source://webrick//lib/webrick/utils.rb#47 + def getservername; end + + # Generates a random string of length +len+ + # + # source://webrick//lib/webrick/utils.rb#79 + def random_string(len); end + + # Sets the close on exec flag for +io+ + # + # source://webrick//lib/webrick/utils.rb#27 + def set_close_on_exec(io); end + + # Sets IO operations on +io+ to be non-blocking + # + # source://webrick//lib/webrick/utils.rb#20 + def set_non_blocking(io); end + + # Changes the process's uid and gid to the ones of +user+ + # + # source://webrick//lib/webrick/utils.rb#34 + def su(user); end + + # Executes the passed block and raises +exception+ if execution takes more + # than +seconds+. + # + # If +seconds+ is zero or nil, simply executes the block + # + # source://webrick//lib/webrick/utils.rb#253 + def timeout(seconds, exception = T.unsafe(nil)); end + end +end + +# Class used to manage timeout handlers across multiple threads. +# +# Timeout handlers should be managed by using the class methods which are +# synchronized. +# +# id = TimeoutHandler.register(10, Timeout::Error) +# begin +# sleep 20 +# puts 'foo' +# ensure +# TimeoutHandler.cancel(id) +# end +# +# will raise Timeout::Error +# +# id = TimeoutHandler.register(10, Timeout::Error) +# begin +# sleep 5 +# puts 'foo' +# ensure +# TimeoutHandler.cancel(id) +# end +# +# will print 'foo' +# +# source://webrick//lib/webrick/utils.rb#118 +class WEBrick::Utils::TimeoutHandler + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # Creates a new TimeoutHandler. You should use ::register and ::cancel + # instead of creating the timeout handler directly. + # + # @return [TimeoutHandler] a new instance of TimeoutHandler + # + # source://webrick//lib/webrick/utils.rb#148 + def initialize; end + + # Cancels the timeout handler +id+ + # + # source://webrick//lib/webrick/utils.rb#226 + def cancel(thread, id); end + + # Interrupts the timeout handler +id+ and raises +exception+ + # + # source://webrick//lib/webrick/utils.rb#203 + def interrupt(thread, id, exception); end + + # Registers a new timeout handler + # + # +time+:: Timeout in seconds + # +exception+:: Exception to raise when timeout elapsed + # + # source://webrick//lib/webrick/utils.rb#214 + def register(thread, time, exception); end + + # source://webrick//lib/webrick/utils.rb#240 + def terminate; end + + private + + # source://webrick//lib/webrick/utils.rb#158 + def watch; end + + # source://webrick//lib/webrick/utils.rb#193 + def watcher; end + + class << self + # Cancels the timeout handler +id+ + # + # source://webrick//lib/webrick/utils.rb#137 + def cancel(id); end + + # Registers a new timeout handler + # + # +time+:: Timeout in seconds + # +exception+:: Exception to raise when timeout elapsed + # + # source://webrick//lib/webrick/utils.rb#130 + def register(seconds, exception); end + + # source://webrick//lib/webrick/utils.rb#141 + def terminate; end + end +end diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi new file mode 100644 index 0000000000..6d2d91a3ff --- /dev/null +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -0,0 +1,428 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yard-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem yard-sorbet`. + +class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base + include ::YARDSorbet::Handlers::StructClassHandler +end + +# Types are documentation +# +# source://yard-sorbet//lib/yard-sorbet/version.rb#5 +module YARDSorbet; end + +# Extract & re-add directives to a docstring +# +# source://yard-sorbet//lib/yard-sorbet/directives.rb#6 +module YARDSorbet::Directives + class << self + # source://yard-sorbet//lib/yard-sorbet/directives.rb#21 + sig { params(docstring: ::String, directives: T::Array[::String]).void } + def add_directives(docstring, directives); end + + # source://yard-sorbet//lib/yard-sorbet/directives.rb#10 + sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) } + def extract_directives(docstring); end + end +end + +# Custom YARD Handlers +# +# @see https://rubydoc.info/gems/yard/YARD/Handlers/Base YARD Base Handler documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7 +module YARDSorbet::Handlers; end + +# Apllies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7 +class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#21 + sig { void } + def process; end +end + +# Extra text for class namespaces +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#18 +YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String) + +# The text accompanying the `@abstract` tag. +# +# @see https://github.com/lsegal/yard/blob/main/templates/default/docstring/html/abstract.erb The `@abstract` tag template +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#16 +YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String) + +# Handle `enums` calls, registering enum values as constants +# +# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#7 +class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#14 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#29 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def const_assign_node?(node); end +end + +# Extends any modules included via `mixes_in_class_methods` +# +# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#9 +class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#16 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#28 + sig { returns(::YARD::CodeObjects::NamespaceObject) } + def included_in; end +end + +# Tracks modules that invoke `mixes_in_class_methods` for use in {IncludeHandler} +# +# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9 +class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#23 + sig { void } + def process; end + + class << self + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18 + sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) } + def mixed_in_class_methods(code_obj); end + end +end + +# A YARD Handler for Sorbet type declarations +# +# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#7 +class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base + # Swap the method definition docstring and the sig docstring. + # Parse relevant parts of the `sig` and include them as well. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#24 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 + sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } + def document_attr_methods(method_objects); end + + # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* + # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* + # declarations. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } + def merged_into_attr?(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#78 + sig do + params( + attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), + docstring: T.nilable(::String), + include_params: T::Boolean + ).void + end + def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#99 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_params(node, docstring); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#109 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_return(node, docstring); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#87 + sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } + def parse_sig(docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void } + def process_attr(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36 + sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void } + def process_def(def_node); end +end + +# YARD types that can have docstrings attached to them +# +# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14 +YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } + +# Class-level handler that folds all `const` and `prop` declarations into the constructor documentation +# this needs to be injected as a module otherwise the default Class handler will overwrite documentation +# +# @note this module is included in `YARD::Handlers::Ruby::ClassHandler` +# +# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10 +module YARDSorbet::Handlers::StructClassHandler + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50 + sig do + params( + object: ::YARD::CodeObjects::MethodObject, + props: T::Array[::YARDSorbet::TStructProp], + docstring: ::YARD::Docstring, + directives: T::Array[::String] + ).void + end + def decorate_t_struct_init(object, props, docstring, directives); end + + # Create a virtual `initialize` method with all the `prop`/`const` arguments + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30 + sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void } + def process_t_struct_props(props, class_ns); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60 + sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) } + def to_object_parameters(props); end +end + +# Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level +# in creating a constructor +# +# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8 +class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15 + sig { void } + def process; end + + private + + # Add the source and docstring to the method object + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28 + sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void } + def decorate_object(object, prop); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38 + sig { returns(T::Boolean) } + def immutable?; end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44 + sig { params(kwd: ::String).returns(T.nilable(::String)) } + def kw_arg(kwd); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#49 + sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } + def make_prop(name); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 + sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } + def params; end + + # Register the field explicitly as an attribute. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#66 + sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } + def register_attrs(object, name); end + + # Store the prop for use in the constructor definition + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#74 + sig { params(prop: ::YARDSorbet::TStructProp).void } + def update_state(prop); end +end + +# Helper methods for working with `YARD` AST Nodes +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6 +module YARDSorbet::NodeUtils + class << self + # Traverse AST nodes in breadth-first order + # + # @note This will skip over some node types. + # @yield [YARD::Parser::Ruby::AstNode] + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21 + sig do + params( + node: ::YARD::Parser::Ruby::AstNode, + _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void + ).void + end + def bfs_traverse(node, &_blk); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#32 + sig { params(node: ::YARD::Parser::Ruby::AstNode).void } + def delete_node(node); end + + # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#38 + sig do + params( + node: ::YARD::Parser::Ruby::AstNode + ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode)) + end + def get_method_node(node); end + + # Find and return the adjacent node (ascending) + # + # @raise [IndexError] if the node does not have an adjacent sibling (ascending) + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#45 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } + def sibling_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#52 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def sigable_node?(node); end + + # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#63 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def validated_attribute_names(attr_node); end + end +end + +# Command node types that can have type signatures +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10 +YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array) + +# Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc` +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12 +YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array) + +# Node types that can have type signatures +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14 +YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } + +# Translate `sig` type syntax to `YARD` type syntax. +# +# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6 +module YARDSorbet::SigToYARD + class << self + # @see https://yardoc.org/types.html + # + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert(node); end + + private + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#61 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } + def build_generic_type(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#70 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_aref(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#82 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_array(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#90 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_collection(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#97 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_hash(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#105 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_list(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#31 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#43 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_node_type(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#110 + sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def convert_t_method(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#121 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_unknown(node); end + end +end + +# Used to store the details of a `T::Struct` `prop` definition +# +# source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6 +class YARDSorbet::TStructProp < ::T::Struct + const :default, T.nilable(::String) + const :doc, ::String + const :prop_name, ::String + const :source, ::String + const :types, T::Array[::String] + + class << self + # source://sorbet-runtime/0.5.11011/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Helper methods for working with `YARD` tags +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6 +module YARDSorbet::TagUtils + class << self + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16 + sig do + params( + docstring: ::YARD::Docstring, + tag_name: ::String, + name: T.nilable(::String) + ).returns(T.nilable(::YARD::Tags::Tag)) + end + def find_tag(docstring, tag_name, name); end + + # Create or update a `YARD` tag with type information + # + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#30 + sig do + params( + docstring: ::YARD::Docstring, + tag_name: ::String, + types: T.nilable(T::Array[::String]), + name: T.nilable(::String), + text: ::String + ).void + end + def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end + end +end + +# The `void` return type, as a constant to reduce array allocations +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10 +YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array) + +# {https://rubygems.org/gems/yard-sorbet Version history} +# +# source://yard-sorbet//lib/yard-sorbet/version.rb#7 +YARDSorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/yard@0.9.34.rbi b/sorbet/rbi/gems/yard@0.9.34.rbi new file mode 100644 index 0000000000..be9c1eb304 --- /dev/null +++ b/sorbet/rbi/gems/yard@0.9.34.rbi @@ -0,0 +1,18312 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yard` gem. +# Please instead update this file by running `bin/tapioca gem yard`. + +# source://yard//lib/yard.rb#61 +::RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +::RUBY19 = T.let(T.unsafe(nil), TrueClass) + +# source://yard//lib/yard/core_ext/array.rb#2 +class Array + include ::Enumerable + + # Places values before or after another object (by value) in + # an array. This is used in tandem with the before and after + # methods of the {Insertion} class. + # + # @example Places an item before another + # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] + # @example Places an item after another + # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c] + # @param values [Array] value to insert + # @return [Insertion] an insertion object to + # @see Insertion#before + # @see Insertion#after + # + # source://yard//lib/yard/core_ext/array.rb#15 + def place(*values); end +end + +# source://yard//lib/yard/core_ext/file.rb#4 +class File < ::IO + class << self + # Cleans a path by removing extraneous '..', '.' and '/' characters + # + # @example Clean a path + # File.cleanpath('a/b//./c/../e') # => "a/b/e" + # @param path [String] the path to clean + # @param rel_root [Boolean] allows relative path above root value + # @return [String] the sanitized path + # + # source://yard//lib/yard/core_ext/file.rb#37 + def cleanpath(path, rel_root = T.unsafe(nil)); end + + # Forces opening a file (for writing) by first creating the file's directory + # + # @param file [String] the filename to open + # @since 0.5.2 + # + # source://yard//lib/yard/core_ext/file.rb#57 + def open!(file, *args, &block); end + + # Reads a file with binary encoding + # + # @return [String] the ascii-8bit encoded data + # @since 0.5.3 + # + # source://yard//lib/yard/core_ext/file.rb#66 + def read_binary(file); end + + # Turns a path +to+ into a relative path from starting + # point +from+. The argument +from+ is assumed to be + # a filename. To treat it as a directory, make sure it + # ends in +File::SEPARATOR+ ('/' on UNIX filesystems). + # + # @param from [String] the starting filename + # (or directory with +from_isdir+ set to +true+). + # @param to [String] the final path that should be made relative. + # @return [String] the relative path from +from+ to +to+. + # + # source://yard//lib/yard/core_ext/file.rb#19 + def relative_path(from, to); end + end +end + +# source://yard//lib/yard/core_ext/file.rb#5 +File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/core_ext/file.rb#6 +File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String) + +# :stopdoc: +# +# source://yard//lib/yard/rubygems/backports/gem.rb#2 +module Gem + class << self + # Returns the Gem::SourceIndex of specifications that are in the Gem.path + # + # source://yard//lib/yard/rubygems/backports/gem.rb#6 + def source_index; end + end +end + +# Cache is an alias for SourceIndex to allow older YAMLized source index +# objects to load properly. +# +# source://yard//lib/yard/rubygems/backports/source_index.rb#363 +Gem::Cache = Gem::SourceIndex + +# The SourceIndex object indexes all the gems available from a +# particular source (e.g. a list of gem directories, or a remote +# source). A SourceIndex maps a gem full name to a gem +# specification. +# +# NOTE:: The class used to be named Cache, but that became +# confusing when cached source fetchers where introduced. The +# constant Gem::Cache is an alias for this class to allow old +# YAMLized source index objects to load properly. +# +# source://yard//lib/yard/rubygems/backports/source_index.rb#21 +class Gem::SourceIndex + include ::Enumerable + + # Constructs a source index instance from the provided specifications, which + # is a Hash of gem full names and Gem::Specifications. + # -- + # TODO merge @gems and @prerelease_gems and provide a separate method + # #prerelease_gems + # + # @return [SourceIndex] a new instance of SourceIndex + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#102 + def initialize(specifications = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#348 + def ==(other); end + + # Add a gem specification to the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#193 + def add_spec(gem_spec, name = T.unsafe(nil)); end + + # Add gem specifications to the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#202 + def add_specs(*gem_specs); end + + # TODO: remove method + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#109 + def all_gems; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#352 + def dump; end + + # Iterate over the specifications in the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#218 + def each(&block); end + + # Find a gem by an exact match on the short name. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#256 + def find_name(gem_name, requirement = T.unsafe(nil)); end + + # The signature for the given gem specification. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#242 + def gem_signature(gem_full_name); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#34 + def gems; end + + # The signature for the source index. Changes in the signature indicate a + # change in the index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#233 + def index_signature; end + + # Returns an Array specifications for the latest released versions + # of each gem in this index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#143 + def latest_specs(include_prerelease = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#248 + def length; end + + # Reconstruct the source index from the specifications in +spec_dirs+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#124 + def load_gems_in(*spec_dirs); end + + # Returns an Array of Gem::Specifications that are not up to date. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#330 + def outdated; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#113 + def prerelease_gems; end + + # An array including only the prerelease gemspecs + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#179 + def prerelease_specs; end + + # Replaces the gems in the source index from specifications in the + # directories this source index was created from. Raises an exception if + # this source index wasn't created from a directory (via from_gems_in or + # from_installed_gems, or having spec_dirs set). + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#322 + def refresh!; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#117 + def released_gems; end + + # An array including only the released gemspecs + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#186 + def released_specs; end + + # Remove a gem specification named +full_name+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#211 + def remove_spec(full_name); end + + # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+ + # is true, only gems matching Gem::Platform.local will be returned. An + # Array of matching Gem::Specification objects is returned. + # + # For backwards compatibility, a String or Regexp pattern may be passed as + # +gem_pattern+, and a Gem::Requirement for +platform_only+. This + # behavior is deprecated and will be removed. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#270 + def search(gem_pattern, platform_only = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#248 + def size; end + + # Directories to use to refresh this SourceIndex when calling refresh! + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#39 + def spec_dirs; end + + # Directories to use to refresh this SourceIndex when calling refresh! + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#39 + def spec_dirs=(_arg0); end + + # The gem specification given a full gem spec name. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#225 + def specification(full_name); end + + class << self + # Creates a new SourceIndex from the ruby format gem specifications in + # +spec_dirs+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#80 + def from_gems_in(*spec_dirs); end + + # Factory method to construct a source index instance for a given + # path. + # + # deprecated:: + # If supplied, from_installed_gems will act just like + # +from_gems_in+. This argument is deprecated and is provided + # just for backwards compatibility, and should not generally + # be used. + # + # return:: + # SourceIndex instance + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#61 + def from_installed_gems(*deprecated); end + + # Returns a list of directories from Gem.path that contain specifications. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#72 + def installed_spec_directories; end + + # Loads a ruby-format specification from +file_name+ and returns the + # loaded spec. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#90 + def load_specification(file_name); end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#17 +class IRB::SLex + # @return [SLex] a new instance of SLex + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#25 + def initialize; end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#60 + def create(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#29 + def def_rule(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil), &block); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#36 + def def_rules(*tokens, &block); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#77 + def inspect; end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#64 + def match(token); end + + # need a check? + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#51 + def postproc(token); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#45 + def preproc(token, proc); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#56 + def search(token); end +end + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#18 +IRB::SLex::DOUT = T.let(T.unsafe(nil), IRB::Notifier::CompositeNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#20 +IRB::SLex::D_DEBUG = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#21 +IRB::SLex::D_DETAIL = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#19 +IRB::SLex::D_WARN = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# ---------------------------------------------------------------------- +# +# class Node - +# +# ---------------------------------------------------------------------- +# +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#86 +class IRB::SLex::Node + # if postproc is nil, this node is an abstract node. + # if postproc is non-nil, this node is a real node. + # + # @return [Node] a new instance of Node + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#89 + def initialize(preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#113 + def create_subnode(chrs, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # chrs: String + # character array + # io must have getc()/ungetc(); and ungetc() must be + # able to be called arbitrary number of times. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#161 + def match(chrs, op = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#198 + def match_io(io, op = T.unsafe(nil)); end + + # Returns the value of attribute postproc. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 + def postproc; end + + # Sets the attribute postproc + # + # @param value the value to set the attribute postproc to. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 + def postproc=(_arg0); end + + # Returns the value of attribute preproc. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 + def preproc; end + + # Sets the attribute preproc + # + # @param value the value to set the attribute preproc to. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 + def preproc=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#98 + def search(chrs, opt = T.unsafe(nil)); end +end + +# The Insertion class inserts a value before or after another +# value in a list. +# +# @example +# Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3] +# +# source://yard//lib/yard/core_ext/insertion.rb#7 +class Insertion + # Creates an insertion object on a list with a value to be + # inserted. To finalize the insertion, call {#before} or + # {#after} on the object. + # + # @param list [Array] the list to perform the insertion on + # @param value [Object] the value to insert + # @return [Insertion] a new instance of Insertion + # + # source://yard//lib/yard/core_ext/insertion.rb#14 + def initialize(list, value); end + + # Inserts the value after +val+. + # + # @example If subsections are ignored + # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3] + # @param val [Object] the object the value will be inserted after + # @param recursive [Boolean] look inside sublists + # + # source://yard//lib/yard/core_ext/insertion.rb#30 + def after(val, recursive = T.unsafe(nil)); end + + # Alias for {#after} with +recursive+ set to true + # + # @since 0.6.0 + # + # source://yard//lib/yard/core_ext/insertion.rb#38 + def after_any(val); end + + # Inserts the value before +val+ + # + # @param val [Object] the object the value will be inserted before + # @param recursive [Boolean] look inside sublists + # + # source://yard//lib/yard/core_ext/insertion.rb#22 + def before(val, recursive = T.unsafe(nil)); end + + # Alias for {#before} with +recursive+ set to true + # + # @since 0.6.0 + # + # source://yard//lib/yard/core_ext/insertion.rb#34 + def before_any(val); end + + private + + # This method performs the actual insertion + # + # @param val [Object] the value to insert + # @param rel [Fixnum] the relative index (0 or 1) of where the object + # should be placed + # @param recursive [Boolean] look inside sublists + # @param list [Array] the list to place objects into + # + # source://yard//lib/yard/core_ext/insertion.rb#49 + def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end +end + +# source://yard//lib/yard/core_ext/module.rb#2 +class Module + # Returns the class name of a full module namespace path + # + # @example + # module A::B::C; class_name end # => "C" + # @return [String] the last part of a module path + # + # source://yard//lib/yard/core_ext/module.rb#8 + def class_name; end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://yard//lib/yard/globals.rb#8 + def P(namespace, name = T.unsafe(nil), type = T.unsafe(nil)); end + + # source://yard//lib/yard/globals.rb#20 + def log; end +end + +# Keep track of Ruby version for compatibility code +# +# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead. +# +# source://yard//lib/yard.rb#61 +RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +RUBY19 = T.let(T.unsafe(nil), TrueClass) + +# source://yard//lib/yard/core_ext/string.rb#2 +class String + include ::Comparable + + # Splits text into tokens the way a shell would, handling quoted + # text as a single token. Use '\"' and "\'" to escape quotes and + # '\\' to escape a backslash. + # + # @return [Array] an array representing the tokens + # + # source://yard//lib/yard/core_ext/string.rb#8 + def shell_split; end +end + +# A subclass of Hash where all keys are converted into Symbols, and +# optionally, all String values are converted into Symbols. +# +# source://yard//lib/yard/core_ext/symbol_hash.rb#8 +class SymbolHash < ::Hash + # Creates a new SymbolHash object + # + # @param symbolize_value [Boolean] converts any String values into Symbols + # if this is set to +true+. + # @return [SymbolHash] a new instance of SymbolHash + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#9 + def initialize(symbolize_value = T.unsafe(nil)); end + + # Accessed a symbolized key + # + # @param key [#to_sym] the key to access + # @return [Object] the value associated with the key + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#49 + def [](key); end + + # Assigns a value to a symbolized key + # + # @param key [#to_sym] the key + # @param value [Object] the value to be assigned. If this is a String and + # values are set to be symbolized, it will be converted into a Symbol. + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#42 + def []=(key, value); end + + # Deleted a key and value associated with it + # + # @param key [#to_sym] the key to delete + # @return [void] + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#54 + def delete(key); end + + # Tests if a symbolized key exists + # + # @param key [#to_sym] the key to test + # @return [Boolean] whether the key exists + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#59 + def has_key?(key); end + + # Tests if a symbolized key exists + # + # @param key [#to_sym] the key to test + # @return [Boolean] whether the key exists + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#59 + def key?(key); end + + # Merges the contents of another hash into a new SymbolHash object + # + # @param hash [Hash] the hash of objects to copy + # @return [SymbolHash] a new SymbolHash containing the merged data + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#74 + def merge(hash); end + + # Updates the object with the contents of another Hash object. + # This method modifies the original SymbolHash object + # + # @param hash [Hash] the hash object to copy the values from + # @return [SymbolHash] self + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#67 + def merge!(hash); end + + # Updates the object with the contents of another Hash object. + # This method modifies the original SymbolHash object + # + # @param hash [Hash] the hash object to copy the values from + # @return [SymbolHash] self + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#67 + def update(hash); end + + class << self + # @overload [] + # @overload [] + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#28 + def [](*hsh); end + end +end + +# @private +# +# source://yard//lib/yard/server/webrick_adapter.rb#42 +class WEBrick::HTTPRequest + # Returns the value of attribute version_supplied. + # + # source://yard//lib/yard/server/webrick_adapter.rb#43 + def version_supplied; end + + # Sets the attribute version_supplied + # + # @param value the value to set the attribute version_supplied to. + # + # source://yard//lib/yard/server/webrick_adapter.rb#43 + def version_supplied=(_arg0); end + + # @return [Boolean] + # + # source://yard//lib/yard/server/webrick_adapter.rb#44 + def xhr?; end +end + +# Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems +# upon gem installation. +# +# This file is automatically required by RubyGems 1.9 and newer. +# +# source://yard//lib/yard.rb#2 +module YARD + class << self + # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except + # those listed in +~/.yard/ignored_plugins+. This is called immediately + # after YARD is loaded to allow plugin support. + # + # @deprecated Use {Config.load_plugins} + # @return [Boolean] true if all plugins loaded successfully, false otherwise. + # + # source://yard//lib/yard.rb#31 + def load_plugins; end + + # An alias to {Parser::SourceParser}'s parsing method + # + # @example Parse a glob of files + # YARD.parse('lib/**/*.rb') + # @see Parser::SourceParser.parse + # + # source://yard//lib/yard.rb#20 + def parse(*args); end + + # An alias to {Parser::SourceParser}'s parsing method + # + # @example Parse a string of input + # YARD.parse_string('class Foo; end') + # @see Parser::SourceParser.parse_string + # + # source://yard//lib/yard.rb#27 + def parse_string(*args); end + + # @return [Boolean] whether YARD is being run in Ruby 1.8 mode + # + # source://yard//lib/yard.rb#44 + def ruby18?; end + + # @return [Boolean] whether YARD is being run in Ruby 1.9 mode + # + # source://yard//lib/yard.rb#47 + def ruby19?; end + + # @return [Boolean] whether YARD is being run in Ruby 2.0 + # + # source://yard//lib/yard.rb#50 + def ruby2?; end + + # @return [Boolean] whether YARD is being run in Ruby 3.1 + # + # source://yard//lib/yard.rb#56 + def ruby31?; end + + # @return [Boolean] whether YARD is being run in Ruby 3.0 + # + # source://yard//lib/yard.rb#53 + def ruby3?; end + + # @return [Boolean] whether YARD is being run inside of Windows + # + # source://yard//lib/yard.rb#34 + def windows?; end + end +end + +# Namespace for command-line interface components +# +# source://yard//lib/yard/autoload.rb#6 +module YARD::CLI; end + +# Abstract base class for CLI utilities. Provides some helper methods for +# the option parser +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/cli/command.rb#11 +class YARD::CLI::Command + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#16 + def description; end + + protected + + # Adds a set of common options to the tail of the OptionParser + # + # @param opts [OptionParser] the option parser object + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#24 + def common_options(opts); end + + # Loads a Ruby script. If <tt>Config.options[:safe_mode]</tt> is enabled, + # this method will do nothing. + # + # @param file [String] the path to the script to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/command.rb#68 + def load_script(file); end + + # Parses the option and gracefully handles invalid switches + # + # @param opts [OptionParser] the option parser object + # @param args [Array<String>] the arguments passed from input. This + # array will be modified. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#55 + def parse_options(opts, args); end + + # Callback when an unrecognize option is parsed + # + # @param err [OptionParser::ParseError] the exception raised by the + # option parser + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#80 + def unrecognized_option(err); end + + class << self + # Helper method to run the utility on an instance. + # + # @see #run + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#14 + def run(*args); end + end +end + +# This class parses a command name out of the +yard+ CLI command and calls +# that command in the form: +# +# $ yard command_name [options] +# +# If no command or arguments are specified, or if the arguments immediately +# begin with a +--opt+ (not +--help+), the {default_command} will be used +# (which itself defaults to +:doc+). +# +# == Adding a Command +# +# To add a custom command via plugin, create a mapping in {commands} from +# the Symbolic command name to the {Command} class that implements the +# command. To implement a command, see the documentation for the {Command} +# class. +# +# @see Command +# @see commands +# @see default_command +# +# source://yard//lib/yard/cli/command_parser.rb#23 +class YARD::CLI::CommandParser + # @return [CommandParser] a new instance of CommandParser + # + # source://yard//lib/yard/cli/command_parser.rb#56 + def initialize; end + + # Runs the {Command} object matching the command name of the first + # argument. + # + # @return [void] + # + # source://yard//lib/yard/cli/command_parser.rb#63 + def run(*args); end + + private + + # source://yard//lib/yard/cli/command_parser.rb#80 + def commands; end + + # source://yard//lib/yard/cli/command_parser.rb#82 + def list_commands; end + + class << self + # @return [Hash{Symbol => Command}] the mapping of command names to + # command classes to parse the user command. + # + # source://yard//lib/yard/cli/command_parser.rb#27 + def commands; end + + # @return [Hash{Symbol => Command}] the mapping of command names to + # command classes to parse the user command. + # + # source://yard//lib/yard/cli/command_parser.rb#27 + def commands=(_arg0); end + + # @return [Symbol] the default command name to use when no options + # are specified or + # + # source://yard//lib/yard/cli/command_parser.rb#31 + def default_command; end + + # @return [Symbol] the default command name to use when no options + # are specified or + # + # source://yard//lib/yard/cli/command_parser.rb#31 + def default_command=(_arg0); end + + # Convenience method to create a new CommandParser and call {#run} + # + # @return [void] + # + # source://yard//lib/yard/cli/command_parser.rb#54 + def run(*args); end + end +end + +# CLI command to view or edit configuration options +# +# @since 0.6.2 +# +# source://yard//lib/yard/cli/config.rb#7 +class YARD::CLI::Config < ::YARD::CLI::Command + # @return [Config] a new instance of Config + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#26 + def initialize; end + + # @return [Boolean] whether to append values to existing key + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#20 + def append; end + + # @return [Boolean] whether to append values to existing key + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#20 + def append=(_arg0); end + + # @return [Boolean] whether the value being set should be inside a list + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#17 + def as_list; end + + # @return [Boolean] whether the value being set should be inside a list + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#17 + def as_list=(_arg0); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#36 + def description; end + + # @return [String, nil] command to use when configuring ~/.gemrc file. + # If the string is nil, configuration should not occur. + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#24 + def gem_install_cmd; end + + # @return [String, nil] command to use when configuring ~/.gemrc file. + # If the string is nil, configuration should not occur. + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#24 + def gem_install_cmd=(_arg0); end + + # @return [Symbol, nil] the key to view/edit, if any + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#8 + def key; end + + # @return [Symbol, nil] the key to view/edit, if any + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#8 + def key=(_arg0); end + + # @return [Boolean] whether to reset the {#key} + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#14 + def reset; end + + # @return [Boolean] whether to reset the {#key} + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#14 + def reset=(_arg0); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#40 + def run(*args); end + + # @return [Array, nil] the list of values to set (or single value), if modifying + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#11 + def values; end + + # @return [Array, nil] the list of values to set (or single value), if modifying + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#11 + def values=(_arg0); end + + private + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#57 + def configure_gemrc; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#111 + def encode_value(value); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#103 + def encode_values; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#97 + def list_configuration; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#78 + def modify_item; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#120 + def optparse(*args); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#92 + def view_item; end +end + +# CLI command to return the objects that were added/removed from 2 versions +# of a project (library, gem, working copy). +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/diff.rb#11 +class YARD::CLI::Diff < ::YARD::CLI::Command + # @return [Diff] a new instance of Diff + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#12 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#24 + def description; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#28 + def run(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#83 + def added_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#78 + def all_objects; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#233 + def cleanup(gemfile); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#175 + def expand_and_parse(gemfile, io); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#187 + def expand_gem(gemfile, io); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#181 + def generate_yardoc(dir); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#118 + def load_gem_data(gemfile); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#102 + def load_git_commit(commit); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#87 + def modified_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#239 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#98 + def removed_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#225 + def require_rubygems; end +end + +# Display one object +# +# @since 0.8.6 +# +# source://yard//lib/yard/cli/display.rb#6 +class YARD::CLI::Display < ::YARD::CLI::Yardoc + # @return [Display] a new instance of Display + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#9 + def initialize(*args); end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#7 + def description; end + + # @return [String] the output data for all formatted objects + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#27 + def format_objects; end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#61 + def output_options(opts); end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#46 + def parse_arguments(*args); end + + # Runs the commandline utility, parsing arguments and displaying an object + # from the {Registry}. + # + # @param args [Array<String>] the list of arguments. + # @return [void] + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#21 + def run(*args); end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#33 + def wrap_layout(contents); end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/cli/gems.rb#5 +class YARD::CLI::Gems < ::YARD::CLI::Command + # @return [Gems] a new instance of Gems + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#6 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#11 + def description; end + + # Runs the commandline utility, parsing arguments and generating + # YARD indexes for gems. + # + # @param args [Array<String>] the list of arguments + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#18 + def run(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#47 + def add_gems(gems); end + + # Builds .yardoc files for all non-existing gems + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#27 + def build_gems; end + + # Parses options + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#61 + def optparse(*args); end +end + +# A command-line utility to generate Graphviz graphs from +# a set of objects +# +# @see Graph#run +# @since 0.6.0 +# +# source://yard//lib/yard/cli/graph.rb#27 +class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand + # Creates a new instance of the command-line utility + # + # @return [Graph] a new instance of Graph + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#34 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#42 + def description; end + + # The set of objects to include in the graph. + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#31 + def objects; end + + # The options parsed out of the commandline. + # Default options are: + # :format => :dot + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#28 + def options; end + + # Runs the command-line utility. + # + # @example + # grapher = Graph.new + # grapher.run('--private') + # @param args [Array<String>] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#52 + def run(*args); end + + private + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#69 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#65 + def unrecognized_option(err); end +end + +# Options to pass to the {Graph} CLI. +# +# source://yard//lib/yard/cli/graph.rb#6 +class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions + # @return [String] any contents to pass to the digraph + # + # source://yard//lib/yard/cli/graph.rb#16 + def contents; end + + # @return [String] any contents to pass to the digraph + # + # source://yard//lib/yard/cli/graph.rb#16 + def contents=(_arg0); end + + # @return [Boolean] whether to show the object dependencies + # + # source://yard//lib/yard/cli/graph.rb#13 + def dependencies; end + + # @return [Boolean] whether to show the object dependencies + # + # source://yard//lib/yard/cli/graph.rb#13 + def dependencies=(_arg0); end + + # @return [:dot] the default output format + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [Boolean] whether to list the full class diagram + # + # source://yard//lib/yard/cli/graph.rb#10 + def full; end + + # @return [Boolean] whether to list the full class diagram + # + # source://yard//lib/yard/cli/graph.rb#10 + def full=(_arg0); end +end + +# Handles help for commands +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/help.rb#6 +class YARD::CLI::Help < ::YARD::CLI::Command + # @since 0.6.0 + # + # source://yard//lib/yard/cli/help.rb#7 + def description; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/help.rb#9 + def run(*args); end +end + +# CLI command to support internationalization (a.k.a. i18n). +# I18n feature is based on gettext technology. +# This command generates .pot file from docstring and extra +# documentation. +# +# @since 0.8.0 +# @todo Support msgminit and msgmerge features? +# +# source://yard//lib/yard/cli/i18n.rb#13 +class YARD::CLI::I18n < ::YARD::CLI::Yardoc + # @return [I18n] a new instance of I18n + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#14 + def initialize; end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#19 + def description; end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#23 + def run(*args); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#44 + def general_options(opts); end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#61 + def generate_pot(relative_base_path); end +end + +# Lists all constant and method names in the codebase. Uses {Yardoc} --list. +# +# source://yard//lib/yard/cli/list.rb#5 +class YARD::CLI::List < ::YARD::CLI::Command + # source://yard//lib/yard/cli/list.rb#6 + def description; end + + # Runs the commandline utility, parsing arguments and displaying a + # list of objects + # + # @param args [Array<String>] the list of arguments. + # @return [void] + # + # source://yard//lib/yard/cli/list.rb#13 + def run(*args); end +end + +# Lists all markup types +# +# @since 0.8.6 +# +# source://yard//lib/yard/cli/markup_types.rb#6 +class YARD::CLI::MarkupTypes < ::YARD::CLI::Command + # @since 0.8.6 + # + # source://yard//lib/yard/cli/markup_types.rb#7 + def description; end + + # Runs the commandline utility, parsing arguments and displaying a + # list of markup types + # + # @param args [Array<String>] the list of arguments. + # @return [void] + # @since 0.8.6 + # + # source://yard//lib/yard/cli/markup_types.rb#14 + def run(*args); end +end + +# A local documentation server +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/server.rb#8 +class YARD::CLI::Server < ::YARD::CLI::Command + # Creates a new instance of the Server command line utility + # + # @return [Server] a new instance of Server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#29 + def initialize; end + + # @return [YARD::Server::Adapter] the adapter to use for loading the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#18 + def adapter; end + + # @return [YARD::Server::Adapter] the adapter to use for loading the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#18 + def adapter=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#41 + def description; end + + # @return [Hash] a list of library names and yardoc files to serve + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#15 + def libraries; end + + # @return [Hash] a list of library names and yardoc files to serve + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#15 + def libraries=(_arg0); end + + # @return [Hash] a list of options to pass to the doc server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#9 + def options; end + + # @return [Hash] a list of options to pass to the doc server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#9 + def options=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#45 + def run(*args); end + + # @return [Array<String>] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts; end + + # @return [Array<String>] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts=(_arg0); end + + # @return [Hash] a list of options to pass to the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#12 + def server_options; end + + # @return [Hash] a list of options to pass to the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#12 + def server_options=(_arg0); end + + # @return [Array<String>] a list of template paths to register + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#26 + def template_paths; end + + # @return [Array<String>] a list of template paths to register + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#26 + def template_paths=(_arg0); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#131 + def add_gems; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#140 + def add_gems_from_gemfile(gemfile = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#76 + def add_libraries(args); end + + # @param library [String] The library name. + # @param dir [String, nil] The argument provided on the CLI after the + # library name. Is supposed to point to either a project directory + # with a Yard options file, or a yardoc db. + # @return [LibraryVersion, nil] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#115 + def create_library_version_if_yardopts_exist(library, dir); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#249 + def extract_db_from_options_file(options_file); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#239 + def generate_doc_for_first_time(libver); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#56 + def load_scripts; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#60 + def load_template_paths; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#156 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#66 + def select_adapter; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/cli/stats.rb#5 +class YARD::CLI::Stats < ::YARD::CLI::Yardoc + include ::YARD::Templates::Helpers::BaseHelper + + # @param parse [Boolean] whether to parse and load registry (see {#parse}) + # @return [Stats] a new instance of Stats + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#18 + def initialize(parse = T.unsafe(nil)); end + + # @return [Array<CodeObjects::Base>] all the parsed objects in the registry, + # removing any objects that are not visible (private, protected) depending + # on the arguments passed to the command. + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#108 + def all_objects; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#25 + def description; end + + # Prints a statistic to standard out. This method is optimized for + # getting Integer values, though it allows any data to be printed. + # + # @param name [String] the statistic name + # @param data [Integer, String] the numeric (or any) data representing + # the statistic. If +data+ is an Integer, it should represent the + # total objects of a type. + # @param undoc [Integer, nil] number of undocumented objects for the type + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#162 + def output(name, data, undoc = T.unsafe(nil)); end + + # @return [Boolean] whether to parse and load registry + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#15 + def parse; end + + # @return [Boolean] whether to parse and load registry + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#15 + def parse=(_arg0); end + + # Prints statistics for different object types + # + # To add statistics for a specific type, add a method +#stats_for_TYPE+ + # to this class that calls {#output}. + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#54 + def print_statistics; end + + # Prints list of undocumented objects + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#79 + def print_undocumented_objects; end + + # Runs the commandline utility, parsing arguments and generating + # output if set. + # + # @param args [Array<String>] the list of arguments + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#34 + def run(*args); end + + # Statistics for attributes + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#135 + def stats_for_attributes; end + + # Statistics for classes + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#125 + def stats_for_classes; end + + # Statistics for constants + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#130 + def stats_for_constants; end + + # Statistics for files + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#113 + def stats_for_files; end + + # Statistics for methods + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#144 + def stats_for_methods; end + + # Statistics for modules + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#120 + def stats_for_modules; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#199 + def general_options(opts); end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#185 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#176 + def type_statistics(type); end +end + +# Maintains the order in which +stats_for_+ statistics methods should be +# printed. +# +# @see #print_statistics +# @since 0.6.0 +# +# source://yard//lib/yard/cli/stats.rb#12 +YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) + +# A tool to view documentation in the console like `ri` +# +# source://yard//lib/yard/cli/yri.rb#9 +class YARD::CLI::YRI < ::YARD::CLI::Command + # @return [YRI] a new instance of YRI + # + # source://yard//lib/yard/cli/yri.rb#31 + def initialize; end + + # source://yard//lib/yard/cli/yri.rb#41 + def description; end + + # Runs the command-line utility. + # + # @example + # YRI.new.run('String#reverse') + # @param args [Array<String>] each tokenized argument + # + # source://yard//lib/yard/cli/yri.rb#50 + def run(*args); end + + protected + + # Caches the .yardoc file where an object can be found in the {CACHE_FILE} + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#85 + def cache_object(name, path); end + + # Locates an object by name starting in the cached paths and then + # searching through any search paths. + # + # @param name [String] the full name of the object + # @return [CodeObjects::Base] an object if found + # @return [nil] if no object is found + # + # source://yard//lib/yard/cli/yri.rb#113 + def find_object(name); end + + # @param object [CodeObjects::Base] the object to print. + # @return [String] the formatted output for an object. + # + # source://yard//lib/yard/cli/yri.rb#98 + def print_object(object); end + + # Prints the command usage + # + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yri.rb#78 + def print_usage; end + + private + + # Adds paths in {SEARCH_PATHS_FILE} + # + # @since 0.5.1 + # + # source://yard//lib/yard/cli/yri.rb#181 + def add_default_paths; end + + # Adds all RubyGems yardoc files to search paths + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#161 + def add_gem_paths; end + + # Loads {CACHE_FILE} + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#151 + def load_cache; end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # + # source://yard//lib/yard/cli/yri.rb#190 + def optparse(*args); end + + # Tries to load the object with name. If successful, caches the object + # with the cache_path + # + # @param name [String] the object path + # @param cache_path [String] the location of the yardoc + # db containing the object to cache for future lookups. + # No caching is done if this is nil. + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#143 + def try_load_object(name, cache_path); end + + class << self + # Helper method to run the utility on an instance. + # + # @see #run + # + # source://yard//lib/yard/cli/yri.rb#29 + def run(*args); end + end +end + +# The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded +# from. +# +# source://yard//lib/yard/cli/yri.rb#10 +YARD::CLI::YRI::CACHE_FILE = T.let(T.unsafe(nil), String) + +# Default search paths that should be loaded dynamically into YRI. These paths +# take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems +# paths). To add a path, call: +# +# DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") +# +# @return [Array<String>] a list of extra search paths +# @since 0.6.0 +# +# source://yard//lib/yard/cli/yri.rb#25 +YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) + +# A file containing all paths, delimited by newlines, to search for +# yardoc databases. +# +# @since 0.5.1 +# +# source://yard//lib/yard/cli/yri.rb#15 +YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/cli/yardoc.rb#147 +class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand + # Creates a new instance of the commandline utility + # + # @return [Yardoc] a new instance of Yardoc + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#207 + def initialize; end + + # The list of all objects to process. Override this method to change + # which objects YARD should generate documentation for. + # + # @deprecated To hide methods use the +@private+ tag instead. + # @return [Array<CodeObjects::Base>] a list of code objects to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#330 + def all_objects; end + + # Keep track of which APIs are to be shown + # + # @return [Array<String>] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis; end + + # Keep track of which APIs are to be shown + # + # @return [Array<String>] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis=(_arg0); end + + # @return [Array<String>] a list of assets to copy after generation + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#197 + def assets; end + + # @return [Array<String>] a list of assets to copy after generation + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#197 + def assets=(_arg0); end + + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#234 + def description; end + + # @return [Array<String>] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded; end + + # @return [Array<String>] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded=(_arg0); end + + # @return [Boolean] whether yard exits with error status code if a warning occurs + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#204 + def fail_on_warning; end + + # @return [Boolean] whether yard exits with error status code if a warning occurs + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#204 + def fail_on_warning=(_arg0); end + + # @return [Array<String>] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files; end + + # @return [Array<String>] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files=(_arg0); end + + # @return [Boolean] whether to generate output + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#166 + def generate; end + + # @return [Boolean] whether to generate output + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#166 + def generate=(_arg0); end + + # @return [Boolean] whether markup option was specified + # @since 0.7.0 + # + # source://yard//lib/yard/cli/yardoc.rb#201 + def has_markup; end + + # @return [Boolean] whether markup option was specified + # @since 0.7.0 + # + # source://yard//lib/yard/cli/yardoc.rb#201 + def has_markup=(_arg0); end + + # Keep track of which APIs are to be hidden + # + # @return [Array<String>] a list of APIs to be hidden + # @since 0.8.7 + # + # source://yard//lib/yard/cli/yardoc.rb#185 + def hidden_apis; end + + # Keep track of which APIs are to be hidden + # + # @return [Array<String>] a list of APIs to be hidden + # @since 0.8.7 + # + # source://yard//lib/yard/cli/yardoc.rb#185 + def hidden_apis=(_arg0); end + + # @return [Array<Symbol>] a list of tags to hide from templates + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#189 + def hidden_tags; end + + # @return [Array<Symbol>] a list of tags to hide from templates + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#189 + def hidden_tags=(_arg0); end + + # @return [Boolean] whether to print a list of objects + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#170 + def list; end + + # @return [Boolean] whether to print a list of objects + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#170 + def list=(_arg0); end + + # @return [Hash] the hash of options passed to the template. + # @see Templates::Engine#render + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#148 + def options; end + + # Parses commandline arguments + # + # @param args [Array<String>] the list of arguments + # @return [Boolean] whether or not arguments are valid + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#291 + def parse_arguments(*args); end + + # Runs the commandline utility, parsing arguments and generating + # output if set. + # + # @param args [Array<String>] the list of arguments. If the list only + # contains a single nil value, skip calling of {#parse_arguments} + # @return [void] + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#244 + def run(*args); end + + # @return [Boolean] whether objects should be serialized to .yardoc db + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#163 + def save_yardoc; end + + # @return [Boolean] whether objects should be serialized to .yardoc db + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#163 + def save_yardoc=(_arg0); end + + # @return [Boolean] whether to print statistics after parsing + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#193 + def statistics; end + + # @return [Boolean] whether to print statistics after parsing + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#193 + def statistics=(_arg0); end + + # @return [Boolean] whether to use the existing yardoc db if the + # .yardoc already exists. Also makes use of file checksums to + # parse only changed files. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#160 + def use_cache; end + + # @return [Boolean] whether to use the existing yardoc db if the + # .yardoc already exists. Also makes use of file checksums to + # parse only changed files. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#160 + def use_cache=(_arg0); end + + # Keep track of which visibilities are to be shown + # + # @return [Array<Symbol>] a list of visibilities + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#175 + def visibilities; end + + # Keep track of which visibilities are to be shown + # + # @return [Array<Symbol>] a list of visibilities + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#175 + def visibilities=(_arg0); end + + private + + # Adds verifier rule for APIs + # + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#474 + def add_api_verifier; end + + # Adds a set of extra documentation files to be processed + # + # @param files [Array<String>] the set of documentation files + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#413 + def add_extra_files(*files); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#507 + def add_tag(tag_data, factory_method = T.unsafe(nil)); end + + # Adds verifier rule for visibilities + # + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#466 + def add_visibility_verifier; end + + # Applies the specified locale to collected objects + # + # @return [void] + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardoc.rb#494 + def apply_locale; end + + # Copies any assets to the output directory + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#389 + def copy_assets; end + + # @param file [String] the filename to validate + # @param check_exists [Boolean] whether the file should exist on disk + # @return [Boolean] whether the file is allowed to be used + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#425 + def extra_file_valid?(file, check_exists = T.unsafe(nil)); end + + # Adds general options + # + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#541 + def general_options(opts); end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#516 + def optparse(*args); end + + # Adds output options + # + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#586 + def output_options(opts); end + + # Parses the file arguments into Ruby files and extra files, which are + # separated by a '-' element. + # + # @example Parses a set of Ruby source files + # parse_files %w(file1 file2 file3) + # @example Parses a set of Ruby files with a separator and extra files + # parse_files %w(file1 file2 - extrafile1 extrafile2) + # @param files [Array<String>] the list of files to parse + # @return [void] + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#446 + def parse_files(*files); end + + # Prints a list of all objects + # + # @return [void] + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#403 + def print_list; end + + # Generates output for objects + # + # @param checksums [Hash, nil] if supplied, a list of checksums for files. + # @return [void] + # @since 0.5.1 + # + # source://yard//lib/yard/cli/yardoc.rb#340 + def run_generate(checksums); end + + # Runs a list of objects against the {Verifier} object passed into the + # template and returns the subset of verified objects. + # + # @param list [Array<CodeObjects::Base>] a list of code objects + # @return [Array<CodeObjects::Base>] a list of code objects that match + # the verifier. If no verifier is supplied, all objects are returned. + # + # source://yard//lib/yard/cli/yardoc.rb#502 + def run_verifier(list); end + + # Adds tag options + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#753 + def tag_options(opts); end + + # Verifies that the markup options are valid before parsing any code. + # Failing early is better than failing late. + # + # @return [Boolean] whether the markup provider was successfully loaded. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#364 + def verify_markup_options; end +end + +# Default options used in +yard doc+ command. +# +# source://yard//lib/yard/cli/yardoc.rb#10 +class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions + # @return [CodeObjects::ExtraFileObject] the file object being rendered. + # The +object+ key is not used so that a file may be rendered in the context + # of an object's namespace (for generating links). + # + # source://yard//lib/yard/cli/yardoc.rb#48 + def file; end + + # @return [CodeObjects::ExtraFileObject] the file object being rendered. + # The +object+ key is not used so that a file may be rendered in the context + # of an object's namespace (for generating links). + # + # source://yard//lib/yard/cli/yardoc.rb#48 + def file=(_arg0); end + + # @return [Array<CodeObjects::ExtraFileObject>] the list of extra files rendered along with objects + # + # source://yard//lib/yard/options.rb#82 + def files; end + + # source://yard//lib/yard/options.rb#82 + def files=(_arg0); end + + # @return [Symbol] the default output format (:html). + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [Numeric] An index value for rendering sequentially related templates + # + # source://yard//lib/yard/cli/yardoc.rb#39 + def index; end + + # @return [Numeric] An index value for rendering sequentially related templates + # + # source://yard//lib/yard/cli/yardoc.rb#39 + def index=(_arg0); end + + # @return [CodeObjects::Base] an extra item to send to a template that is not + # the main rendered object + # + # source://yard//lib/yard/cli/yardoc.rb#43 + def item; end + + # @return [CodeObjects::Base] an extra item to send to a template that is not + # the main rendered object + # + # source://yard//lib/yard/cli/yardoc.rb#43 + def item=(_arg0); end + + # @return [String] the current locale + # + # source://yard//lib/yard/cli/yardoc.rb#51 + def locale; end + + # @return [String] the current locale + # + # source://yard//lib/yard/cli/yardoc.rb#51 + def locale=(_arg0); end + + # @return [Array<CodeObjects::Base>] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects; end + + # @return [Array<CodeObjects::Base>] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects=(_arg0); end + + # @return [Boolean] whether the data should be rendered in a single page, + # if the template supports it. + # + # source://yard//lib/yard/options.rb#82 + def onefile; end + + # source://yard//lib/yard/options.rb#82 + def onefile=(_arg0); end + + # @return [CodeObjects::ExtraFileObject] the README file object rendered + # along with objects + # + # source://yard//lib/yard/cli/yardoc.rb#32 + def readme; end + + # @return [CodeObjects::ExtraFileObject] the README file object rendered + # along with objects + # + # source://yard//lib/yard/cli/yardoc.rb#32 + def readme=(_arg0); end + + # @return [Serializers::Base] the default serializer for generating output + # to disk. + # + # source://yard//lib/yard/options.rb#82 + def serializer; end + + # source://yard//lib/yard/options.rb#82 + def serializer=(_arg0); end + + # @return [String] the default title appended to each generated page + # + # source://yard//lib/yard/options.rb#82 + def title; end + + # source://yard//lib/yard/options.rb#82 + def title=(_arg0); end + + # @return [Verifier] the default verifier object to filter queries + # + # source://yard//lib/yard/options.rb#82 + def verifier; end + + # source://yard//lib/yard/options.rb#82 + def verifier=(_arg0); end +end + +# Abstract base class for command that reads .yardopts file +# +# @abstract +# @since 0.8.3 +# +# source://yard//lib/yard/cli/yardopts_command.rb#11 +class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command + # Creates a new command that reads .yardopts + # + # @return [YardoptsCommand] a new instance of YardoptsCommand + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#25 + def initialize; end + + # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) + # + # @return [String] the filename to load extra options from + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#22 + def options_file; end + + # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) + # + # @return [String] the filename to load extra options from + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#22 + def options_file=(_arg0); end + + # Parses commandline arguments + # + # @param args [Array<String>] the list of arguments + # @return [Boolean] whether or not arguments are valid + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardopts_command.rb#36 + def parse_arguments(*args); end + + # @return [Boolean] whether to parse options from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#18 + def use_document_file; end + + # @return [Boolean] whether to parse options from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#18 + def use_document_file=(_arg0); end + + # @return [Boolean] whether to parse options from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#15 + def use_yardopts_file; end + + # @return [Boolean] whether to parse options from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#15 + def use_yardopts_file=(_arg0); end + + protected + + # Adds --[no-]yardopts / --[no-]document + # + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#48 + def yardopts_options(opts); end + + private + + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#92 + def parse_rdoc_document_file(file = T.unsafe(nil)); end + + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#96 + def parse_yardopts(file = T.unsafe(nil)); end + + # Parses out the yardopts/document options + # + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#78 + def parse_yardopts_options(*args); end + + # Reads a .document file in the directory to get source file globs + # + # @return [Array<String>] an array of files parsed from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#102 + def support_rdoc_document_file!(file = T.unsafe(nil)); end + + # Parses the .yardopts file for default yard options + # + # @return [Array<String>] an array of options parsed from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#70 + def yardopts(file = T.unsafe(nil)); end +end + +# The configuration filename to load extra options from +# +# @since 0.8.3 +# +# source://yard//lib/yard/cli/yardopts_command.rb#12 +YARD::CLI::YardoptsCommand::DEFAULT_YARDOPTS_FILE = T.let(T.unsafe(nil), String) + +# @deprecated Use {Config::CONFIG_DIR} +# +# source://yard//lib/yard.rb#13 +YARD::CONFIG_DIR = T.let(T.unsafe(nil), String) + +# A "code object" is defined as any entity in the Ruby language. +# Classes, modules, methods, class variables and constants are the +# major objects, but DSL languages can create their own by inheriting +# from {CodeObjects::Base}. +# +# source://yard//lib/yard/autoload.rb#29 +module YARD::CodeObjects + extend ::YARD::CodeObjects::NamespaceMapper +end + +# All builtin Ruby classes and modules. +# +# source://yard//lib/yard/code_objects/base.rb#91 +YARD::CodeObjects::BUILTIN_ALL = T.let(T.unsafe(nil), Array) + +# All builtin Ruby classes for inheritance tree. +# +# @note MatchingData is a 1.8.x legacy class +# +# source://yard//lib/yard/code_objects/base.rb#78 +YARD::CodeObjects::BUILTIN_CLASSES = T.let(T.unsafe(nil), Array) + +# All builtin Ruby exception classes for inheritance tree. +# +# source://yard//lib/yard/code_objects/base.rb#67 +YARD::CodeObjects::BUILTIN_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups) +# +# source://yard//lib/yard/code_objects/base.rb#94 +YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH = T.let(T.unsafe(nil), Hash) + +# All builtin Ruby modules for mixin handling. +# +# source://yard//lib/yard/code_objects/base.rb#87 +YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array) + +# +Base+ is the superclass of all code objects recognized by YARD. A code +# object is any entity in the Ruby language (class, method, module). A +# DSL might subclass +Base+ to create a new custom object representing +# a new entity type. +# +# == Registry Integration +# Any created object associated with a namespace is immediately registered +# with the registry. This allows the Registry to act as an identity map +# to ensure that no object is represented by more than one Ruby object +# in memory. A unique {#path} is essential for this identity map to work +# correctly. +# +# == Custom Attributes +# Code objects allow arbitrary custom attributes to be set using the +# {#[]=} assignment method. +# +# == Namespaces +# There is a special type of object called a "namespace". These are subclasses +# of the {NamespaceObject} and represent Ruby entities that can have +# objects defined within them. Classically these are modules and classes, +# though a DSL might create a custom {NamespaceObject} to describe a +# specific set of objects. +# +# == Separators +# Custom classes with different separator tokens should define their own +# separators using the {NamespaceMapper.register_separator} method. The +# standard Ruby separators have already been defined ('::', '#', '.', etc). +# +# @abstract This class should not be used directly. Instead, create a +# subclass that implements {#path}, {#sep} or {#type}. You might also +# need to register custom separators if {#sep} uses alternate separator +# tokens. +# @see Registry +# @see #path +# @see #[]= +# @see NamespaceObject +# @see NamespaceMapper.register_separator +# +# source://yard//lib/yard/code_objects/base.rb#133 +class YARD::CodeObjects::Base + # Creates a new code object + # + # @example Create a method in the root namespace + # CodeObjects::Base.new(:root, '#method') # => #<yardoc method #method> + # @example Create class Z inside namespace X::Y + # CodeObjects::Base.new(P("X::Y"), :Z) # or + # CodeObjects::Base.new(Registry.root, "X::Y") + # @param namespace [NamespaceObject] the namespace the object belongs in, + # {Registry.root} or :root should be provided if it is associated with + # the top level namespace. + # @param name [Symbol, String] the name (or complex path) of the object. + # @return [Base] the newly created object + # @yield [self] a block to perform any extra initialization on the object + # @yieldparam self [Base] the newly initialized code object + # + # source://yard//lib/yard/code_objects/base.rb#238 + def initialize(namespace, name, *_arg2); end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#322 + def ==(other); end + + # Accesses a custom attribute on the object + # + # @param key [#to_s] the name of the custom attribute + # @return [Object, nil] the custom attribute or nil if not found. + # @see #[]= + # + # source://yard//lib/yard/code_objects/base.rb#342 + def [](key); end + + # Sets a custom attribute on the object + # + # @param key [#to_s] the name of the custom attribute + # @param value [Object] the value to associate + # @return [void] + # @see #[] + # + # source://yard//lib/yard/code_objects/base.rb#355 + def []=(key, value); end + + # Associates a file with a code object, optionally adding the line where it was defined. + # By convention, '<stdin>' should be used to associate code that comes form standard input. + # + # @param file [String] the filename ('<stdin>' for standard input) + # @param line [Fixnum, nil] the line number where the object lies in the file + # @param has_comments [Boolean] whether or not the definition has comments associated. This + # will allow {#file} to return the definition where the comments were made instead + # of any empty definitions that might have been parsed before (module namespaces for instance). + # @raise [ArgumentError] + # + # source://yard//lib/yard/code_objects/base.rb#290 + def add_file(file, line = T.unsafe(nil), has_comments = T.unsafe(nil)); end + + # Add tags to the {#docstring} + # + # @see Docstring#add_tag + # @since 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#560 + def add_tag(*tags); end + + # The non-localized documentation string associated with the object + # + # @return [Docstring] the documentation string + # @since 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#166 + def base_docstring; end + + # Copies all data in this object to another code object, except for + # uniquely identifying information (path, namespace, name, scope). + # + # @param other [Base] the object to copy data to + # @return [Base] the other object + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/base.rb#263 + def copy_to(other); end + + # The documentation string associated with the object + # + # @param locale [String, I18n::Locale] (I18n::Locale.default) + # the locale of the documentation string. + # @return [Docstring] the documentation string + # + # source://yard//lib/yard/code_objects/base.rb#404 + def docstring(locale = T.unsafe(nil)); end + + # Attaches a docstring to a code object by parsing the comments attached to the statement + # and filling the {#tags} and {#docstring} methods with the parsed information. + # + # @param comments [String, Array<String>, Docstring] the comments attached to the code object to be parsed + # into a docstring and meta tags. + # + # source://yard//lib/yard/code_objects/base.rb#426 + def docstring=(comments); end + + # Marks whether or not the method is conditionally defined at runtime + # + # @return [Boolean] true if the method is conditionally defined at runtime + # + # source://yard//lib/yard/code_objects/base.rb#170 + def dynamic; end + + # Marks whether or not the method is conditionally defined at runtime + # + # @return [Boolean] true if the method is conditionally defined at runtime + # + # source://yard//lib/yard/code_objects/base.rb#170 + def dynamic=(_arg0); end + + # Is the object defined conditionally at runtime? + # + # @return [Boolean] + # @see #dynamic + # + # source://yard//lib/yard/code_objects/base.rb#178 + def dynamic?; end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#322 + def eql?(other); end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#322 + def equal?(other); end + + # Returns the filename the object was first parsed at, taking + # definitions with docstrings first. + # + # @return [String] a filename + # + # source://yard//lib/yard/code_objects/base.rb#306 + def file; end + + # The files the object was defined in. To add a file, use {#add_file}. + # + # @return [Array<Array(String, Integer)>] a list of files + # @see #add_file + # + # source://yard//lib/yard/code_objects/base.rb#137 + def files; end + + # Renders the object using the {Templates::Engine templating system}. + # + # @example Formats a class in plaintext + # puts P('MyClass').format + # @example Formats a method in html with rdoc markup + # puts P('MyClass#meth').format(:format => :html, :markup => :rdoc) + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a set of options to pass to the template + # @return [String] the rendered template + # @see Templates::Engine#render + # + # source://yard//lib/yard/code_objects/base.rb#504 + def format(options = T.unsafe(nil)); end + + # @return [String] the group this object is associated with + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/base.rb#174 + def group; end + + # @return [String] the group this object is associated with + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/base.rb#174 + def group=(_arg0); end + + # Tests if the {#docstring} has a tag + # + # @return [Boolean] + # @see Docstring#has_tag? + # + # source://yard//lib/yard/code_objects/base.rb#555 + def has_tag?(name); end + + # @return [Integer] the object's hash value (for equality checking) + # + # source://yard//lib/yard/code_objects/base.rb#333 + def hash; end + + # Inspects the object, returning the type and path + # + # @return [String] a string describing the object + # + # source://yard//lib/yard/code_objects/base.rb#512 + def inspect; end + + # Returns the line the object was first parsed at (or nil) + # + # @return [Fixnum] the line where the object was first defined. + # @return [nil] if there is no line associated with the object + # + # source://yard//lib/yard/code_objects/base.rb#314 + def line; end + + # @overload dynamic_attr_name + # @overload dynamic_attr_name= + # + # source://yard//lib/yard/code_objects/base.rb#372 + def method_missing(meth, *args, &block); end + + # The name of the object + # + # @param prefix [Boolean] whether to show a prefix. Implement + # this in a subclass to define how the prefix is showed. + # @return [Symbol] if prefix is false, the symbolized name + # @return [String] if prefix is true, prefix + the name as a String. + # This must be implemented by the subclass. + # + # source://yard//lib/yard/code_objects/base.rb#278 + def name(prefix = T.unsafe(nil)); end + + # The namespace the object is defined in. If the object is in the + # top level namespace, this is {Registry.root} + # + # @return [NamespaceObject] the namespace object + # + # source://yard//lib/yard/code_objects/base.rb#142 + def namespace; end + + # Sets the namespace the object is defined in. + # + # @param obj [NamespaceObject, :root, nil] the new namespace (:root + # for {Registry.root}). If obj is nil, the object is unregistered + # from the Registry. + # + # source://yard//lib/yard/code_objects/base.rb#521 + def namespace=(obj); end + + # The namespace the object is defined in. If the object is in the + # top level namespace, this is {Registry.root} + # + # @return [NamespaceObject] the namespace object + # + # source://yard//lib/yard/code_objects/base.rb#142 + def parent; end + + # Sets the namespace the object is defined in. + # + # @param obj [NamespaceObject, :root, nil] the new namespace (:root + # for {Registry.root}). If obj is nil, the object is unregistered + # from the Registry. + # + # source://yard//lib/yard/code_objects/base.rb#521 + def parent=(obj); end + + # Represents the unique path of the object. The default implementation + # joins the path of {#namespace} with {#name} via the value of {#sep}. + # Custom code objects should ensure that the path is unique to the code + # object by either overriding {#sep} or this method. + # + # @example The path of an instance method + # MethodObject.new(P("A::B"), :c).path # => "A::B#c" + # @return [String] the unique path of the object + # @see #sep + # + # source://yard//lib/yard/code_objects/base.rb#452 + def path; end + + # @param other [Base, String] another code object (or object path) + # @return [String] the shortest relative path from this object to +other+ + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/base.rb#474 + def relative_path(other); end + + # @return [Boolean] whether or not this object is a RootObject + # + # source://yard//lib/yard/code_objects/base.rb#566 + def root?; end + + # Override this method with a custom component separator. For instance, + # {MethodObject} implements sep as '#' or '.' (depending on if the + # method is instance or class respectively). {#path} depends on this + # value to generate the full path in the form: namespace.path + sep + name + # + # @return [String] the component that separates the namespace path + # and the name (default is {NSEP}) + # + # source://yard//lib/yard/code_objects/base.rb#575 + def sep; end + + # The one line signature representing an object. For a method, this will + # be of the form "def meth(arguments...)". This is usually the first + # source line. + # + # @return [String] a line of source + # + # source://yard//lib/yard/code_objects/base.rb#159 + def signature; end + + # The one line signature representing an object. For a method, this will + # be of the form "def meth(arguments...)". This is usually the first + # source line. + # + # @return [String] a line of source + # + # source://yard//lib/yard/code_objects/base.rb#159 + def signature=(_arg0); end + + # The source code associated with the object + # + # @return [String, nil] source, if present, or nil + # + # source://yard//lib/yard/code_objects/base.rb#146 + def source; end + + # Attaches source code to a code object with an optional file location + # + # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source + # as a +String+ for the definition of the code object only (not the block) + # + # source://yard//lib/yard/code_objects/base.rb#387 + def source=(statement); end + + # Language of the source code associated with the object. Defaults to + # +:ruby+. + # + # @return [Symbol] the language type + # + # source://yard//lib/yard/code_objects/base.rb#152 + def source_type; end + + # Language of the source code associated with the object. Defaults to + # +:ruby+. + # + # @return [Symbol] the language type + # + # source://yard//lib/yard/code_objects/base.rb#152 + def source_type=(_arg0); end + + # Gets a tag from the {#docstring} + # + # @see Docstring#tag + # + # source://yard//lib/yard/code_objects/base.rb#547 + def tag(name); end + + # Gets a list of tags from the {#docstring} + # + # @see Docstring#tags + # + # source://yard//lib/yard/code_objects/base.rb#551 + def tags(name = T.unsafe(nil)); end + + # @note Override this method if your object has a special title that does + # not match the {#path} attribute value. This title will be used + # when linking or displaying the object. + # @return [String] the display title for an object + # @see 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#467 + def title; end + + # @return [nil] this object does not turn into an array + # + # source://yard//lib/yard/code_objects/base.rb#336 + def to_ary; end + + # Represents the unique path of the object. The default implementation + # joins the path of {#namespace} with {#name} via the value of {#sep}. + # Custom code objects should ensure that the path is unique to the code + # object by either overriding {#sep} or this method. + # + # @example The path of an instance method + # MethodObject.new(P("A::B"), :c).path # => "A::B#c" + # @return [String] the unique path of the object + # @see #sep + # + # source://yard//lib/yard/code_objects/base.rb#452 + def to_s; end + + # Default type is the lowercase class name without the "Object" suffix. + # Override this method to provide a custom object type + # + # @return [Symbol] the type of code object this represents + # + # source://yard//lib/yard/code_objects/base.rb#436 + def type; end + + # @return [Symbol] the visibility of an object (:public, :private, :protected) + # + # source://yard//lib/yard/code_objects/base.rb#181 + def visibility; end + + # @return [Symbol] the visibility of an object (:public, :private, :protected) + # + # source://yard//lib/yard/code_objects/base.rb#183 + def visibility=(v); end + + protected + + # Override this method if your code object subclass does not allow + # copying of certain attributes. + # + # @return [Array<String>] the list of instance variable names (without + # "@" prefix) that should be copied when {#copy_to} is called + # @see #copy_to + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/base.rb#586 + def copyable_attributes; end + + private + + # Formats source code by removing leading indentation + # + # @param source [String] the source code to format + # @return [String] formatted source + # + # source://yard//lib/yard/code_objects/base.rb#598 + def format_source(source); end + + # source://yard//lib/yard/code_objects/base.rb#605 + def translate_docstring(locale); end + + class << self + # Compares the class with subclasses + # + # @param other [Object] the other object to compare classes with + # @return [Boolean] true if other is a subclass of self + # + # source://yard//lib/yard/code_objects/base.rb#219 + def ===(other); end + + # Allocates a new code object + # + # @raise [ArgumentError] + # @return [Base] + # @see #initialize + # @yield [obj] + # + # source://yard//lib/yard/code_objects/base.rb#189 + def new(namespace, name, *args, &block); end + end +end + +# Regular expression to match constant name +# +# source://yard//lib/yard/code_objects/base.rb#52 +YARD::CodeObjects::CONSTANTMATCH = T.let(T.unsafe(nil), Regexp) + +# Regular expression to match the beginning of a constant +# +# source://yard//lib/yard/code_objects/base.rb#55 +YARD::CodeObjects::CONSTANTSTART = T.let(T.unsafe(nil), Regexp) + +# Class method separator +# +# source://yard//lib/yard/code_objects/base.rb#46 +YARD::CodeObjects::CSEP = T.let(T.unsafe(nil), String) + +# Regex-quoted class method separator +# +# source://yard//lib/yard/code_objects/base.rb#49 +YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) + +# A ClassObject represents a Ruby class in source code. It is a {ModuleObject} +# with extra inheritance semantics through the superclass. +# +# source://yard//lib/yard/code_objects/class_object.rb#9 +class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject + # Creates a new class object in +namespace+ with +name+ + # + # @return [ClassObject] a new instance of ClassObject + # @see Base.new + # + # source://yard//lib/yard/code_objects/class_object.rb#15 + def initialize(namespace, name, *args, &block); end + + # Returns the list of constants matching the options hash. + # + # @option opts + # @option opts + # @param opts [Hash] the options hash to match + # @return [Array<ConstantObject>] the list of constant that matched + # + # source://yard//lib/yard/code_objects/class_object.rb#101 + def constants(opts = T.unsafe(nil)); end + + # Returns the inheritance tree of the object including self. + # + # @param include_mods [Boolean] whether or not to include mixins in the + # inheritance tree. + # @return [Array<NamespaceObject>] the list of code objects that make up + # the inheritance tree. + # + # source://yard//lib/yard/code_objects/class_object.rb#45 + def inheritance_tree(include_mods = T.unsafe(nil)); end + + # Returns only the constants that were inherited. + # + # @return [Array<ConstantObject>] the list of inherited constant objects + # + # source://yard//lib/yard/code_objects/class_object.rb#109 + def inherited_constants; end + + # Returns only the methods that were inherited. + # + # @return [Array<MethodObject>] the list of inherited method objects + # + # source://yard//lib/yard/code_objects/class_object.rb#79 + def inherited_meths(opts = T.unsafe(nil)); end + + # Whether or not the class is a Ruby Exception + # + # @return [Boolean] whether the object represents a Ruby exception + # + # source://yard//lib/yard/code_objects/class_object.rb#35 + def is_exception?; end + + # Returns the list of methods matching the options hash. Returns + # all methods if hash is empty. + # + # @option opts + # @option opts + # @param opts [Hash] the options hash to match + # @return [Array<MethodObject>] the list of methods that matched + # + # source://yard//lib/yard/code_objects/class_object.rb#66 + def meths(opts = T.unsafe(nil)); end + + # The {ClassObject} that this class object inherits from in Ruby source. + # + # @return [ClassObject] a class object that is the superclass of this one + # + # source://yard//lib/yard/code_objects/class_object.rb#10 + def superclass; end + + # Sets the superclass of the object + # + # @param object [Base, Proxy, String, Symbol, nil] the superclass value + # @return [void] + # + # source://yard//lib/yard/code_objects/class_object.rb#125 + def superclass=(object); end +end + +# Represents a class variable inside a namespace. The path is expressed +# in the form "A::B::@@classvariable" +# +# source://yard//lib/yard/code_objects/class_variable_object.rb#8 +class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base + # @return [String] the class variable's value + # + # source://yard//lib/yard/code_objects/class_variable_object.rb#9 + def value; end + + # @return [String] the class variable's value + # + # source://yard//lib/yard/code_objects/class_variable_object.rb#9 + def value=(_arg0); end +end + +# A list of code objects. This array acts like a set (no unique items) +# but also disallows any {Proxy} objects from being added. +# +# source://yard//lib/yard/code_objects/base.rb#10 +class YARD::CodeObjects::CodeObjectList < ::Array + # Creates a new object list associated with a namespace + # + # @param owner [NamespaceObject] the namespace the list should be associated with + # @return [CodeObjectList] + # + # source://yard//lib/yard/code_objects/base.rb#11 + def initialize(owner = T.unsafe(nil)); end + + # Adds a new value to the list + # + # @param value [Base] a code object to add + # @return [CodeObjectList] self + # + # source://yard//lib/yard/code_objects/base.rb#19 + def <<(value); end + + # Adds a new value to the list + # + # @param value [Base] a code object to add + # @return [CodeObjectList] self + # + # source://yard//lib/yard/code_objects/base.rb#19 + def push(value); end +end + +# A +ConstantObject+ represents a Ruby constant (not a module or class). +# To access the constant's (source code) value, use {#value}. +# +# source://yard//lib/yard/code_objects/constant_object.rb#9 +class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base + # The source code representing the constant's value + # + # @return [String] the value the constant is set to + # + # source://yard//lib/yard/code_objects/constant_object.rb#10 + def value; end + + # source://yard//lib/yard/code_objects/constant_object.rb#12 + def value=(value); end +end + +# Represents an instance method of a module that was mixed into the class +# scope of another namespace. +# +# @see MethodObject +# +# source://yard//lib/yard/code_objects/extended_method_object.rb#7 +class YARD::CodeObjects::ExtendedMethodObject + # Sets up a delegate for {MethodObject} obj. + # + # @param obj [MethodObject] the instance method to treat as a mixed in + # class method on another namespace. + # @return [ExtendedMethodObject] a new instance of ExtendedMethodObject + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#17 + def initialize(obj); end + + # Sends all methods to the {MethodObject} assigned in {#initialize} + # + # @see #initialize + # @see MethodObject + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#22 + def method_missing(sym, *args, &block); end + + # @return [Symbol] always +:class+ + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#11 + def scope; end +end + +# An ExtraFileObject represents an extra documentation file (README or other +# file). It is not strictly a CodeObject (does not inherit from `Base`) although +# it implements `path`, `name` and `type`, and therefore should be structurally +# compatible with most CodeObject interfaces. +# +# source://yard//lib/yard/code_objects/extra_file_object.rb#7 +class YARD::CodeObjects::ExtraFileObject + # Creates a new extra file object. + # + # @param filename [String] the location on disk of the file + # @param contents [String] the file contents. If not set, the contents + # will be read from disk using the +filename+. + # @return [ExtraFileObject] a new instance of ExtraFileObject + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#18 + def initialize(filename, contents = T.unsafe(nil)); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def ==(other); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#30 + def attributes; end + + # Sets the attribute attributes + # + # @param value the value to set the attribute attributes to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#9 + def attributes=(_arg0); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#39 + def contents; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#44 + def contents=(contents); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def eql?(other); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def equal?(other); end + + # Returns the value of attribute filename. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#8 + def filename; end + + # Sets the attribute filename + # + # @param value the value to set the attribute filename to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#8 + def filename=(_arg0); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#70 + def hash; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#57 + def inspect; end + + # @since 0.8.3 + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#12 + def locale; end + + # @param locale [String] the locale name to be translated. + # @return [void] + # @since 0.8.3 + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#52 + def locale=(locale); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def name=(_arg0); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def path; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#35 + def title; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#57 + def to_s; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#62 + def type; end + + private + + # source://yard//lib/yard/code_objects/extra_file_object.rb#74 + def ensure_parsed; end + + # @param data [String] the file contents + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#81 + def parse_contents(data); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#129 + def translate(data); end +end + +# Instance method separator +# +# source://yard//lib/yard/code_objects/base.rb#40 +YARD::CodeObjects::ISEP = T.let(T.unsafe(nil), String) + +# Regex-quoted instance method separator +# +# source://yard//lib/yard/code_objects/base.rb#43 +YARD::CodeObjects::ISEPQ = T.let(T.unsafe(nil), String) + +# Regular expression to match a fully qualified method def (self.foo, Class.foo). +# +# source://yard//lib/yard/code_objects/base.rb#64 +YARD::CodeObjects::METHODMATCH = T.let(T.unsafe(nil), Regexp) + +# Regular expression to match a method name +# +# source://yard//lib/yard/code_objects/base.rb#61 +YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) + +# A MacroObject represents a docstring defined through +@!macro NAME+ and can be +# reused by specifying the tag +@!macro NAME+. You can also provide the +# +attached+ type flag to the macro definition to have it attached to the +# specific DSL method so it will be implicitly reused. +# +# Macros are fully described in the {file:docs/Tags.md#macro Tags Overview} +# document. +# +# @example Creating a basic named macro +# # @!macro prop +# # @!method $1(${3-}) +# # @return [$2] the value of the $0 +# property :foo, String, :a, :b +# +# # @!macro prop +# property :bar, Numeric, :value +# @example Creating a macro that is attached to the method call +# # @!macro [attach] prop2 +# # @!method $1(value) +# property :foo +# +# # Extra data added to docstring +# property :bar +# +# source://yard//lib/yard/code_objects/macro_object.rb#30 +class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base + # @return [Boolean] whether this macro is attached to a method + # + # source://yard//lib/yard/code_objects/macro_object.rb#149 + def attached?; end + + # Expands the macro using + # + # @example Expanding a Macro + # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=> + # "...macro data interpolating this line of code..." + # @param call_params [Array<String>] a list of tokens that are passed + # to the method call + # @param full_source [String] the full method call (not including the block) + # @param block_source [String] the source passed in the block of the method + # call, if there is a block. + # @see expand + # + # source://yard//lib/yard/code_objects/macro_object.rb#167 + def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # @return [String] the macro data stored on the object + # + # source://yard//lib/yard/code_objects/macro_object.rb#142 + def macro_data; end + + # @return [String] the macro data stored on the object + # + # source://yard//lib/yard/code_objects/macro_object.rb#142 + def macro_data=(_arg0); end + + # @return [CodeObjects::Base] the method object that this macro is + # attached to. + # + # source://yard//lib/yard/code_objects/macro_object.rb#146 + def method_object; end + + # @return [CodeObjects::Base] the method object that this macro is + # attached to. + # + # source://yard//lib/yard/code_objects/macro_object.rb#146 + def method_object=(_arg0); end + + # Overrides {Base#path} so the macro path is ".macro.MACRONAME" + # + # source://yard//lib/yard/code_objects/macro_object.rb#152 + def path; end + + # Overrides the separator to be '.' + # + # source://yard//lib/yard/code_objects/macro_object.rb#155 + def sep; end + + class << self + # Applies a macro on a docstring by creating any macro data inside of + # the docstring first. Equivalent to calling {find_or_create} and {apply_macro} + # on the new macro object. + # + # @param docstring [Docstring] the docstring to create a macro out of + # @param call_params [Array<String>] the method name and parameters + # to the method call. These arguments will fill $0-N + # @param full_source [String] the full source line (excluding block) + # interpolated as $* + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. + # @return [String] the expanded macro data + # @see find_or_create + # + # source://yard//lib/yard/code_objects/macro_object.rb#120 + def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end + + # Applies a macro to a docstring, interpolating the macro's data on the + # docstring and appending any extra local docstring data that was in + # the original +docstring+ object. + # + # @param macro [MacroObject] the macro object + # @param call_params [Array<String>] the method name and parameters + # to the method call. These arguments will fill $0-N + # @param full_source [String] the full source line (excluding block) + # interpolated as $* + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. + # @return [String] the expanded macro data + # + # source://yard//lib/yard/code_objects/macro_object.rb#136 + def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # Creates a new macro and fills in the relevant properties. + # + # @param macro_name [String] the name of the macro, must be unique. + # @param data [String] the data the macro should expand when re-used + # @param method_object [CodeObjects::Base] an object to attach this + # macro to. If supplied, {#attached?} will be true + # @return [MacroObject] the newly created object + # + # source://yard//lib/yard/code_objects/macro_object.rb#40 + def create(macro_name, data, method_object = T.unsafe(nil)); end + + # Parses a given docstring and determines if the macro is "new" or + # not. If the macro has $variable names or if it has a @!macro tag + # with the [new] or [attached] flag, it is considered new. + # + # If a new macro is found, the macro is created and registered. Otherwise + # the macro name is searched and returned. If a macro is not found, + # nil is returned. + # + # @param macro_name [#to_s] the name of the macro + # @param method_object [CodeObjects::Base] an optional method to attach + # the macro to. Only used if the macro is being created, otherwise + # this argument is ignored. + # @return [MacroObject] the newly created or existing macro, depending + # on whether the @!macro tag was a new tag or not. + # @return [nil] if the +data+ has no macro tag or if the macro is + # not new and no macro by the macro name is found. + # + # source://yard//lib/yard/code_objects/macro_object.rb#71 + def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end + + # Expands +macro_data+ using the interpolation parameters. + # + # Interpolation rules: + # * $0, $1, $2, ... = the Nth parameter in +call_params+ + # * $* = the full statement source (excluding block) + # * Also supports $!{N-M} ranges, as well as negative indexes on N or M + # * Use \$ to escape the variable name in a macro. + # + # @param macro_data [String] the macro data to expand (taken from {#macro_data}) + # + # source://yard//lib/yard/code_objects/macro_object.rb#93 + def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # Finds a macro using +macro_name+ + # + # @param macro_name [#to_s] the name of the macro + # @return [MacroObject] if a macro is found + # @return [nil] if there is no registered macro by that name + # + # source://yard//lib/yard/code_objects/macro_object.rb#51 + def find(macro_name); end + + # Parses a given docstring and determines if the macro is "new" or + # not. If the macro has $variable names or if it has a @!macro tag + # with the [new] or [attached] flag, it is considered new. + # + # If a new macro is found, the macro is created and registered. Otherwise + # the macro name is searched and returned. If a macro is not found, + # nil is returned. + # + # @param macro_name [#to_s] the name of the macro + # @param method_object [CodeObjects::Base] an optional method to attach + # the macro to. Only used if the macro is being created, otherwise + # this argument is ignored. + # @return [MacroObject] the newly created or existing macro, depending + # on whether the @!macro tag was a new tag or not. + # @return [nil] if the +data+ has no macro tag or if the macro is + # not new and no macro by the macro name is found. + # + # source://yard//lib/yard/code_objects/macro_object.rb#71 + def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end + end +end + +# source://yard//lib/yard/code_objects/macro_object.rb#31 +YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) + +# Represents a Ruby method in source +# +# source://yard//lib/yard/code_objects/method_object.rb#10 +class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base + # Creates a new method object in +namespace+ with +name+ and an instance + # or class +scope+ + # + # If scope is +:module+, this object is instantiated as a public + # method in +:class+ scope, but also creates a new (empty) method + # as a private +:instance+ method on the same class or module. + # + # @param namespace [NamespaceObject] the namespace + # @param name [String, Symbol] the method name + # @param scope [Symbol] +:instance+, +:class+, or +:module+ + # @return [MethodObject] a new instance of MethodObject + # + # source://yard//lib/yard/code_objects/method_object.rb#37 + def initialize(namespace, name, scope = T.unsafe(nil), &block); end + + # Returns all alias names of the object + # + # @return [Array<MethodObject>] the alias names + # + # source://yard//lib/yard/code_objects/method_object.rb#149 + def aliases; end + + # Returns the read/writer info for the attribute if it is one + # + # @return [SymbolHash] if there is information about the attribute + # @return [nil] if the method is not an attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#93 + def attr_info; end + + # @return [Boolean] whether or not the method is the #initialize constructor method + # + # source://yard//lib/yard/code_objects/method_object.rb#78 + def constructor?; end + + # Whether the object is explicitly defined in source or whether it was + # inferred by a handler. For instance, attribute methods are generally + # inferred and therefore not explicitly defined in source. + # + # @return [Boolean] whether the object is explicitly defined in source. + # + # source://yard//lib/yard/code_objects/method_object.rb#18 + def explicit; end + + # Whether the object is explicitly defined in source or whether it was + # inferred by a handler. For instance, attribute methods are generally + # inferred and therefore not explicitly defined in source. + # + # @return [Boolean] whether the object is explicitly defined in source. + # + # source://yard//lib/yard/code_objects/method_object.rb#18 + def explicit=(_arg0); end + + # Tests if the object is defined as an alias of another method + # + # @return [Boolean] whether the object is an alias + # + # source://yard//lib/yard/code_objects/method_object.rb#126 + def is_alias?; end + + # Tests if the object is defined as an attribute in the namespace + # + # @return [Boolean] whether the object is an attribute + # + # source://yard//lib/yard/code_objects/method_object.rb#114 + def is_attribute?; end + + # Tests boolean {#explicit} value. + # + # @return [Boolean] whether the method is explicitly defined in source + # + # source://yard//lib/yard/code_objects/method_object.rb#134 + def is_explicit?; end + + # @return [Boolean] whether or not this method was created as a module + # function + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/method_object.rb#85 + def module_function?; end + + # Returns the name of the object. + # + # @example The name of an instance method (with prefix) + # an_instance_method.name(true) # => "#mymethod" + # @example The name of a class method (with prefix) + # a_class_method.name(true) # => "mymethod" + # @param prefix [Boolean] whether or not to show the prefix + # @return [String] returns {#sep} + +name+ for an instance method if + # prefix is true + # @return [Symbol] the name without {#sep} if prefix is set to false + # + # source://yard//lib/yard/code_objects/method_object.rb#175 + def name(prefix = T.unsafe(nil)); end + + # @return [MethodObject] the object that this method overrides + # @return [nil] if it does not override a method + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/method_object.rb#141 + def overridden_method; end + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array<Array(String, String)>] a list of parameter names followed + # by their default values (or nil) + # + # source://yard//lib/yard/code_objects/method_object.rb#25 + def parameters; end + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array<Array(String, String)>] a list of parameter names followed + # by their default values (or nil) + # + # source://yard//lib/yard/code_objects/method_object.rb#25 + def parameters=(_arg0); end + + # Override path handling for instance methods in the root namespace + # (they should still have a separator as a prefix). + # + # @return [String] the path of a method + # + # source://yard//lib/yard/code_objects/method_object.rb#161 + def path; end + + # @return [Boolean] whether the method is a reader attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#107 + def reader?; end + + # The scope of the method (+:class+ or +:instance+) + # + # @return [Symbol] the scope + # + # source://yard//lib/yard/code_objects/method_object.rb#11 + def scope; end + + # Changes the scope of an object from :instance or :class + # + # @param v [Symbol] the new scope + # + # source://yard//lib/yard/code_objects/method_object.rb#58 + def scope=(v); end + + # Override separator to differentiate between class and instance + # methods. + # + # @return [String] "#" for an instance method, "." for class + # + # source://yard//lib/yard/code_objects/method_object.rb#182 + def sep; end + + # @return [Boolean] whether the method is a writer attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#100 + def writer?; end + + protected + + # source://yard//lib/yard/code_objects/method_object.rb#192 + def copyable_attributes; end +end + +# Represents a Ruby module. +# +# source://yard//lib/yard/code_objects/module_object.rb#11 +class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject + # Returns the inheritance tree of mixins. + # + # @param include_mods [Boolean] if true, will include mixed in + # modules (which is likely what is wanted). + # @return [Array<NamespaceObject>] a list of namespace objects + # + # source://yard//lib/yard/code_objects/module_object.rb#12 + def inheritance_tree(include_mods = T.unsafe(nil)); end +end + +# Regular expression to match namespaces (const A or complex path A::B) +# +# source://yard//lib/yard/code_objects/base.rb#58 +YARD::CodeObjects::NAMESPACEMATCH = T.let(T.unsafe(nil), Regexp) + +# Namespace separator +# +# source://yard//lib/yard/code_objects/base.rb#34 +YARD::CodeObjects::NSEP = T.let(T.unsafe(nil), String) + +# Regex-quoted namespace separator +# +# source://yard//lib/yard/code_objects/base.rb#37 +YARD::CodeObjects::NSEPQ = T.let(T.unsafe(nil), String) + +# This module controls registration and accessing of namespace separators +# for {Registry} lookup. +# +# @since 0.9.1 +# +# source://yard//lib/yard/code_objects/namespace_mapper.rb#8 +module YARD::CodeObjects::NamespaceMapper + # Clears the map of separators. + # + # @return [void] + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#55 + def clear_separators; end + + # Gets or sets the default separator value to use when no + # separator for the namespace can be determined. + # + # @example + # default_separator "::" + # @param value [String, nil] the default separator, or nil to return the + # value + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#68 + def default_separator(value = T.unsafe(nil)); end + + # Registers a separator with an optional set of valid types that + # must follow the separator lexically. + # + # Calls all callbacks defined by {NamespaceMapper.on_invalidate} after + # the separator is registered. + # + # @example Registering separators for a method object + # # Anything after a "#" denotes a method object + # register_separator "#", :method + # # Anything after a "." denotes a method object + # register_separator ".", :method + # @param sep [String] the separator string for the namespace + # @param valid_types [Array<Symbol>] a list of object types that + # must follow the separator. If the list is empty, any type can + # follow the separator. + # @see .on_invalidate + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#27 + def register_separator(sep, *valid_types); end + + # @return [Array<String>] all of the registered separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#80 + def separators; end + + # @param type [String] the type to return separators for + # @return [Array<Symbol>] a list of separators registered to a type + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#97 + def separators_for_type(type); end + + # @return [Regexp] the regexp match of all separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#85 + def separators_match; end + + # @param sep [String] the separator to return types for + # @return [Array<Symbol>] a list of types registered to a separator + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#91 + def types_for_separator(sep); end + + # Unregisters a separator by a type. + # + # @param type [Symbol] the type to unregister + # @see #register_separator + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#43 + def unregister_separator_by_type(type); end + + class << self + # @return [String] the default separator when no separator can begin + # determined. + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 + def default_separator; end + + # @return [String] the default separator when no separator can begin + # determined. + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 + def default_separator=(_arg0); end + + # Invalidates all separators + # + # @return [void] + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#125 + def invalidate; end + + # @return [Hash] a mapping of types to separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#114 + def map; end + + # @return [Regexp] the full list of separators as a regexp match + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#131 + def map_match; end + + # Adds a callback that triggers when a new separator is registered or + # the cache is cleared by invalidation. + # + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#107 + def on_invalidate(&block); end + + # @return [Hash] a reverse mapping of separators to types + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#119 + def rev_map; end + end +end + +# A "namespace" is any object that can store other objects within itself. +# The two main Ruby objects that can act as namespaces are modules +# ({ModuleObject}) and classes ({ClassObject}). +# +# source://yard//lib/yard/code_objects/namespace_object.rb#11 +class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base + # Creates a new namespace object inside +namespace+ with +name+. + # + # @return [NamespaceObject] a new instance of NamespaceObject + # @see Base#initialize + # + # source://yard//lib/yard/code_objects/namespace_object.rb#56 + def initialize(namespace, name, *args, &block); end + + # A hash containing two keys, :class and :instance, each containing + # a hash of objects and their alias names. + # + # @return [Hash] a list of methods + # + # source://yard//lib/yard/code_objects/namespace_object.rb#44 + def aliases; end + + # A hash containing two keys, class and instance, each containing + # the attribute name with a { :read, :write } hash for the read and + # write objects respectively. + # + # @example The attributes of an object + # >> Registry.at('YARD::Docstring').attributes + # => { + # :class => { }, + # :instance => { + # :ref_tags => { + # :read => #<yardoc method YARD::Docstring#ref_tags>, + # :write => nil + # }, + # :object => { + # :read => #<yardoc method YARD::Docstring#object>, + # :write => #<yardoc method YARD::Docstring#object=> + # }, + # ... + # } + # } + # @return [Hash] a list of methods + # + # source://yard//lib/yard/code_objects/namespace_object.rb#39 + def attributes; end + + # Looks for a child that matches the attributes specified by +opts+. + # + # @example Finds a child by name and scope + # namespace.child(:name => :to_s, :scope => :instance) + # # => #<yardoc method MyClass#to_s> + # @return [Base, nil] the first matched child object, or nil + # + # source://yard//lib/yard/code_objects/namespace_object.rb#86 + def child(opts = T.unsafe(nil)); end + + # The list of objects defined in this namespace + # + # @return [Array<Base>] a list of objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#16 + def children; end + + # Only the class attributes + # + # @return [Hash] a list of method names and their read/write objects + # @see #attributes + # + # source://yard//lib/yard/code_objects/namespace_object.rb#69 + def class_attributes; end + + # Class mixins + # + # @return [Array<ModuleObject>] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#48 + def class_mixins; end + + # Returns all constants in the namespace + # + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array<ConstantObject>] a list of constant objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#164 + def constants(opts = T.unsafe(nil)); end + + # Returns class variables defined in this namespace. + # + # @return [Array<ClassVariableObject>] a list of class variable objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#186 + def cvars; end + + # @return [Array<String>] a list of ordered group names inside the namespace + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/namespace_object.rb#12 + def groups; end + + # @return [Array<String>] a list of ordered group names inside the namespace + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/namespace_object.rb#12 + def groups=(_arg0); end + + # Returns constants included from any mixins + # + # @return [Array<ConstantObject>] a list of constant objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#172 + def included_constants; end + + # Returns methods included from any mixins that match the attributes + # specified by +opts+. If no options are specified, returns all included + # methods. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @see #meths + # + # source://yard//lib/yard/code_objects/namespace_object.rb#144 + def included_meths(opts = T.unsafe(nil)); end + + # Only the instance attributes + # + # @return [Hash] a list of method names and their read/write objects + # @see #attributes + # + # source://yard//lib/yard/code_objects/namespace_object.rb#76 + def instance_attributes; end + + # Instance mixins + # + # @return [Array<ModuleObject>] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#52 + def instance_mixins; end + + # Returns all methods that match the attributes specified by +opts+. If + # no options are provided, returns all methods. + # + # @example Finds all private and protected class methods + # namespace.meths(:visibility => [:private, :protected], :scope => :class) + # # => [#<yardoc method MyClass.privmeth>, #<yardoc method MyClass.protmeth>] + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array<MethodObject>] a list of method objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#113 + def meths(opts = T.unsafe(nil)); end + + # Returns for specific scopes. If no scopes are provided, returns all mixins. + # + # @param scopes [Array<Symbol>] a list of scopes (:class, :instance) to + # return mixins for. If this is empty, all scopes will be returned. + # @return [Array<ModuleObject>] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#194 + def mixins(*scopes); end +end + +# @private +# +# source://yard//lib/yard/code_objects/proxy.rb#8 +YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp) + +# The Proxy class is a way to lazily resolve code objects in +# cases where the object may not yet exist. A proxy simply stores +# an unresolved path until a method is called on the object, at which +# point it does a lookup using {Registry.resolve}. If the object is +# not found, a warning is raised and {ProxyMethodError} might be raised. +# +# @example Creates a Proxy to the String class from a module +# # When the String class is parsed this method will +# # begin to act like the String ClassObject. +# Proxy.new(mymoduleobj, "String") +# @see Registry.resolve +# @see ProxyMethodError +# +# source://yard//lib/yard/code_objects/proxy.rb#24 +class YARD::CodeObjects::Proxy + # Creates a new Proxy + # + # @raise [ArgumentError] if namespace is not a NamespaceObject + # @return [Proxy] self + # + # source://yard//lib/yard/code_objects/proxy.rb#34 + def initialize(namespace, name, type = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#118 + def <=>(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#127 + def ==(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#113 + def ===(other); end + + # Returns the class name of the object the proxy is mimicking, if + # resolved. Otherwise returns +Proxy+. + # + # @return [Class] the resolved object's class or +Proxy+ + # + # source://yard//lib/yard/code_objects/proxy.rb#142 + def class; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#127 + def equal?(other); end + + # @return [Integer] the object's hash value (for equality checking) + # + # source://yard//lib/yard/code_objects/proxy.rb#137 + def hash; end + + # Returns a text representation of the Proxy + # + # @return [String] the object's #inspect method or P(OBJECTPATH) + # + # source://yard//lib/yard/code_objects/proxy.rb#91 + def inspect; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#161 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#108 + def is_a?(klass); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#166 + def kind_of?(klass); end + + # Dispatches the method to the resolved object. + # + # @raise [ProxyMethodError] if the proxy cannot find the real object + # + # source://yard//lib/yard/code_objects/proxy.rb#178 + def method_missing(meth, *args, &block); end + + # The name of the object + # + # @param prefix [Boolean] whether to show a prefix. Implement + # this in a subclass to define how the prefix is showed. + # @return [Symbol] if prefix is false, the symbolized name + # @return [String] if prefix is true, prefix + the name as a String. + # This must be implemented by the subclass. + # + # source://yard//lib/yard/code_objects/proxy.rb#85 + def name(prefix = T.unsafe(nil)); end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/code_objects/proxy.rb#27 + def namespace; end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/code_objects/proxy.rb#27 + def parent; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#171 + def respond_to?(meth, include_private = T.unsafe(nil)); end + + # This class is never a root object + # + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#200 + def root?; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def title; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def to_s; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def to_str; end + + # Returns the type of the proxy. If it cannot be resolved at the + # time of the call, it will either return the inferred proxy type + # (see {#type=}) or +:proxy+ + # + # @return [Symbol] the Proxy's type + # @see #type= + # + # source://yard//lib/yard/code_objects/proxy.rb#151 + def type; end + + # Allows a parser to infer the type of the proxy by its path. + # + # @param type [#to_sym] the proxy's inferred type + # @return [void] + # + # source://yard//lib/yard/code_objects/proxy.rb#158 + def type=(type); end + + private + + # source://yard//lib/yard/code_objects/proxy.rb#228 + def proxy_path; end + + # @note this method fixes a bug in 1.9.2: http://gist.github.com/437136 + # + # source://yard//lib/yard/code_objects/proxy.rb#205 + def to_ary; end + + # Attempts to find the object that this unresolved object + # references by checking if any objects by this name are + # registered all the way up the namespace tree. + # + # @return [Base, nil] the registered code object or nil + # + # source://yard//lib/yard/code_objects/proxy.rb#212 + def to_obj; end + + class << self + # source://yard//lib/yard/code_objects/proxy.rb#25 + def ===(other); end + end +end + +# A special type of +NoMethodError+ when raised from a {Proxy} +# +# source://yard//lib/yard/code_objects/proxy.rb#5 +class YARD::CodeObjects::ProxyMethodError < ::NoMethodError; end + +# Represents the root namespace object (the invisible Ruby module that +# holds all top level modules, class and other objects). +# +# source://yard//lib/yard/code_objects/root_object.rb#6 +class YARD::CodeObjects::RootObject < ::YARD::CodeObjects::ModuleObject + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/root_object.rb#12 + def equal?(other); end + + # source://yard//lib/yard/code_objects/root_object.rb#16 + def hash; end + + # source://yard//lib/yard/code_objects/root_object.rb#8 + def inspect; end + + # source://yard//lib/yard/code_objects/root_object.rb#7 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/root_object.rb#9 + def root?; end + + # source://yard//lib/yard/code_objects/root_object.rb#10 + def title; end +end + +# This class maintains all system-wide configuration for YARD and handles +# the loading of plugins. To access options call {options}, and to load +# a plugin use {load_plugin}. All other public methods are used by YARD +# during load time. +# +# == User Configuration Files +# +# Persistent user configuration files can be stored in the file +# +~/.yard/config+, which is read when YARD first loads. The file should +# be formatted as YAML, and should contain a map of keys and values. +# +# Although you can specify any key-value mapping in the configuration file, +# YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}. +# +# An example of a configuration file is listed below: +# +# !!!yaml +# load_plugins: true # Auto-load plugins when YARD starts +# ignored_plugins: +# - yard-broken +# - broken2 # yard- prefix not necessary +# autoload_plugins: +# - yard-rspec +# +# == Automatic Loading of Plugins +# +# YARD 0.6.2 will no longer automatically load all plugins by default. This +# option can be reset by setting 'load_plugins' to true in the configuration +# file. In addition, you can specify a set of specific plugins to load on +# load through the 'autoload_plugins' list setting. This setting is +# independent of the 'load_plugins' value and will always be processed. +# +# == Ignored Plugins File +# +# YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify +# plugins to be ignored at load time. Ignored plugins in 0.6.2 and above +# should now be specified in the main configuration file, though YARD +# will support the +ignored_plugins+ file until 0.7.x. +# +# == Safe Mode +# +# YARD supports running in safe-mode. By doing this, it will avoid executing +# any user code such as require files or queries. Plugins will still be +# loaded with safe mode on, because plugins are properly namespaced with +# a 'yard-' prefix, must be installed as a gem, and therefore cannot be +# touched by the user. To specify safe mode, use the +safe_mode+ key. +# +# == Plugin Specific Configuration +# +# Additional settings can be defined within the configuration file +# specifically to provide configuration for a plugin. A plugin that utilizes +# the YARD configuration is strongly encouraged to utilize namespacing of +# their configuration content. +# +# !!!yaml +# load_plugins: true # Auto-load plugins when YARD starts +# ignored_plugins: +# - yard-broken +# - broken2 # yard- prefix not necessary +# autoload_plugins: +# - yard-rspec +# # Plugin Specific Configuration +# yard-sample-plugin: +# show-results-inline: true +# +# As the configuration is available system wide, it can be +# accessed within the plugin code. +# +# +# if YARD::Config.options['yard-sample-plugin'] and +# YARD::Config.options['yard-sample-plugin']['show-results-inline'] +# # ... perform the action that places the results inline ... +# else +# # ... do the default behavior of not showing the results inline ... +# end +# +# When accessing the configuration, be aware that this file is user managed +# so configuration keys and values may not be present. Make no assumptions and +# instead ensure that you check for the existence of keys before proceeding to +# retrieve values. +# +# @see options +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#86 +class YARD::Config + class << self + # Legacy support for {IGNORED_PLUGINS} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#221 + def add_ignored_plugins_file; end + + # @return [Array<String>] arguments from commandline and yardopts file + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#268 + def arguments; end + + # Loads settings from {CONFIG_FILE}. This method is called by YARD at + # load time and should not be called by the user. + # + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#119 + def load; end + + # Load plugins set in :autoload_plugins + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#189 + def load_autoload_plugins; end + + # Load plugins from {arguments} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#194 + def load_commandline_plugins; end + + # Check for command-line safe_mode switch in {arguments} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#204 + def load_commandline_safemode; end + + # Load gem plugins if :load_plugins is true + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#169 + def load_gem_plugins; end + + # Loads an individual plugin by name. It is not necessary to include the + # +yard-+ plugin prefix here. + # + # @param name [String] the name of the plugin (with or without +yard-+ prefix) + # @return [Boolean] whether the plugin was successfully loaded + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#157 + def load_plugin(name); end + + # Print a warning if the plugin failed to load + # + # @return [false] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#214 + def load_plugin_failed(name, exception); end + + # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except + # those listed in +~/.yard/ignored_plugins+. This is called immediately + # after YARD is loaded to allow plugin support. + # + # @return [Boolean] true if all plugins loaded successfully, false otherwise. + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#146 + def load_plugins; end + + # The system-wide configuration options for YARD + # + # @return [SymbolHash] a map a key-value pair settings. + # @see DEFAULT_CONFIG_OPTIONS + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#91 + def options; end + + # The system-wide configuration options for YARD + # + # @return [SymbolHash] a map a key-value pair settings. + # @see DEFAULT_CONFIG_OPTIONS + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#91 + def options=(_arg0); end + + # Loads the YAML configuration file into memory + # + # @return [Hash] the contents of the YAML file from disk + # @see CONFIG_FILE + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#236 + def read_config_file; end + + # Saves settings to {CONFIG_FILE}. + # + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#135 + def save; end + + # Sanitizes and normalizes a plugin name to include the 'yard-' prefix. + # + # @param name [String] the plugin name + # @return [String] the sanitized and normalized plugin name. + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#252 + def translate_plugin_name(name); end + + # Translates plugin names to add yard- prefix. + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#228 + def translate_plugin_names; end + + # Temporarily loads .yardopts file into @yardopts + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#259 + def with_yardopts; end + end +end + +# The location where YARD stores user-specific settings +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#95 +YARD::Config::CONFIG_DIR = T.let(T.unsafe(nil), String) + +# The main configuration YAML file. +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#98 +YARD::Config::CONFIG_FILE = T.let(T.unsafe(nil), String) + +# Default configuration options +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#105 +YARD::Config::DEFAULT_CONFIG_OPTIONS = T.let(T.unsafe(nil), Hash) + +# File listing all ignored plugins +# +# @deprecated Set `ignored_plugins` in the {CONFIG_FILE} instead. +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#102 +YARD::Config::IGNORED_PLUGINS = T.let(T.unsafe(nil), String) + +# The prefix used for YARD plugins. Name your gem with this prefix +# to allow it to be used as a plugin. +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#114 +YARD::Config::YARD_PLUGIN_PREFIX = T.let(T.unsafe(nil), Regexp) + +# A documentation string, or "docstring" for short, encapsulates the +# comments and metadata, or "tags", of an object. Meta-data is expressed +# in the form +@tag VALUE+, where VALUE can span over multiple lines as +# long as they are indented. The following +@example+ tag shows how tags +# can be indented: +# +# # @example My example +# # a = "hello world" +# # a.reverse +# # @version 1.0 +# +# Tags can be nested in a documentation string, though the {Tags::Tag} +# itself is responsible for parsing the inner tags. +# +# source://yard//lib/yard/docstring.rb#16 +class YARD::Docstring < ::String + # Creates a new docstring with the raw contents attached to an optional + # object. Parsing will be done by the {DocstringParser} class. + # + # @example + # Docstring.new("hello world\n@return Object return", someobj) + # @note To properly parse directives with proper parser context within + # handlers, you should not use this method to create a Docstring. + # Instead, use the {parser}, which takes a handler object that + # can pass parser state onto directives. If a Docstring is created + # with this method, directives do not have access to any parser + # state, and may not function as expected. + # @param content [String] the raw comments to be parsed into a docstring + # and associated meta-data. + # @param object [CodeObjects::Base] an object to associate the docstring + # with. + # @return [Docstring] a new instance of Docstring + # + # source://yard//lib/yard/docstring.rb#103 + def initialize(content = T.unsafe(nil), object = T.unsafe(nil)); end + + # Adds another {Docstring}, copying over tags. + # + # @param other [Docstring, String] the other docstring (or string) to + # add. + # @return [Docstring] a new docstring with both docstrings combines + # + # source://yard//lib/yard/docstring.rb#116 + def +(other); end + + # Adds a tag or reftag object to the tag list. If you want to parse + # tag data based on the {Tags::DefaultFactory} tag factory, use + # {DocstringParser} instead. + # + # @param tags [Tags::Tag, Tags::RefTag] list of tag objects to add + # @return [void] + # + # source://yard//lib/yard/docstring.rb#242 + def add_tag(*tags); end + + # @return [String] the raw documentation (including raw tag text) + # + # source://yard//lib/yard/docstring.rb#53 + def all; end + + # Replaces the docstring with new raw content. Called by {#all=}. + # + # @param content [String] the raw comments to be parsed + # + # source://yard//lib/yard/docstring.rb#132 + def all=(content, parse = T.unsafe(nil)); end + + # Returns true if the docstring has no content that is visible to a template. + # + # @param only_visible_tags [Boolean] whether only {Tags::Library.visible_tags} + # should be checked, or if all tags should be considered. + # @return [Boolean] whether or not the docstring has content + # + # source://yard//lib/yard/docstring.rb#310 + def blank?(only_visible_tags = T.unsafe(nil)); end + + # Deletes all tags where the block returns true + # + # @return [void] + # @since 0.7.0 + # @yieldparam tag [Tags::Tag] the tag that is being tested + # @yieldreturn [Boolean] true if the tag should be deleted + # + # source://yard//lib/yard/docstring.rb#300 + def delete_tag_if(&block); end + + # Delete all tags with +name+ + # + # @param name [String] the tag name + # @return [void] + # @since 0.7.0 + # + # source://yard//lib/yard/docstring.rb#291 + def delete_tags(name); end + + # Deep-copies a docstring + # + # @note This method creates a new docstring with new tag lists, but does + # not create new individual tags. Modifying the tag objects will still + # affect the original tags. + # @return [Docstring] a new copied docstring + # @since 0.7.0 + # + # source://yard//lib/yard/docstring.rb#153 + def dup; end + + # Returns true if at least one tag by the name +name+ was declared + # + # @param name [String] the tag name to search for + # @return [Boolean] whether or not the tag +name+ was declared + # + # source://yard//lib/yard/docstring.rb#283 + def has_tag?(name); end + + # @return [Boolean] whether the docstring was started with "##" + # + # source://yard//lib/yard/docstring.rb#56 + def hash_flag; end + + # source://yard//lib/yard/docstring.rb#57 + def hash_flag=(v); end + + # @return [Fixnum] the first line of the {#line_range} + # @return [nil] if there is no associated {#line_range} + # + # source://yard//lib/yard/docstring.rb#167 + def line; end + + # @return [Range] line range in the {#object}'s file where the docstring was parsed from + # + # source://yard//lib/yard/docstring.rb#50 + def line_range; end + + # @return [Range] line range in the {#object}'s file where the docstring was parsed from + # + # source://yard//lib/yard/docstring.rb#50 + def line_range=(_arg0); end + + # @return [CodeObjects::Base] the object that owns the docstring. + # + # source://yard//lib/yard/docstring.rb#47 + def object; end + + # @return [CodeObjects::Base] the object that owns the docstring. + # + # source://yard//lib/yard/docstring.rb#47 + def object=(_arg0); end + + # @return [Array<Tags::RefTag>] the list of reference tags + # + # source://yard//lib/yard/docstring.rb#44 + def ref_tags; end + + # Replaces the docstring with new raw content. Called by {#all=}. + # + # @param content [String] the raw comments to be parsed + # + # source://yard//lib/yard/docstring.rb#132 + def replace(content, parse = T.unsafe(nil)); end + + # Resolves unresolved other docstring reference if there is + # unresolved reference. Does nothing if there is no unresolved + # reference. + # + # Normally, you don't need to call this method + # explicitly. Resolving unresolved reference is done implicitly. + # + # @return [void] + # + # source://yard//lib/yard/docstring.rb#328 + def resolve_reference; end + + # Gets the first line of a docstring to the period or the first paragraph. + # + # @return [String] The first line or paragraph of the docstring; always ends with a period. + # + # source://yard//lib/yard/docstring.rb#173 + def summary; end + + # Convenience method to return the first tag + # object in the list of tag objects of that name + # + # @example + # doc = Docstring.new("@return zero when nil") + # doc.tag(:return).text # => "zero when nil" + # @param name [#to_s] the tag name to return data for + # @return [Tags::Tag] the first tag in the list of {#tags} + # + # source://yard//lib/yard/docstring.rb#265 + def tag(name); end + + # Returns a list of tags specified by +name+ or all tags if +name+ is not specified. + # + # @param name [#to_s] the tag name to return data for, or nil for all tags + # @return [Array<Tags::Tag>] the list of tags by the specified tag name + # + # source://yard//lib/yard/docstring.rb#273 + def tags(name = T.unsafe(nil)); end + + # Reformats and returns a raw representation of the tag data using the + # current tag and docstring data, not the original text. + # + # @return [String] the updated raw formatted docstring data + # @since 0.7.0 + # @todo Add Tags::Tag#to_raw and refactor + # + # source://yard//lib/yard/docstring.rb#207 + def to_raw; end + + # source://yard//lib/yard/docstring.rb#125 + def to_s; end + + private + + # Maps valid reference tags + # + # @return [Array<Tags::RefTag>] the list of valid reference tags + # + # source://yard//lib/yard/docstring.rb#344 + def convert_ref_tags; end + + # Parses out comments split by newlines into a new code object + # + # @param comments [String] the newline delimited array of comments. If the comments + # are passed as a String, they will be split by newlines. + # @return [String] the non-metadata portion of the comments to + # be used as a docstring + # + # source://yard//lib/yard/docstring.rb#369 + def parse_comments(comments); end + + # A stable sort_by method. + # + # @param list [Enumerable] the list to sort. + # @return [Array] a stable sorted list. + # + # source://yard//lib/yard/docstring.rb#382 + def stable_sort_by(list); end + + class << self + # @note Plugin developers should make sure to reset this value + # after parsing finishes. This can be done via the + # {Parser::SourceParser.after_parse_list} callback. This will + # ensure that YARD can properly parse multiple projects in + # the same process. + # @return [Class<DocstringParser>] the parser class used to parse + # text and optional meta-data from docstrings. Defaults to + # {DocstringParser}. + # @see DocstringParser + # @see Parser::SourceParser.after_parse_list + # + # source://yard//lib/yard/docstring.rb#28 + def default_parser; end + + # @note Plugin developers should make sure to reset this value + # after parsing finishes. This can be done via the + # {Parser::SourceParser.after_parse_list} callback. This will + # ensure that YARD can properly parse multiple projects in + # the same process. + # @return [Class<DocstringParser>] the parser class used to parse + # text and optional meta-data from docstrings. Defaults to + # {DocstringParser}. + # @see DocstringParser + # @see Parser::SourceParser.after_parse_list + # + # source://yard//lib/yard/docstring.rb#28 + def default_parser=(_arg0); end + + # Creates a new docstring without performing any parsing through + # a {DocstringParser}. This method is called by +DocstringParser+ + # when creating the new docstring object. + # + # @param text [String] the textual portion of the docstring + # @param tags [Array<Tags::Tag>] the list of tag objects in the docstring + # @param object [CodeObjects::Base, nil] the object associated with the + # docstring. May be nil. + # @param raw_data [String] the complete docstring, including all + # original formatting and any unparsed tags/directives. + # @param ref_object [CodeObjects::Base, nil] a reference object used for + # the base set of documentation / tag information. + # + # source://yard//lib/yard/docstring.rb#77 + def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end + + # Creates a parser object using the current {default_parser}. + # Equivalent to: + # Docstring.default_parser.new(*args) + # + # @param args arguments are passed to the {DocstringParser} + # class. See {DocstringParser#initialize} for details on + # arguments. + # @return [DocstringParser] the parser object used to parse a + # docstring. + # + # source://yard//lib/yard/docstring.rb#38 + def parser(*args); end + end +end + +# Matches a tag at the start of a comment line +# +# @deprecated Use {DocstringParser::META_MATCH} +# +# source://yard//lib/yard/docstring.rb#61 +YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) + +# Parses text and creates a {Docstring} object to represent documentation +# for a {CodeObjects::Base}. To create a new docstring, you should initialize +# the parser and call {#parse} followed by {#to_docstring}. +# +# == Subclassing Notes +# +# The DocstringParser can be subclassed and substituted during parsing by +# setting the {Docstring.default_parser} attribute with the name of the +# subclass. This allows developers to change the way docstrings are +# parsed, allowing for completely different docstring syntaxes. +# +# @example Creating a Docstring with a DocstringParser +# DocstringParser.new.parse("text here").to_docstring +# @example Creating a Custom DocstringParser +# # Parses docstrings backwards! +# class ReverseDocstringParser +# def parse_content(content) +# super(content.reverse) +# end +# end +# +# # Set the parser as default when parsing +# YARD::Docstring.default_parser = ReverseDocstringParser +# @see #parse_content +# @since 0.8.0 +# +# source://yard//lib/yard/docstring_parser.rb#30 +class YARD::DocstringParser + # Creates a new parser to parse docstring data + # + # @param library [Tags::Library] a tag library for recognizing + # tags. + # @return [DocstringParser] a new instance of DocstringParser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#81 + def initialize(library = T.unsafe(nil)); end + + # Creates a new directive using the registered {#library} + # + # @return [Tags::Directive] the directive object that is created + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#232 + def create_directive(tag_name, tag_buf); end + + # Creates a {Tags::RefTag} + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#226 + def create_ref_tag(tag_name, name, object_name); end + + # Creates a tag from the {Tags::DefaultFactory tag factory}. + # + # To add an already created tag object, append it to {#tags}. + # + # @param tag_name [String] the tag name + # @param tag_buf [String] the text attached to the tag with newlines removed. + # @return [Tags::Tag, Tags::RefTag] a tag + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#209 + def create_tag(tag_name, tag_buf = T.unsafe(nil)); end + + # @return [Array<Tags::Directive>] a list of directives identified + # by the parser. This list will not be passed on to the + # Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#45 + def directives; end + + # @return [Array<Tags::Directive>] a list of directives identified + # by the parser. This list will not be passed on to the + # Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#45 + def directives=(_arg0); end + + # @return [Handlers::Base, nil] the handler parsing this + # docstring. May be nil if this docstring parser is not + # initialized through + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#66 + def handler; end + + # @return [Handlers::Base, nil] the handler parsing this + # docstring. May be nil if this docstring parser is not + # initialized through + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#66 + def handler=(_arg0); end + + # @return [Tags::Library] the tag library being used to + # identify registered tags in the docstring. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#70 + def library; end + + # @return [Tags::Library] the tag library being used to + # identify registered tags in the docstring. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#70 + def library=(_arg0); end + + # @return [CodeObjects::Base, nil] the object associated with + # the docstring being parsed. May be nil if the docstring is + # not attached to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#56 + def object; end + + # @return [CodeObjects::Base, nil] the object associated with + # the docstring being parsed. May be nil if the docstring is + # not attached to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#56 + def object=(_arg0); end + + # Parses all content and returns itself. + # + # @param content [String] the docstring text to parse + # @param object [CodeObjects::Base] the object that the docstring + # is attached to. Will be passed to directives to act on + # this object. + # @param handler [Handlers::Base, nil] the handler object that is + # parsing this object. May be nil if this parser is not being + # called from a {Parser::SourceParser} context. + # @return [self] the parser object. To get the docstring, + # call {#to_docstring}. + # @see #to_docstring + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#113 + def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end + + # Parses a given block of text. + # + # @note Subclasses can override this method to perform custom + # parsing of content data. + # @param content [String] the content to parse + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#129 + def parse_content(content); end + + # Call post processing callbacks on parser. + # This is called implicitly by parser. Use this when + # manually configuring a {Docstring} object. + # + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#196 + def post_process; end + + # @return [String] the complete input string to the parser. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#36 + def raw_text; end + + # @return [String] the complete input string to the parser. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#36 + def raw_text=(_arg0); end + + # @return [CodeObjects::Base, nil] the object referenced by + # the docstring being parsed. May be nil if the docstring doesn't + # refer to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#61 + def reference; end + + # @return [CodeObjects::Base, nil] the object referenced by + # the docstring being parsed. May be nil if the docstring doesn't + # refer to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#61 + def reference=(_arg0); end + + # @return [OpenStruct] any arbitrary state to be passed between + # tags during parsing. Mainly used by directives to coordinate + # behaviour (so that directives can be aware of other directives + # used in a docstring). + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#51 + def state; end + + # @return [OpenStruct] any arbitrary state to be passed between + # tags during parsing. Mainly used by directives to coordinate + # behaviour (so that directives can be aware of other directives + # used in a docstring). + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#51 + def state=(_arg0); end + + # Backward compatibility to detect old tags that should be specified + # as directives in 0.8 and onward. + # + # @return [Boolean] + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#252 + def tag_is_directive?(tag_name); end + + # @return [Array<Tags::Tag>] the list of meta-data tags identified + # by the parser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#40 + def tags; end + + # @return [Array<Tags::Tag>] the list of meta-data tags identified + # by the parser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#40 + def tags=(_arg0); end + + # @return [String] the parsed text portion of the docstring, + # with tags removed. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#33 + def text; end + + # @return [String] the parsed text portion of the docstring, + # with tags removed. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#33 + def text=(_arg0); end + + # @return [Docstring] translates parsed text into + # a Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#95 + def to_docstring; end + + private + + # Calls all {after_parse} callbacks + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#324 + def call_after_parse_callbacks; end + + # Calls the {Tags::Directive#after_parse} callback on all the + # created directives. + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#319 + def call_directives_after_parse; end + + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#305 + def detect_reference(content); end + + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#301 + def namespace; end + + class << self + # Creates a callback that is called after a docstring is successfully + # parsed. Use this method to perform sanity checks on a docstring's + # tag data, or add any extra tags automatically to a docstring. + # + # @return [void] + # @since 0.8.0 + # @yield [parser] a block to be called after a docstring is parsed + # @yieldparam parser [DocstringParser] the docstring parser object + # with all directives and tags created. + # @yieldreturn [void] + # + # source://yard//lib/yard/docstring_parser.rb#266 + def after_parse(&block); end + + # @return [Array<Proc>] the {after_parse} callback proc objects + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#271 + def after_parse_callbacks; end + end +end + +# The regular expression to match the tag syntax +# +# @since 0.8.0 +# +# source://yard//lib/yard/docstring_parser.rb#73 +YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/gem_index.rb#6 +module YARD::GemIndex + private + + # source://yard//lib/yard/gem_index.rb#25 + def all; end + + # source://yard//lib/yard/gem_index.rb#17 + def each(&block); end + + # source://yard//lib/yard/gem_index.rb#9 + def find_all_by_name(*args); end + + class << self + # source://yard//lib/yard/gem_index.rb#25 + def all; end + + # source://yard//lib/yard/gem_index.rb#17 + def each(&block); end + + # source://yard//lib/yard/gem_index.rb#9 + def find_all_by_name(*args); end + end +end + +# Handlers are called during the data processing part of YARD's +# parsing phase. This allows YARD as well as any custom extension to +# analyze source and generate {CodeObjects} to be stored for later use. +# +# source://yard//lib/yard/autoload.rb#66 +module YARD::Handlers; end + +# Handlers are pluggable semantic parsers for YARD's code generation +# phase. They allow developers to control what information gets +# generated by YARD, giving them the ability to, for instance, document +# any Ruby DSLs that a customized framework may use. A good example +# of this would be the ability to document and generate meta data for +# the 'describe' declaration of the RSpec testing framework by simply +# adding a handler for such a keyword. Similarly, any Ruby API that +# takes advantage of class level declarations could add these to the +# documentation in a very explicit format by treating them as first- +# class objects in any outputted documentation. +# +# == Overview of a Typical Handler Scenario +# +# Generally, a handler class will declare a set of statements which +# it will handle using the {handles} class declaration. It will then +# implement the {#process} method to do the work. The processing would +# usually involve the manipulation of the {#namespace}, {#owner} +# {CodeObjects::Base code objects} or the creation of new ones, in +# which case they should be registered by {#register}, a method that +# sets some basic attributes for the new objects. +# +# Handlers are usually simple and take up to a page of code to process +# and register a new object or add new attributes to the current +namespace+. +# +# == Setting up a Handler for Use +# +# A Handler is automatically registered when it is subclassed from the +# base class. The only other thing that needs to be done is to specify +# which statement the handler will process. This is done with the +handles+ +# declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or `Regexp`. +# Here is a simple example which processes module statements. +# +# class MyModuleHandler < YARD::Handlers::Base +# handles TkMODULE +# +# def process +# # do something +# end +# end +# +# == Processing Handler Data +# +# The goal of a specific handler is really up to the developer, and as +# such there is no real guideline on how to process the data. However, +# it is important to know where the data is coming from to be able to use +# it. +# +# === +statement+ Attribute +# +# The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} object +# containing a set of tokens parsed in by the parser. This is the main set +# of data to be analyzed and processed. The comments attached to the statement +# can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, but generally +# the data to be processed will live in the +tokens+ attribute. This list +# can be converted to a +String+ using +#to_s+ to parse the data with +# regular expressions (or other text processing mechanisms), if needed. +# +# === +namespace+ Attribute +# +# The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace object} +# which represents the current namespace that the parser is in. For instance: +# +# module SomeModule +# class MyClass +# def mymethod; end +# end +# end +# +# If a handler was to parse the 'class MyClass' statement, it would +# be necessary to know that it belonged inside the SomeModule module. +# This is the value that +namespace+ would return when processing such +# a statement. If the class was then entered and another handler was +# called on the method, the +namespace+ would be set to the 'MyClass' +# code object. +# +# === +owner+ Attribute +# +# The +owner+ attribute is similar to the +namespace+ attribute in that +# it also follows the scope of the code during parsing. However, a namespace +# object is loosely defined as a module or class and YARD has the ability +# to parse beyond module and class blocks (inside methods, for instance), +# so the +owner+ attribute would not be limited to modules and classes. +# +# To put this into context, the example from above will be used. If a method +# handler was added to the mix and decided to parse inside the method body, +# the +owner+ would be set to the method object but the namespace would remain +# set to the class. This would allow the developer to process any method +# definitions set inside a method (def x; def y; 2 end end) by adding them +# to the correct namespace (the class, not the method). +# +# In summary, the distinction between +namespace+ and +owner+ can be thought +# of as the difference between first-class Ruby objects (namespaces) and +# second-class Ruby objects (methods). +# +# === +visibility+ and +scope+ Attributes +# +# Mainly needed for parsing methods, the +visibility+ and +scope+ attributes +# refer to the public/protected/private and class/instance values (respectively) +# of the current parsing position. +# +# == Parsing Blocks in Statements +# +# In addition to parsing a statement and creating new objects, some +# handlers may wish to continue parsing the code inside the statement's +# block (if there is one). In this context, a block means the inside +# of any statement, be it class definition, module definition, if +# statement or classic 'Ruby block'. +# +# For example, a class statement would be "class MyClass" and the block +# would be a list of statements including the method definitions inside +# the class. For a class handler, the programmer would execute the +# {#parse_block} method to continue parsing code inside the block, with +# the +namespace+ now pointing to the class object the handler created. +# +# YARD has the ability to continue into any block: class, module, method, +# even if statements. For this reason, the block parsing method must be +# invoked explicitly out of efficiency sake. +# +# @abstract Subclass this class to provide a handler for YARD to use +# during the processing phase. +# @see CodeObjects::Base +# @see CodeObjects::NamespaceObject +# @see handles +# @see #namespace +# @see #owner +# @see #register +# @see #parse_block +# +# source://yard//lib/yard/handlers/base.rb#149 +class YARD::Handlers::Base + include ::YARD::CodeObjects + include ::YARD::Parser + + # @return [Base] a new instance of Base + # + # source://yard//lib/yard/handlers/base.rb#276 + def initialize(source_parser, stmt); end + + # Aborts a handler by raising {Handlers::HandlerAborted}. + # An exception will only be logged in debugging mode for + # this kind of handler exit. + # + # @raise [Handlers::HandlerAborted] + # @since 0.8.4 + # + # source://yard//lib/yard/handlers/base.rb#355 + def abort!; end + + # @abstract Implement this method to return the parameters in a method call + # statement. It should return an empty list if the statement is not a + # method call. + # @raise [NotImplementedError] + # @return [Array<String>] a list of argument names + # + # source://yard//lib/yard/handlers/base.rb#581 + def call_params; end + + # @abstract Implement this method to return the method being called in + # a method call. It should return nil if the statement is not a method + # call. + # @raise [NotImplementedError] + # @return [String] the method name being called + # @return [nil] if the statement is not a method call + # + # source://yard//lib/yard/handlers/base.rb#590 + def caller_method; end + + # Ensures that a specific +object+ has been parsed and loaded into the + # registry. This is necessary when adding data to a namespace, for instance, + # since the namespace may not have been processed yet (it can be located + # in a file that has not been handled). + # + # Calling this method defers the handler until all other files have been + # processed. If the object gets resolved, the rest of the handler continues, + # otherwise an exception is raised. + # + # @example Adding a mixin to the String class programmatically + # ensure_loaded! P('String') + # # "String" is now guaranteed to be loaded + # P('String').mixins << P('MyMixin') + # @param object [Proxy, CodeObjects::Base] the object to resolve. + # @param max_retries [Integer] the number of times to defer the handler + # before raising a +NamespaceMissingError+. + # @raise [NamespaceMissingError] if the object is not resolved within + # +max_retries+ attempts, this exception is raised and the handler + # finishes processing. + # + # source://yard//lib/yard/handlers/base.rb#561 + def ensure_loaded!(object, max_retries = T.unsafe(nil)); end + + # Returns the value of attribute extra_state. + # + # source://yard//lib/yard/handlers/base.rb#348 + def extra_state; end + + # Returns the value of attribute globals. + # + # source://yard//lib/yard/handlers/base.rb#347 + def globals; end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/handlers/base.rb#341 + def namespace; end + + # Sets the attribute namespace + # + # @param value the value to set the attribute namespace to. + # + # source://yard//lib/yard/handlers/base.rb#342 + def namespace=(v); end + + # Returns the value of attribute owner. + # + # source://yard//lib/yard/handlers/base.rb#339 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/handlers/base.rb#340 + def owner=(v); end + + # Parses the semantic "block" contained in the statement node. + # + # @abstract Subclasses should call {Processor#process parser.process} + # @raise [NotImplementedError] + # + # source://yard//lib/yard/handlers/base.rb#304 + def parse_block(*_arg0); end + + # @return [Processor] the processor object that manages all global state + # during handling. + # + # source://yard//lib/yard/handlers/base.rb#310 + def parser; end + + # The main handler method called by the parser on a statement + # that matches the {handles} declaration. + # + # Subclasses should override this method to provide the handling + # functionality for the class. + # + # @raise [NotImplementedError] + # @return [Array<CodeObjects::Base>, CodeObjects::Base, Object] If this method returns a code object (or a list of them), + # they are passed to the +#register+ method which adds basic + # attributes. It is not necessary to return any objects and in + # some cases you may want to explicitly avoid the returning of + # any objects for post-processing by the register method. + # @see handles + # @see #register + # + # source://yard//lib/yard/handlers/base.rb#297 + def process; end + + # Executes a given block with specific state values for {#owner}, + # {#namespace} and {#scope}. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @yield a block to execute with the given state values. + # + # source://yard//lib/yard/handlers/base.rb#370 + def push_state(opts = T.unsafe(nil)); end + + # Do some post processing on a list of code objects. + # Adds basic attributes to the list of objects like + # the filename, line number, {CodeObjects::Base#dynamic}, + # source code and {CodeObjects::Base#docstring}, + # but only if they don't exist. + # + # @param objects [Array<CodeObjects::Base>] the list of objects to post-process. + # @return [CodeObjects::Base, Array<CodeObjects::Base>] returns whatever is passed in, for chainability. + # + # source://yard//lib/yard/handlers/base.rb#407 + def register(*objects); end + + # Registers any docstring found for the object and expands macros + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#450 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # Registers the object as dynamic if the object is defined inside + # a method or block (owner != namespace) + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#537 + def register_dynamic(object); end + + # Ensures that the object's namespace is loaded before attaching it + # to the namespace. + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#429 + def register_ensure_loaded(object); end + + # Registers the file/line of the declaration with the object + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#441 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Registers the object as being inside a specific group + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#473 + def register_group(object, group = T.unsafe(nil)); end + + # Registers the same method information on the module function, if + # the object was defined as a module function. + # + # @param object [CodeObjects::Base] the possible module function object + # to copy data for + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#523 + def register_module_function(object); end + + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#499 + def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end + + # Registers any transitive tags from the namespace on the object + # + # @param object [CodeObjects::Base, nil] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#487 + def register_transitive_tags(object); end + + # Registers visibility on a method object. If the object does not + # respond to setting visibility, nothing is done. + # + # @param object [#visibility=] the object to register + # @param visibility [Symbol] the visibility to set on the object + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#511 + def register_visibility(object, visibility = T.unsafe(nil)); end + + # Returns the value of attribute scope. + # + # source://yard//lib/yard/handlers/base.rb#345 + def scope; end + + # Sets the attribute scope + # + # @param value the value to set the attribute scope to. + # + # source://yard//lib/yard/handlers/base.rb#346 + def scope=(v); end + + # @return [Object] the statement object currently being processed. Usually + # refers to one semantic language statement, though the strict definition + # depends on the parser used. + # + # source://yard//lib/yard/handlers/base.rb#315 + def statement; end + + # Returns the value of attribute visibility. + # + # source://yard//lib/yard/handlers/base.rb#343 + def visibility; end + + # Sets the attribute visibility + # + # @param value the value to set the attribute visibility to. + # + # source://yard//lib/yard/handlers/base.rb#344 + def visibility=(v); end + + class << self + # Clear all registered subclasses. Testing purposes only + # + # @return [void] + # + # source://yard//lib/yard/handlers/base.rb#159 + def clear_subclasses; end + + # @return [Array] a list of matchers for the handler object. + # @see handles? + # + # source://yard//lib/yard/handlers/base.rb#211 + def handlers; end + + # Declares the statement type which will be processed + # by this handler. + # + # A match need not be unique to a handler. Multiple + # handlers can process the same statement. However, + # in this case, care should be taken to make sure that + # {#parse_block} would only be executed by one of + # the handlers, otherwise the same code will be parsed + # multiple times and slow YARD down. + # + # @param matches [Parser::Ruby::Legacy::RubyToken, Symbol, String, Regexp] statements that match the declaration will be + # processed by this handler. A {String} match is + # equivalent to a +/\Astring/+ regular expression + # (match from the beginning of the line), and all + # token matches match only the first token of the + # statement. + # + # source://yard//lib/yard/handlers/base.rb#192 + def handles(*matches); end + + # This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}. + # To implement a base handler class for another language, implement + # this method to return true if the handler should process the given + # statement object. Use {handlers} to enumerate the matchers declared + # for the handler class. + # + # @param statement a statement object or node (depends on language type) + # @raise [NotImplementedError] + # @return [Boolean] whether or not this handler object should process + # the given statement + # + # source://yard//lib/yard/handlers/base.rb#205 + def handles?(statement); end + + # Declares that a handler should only be called when inside a filename + # by its basename or a regex match for the full path. + # + # @param filename [String, Regexp] a matching filename or regex + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/handlers/base.rb#235 + def in_file(filename); end + + # @private + # + # source://yard//lib/yard/handlers/base.rb#169 + def inherited(subclass); end + + # @return [Boolean] whether the filename matches the declared file + # match for a handler. If no file match is specified, returns true. + # @since 0.6.2 + # + # source://yard//lib/yard/handlers/base.rb#242 + def matches_file?(filename); end + + # Declares that the handler should only be called when inside a + # {CodeObjects::NamespaceObject}, not a method body. + # + # @return [void] + # + # source://yard//lib/yard/handlers/base.rb#219 + def namespace_only; end + + # @return [Boolean] whether the handler should only be processed inside + # a namespace. + # + # source://yard//lib/yard/handlers/base.rb#225 + def namespace_only?; end + + # Generates a +process+ method, equivalent to +def process; ... end+. + # Blocks defined with this syntax will be wrapped inside an anonymous + # module so that the handler class can be extended with mixins that + # override the +process+ method without alias chaining. + # + # @return [void] + # @see #process + # @since 0.5.4 + # + # source://yard//lib/yard/handlers/base.rb#269 + def process(&block); end + + # Returns all registered handler subclasses. + # + # @return [Array<Base>] a list of handlers + # + # source://yard//lib/yard/handlers/base.rb#165 + def subclasses; end + end +end + +# CRuby Handlers +# +# @since 0.8.0 +# +# source://yard//lib/yard/autoload.rb#74 +module YARD::Handlers::C; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/alias_handler.rb#2 +class YARD::Handlers::C::AliasHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/alias_handler.rb#3 +YARD::Handlers::C::AliasHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/attribute_handler.rb#2 +class YARD::Handlers::C::AttributeHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/attribute_handler.rb#3 +YARD::Handlers::C::AttributeHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/base.rb#5 +class YARD::Handlers::C::Base < ::YARD::Handlers::Base + include ::YARD::Parser::C + include ::YARD::Handlers::Common::MethodHandler + include ::YARD::Handlers::C::HandlerMethods + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#77 + def ensure_variable_defined!(var, max_retries = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#64 + def namespace_for_variable(var); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#94 + def namespaces; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#60 + def override_comments; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#104 + def parse_block(opts = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#113 + def process_file(file, object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#98 + def processed_files; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#38 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#42 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#46 + def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#50 + def register_visibility(object, visibility = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#56 + def symbols; end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#158 + def remove_var_prefix(var); end + + class << self + # @return [Boolean] whether the handler handles this statement + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#10 + def handles?(statement, processor); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#28 + def statement_class(type = T.unsafe(nil)); end + end +end + +# Generated by update_error_map.rb (Copy+past results) +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/base.rb#131 +YARD::Handlers::C::Base::ERROR_CLASS_NAMES = T.let(T.unsafe(nil), Hash) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#2 +class YARD::Handlers::C::ClassHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#3 +YARD::Handlers::C::ClassHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#9 +YARD::Handlers::C::ClassHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/constant_handler.rb#2 +class YARD::Handlers::C::ConstantHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/constant_handler.rb#3 +YARD::Handlers::C::ConstantHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/handler_methods.rb#5 +module YARD::Handlers::C::HandlerMethods + include ::YARD::Parser::C + include ::YARD::CodeObjects + include ::YARD::Handlers::Common::MethodHandler + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#86 + def handle_alias(var_name, new_name, old_name); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#75 + def handle_attribute(var_name, name, read, write); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#10 + def handle_class(var_name, class_name, parent, in_module = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#109 + def handle_constants(type, var_name, const_name, value); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#46 + def handle_method(scope, var_name, name, func_name, _source_file = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#33 + def handle_module(var_name, module_name, in_module = T.unsafe(nil)); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#123 + def find_constant_docstring(object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#154 + def find_method_body(object, symbol); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#196 + def record_parameters(object, symbol, src); end +end + +# Handles the Init_Libname() method +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/init_handler.rb#3 +class YARD::Handlers::C::InitHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/init_handler.rb#4 +YARD::Handlers::C::InitHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#2 +class YARD::Handlers::C::MethodHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#3 +YARD::Handlers::C::MethodHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#14 +YARD::Handlers::C::MethodHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#18 +YARD::Handlers::C::MethodHandler::MATCH3 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/mixin_handler.rb#2 +class YARD::Handlers::C::MixinHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/mixin_handler.rb#3 +YARD::Handlers::C::MixinHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#2 +class YARD::Handlers::C::ModuleHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#3 +YARD::Handlers::C::ModuleHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#4 +YARD::Handlers::C::ModuleHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# Parses comments +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/override_comment_handler.rb#3 +class YARD::Handlers::C::OverrideCommentHandler < ::YARD::Handlers::C::Base + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/override_comment_handler.rb#24 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/override_comment_handler.rb#28 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end +end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/path_handler.rb#2 +class YARD::Handlers::C::PathHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/path_handler.rb#3 +YARD::Handlers::C::PathHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/struct_handler.rb#2 +class YARD::Handlers::C::StructHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/struct_handler.rb#3 +YARD::Handlers::C::StructHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# Keeps track of function bodies for symbol lookup during Ruby method declarations +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/symbol_handler.rb#3 +class YARD::Handlers::C::SymbolHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/symbol_handler.rb#4 +YARD::Handlers::C::SymbolHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# Shared logic between C and Ruby handlers. +# +# source://yard//lib/yard/autoload.rb#68 +module YARD::Handlers::Common; end + +# Shared functionality between Ruby and C method handlers. +# +# source://yard//lib/yard/handlers/common/method_handler.rb#6 +module YARD::Handlers::Common::MethodHandler + # @param obj [MethodObject] + # + # source://yard//lib/yard/handlers/common/method_handler.rb#8 + def add_predicate_return_tag(obj); end +end + +# Raise this error when a handler should exit before completing. +# The exception will be silenced, allowing the next handler(s) in the +# queue to be executed. +# +# @since 0.8.4 +# +# source://yard//lib/yard/handlers/base.rb#8 +class YARD::Handlers::HandlerAborted < ::RuntimeError; end + +# Raised during processing phase when a handler needs to perform +# an operation on an object's namespace but the namespace could +# not be resolved. +# +# source://yard//lib/yard/handlers/base.rb#15 +class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError + # @return [NamespaceMissingError] a new instance of NamespaceMissingError + # + # source://yard//lib/yard/handlers/base.rb#18 + def initialize(object); end + + # The object the error occurred on + # + # @return [CodeObjects::Base] a code object + # + # source://yard//lib/yard/handlers/base.rb#16 + def object; end + + # The object the error occurred on + # + # @return [CodeObjects::Base] a code object + # + # source://yard//lib/yard/handlers/base.rb#16 + def object=(_arg0); end +end + +# Iterates over all statements in a file and delegates them to the +# {Handlers::Base} objects that are registered to handle the statement. +# +# This class is passed to each handler and keeps overall processing state. +# For example, if the {#visibility} is set in a handler, all following +# statements will have access to this state. This allows "public", +# "protected" and "private" statements to be handled in classes and modules. +# In addition, the {#namespace} can be set during parsing to control +# where objects are being created from. You can also access extra stateful +# properties that any handler can set during the duration of the post +# processing of a file from {#extra_state}. If you need to access state +# across different files, look at {#globals}. +# +# @see Handlers::Base +# +# source://yard//lib/yard/handlers/processor.rb#20 +class YARD::Handlers::Processor + # Creates a new Processor for a +file+. + # + # @param parser [Parser::SourceParser] the parser used to initialize the processor + # @return [Processor] a new instance of Processor + # + # source://yard//lib/yard/handlers/processor.rb#92 + def initialize(parser); end + + # Share state across different handlers inside of a file. + # This attribute is similar to {#visibility}, {#scope}, {#namespace} + # and {#owner}, in that they all maintain state across all handlers + # for the entire source file. Use this attribute to store any data + # your handler might need to save during the parsing of a file. If + # you need to save state across files, see {#globals}. + # + # @return [OpenStruct] an open structure that can store arbitrary data + # @see #globals + # + # source://yard//lib/yard/handlers/processor.rb#88 + def extra_state; end + + # Share state across different handlers inside of a file. + # This attribute is similar to {#visibility}, {#scope}, {#namespace} + # and {#owner}, in that they all maintain state across all handlers + # for the entire source file. Use this attribute to store any data + # your handler might need to save during the parsing of a file. If + # you need to save state across files, see {#globals}. + # + # @return [OpenStruct] an open structure that can store arbitrary data + # @see #globals + # + # source://yard//lib/yard/handlers/processor.rb#88 + def extra_state=(_arg0); end + + # @return [String] the filename + # + # source://yard//lib/yard/handlers/processor.rb#41 + def file; end + + # @return [String] the filename + # + # source://yard//lib/yard/handlers/processor.rb#41 + def file=(_arg0); end + + # Searches for all handlers in {Base.subclasses} that match the +statement+ + # + # @param statement the statement object to match. + # @return [Array<Base>] a list of handlers to process the statement with. + # + # source://yard//lib/yard/handlers/processor.rb#151 + def find_handlers(statement); end + + # Handlers can share state for the entire post processing stage through + # this attribute. Note that post processing stage spans multiple files. + # To share state only within a single file, use {#extra_state} + # + # @example Sharing state among two handlers + # class Handler1 < YARD::Handlers::Ruby::Base + # handles :class + # process { globals.foo = :bar } + # end + # + # class Handler2 < YARD::Handlers::Ruby::Base + # handles :method + # process { puts globals.foo } + # end + # @return [OpenStruct] global shared state for post-processing stage + # @see #extra_state + # + # source://yard//lib/yard/handlers/processor.rb#77 + def globals; end + + # Handlers can share state for the entire post processing stage through + # this attribute. Note that post processing stage spans multiple files. + # To share state only within a single file, use {#extra_state} + # + # @example Sharing state among two handlers + # class Handler1 < YARD::Handlers::Ruby::Base + # handles :class + # process { globals.foo = :bar } + # end + # + # class Handler2 < YARD::Handlers::Ruby::Base + # handles :method + # process { puts globals.foo } + # end + # @return [OpenStruct] global shared state for post-processing stage + # @see #extra_state + # + # source://yard//lib/yard/handlers/processor.rb#77 + def globals=(_arg0); end + + # @return [CodeObjects::NamespaceObject] the current namespace + # + # source://yard//lib/yard/handlers/processor.rb#44 + def namespace; end + + # @return [CodeObjects::NamespaceObject] the current namespace + # + # source://yard//lib/yard/handlers/processor.rb#44 + def namespace=(_arg0); end + + # @return [CodeObjects::Base, nil] unlike the namespace, the owner + # is a non-namespace object that should be stored between statements. + # For instance, when parsing a method body, the {CodeObjects::MethodObject} + # is set as the owner, in case any extra method information is processed. + # + # source://yard//lib/yard/handlers/processor.rb#56 + def owner; end + + # @return [CodeObjects::Base, nil] unlike the namespace, the owner + # is a non-namespace object that should be stored between statements. + # For instance, when parsing a method body, the {CodeObjects::MethodObject} + # is set as the owner, in case any extra method information is processed. + # + # source://yard//lib/yard/handlers/processor.rb#56 + def owner=(_arg0); end + + # Continue parsing the remainder of the files in the +globals.ordered_parser+ + # object. After the remainder of files are parsed, processing will continue + # on the current file. + # + # @return [void] + # @see Parser::OrderedParser + # + # source://yard//lib/yard/handlers/processor.rb#140 + def parse_remaining_files; end + + # @return [Symbol] the parser type (:ruby, :ruby18, :c) + # + # source://yard//lib/yard/handlers/processor.rb#59 + def parser_type; end + + # @return [Symbol] the parser type (:ruby, :ruby18, :c) + # + # source://yard//lib/yard/handlers/processor.rb#59 + def parser_type=(_arg0); end + + # Processes a list of statements by finding handlers to process each + # one. + # + # @param statements [Array] a list of statements + # @return [void] + # + # source://yard//lib/yard/handlers/processor.rb#110 + def process(statements); end + + # @return [Symbol] the current scope (class, instance) + # + # source://yard//lib/yard/handlers/processor.rb#50 + def scope; end + + # @return [Symbol] the current scope (class, instance) + # + # source://yard//lib/yard/handlers/processor.rb#50 + def scope=(_arg0); end + + # @return [Symbol] the current visibility (public, private, protected) + # + # source://yard//lib/yard/handlers/processor.rb#47 + def visibility; end + + # @return [Symbol] the current visibility (public, private, protected) + # + # source://yard//lib/yard/handlers/processor.rb#47 + def visibility=(_arg0); end + + private + + # Returns the handler base class + # + # @return [Base] the base class + # + # source://yard//lib/yard/handlers/processor.rb#172 + def handler_base_class; end + + # The module holding the handlers to be loaded + # + # @return [Module] the module containing the handlers depending on + # {#parser_type}. + # + # source://yard//lib/yard/handlers/processor.rb#180 + def handler_base_namespace; end + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/processor.rb#161 + def handles?(handler, statement); end + + # Loads handlers from {#handler_base_namespace}. This ensures that + # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount + # of modules that are loaded + # + # @return [void] + # + # source://yard//lib/yard/handlers/processor.rb#188 + def load_handlers; end + + class << self + # @private + # @return [Hash] a list of registered parser type extensions + # @since 0.6.0 + # + # source://yard//lib/yard/handlers/processor.rb#33 + def namespace_for_handler; end + + # Registers a new namespace for handlers of the given type. + # + # @since 0.6.0 + # + # source://yard//lib/yard/handlers/processor.rb#24 + def register_handler_namespace(type, ns); end + end +end + +# All Ruby handlers +# +# source://yard//lib/yard/autoload.rb#92 +module YARD::Handlers::Ruby; end + +# Handles alias and alias_method calls +# +# source://yard//lib/yard/handlers/ruby/alias_handler.rb#3 +class YARD::Handlers::Ruby::AliasHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles +attr_*+ statements in modules/classes +# +# source://yard//lib/yard/handlers/ruby/attribute_handler.rb#3 +class YARD::Handlers::Ruby::AttributeHandler < ::YARD::Handlers::Ruby::Base + protected + + # Strips out any non-essential arguments from the attr statement. + # + # @param params [Array<Parser::Ruby::AstNode>] a list of the parameters + # in the attr call. + # @raise [Parser::UndocumentableError] if the arguments are not valid. + # @return [Array<String>] the validated attribute names + # + # source://yard//lib/yard/handlers/ruby/attribute_handler.rb#75 + def validated_attribute_names(params); end +end + +# This is the base handler class for the new-style (1.9) Ruby parser. +# All handlers that subclass this base class will be used when the +# new-style parser is used. For implementing legacy handlers, see +# {Legacy::Base}. +# +# @abstract See {Handlers::Base} for subclassing information. +# @see Handlers::Base +# @see Legacy::Base +# +# source://yard//lib/yard/handlers/ruby/base.rb#65 +class YARD::Handlers::Ruby::Base < ::YARD::Handlers::Base + include ::YARD::Parser::Ruby + extend ::YARD::Parser::Ruby + + # source://yard//lib/yard/handlers/ruby/base.rb#144 + def call_params; end + + # source://yard//lib/yard/handlers/ruby/base.rb#155 + def caller_method; end + + # source://yard//lib/yard/handlers/ruby/base.rb#135 + def parse_block(inner_node, opts = T.unsafe(nil)); end + + class << self + # @return [Boolean] whether or not an {AstNode} object should be + # handled by this handler + # + # source://yard//lib/yard/handlers/ruby/base.rb#113 + def handles?(node); end + + # Matcher for handling a node with a specific meta-type. An {AstNode} + # has a {AstNode#type} to define its type but can also be associated + # with a set of types. For instance, +:if+ and +:unless+ are both + # of the meta-type +:condition+. + # + # A meta-type is any method on the {AstNode} class ending in "?", + # though you should not include the "?" suffix in your declaration. + # Some examples are: "condition", "call", "literal", "kw", "token", + # "ref". + # + # @example Handling any conditional statement (if, unless) + # handles meta_type(:condition) + # @param type [Symbol] the meta-type to match. A meta-type can be + # any method name + "?" that {AstNode} responds to. + # @return [void] + # + # source://yard//lib/yard/handlers/ruby/base.rb#105 + def meta_type(type); end + + # Matcher for handling any type of method call. Method calls can + # be expressed by many {AstNode} types depending on the syntax + # with which it is called, so YARD allows you to use this matcher + # to simplify matching a method call. + # + # @example Match the "describe" method call + # handles method_call(:describe) + # + # # The following will be matched: + # # describe(...) + # # object.describe(...) + # # describe "argument" do ... end + # @param name [#to_s] matches the method call of this name + # @return [void] + # + # source://yard//lib/yard/handlers/ruby/base.rb#86 + def method_call(name = T.unsafe(nil)); end + end +end + +# Matches if/unless conditions inside classes and attempts to process only +# one branch (by evaluating the condition if possible). +# +# @example A simple class conditional +# class Foo +# if 0 +# # This method is ignored +# def xyz; end +# end +# end +# +# source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#12 +class YARD::Handlers::Ruby::ClassConditionHandler < ::YARD::Handlers::Ruby::Base + protected + + # Parses the condition part of the if/unless statement + # + # @return [true, false, nil] true if the condition can be definitely + # parsed to true, false if not, and nil if the condition cannot be + # parsed with certainty (it's dynamic) + # + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#36 + def parse_condition; end + + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#87 + def parse_else_block; end + + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#83 + def parse_then_block; end +end + +# Handles class declarations +# +# source://yard//lib/yard/handlers/ruby/class_handler.rb#3 +class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#73 + def create_struct_superclass(superclass, superclass_def); end + + # Extract the parameters from the Struct.new AST node, returning them as a list + # of strings + # + # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @return [Array<String>] the member names to generate methods for + # + # source://yard//lib/yard/handlers/ruby/class_handler.rb#67 + def extract_parameters(superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#92 + def parse_struct_superclass(klass, superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#98 + def parse_superclass(superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#82 + def struct_superclass_name(superclass); end +end + +# Handles a class variable (@@variable) +# +# source://yard//lib/yard/handlers/ruby/class_variable_handler.rb#3 +class YARD::Handlers::Ruby::ClassVariableHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles any lone comment statement in a Ruby file +# +# source://yard//lib/yard/handlers/ruby/comment_handler.rb#3 +class YARD::Handlers::Ruby::CommentHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles any constant assignment +# +# source://yard//lib/yard/handlers/ruby/constant_handler.rb#3 +class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # Extract the parameters from the Struct.new AST node, returning them as a list + # of strings + # + # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @return [Array<String>] the member names to generate methods for + # + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#49 + def extract_parameters(superclass); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#21 + def process_constant(statement); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#33 + def process_structclass(statement); end +end + +# Handles automatic detection of dsl-style methods +# +# source://yard//lib/yard/handlers/ruby/dsl_handler.rb#6 +class YARD::Handlers::Ruby::DSLHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DSLHandlerMethods +end + +# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#5 +module YARD::Handlers::Ruby::DSLHandlerMethods + include ::YARD::CodeObjects + include ::YARD::Parser + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#14 + def handle_comments; end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#48 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#72 + def find_attached_macro; end + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#54 + def implicit_docstring?; end + + # @return [Boolean] whether caller method matches a macro or + # its alias names. + # + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#85 + def macro_name_matches(macro); end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#59 + def method_name; end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#68 + def method_signature; end +end + +# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#9 +YARD::Handlers::Ruby::DSLHandlerMethods::IGNORE_METHODS = T.let(T.unsafe(nil), Hash) + +# Helper methods to assist with processing decorators. +# +# source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#3 +module YARD::Handlers::Ruby::DecoratorHandlerMethods + # @overload process_decorator + # + # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#43 + def process_decorator(*nodes, &block); end + + private + + # @yield [method, node, name.to_sym] + # + # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#78 + def process_decorator_parameter(node, opts = T.unsafe(nil), &block); end +end + +# Handles 'raise' calls inside methods +# +# source://yard//lib/yard/handlers/ruby/exception_handler.rb#3 +class YARD::Handlers::Ruby::ExceptionHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles 'extend' call to include modules into the class scope of another +# +# @see MixinHandler +# +# source://yard//lib/yard/handlers/ruby/extend_handler.rb#4 +class YARD::Handlers::Ruby::ExtendHandler < ::YARD::Handlers::Ruby::MixinHandler + # source://yard//lib/yard/handlers/ruby/extend_handler.rb#8 + def scope; end + + private + + # source://yard//lib/yard/handlers/ruby/extend_handler.rb#12 + def process_mixin(mixin); end +end + +# To implement a custom handler matcher, subclass this class and implement +# {#matches?} to return whether a node matches the handler. +# +# @example A Custom Handler Matcher Extension +# # Implements a handler that checks for a specific string +# # in the node's source. +# class MyExtension < HandlesExtension +# def matches?(node) node.source.include?(name) end +# end +# +# # This handler will handle any node where the source includes 'foo' +# class MyHandler < Handlers::Ruby::Base +# handles MyExtension.new('foo') +# end +# +# source://yard//lib/yard/handlers/ruby/base.rb#19 +class YARD::Handlers::Ruby::HandlesExtension + # Creates a new extension with a specific matcher value +name+ + # + # @param name [Object] the matcher value to check against {#matches?} + # @return [HandlesExtension] a new instance of HandlesExtension + # + # source://yard//lib/yard/handlers/ruby/base.rb#22 + def initialize(name); end + + # Tests if the node matches the handler + # + # @param node [Parser::Ruby::AstNode] a Ruby node + # @raise [NotImplementedError] + # @return [Boolean] whether the +node+ matches the handler + # + # source://yard//lib/yard/handlers/ruby/base.rb#27 + def matches?(node); end + + protected + + # @return [String] the extension matcher value + # + # source://yard//lib/yard/handlers/ruby/base.rb#34 + def name; end +end + +# Handlers for old Ruby 1.8 parser +# +# source://yard//lib/yard/autoload.rb#93 +module YARD::Handlers::Ruby::Legacy; end + +# Handles alias and alias_method calls +# +# source://yard//lib/yard/handlers/ruby/legacy/alias_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::AliasHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles +attr_*+ statements in modules/classes +# +# source://yard//lib/yard/handlers/ruby/legacy/attribute_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# This is the base handler for the legacy parser. To implement a legacy +# handler, subclass this class. +# +# @abstract See {Handlers::Base} for subclassing information. +# +# source://yard//lib/yard/handlers/ruby/legacy/base.rb#10 +class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#44 + def call_params; end + + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#53 + def caller_method; end + + # Parses a statement's block with a set of state values. If the + # statement has no block, nothing happens. A description of state + # values can be found at {Handlers::Base#push_state} + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] State options + # @see Handlers::Base#push_state #push_state + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#35 + def parse_block(opts = T.unsafe(nil)); end + + private + + # Extracts method information for macro expansion only + # + # @return [Array<String,Array<Array<String>>>] the method name followed by method + # arguments (name and optional value) + # @todo This is a duplicate implementation of {MethodHandler}. Refactor. + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#68 + def extract_method_details; end + + # The string value of a token. For example, the return value for the symbol :sym + # would be :sym. The return value for a string +"foo #{ bar}"+ would be the literal + # +"foo #{ bar}"+ without any interpolation. The return value of the identifier + # 'test' would be the same value: 'test'. Here is a list of common types and + # their return values: + # + # @example + # tokval(TokenList.new('"foo"').first) => "foo" + # tokval(TokenList.new(':foo').first) => :foo + # tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => "CONSTANT" + # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier" + # tokval(TokenList.new('3.25').first) => 3.25 + # tokval(TokenList.new('/xyz/i').first) => /xyz/i + # @param token [Token] The token of the class + # @param accepted_types [Array<Class<Token>>, Symbol] The allowed token types that this token can be. Defaults to [{TkVal}]. + # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return + # the token's value if it is either of those types. If +TkVal+ is accepted, + # +TkNode+ is also accepted. + # + # Certain symbol keys are allowed to specify multiple types in one fell swoop. + # These symbols are: + # :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+ + # :attr => +TkSYMBOL+ and +TkSTRING+ + # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+. + # :number => +TkFLOAT+, +TkINTEGER+ + # @return [Object] if the token is one of the accepted types, in its real value form. + # It should be noted that identifiers and constants are kept in String form. + # @return [nil] if the token is not any of the specified accepted types + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#112 + def tokval(token, *accepted_types); end + + # Returns a list of symbols or string values from a statement. + # The list must be a valid comma delimited list, and values + # will only be returned to the end of the list only. + # + # Example: + # attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd'] + # attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c'] + # + # The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above + # code would be the {#tokval} value of :a, 'b', + # :c and :d. + # + # It should also be noted that this function stops immediately at + # any ruby keyword encountered: + # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c'] + # + # @param tokenlist [TokenList] The list of tokens to process. + # @param accepted_types [Array<Class<Token>>] passed to {#tokval} + # @return [Array<String>] the list of tokvalues in the list. + # @return [Array<EMPTY>] if there are no symbols or Strings in the list + # @see #tokval + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#178 + def tokval_list(tokenlist, *accepted_types); end + + class << self + # @return [Boolean] whether or not a {Parser::Ruby::Legacy::Statement} object should be handled + # by this handler. + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#15 + def handles?(stmt); end + end +end + +# Matches if/unless conditions inside classes and attempts to process only +# one branch (by evaluating the condition if possible). +# +# @example A simple class conditional +# class Foo +# if 0 +# # This method is ignored +# def xyz; end +# end +# end +# @since 0.5.4 +# +# source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#4 +class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < ::YARD::Handlers::Ruby::Legacy::Base + protected + + # Parses the condition part of the if/unless statement + # + # @return [true, false, nil] true if the condition can be definitely + # parsed to true, false if not, and nil if the condition cannot be + # parsed with certainty (it's dynamic) + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#29 + def parse_condition; end + + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#73 + def parse_else_block; end + + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#68 + def parse_then_block; end +end + +# Handles class declarations +# +# source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ClassHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#74 + def create_struct_superclass(superclass, superclass_def); end + + # Extracts the parameter list from the Struct.new declaration and returns it + # formatted as a list of member names. Expects the user will have used symbols + # to define the struct member names + # + # @param superstring [String] the string declaring the superclass + # @return [Array<String>] a list of member names + # + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#69 + def extract_parameters(superstring); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#95 + def parse_struct_subclass(klass, superclass_def); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#102 + def parse_superclass(superclass); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#83 + def struct_superclass_name(superclass); end +end + +# Handles a class variable (@@variable) +# +# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#4 +YARD::Handlers::Ruby::Legacy::ClassVariableHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) + +# Handles any lone comment statement in a Ruby file +# +# source://yard//lib/yard/handlers/ruby/legacy/comment_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::CommentHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles any constant assignment +# +# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#25 + def extract_parameters(parameters); end + + # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#20 + def process_structclass(classname, parameters); end +end + +# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#5 +YARD::Handlers::Ruby::Legacy::ConstantHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) + +# Handles automatic detection of dsl-style methods +# +# source://yard//lib/yard/handlers/ruby/legacy/dsl_handler.rb#7 +class YARD::Handlers::Ruby::Legacy::DSLHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::DSLHandlerMethods +end + +# Handles 'raise' calls inside methods +# +# source://yard//lib/yard/handlers/ruby/legacy/exception_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ExceptionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles 'extend' call to include modules into the class scope of another +# +# @see MixinHandler +# +# source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ExtendHandler < ::YARD::Handlers::Ruby::Legacy::MixinHandler + # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#7 + def scope; end + + private + + # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#11 + def process_mixin(mixin); end +end + +# Handles a method definition +# +# source://yard//lib/yard/handlers/ruby/legacy/method_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::MethodHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles the 'include' statement to mixin a module in the instance scope +# +# source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::MixinHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # @raise [YARD::Parser::UndocumentableError] + # + # source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#26 + def process_mixin(mixin); end +end + +# Handles module_function calls to turn methods into public class methods. +# Also creates a private instance copy of the method. +# +# source://yard//lib/yard/handlers/ruby/legacy/module_function_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles the declaration of a module +# +# source://yard//lib/yard/handlers/ruby/legacy/module_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ModuleHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Sets visibility of a class method to private. +# +# source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#15 + def privatize_class_method(name); end +end + +# Sets visibility of a constant (class, module, const) +# +# source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#15 + def privatize_constant(name); end +end + +# Handles 'private', 'protected', and 'public' calls. +# +# source://yard//lib/yard/handlers/ruby/legacy/visibility_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::VisibilityHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles 'yield' calls +# +# source://yard//lib/yard/handlers/ruby/legacy/yield_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::YieldHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# source://yard//lib/yard/handlers/ruby/base.rb#37 +class YARD::Handlers::Ruby::MethodCallWrapper < ::YARD::Handlers::Ruby::HandlesExtension + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/base.rb#38 + def matches?(node); end +end + +# Handles a conditional inside a method +# +# source://yard//lib/yard/handlers/ruby/method_condition_handler.rb#3 +class YARD::Handlers::Ruby::MethodConditionHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles a method definition +# +# source://yard//lib/yard/handlers/ruby/method_handler.rb#3 +class YARD::Handlers::Ruby::MethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Common::MethodHandler + + # source://yard//lib/yard/handlers/ruby/method_handler.rb#69 + def format_args; end +end + +# Handles the 'include' statement to mixin a module in the instance scope +# +# source://yard//lib/yard/handlers/ruby/mixin_handler.rb#3 +class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base + protected + + # @raise [YARD::Parser::UndocumentableError] + # + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25 + def process_mixin(mixin); end + + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50 + def recipient(mixin); end +end + +# Handles module_function calls to turn methods into public class methods. +# Also creates a private instance copy of the method. +# +# source://yard//lib/yard/handlers/ruby/module_function_handler.rb#4 +class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods + + # source://yard//lib/yard/handlers/ruby/module_function_handler.rb#34 + def make_module_function(instance_method, namespace); end +end + +# Handles the declaration of a module +# +# source://yard//lib/yard/handlers/ruby/module_handler.rb#3 +class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end + +# Sets visibility of a class method to private. +# +# source://yard//lib/yard/handlers/ruby/private_class_method_handler.rb#3 +class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Sets visibility of a constant (class, module, const) +# +# source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#6 +class YARD::Handlers::Ruby::PrivateConstantHandler < ::YARD::Handlers::Ruby::Base + private + + # source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#28 + def privatize_constant(node); end +end + +# Sets visibility of a class method to public. +# +# source://yard//lib/yard/handlers/ruby/public_class_method_handler.rb#3 +class YARD::Handlers::Ruby::PublicClassMethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Helper methods to parse @attr_* tags on a class. +# +# @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of +# the +@!attribute+ directive. This module should not be relied on. +# @since 0.5.6 +# +# source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#7 +module YARD::Handlers::Ruby::StructHandlerMethods + include ::YARD::CodeObjects + + # Creates the auto-generated docstring for the getter method of a struct's + # member. This is used so the generated documentation will look just like that + # of an attribute defined using attr_accessor. + # + # @param klass [ClassObject] the class whose members we're working with + # @param member [String] the name of the member we're generating documentation for + # @return [String] a docstring to be attached to the getter method for this member + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#62 + def add_reader_tags(klass, new_method, member); end + + # Creates the auto-generated docstring for the setter method of a struct's + # member. This is used so the generated documentation will look just like that + # of an attribute defined using attr_accessor. + # + # @param klass [ClassObject] the class whose members we're working with + # @param member [String] the name of the member we're generating documentation for + # @return [String] a docstring to be attached to the setter method for this member + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#77 + def add_writer_tags(klass, new_method, member); end + + # Creates the given member methods and attaches them to the given ClassObject. + # + # @param klass [ClassObject] the class to generate attributes for + # @param members [Array<String>] a list of member names + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#134 + def create_attributes(klass, members); end + + # Creates and registers a class object with the given name and superclass name. + # Returns it for further use. + # + # @param classname [String] the name of the class + # @param superclass [String] the name of the superclass + # @return [ClassObject] the class object for further processing/method attaching + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#92 + def create_class(classname, superclass); end + + # Determines whether to create an attribute method based on the class's + # tags. + # + # @param klass [ClassObject] the class whose tags we're searching + # @param member [String] the name of the struct member we need + # @param type [Symbol] (:read) reader method, or writer method? + # @return [Boolean] should the attribute be created? + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#38 + def create_member_method?(klass, member, type = T.unsafe(nil)); end + + # Creates the getter (reader) method and attaches it to the class as an attribute. + # Also sets up the docstring to prettify the documentation output. + # + # @param klass [ClassObject] the class to attach the method to + # @param member [String] the name of the member we're generating a method for + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#121 + def create_reader(klass, member); end + + # Creates the setter (writer) method and attaches it to the class as an attribute. + # Also sets up the docstring to prettify the documentation output. + # + # @param klass [ClassObject] the class to attach the method to + # @param member [String] the name of the member we're generating a method for + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#104 + def create_writer(klass, member); end + + # Extracts the user's defined @member tag for a given class and its member. Returns + # nil if the user did not define a @member tag for this struct entry. + # + # @param klass [ClassObject] the class whose tags we're searching + # @param member [String] the name of the struct member we need + # @param type [Symbol] reader method, or writer method? + # @return [Tags::Tag, nil] the tag matching the request, or nil if not found + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#17 + def member_tag_for_member(klass, member, type = T.unsafe(nil)); end + + # Retrieves all members defined in @attr* tags + # + # @param klass [ClassObject] the class with the attributes + # @return [Array<String>] the list of members defined as attributes on the class + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#26 + def members_from_tags(klass); end + + # Gets the return type for the member in a nicely formatted string. Used + # to be injected into auto-generated docstrings. + # + # @param member_tag [Tags::Tag] the tag object to check for types + # @return [String] the user-declared type of the struct member, or [Object] if + # the user did not define a type for this member. + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#51 + def return_type_from_tag(member_tag); end +end + +# source://yard//lib/yard/handlers/ruby/base.rb#53 +class YARD::Handlers::Ruby::TestNodeWrapper < ::YARD::Handlers::Ruby::HandlesExtension + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/base.rb#54 + def matches?(node); end +end + +# Handles 'private', 'protected', and 'public' calls. +# +# source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 +class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Handles 'yield' calls +# +# source://yard//lib/yard/handlers/ruby/yield_handler.rb#3 +class YARD::Handlers::Ruby::YieldHandler < ::YARD::Handlers::Ruby::Base; end + +# Namespace for internationalization (i18n) +# +# @since 0.8.0 +# +# source://yard//lib/yard/autoload.rb#151 +module YARD::I18n; end + +# +Locale+ is a unit of translation. It has {#name} and a set of +# messages. +# +# @since 0.8.2 +# +# source://yard//lib/yard/i18n/locale.rb#8 +class YARD::I18n::Locale + # Creates a locale for +name+ locale. + # + # @param name [String] the locale name. + # @return [Locale] a new instance of Locale + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#34 + def initialize(name); end + + # Loads translation messages from +locale_directory+/{#name}.po. + # + # @param locale_directory [String] the directory path that has + # {#name}.po. + # @return [Boolean] +true+ if PO file exists, +false+ otherwise. + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#44 + def load(locale_directory); end + + # @return [String] the name of the locale. It used IETF language + # tag format +[language[_territory][.codeset][@modifier]]+. + # @see http://tools.ietf.org/rfc/bcp/bcp47.txt BCP 47 - Tags for Identifying Languages + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#29 + def name; end + + # @param message [String] the translation target message. + # @return [String] translated message. If translation isn't + # registered, the +message+ is returned. + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#62 + def translate(message); end + + class << self + # @return [String, nil] the default locale name. + # @since 0.8.4 + # + # source://yard//lib/yard/i18n/locale.rb#15 + def default; end + + # @return [String, nil] the default locale name. + # @since 0.8.4 + # + # source://yard//lib/yard/i18n/locale.rb#20 + def default=(locale); end + end +end + +# +Message+ is a translation target message. It has message ID as +# {#id} and some properties {#locations} and {#comments}. +# +# @since 0.8.1 +# +# source://yard//lib/yard/i18n/message.rb#10 +class YARD::I18n::Message + # Creates a translate target message for message ID +id+. + # + # @param id [String] the message ID of the translate target message. + # @return [Message] a new instance of Message + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#24 + def initialize(id); end + + # @param other [Message] the +Message+ to be compared. + # @return [Boolean] checks whether this message is equal to another. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#49 + def ==(other); end + + # Adds a comment for the message. + # + # @param comment [String] the comment for the message to be added. + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#43 + def add_comment(comment); end + + # Adds location information for the message. + # + # @param path [String] the path where the message appears. + # @param line [Integer] the line number where the message appears. + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#35 + def add_location(path, line); end + + # @return [Set] the set of comments for the messages. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#19 + def comments; end + + # @return [String] the message ID of the translation target message. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#12 + def id; end + + # path and line number where the message is appeared. + # + # @return [Set] the set of locations. Location is an array of + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#16 + def locations; end +end + +# Acts as a container for {Message} objects. +# +# @since 0.8.1 +# +# source://yard//lib/yard/i18n/messages.rb#7 +class YARD::I18n::Messages + include ::Enumerable + + # Creates a new container. + # + # @return [Messages] a new instance of Messages + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#11 + def initialize; end + + # Checks if this messages list is equal to another messages list. + # + # @param other [Messages] the container to compare. + # @return [Boolean] whether +self+ and +other+ is equivalence or not. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#45 + def ==(other); end + + # @param id [String] the message ID to perform a lookup on. + # @return [Message, nil] a registered message for the given +id+, + # or nil if no message for the ID is found. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#27 + def [](id); end + + # Enumerates each {Message} in the container. + # + # @return [void] + # @since 0.8.1 + # @yieldparam message [Message] the next message object in + # the enumeration. + # + # source://yard//lib/yard/i18n/messages.rb#20 + def each(&block); end + + # Registers a {Message}, the message ID of which is +id+. If + # corresponding +Message+ is already registered, the previously + # registered object is returned. + # + # @param id [String] the ID of the message to be registered. + # @return [Message] the registered +Message+. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#37 + def register(id); end + + protected + + # @return [Hash{String=>Message}] the set of message objects + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#53 + def messages; end +end + +# The +PotGenerator+ generates POT format string from +# {CodeObjects::Base} and {CodeObjects::ExtraFileObject}. +# +# == POT and PO +# +# POT is an acronym for "Portable Object Template". POT is a +# template file to create PO file. The extension for POT is +# ".pot". PO file is an acronym for "Portable Object". PO file has +# many parts of message ID (msgid) that is translation target +# message and message string (msgstr) that is translated message +# of message ID. If you want to translate "Hello" in English into +# "Bonjour" in French, "Hello" is the msgid ID and "Bonjour" is +# msgstr. The extension for PO is ".po". +# +# == How to extract msgids +# +# The +PotGenerator+ has two parse methods: +# +# * {#parse_objects} for {CodeObjects::Base} +# * {#parse_files} for {CodeObjects::ExtraFileObject} +# +# {#parse_objects} extracts msgids from docstring and tags of +# {CodeObjects::Base} objects. The docstring of +# {CodeObjects::Base} object is parsed and a paragraph is +# extracted as a msgid. Tag name and tag text are extracted as +# msgids from a tag. +# +# {#parse_files} extracts msgids from +# {CodeObjects::ExtraFileObject} objects. The file content of +# {CodeObjects::ExtraFileObject} object is parsed and a paragraph +# is extracted as a msgid. +# +# == Usage +# +# To create a .pot file by +PotGenerator+, instantiate a +# +PotGenerator+ with a relative working directory path from a +# directory path that has created .pot file, parse +# {CodeObjects::Base} objects and {CodeObjects::ExtraFileObject} +# objects, generate a POT and write the generated POT to a .pot +# file. The relative working directory path is ".." when the +# working directory path is "." and the POT is wrote into +# "po/yard.pot". +# +# @example Generate a .pot file +# po_file_path = "po/yard.pot" +# po_file_directory_pathname = Pathname.new(po_file_path).directory) +# working_directory_pathname = Pathname.new(".") +# relative_base_path = working_directory_pathname.relative_path_from(po_file_directory_pathname).to_s +# # relative_base_path -> ".." +# generator = YARD::I18n::PotGenerator.new(relative_base_path) +# generator.parse_objects(objects) +# generator.parse_files(files) +# pot = generator.generate +# po_file_directory_pathname.mkpath +# File.open(po_file_path, "w") do |pot_file| +# pot_file.print(pot) +# end +# @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html GNU gettext manual about details of PO file +# @since 0.8.0 +# +# source://yard//lib/yard/i18n/pot_generator.rb#65 +class YARD::I18n::PotGenerator + # Creates a POT generator that uses +relative_base_path+ to + # generate locations for a msgid. +relative_base_path+ is + # prepended to all locations. + # + # @param relative_base_path [String] a relative working + # directory path from a directory path that has created .pot + # file. + # @return [PotGenerator] a new instance of PotGenerator + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#79 + def initialize(relative_base_path); end + + # Generates POT from +@messages+. + # + # One PO file entry is generated from a +Message+ in + # +@messages+. + # + # Locations of the +Message+ are used to generate the reference + # line that is started with "#: ". +relative_base_path+ passed + # when the generator is created is prepended to each path in location. + # + # Comments of the +Message+ are used to generate the + # translator-comment line that is started with "# ". + # + # @return [String] POT format string + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#122 + def generate; end + + # Extracted messages. + # + # @return [Messages] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/pot_generator.rb#70 + def messages; end + + # Parses {CodeObjects::ExtraFileObject} objects and stores + # extracted msgids into {#messages}. + # + # @param files [Array<CodeObjects::ExtraFileObject>] a list + # of {CodeObjects::ExtraFileObject} objects to be parsed. + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#103 + def parse_files(files); end + + # Parses {CodeObjects::Base} objects and stores extracted msgids + # into {#messages} + # + # @param objects [Array<CodeObjects::Base>] a list of + # {CodeObjects::Base} to be parsed. + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#91 + def parse_objects(objects); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#160 + def current_time; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#183 + def escape_message_id(message_id); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#194 + def extract_documents(object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#268 + def extract_paragraphs(file); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#235 + def extract_tag_documents(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#242 + def extract_tag_name(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#255 + def extract_tag_text(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#168 + def generate_message(pot, message); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#164 + def generate_pot_creation_date_value; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#136 + def header; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#190 + def register_message(id); end +end + +# Provides some convenient features for translating a text. +# +# @since 0.8.0 +# +# source://yard//lib/yard/i18n/text.rb#5 +class YARD::I18n::Text + # Creates a text object that has translation related features for + # the input text. + # + # @option options + # @param input [#each_line] a text to be translated. + # @param options [Hash] a customizable set of options + # @return [Text] a new instance of Text + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#12 + def initialize(input, options = T.unsafe(nil)); end + + # Extracts translation target messages from +@input+. + # + # @return [void] + # @since 0.8.0 + # @yield [:attribute, name, value, line_no] the block that + # receives extracted an attribute in header. It may called many + # times. + # @yield [:paragraph, text, start_line_no] the block that + # receives extracted a paragraph in body. Paragraph is a text + # block separated by one or more empty lines. Empty line is a + # line that contains only zero or more whitespaces. It may + # called many times. + # @yieldparam name [String] the name of extracted attribute. + # @yieldparam value [String] the value of extracted attribute. + # @yieldparam line_no [Integer] the defined line number of extracted + # attribute. + # @yieldparam text [String] the text of extracted paragraph. + # @yieldparam start_line_no [Integer] the start line number of + # extracted paragraph. + # + # source://yard//lib/yard/i18n/text.rb#35 + def extract_messages; end + + # Translates into +locale+. + # + # @param locale [Locale] the translation target locale. + # @return [String] translated text. + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#52 + def translate(locale); end + + private + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#134 + def emit_attribute_event(match_data, line_no); end + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#147 + def emit_empty_line_event(line, line_no); end + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#125 + def emit_markup_event(line, line_no); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#156 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#76 + def parse(&block); end +end + +# Handles console logging for info, warnings and errors. +# Uses the stdlib Logger class in Ruby for all the backend logic. +# +# source://yard//lib/yard/logging.rb#12 +class YARD::Logger < ::Logger + # Creates a new logger + # + # @return [Logger] a new instance of Logger + # + # source://yard//lib/yard/logging.rb#43 + def initialize(pipe, *args); end + + # Displays an unformatted line to the logger output stream. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#143 + def <<(msg = T.unsafe(nil)); end + + # Prints the backtrace +exc+ to the logger as error data. + # + # @param exc [Array<String>] the backtrace list + # @param level_meth [Symbol] the level to log backtrace at + # @return [void] + # + # source://yard//lib/yard/logging.rb#154 + def backtrace(exc, level_meth = T.unsafe(nil)); end + + # Captures the duration of a block of code for benchmark analysis. Also + # calls {#progress} on the message to display it to the user. + # + # @param msg [String] the message to display + # @param nontty_log [Symbol, nil] the level to log as if the output + # stream is not a TTY. Use +nil+ for no alternate logging. + # @return [void] + # @todo Implement capture storage for reporting of benchmarks + # @yield a block of arbitrary code to benchmark + # + # source://yard//lib/yard/logging.rb#80 + def capture(msg, nontty_log = T.unsafe(nil)); end + + # Clears the progress indicator in the TTY display. + # + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#121 + def clear_progress; end + + # Changes the debug level to DEBUG if $DEBUG is set + # and writes a debugging message. + # + # source://yard//lib/yard/logging.rb#59 + def debug(*args); end + + # Sets the logger level for the duration of the block + # + # @example + # log.enter_level(Logger::ERROR) do + # YARD.parse_string "def x; end" + # end + # @param new_level [Fixnum] the logger level for the duration of the block. + # values can be found in Ruby's Logger class. + # @yield the block with the logger temporarily set to +new_level+ + # + # source://yard//lib/yard/logging.rb#179 + def enter_level(new_level = T.unsafe(nil)); end + + # @return [IO] the IO object being logged to + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#17 + def io; end + + # source://yard//lib/yard/logging.rb#18 + def io=(pipe); end + + # Displays an unformatted line to the logger output stream. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#143 + def print(msg = T.unsafe(nil)); end + + # Displays a progress indicator for a given message. This progress report + # is only displayed on TTY displays, otherwise the message is passed to + # the +nontty_log+ level. + # + # @param msg [String] the message to log + # @param nontty_log [Symbol, nil] the level to log as if the output + # stream is not a TTY. Use +nil+ for no alternate logging. + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#96 + def progress(msg, nontty_log = T.unsafe(nil)); end + + # Displays an unformatted line to the logger output stream, adding + # a newline. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#132 + def puts(msg = T.unsafe(nil)); end + + # @return [Boolean] whether backtraces should be shown (by default + # this is on). + # + # source://yard//lib/yard/logging.rb#22 + def show_backtraces; end + + # Sets the attribute show_backtraces + # + # @param value the value to set the attribute show_backtraces to. + # + # source://yard//lib/yard/logging.rb#23 + def show_backtraces=(_arg0); end + + # @return [Boolean] whether progress indicators should be shown when + # logging CLIs (by default this is off). + # + # source://yard//lib/yard/logging.rb#27 + def show_progress; end + + # Sets the attribute show_progress + # + # @param value the value to set the attribute show_progress to. + # + # source://yard//lib/yard/logging.rb#34 + def show_progress=(_arg0); end + + # Remembers when a warning occurs and writes a warning message. + # + # source://yard//lib/yard/logging.rb#65 + def warn(*args); end + + # Warns that the Ruby environment does not support continuations. Applies + # to JRuby, Rubinius and MacRuby. This warning will only display once + # per Ruby process. + # + # @deprecated Continuations are no longer needed by YARD 0.8.0+. + # @return [void] + # + # source://yard//lib/yard/logging.rb#167 + def warn_no_continuations; end + + # Returns the value of attribute warned. + # + # source://yard//lib/yard/logging.rb#69 + def warned; end + + # Sets the attribute warned + # + # @param value the value to set the attribute warned to. + # + # source://yard//lib/yard/logging.rb#69 + def warned=(_arg0); end + + private + + # Override this internal Logger method to clear line + # + # source://yard//lib/yard/logging.rb#190 + def add(*args); end + + # source://yard//lib/yard/logging.rb#195 + def clear_line; end + + # Log format (from Logger implementation). Used by Logger internally + # + # source://yard//lib/yard/logging.rb#201 + def format_log(sev, _time, _prog, msg); end + + # source://logger/1.5.0/logger.rb#485 + def print_no_newline(msg); end + + class << self + # The logger instance + # + # @return [Logger] the logger instance + # + # source://yard//lib/yard/logging.rb#38 + def instance(pipe = T.unsafe(nil)); end + end +end + +# The list of characters displayed beside the progress bar to indicate +# "movement". +# +# @since 0.8.2 +# +# source://yard//lib/yard/logging.rb#13 +YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) + +# Generalized options class for passing around large amounts of options between objects. +# +# The options class exists for better visibility and documentability of options being +# passed through to other objects. Because YARD has parser and template architectures +# that are heavily reliant on options, it is necessary to make these option keys easily +# visible and understood by developers. Since the options class is more than just a +# basic Hash, the subclass can provide aliasing and convenience methods to simplify +# option property access, and, if needed, support backward-compatibility for deprecated +# key names. +# +# == Hash and OpenStruct-like Access +# +# Although the options class allows for Hash-like access (<tt>opts[:key]</tt>), the recommended +# mechanism for accessing an option key will be via standard method calls on attributes +# +# The options class can also act as an open ended key value storage structure (like a +# Hash or OpenStruct), and allows for setting and getting of unregistered option keys. +# This methodology is not recommended, however, and is only supported for backward +# compatibility inside YARD. Whenever possible, developers should define all keys used +# by an options class. +# +# == Declaring Default Values +# +# Note that the options class can contain default value definitions for certain options, +# but to initialize these defaults, {#reset_defaults} must be called manually after +# initialization; the options object is always created empty until defaults are applied. +# +# @abstract Subclasses should define (and document) custom attributes that are expected +# to be made available as option keys. +# @example Defining an Options class with custom option keys +# class TemplateOptions < YARD::Options +# # @return [Symbol] the output format to generate templates in +# attr_accessor :format +# +# # @return [Symbol] the template to use when generating output +# attr_accessor :template +# end +# @example Initializing default option values +# class TemplateOptions < YARD::Options +# def reset_defaults +# super +# self.format = :html +# self.template = :default +# self.highlight = true +# # ... +# end +# end +# @example Using +default_attr+ to create default attributes +# class TemplateOptions < YARD::Options +# default_attr :format, :html +# default_attr :template, :default +# default_attr :highlight, true +# end +# @example Deprecating an option while still supporting it +# class TemplateOptions < YARD::Options +# # @return [Boolean] if syntax highlighting should be performed on code blocks. +# # Defaults to true. +# attr_accessor :highlight +# +# # @deprecated Use {#highlight} instead. +# # @return [Boolean] if no syntax highlighting should be performs on code blocks. +# # Defaults to false. +# attr_accessor :no_highlight +# def no_highlight=(value) @highlight = !value end +# def no_highlight; !highlight end +# end +# +# source://yard//lib/yard/options.rb#69 +class YARD::Options + # @return [Boolean] whether another Options object equals the + # keys and values of this options object + # + # source://yard//lib/yard/options.rb#157 + def ==(other); end + + # Delegates calls with Hash syntax to actual method with key name + # + # @example Calling on an option key with Hash syntax + # options[:format] # equivalent to: options.format + # @param key [Symbol, String] the option name to access + # @return the value of the option named +key+ + # + # source://yard//lib/yard/options.rb#91 + def [](key); end + + # Delegates setter calls with Hash syntax to the attribute setter with the key name + # + # @example Setting an option with Hash syntax + # options[:format] = :html # equivalent to: options.format = :html + # @param key [Symbol, String] the option to set + # @param value [Object] the value to set for the option + # @return [Object] the value being set + # + # source://yard//lib/yard/options.rb#100 + def []=(key, value); end + + # Deletes an option value for +key+ + # + # @param key [Symbol, String] the key to delete a value for + # @return [Object] the value that was deleted + # + # source://yard//lib/yard/options.rb#207 + def delete(key); end + + # Yields over every option key and value + # + # @return [void] + # @yield [key, value] every option key and value + # @yieldparam key [Symbol] the option key + # @yieldparam value [Object] the option value + # + # source://yard//lib/yard/options.rb#143 + def each; end + + # Inspects the object + # + # source://yard//lib/yard/options.rb#151 + def inspect; end + + # Creates a new options object and sets options hash or object value + # onto that object. + # + # @param opts [Options, Hash] + # @return [Options] the newly created options object + # @see #update + # + # source://yard//lib/yard/options.rb#123 + def merge(opts); end + + # Handles setting and accessing of unregistered keys similar + # to an OpenStruct object. + # + # @note It is not recommended to set and access unregistered keys on + # an Options object. Instead, register the attribute before using it. + # + # source://yard//lib/yard/options.rb#170 + def method_missing(meth, *args, &block); end + + # Resets all values to their defaults. + # + # @abstract Subclasses should override this method to perform custom + # value initialization if not using {default_attr}. Be sure to call + # +super+ so that default initialization can take place. + # @return [void] + # + # source://yard//lib/yard/options.rb#188 + def reset_defaults; end + + # @return [Hash] Converts options object to an options hash. All keys + # will be symbolized. + # + # source://yard//lib/yard/options.rb#129 + def to_hash; end + + # Updates values from an options hash or options object on this object. + # All keys passed should be key names defined by attributes on the class. + # + # @example Updating a set of options on an Options object + # opts.update(:template => :guide, :type => :fulldoc) + # @param opts [Hash, Options] + # @return [self] + # + # source://yard//lib/yard/options.rb#109 + def update(opts); end + + class << self + # Defines an attribute named +key+ and sets a default value for it + # + # @example Defining a default option key + # default_attr :name, 'Default Name' + # default_attr :time, lambda { Time.now } + # @param key [Symbol] the option key name + # @param default [Object, Proc] the default object value. If the default + # value is a proc, it is executed upon initialization. + # + # source://yard//lib/yard/options.rb#80 + def default_attr(key, default); end + end +end + +# The parser namespace holds all parsing engines used by YARD. +# Currently only Ruby and C (Ruby) parsers are implemented. +# +# source://yard//lib/yard/autoload.rb#161 +module YARD::Parser; end + +# Represents the abstract base parser class that parses source code in +# a specific way. A parser should implement {#parse}, {#tokenize} and +# {#enumerator}. +# +# == Registering a Custom Parser +# To register a parser, see {SourceParser.register_parser_type} +# +# @abstract +# @see #parse +# @see #tokenize +# @see #enumerator +# @since 0.5.6 +# +# source://yard//lib/yard/parser/base.rb#16 +class YARD::Parser::Base + # This default constructor does nothing. The subclass is responsible for + # storing the source contents and filename if they are required. + # + # @param source [String] the source contents + # @param filename [String] the name of the file if from disk + # @raise [NotImplementedError] + # @return [Base] a new instance of Base + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#26 + def initialize(source, filename); end + + # This method should be implemented to return a list of semantic tokens + # representing the source code to be post-processed. Otherwise the method + # should return nil. + # + # @abstract + # @return [Array] a list of semantic tokens representing the source code + # to be post-processed + # @return [nil] if no post-processing should be done + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#52 + def enumerator; end + + # This method should be implemented to parse the source and return itself. + # + # @abstract + # @raise [NotImplementedError] + # @return [Base] this method should return itself + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#33 + def parse; end + + # This method should be implemented to tokenize given source + # + # @abstract + # @raise [NotImplementedError] + # @return [Array] a list/tree of lexical tokens + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#40 + def tokenize; end + + class << self + # Convenience method to create a new parser and {#parse} + # + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#18 + def parse(source, filename = T.unsafe(nil)); end + end +end + +# CRuby Parsing components +# +# source://yard//lib/yard/autoload.rb#162 +module YARD::Parser::C; end + +# source://yard//lib/yard/parser/c/statement.rb#41 +class YARD::Parser::C::BodyStatement < ::YARD::Parser::C::Statement + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/c/statement.rb#42 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://yard//lib/yard/parser/c/statement.rb#42 + def comments=(_arg0); end +end + +# source://yard//lib/yard/parser/c/c_parser.rb#5 +class YARD::Parser::C::CParser < ::YARD::Parser::Base + # @return [CParser] a new instance of CParser + # + # source://yard//lib/yard/parser/c/c_parser.rb#6 + def initialize(source, file = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#24 + def enumerator; end + + # source://yard//lib/yard/parser/c/c_parser.rb#19 + def parse; end + + # @raise [NotImplementedError] + # + # source://yard//lib/yard/parser/c/c_parser.rb#28 + def tokenize; end + + private + + # source://yard//lib/yard/parser/c/c_parser.rb#213 + def advance(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#216 + def advance_loop; end + + # source://yard//lib/yard/parser/c/c_parser.rb#195 + def attach_comment(statement); end + + # source://yard//lib/yard/parser/c/c_parser.rb#214 + def back(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#225 + def char(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#96 + def consume_body_statements; end + + # source://yard//lib/yard/parser/c/c_parser.rb#136 + def consume_comment(add_comment = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#59 + def consume_directive; end + + # source://yard//lib/yard/parser/c/c_parser.rb#47 + def consume_quote(type = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#73 + def consume_toplevel_statement; end + + # source://yard//lib/yard/parser/c/c_parser.rb#169 + def consume_until(end_char, bracket_level = T.unsafe(nil), brace_level = T.unsafe(nil), add_comment = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#132 + def consume_whitespace; end + + # source://yard//lib/yard/parser/c/c_parser.rb#227 + def nextchar(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#220 + def nextline; end + + # source://yard//lib/yard/parser/c/c_parser.rb#34 + def parse_toplevel; end + + # source://yard//lib/yard/parser/c/c_parser.rb#226 + def prevchar(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#118 + def strip_non_statement_data; end + + # source://yard//lib/yard/parser/c/c_parser.rb#229 + def struct; end +end + +# source://yard//lib/yard/parser/c/statement.rb#51 +class YARD::Parser::C::Comment < ::YARD::Parser::C::Statement + include ::YARD::Parser::C::CommentParser + + # @return [Comment] a new instance of Comment + # + # source://yard//lib/yard/parser/c/statement.rb#58 + def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/statement.rb#62 + def comments; end + + # Returns the value of attribute overrides. + # + # source://yard//lib/yard/parser/c/statement.rb#55 + def overrides; end + + # Sets the attribute overrides + # + # @param value the value to set the attribute overrides to. + # + # source://yard//lib/yard/parser/c/statement.rb#55 + def overrides=(_arg0); end + + # Returns the value of attribute statement. + # + # source://yard//lib/yard/parser/c/statement.rb#56 + def statement; end + + # Sets the attribute statement + # + # @param value the value to set the attribute statement to. + # + # source://yard//lib/yard/parser/c/statement.rb#56 + def statement=(_arg0); end + + # Returns the value of attribute type. + # + # source://yard//lib/yard/parser/c/statement.rb#54 + def type; end + + # Sets the attribute type + # + # @param value the value to set the attribute type to. + # + # source://yard//lib/yard/parser/c/statement.rb#54 + def type=(_arg0); end +end + +# source://yard//lib/yard/parser/c/comment_parser.rb#5 +module YARD::Parser::C::CommentParser + protected + + # source://yard//lib/yard/parser/c/comment_parser.rb#8 + def parse_comments(comments); end + + private + + # source://yard//lib/yard/parser/c/comment_parser.rb#42 + def parse_callseq(comments); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#30 + def parse_overrides(comments); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#87 + def parse_types(types); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#126 + def remove_private_comments(comment); end +end + +# source://yard//lib/yard/parser/c/statement.rb#5 +class YARD::Parser::C::Statement + # @return [Statement] a new instance of Statement + # + # source://yard//lib/yard/parser/c/statement.rb#16 + def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Returns the value of attribute comments_hash_flag. + # + # source://yard//lib/yard/parser/c/statement.rb#14 + def comments_hash_flag; end + + # Sets the attribute comments_hash_flag + # + # @param value the value to set the attribute comments_hash_flag to. + # + # source://yard//lib/yard/parser/c/statement.rb#14 + def comments_hash_flag=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#26 + def comments_range; end + + # Returns the value of attribute file. + # + # source://yard//lib/yard/parser/c/statement.rb#8 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://yard//lib/yard/parser/c/statement.rb#8 + def file=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#30 + def first_line; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/c/statement.rb#12 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/c/statement.rb#12 + def group=(_arg0); end + + # Returns the value of attribute line. + # + # source://yard//lib/yard/parser/c/statement.rb#7 + def line; end + + # Sets the attribute line + # + # @param value the value to set the attribute line to. + # + # source://yard//lib/yard/parser/c/statement.rb#7 + def line=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#22 + def line_range; end + + # source://yard//lib/yard/parser/c/statement.rb#36 + def show; end + + # source://yard//lib/yard/parser/c/statement.rb#30 + def signature; end + + # Returns the value of attribute source. + # + # source://yard//lib/yard/parser/c/statement.rb#6 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://yard//lib/yard/parser/c/statement.rb#6 + def source=(_arg0); end +end + +# source://yard//lib/yard/parser/c/statement.rb#45 +class YARD::Parser::C::ToplevelStatement < ::YARD::Parser::C::Statement + # Returns the value of attribute block. + # + # source://yard//lib/yard/parser/c/statement.rb#46 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://yard//lib/yard/parser/c/statement.rb#46 + def block=(_arg0); end + + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/c/statement.rb#48 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://yard//lib/yard/parser/c/statement.rb#48 + def comments=(_arg0); end + + # Returns the value of attribute declaration. + # + # source://yard//lib/yard/parser/c/statement.rb#47 + def declaration; end + + # Sets the attribute declaration + # + # @param value the value to set the attribute declaration to. + # + # source://yard//lib/yard/parser/c/statement.rb#47 + def declaration=(_arg0); end +end + +# Responsible for parsing a list of files in order. The +# {#parse} method of this class can be called from the +# {SourceParser#globals} globals state list to re-enter +# parsing for the remainder of files in the list recursively. +# +# @see Processor#parse_remaining_files +# +# source://yard//lib/yard/parser/source_parser.rb#21 +class YARD::Parser::OrderedParser + # Creates a new OrderedParser with the global state and a list + # of files to parse. + # + # @note OrderedParser sets itself as the +ordered_parser+ key on + # global_state for later use in {Handlers::Processor}. + # @param global_state [OpenStruct] a structure containing all global + # state during parsing + # @param files [Array<String>] the list of files to parse + # @return [OrderedParser] a new instance of OrderedParser + # + # source://yard//lib/yard/parser/source_parser.rb#33 + def initialize(global_state, files); end + + # @return [Array<String>] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#23 + def files; end + + # @return [Array<String>] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#23 + def files=(_arg0); end + + # Parses the remainder of the {#files} list. + # + # @see Processor#parse_remaining_files + # + # source://yard//lib/yard/parser/source_parser.rb#42 + def parse; end +end + +# Raised when the parser sees a Ruby syntax error +# +# source://yard//lib/yard/parser/source_parser.rb#13 +class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end + +# Ruby parsing components. +# +# source://yard//lib/yard/autoload.rb#171 +module YARD::Parser::Ruby + # Builds and s-expression by creating {AstNode} objects with + # the type provided by the first argument. + # + # @example An implicit list of keywords + # ast = s(s(:kw, "if"), s(:kw, "else")) + # ast.type # => :list + # @example A method call + # s(:command, s(:var_ref, "mymethod")) + # @overload s + # @overload s + # @see AstNode#initialize + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#25 + def s(*args); end +end + +# An AST node is characterized by a type and a list of children. It +# is most easily represented by the s-expression {#s} such as: +# # AST for "if true; 5 end": +# s(s(:if, s(:var_ref, s(:kw, "true")), s(s(:int, "5")), nil)) +# +# The node type is not considered part of the list, only its children. +# So +ast[0]+ does not refer to the type, but rather the first child +# (or object). Items that are not +AstNode+ objects can be part of the +# list, like Strings or Symbols representing names. To return only +# the AstNode children of the node, use {#children}. +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#41 +class YARD::Parser::Ruby::AstNode < ::Array + # Creates a new AST node + # + # @option opts + # @option opts + # @option opts + # @option opts + # @option opts + # @param type [Symbol] the type of node being created + # @param arr [Array<AstNode>] the child nodes + # @param opts [Hash] any extra line options + # @return [AstNode] a new instance of AstNode + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#153 + def initialize(type, arr, opts = T.unsafe(nil)); end + + # @private + # @return [Boolean] whether the node is equal to another by checking + # the list and type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#167 + def ==(other); end + + # @return [Boolean] whether the node has a block + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#261 + def block?; end + + # @return [Boolean] whether the node is a method call + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#241 + def call?; end + + # @return [Array<AstNode>] the {AstNode} children inside the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#199 + def children; end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def comments; end + + # Returns the value of attribute docstring_hash_flag. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def comments_hash_flag; end + + # Returns the value of attribute docstring_range. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def comments_range; end + + # @return [Boolean] whether the node is a if/elsif/else condition + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#251 + def condition?; end + + # @return [Boolean] whether the node is a method definition + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#246 + def def?; end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring; end + + # Sets the attribute docstring + # + # @param value the value to set the attribute docstring to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring=(_arg0); end + + # Returns the value of attribute docstring_hash_flag. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def docstring_hash_flag; end + + # Sets the attribute docstring_hash_flag + # + # @param value the value to set the attribute docstring_hash_flag to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def docstring_hash_flag=(_arg0); end + + # Returns the value of attribute docstring_range. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring_range; end + + # Sets the attribute docstring_range + # + # @param value the value to set the attribute docstring_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring_range=(_arg0); end + + # @return [String] the filename the node was parsed from + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#76 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def file=(_arg0); end + + # @return [String] the first line of source represented by the node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#278 + def first_line; end + + # @return [String] the full source that the node was parsed from + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#82 + def full_source; end + + # Sets the attribute full_source + # + # @param value the value to set the attribute full_source to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def full_source=(_arg0); end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#47 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#47 + def group=(_arg0); end + + # @return [Boolean] whether the node has a {#line_range} set + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#268 + def has_line?; end + + # @return [String] inspects the object + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#323 + def inspect; end + + # Searches through the node and all descendants and returns the + # first node with a type matching any of +node_types+, otherwise + # returns the original node (self). + # + # @example Returns the first method definition in a block of code + # ast = YARD.parse_string("if true; def x; end end").ast + # ast.jump(:def) + # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, + # # nil), s(s(:void_stmt, ))) + # @example Returns first 'def' or 'class' statement + # ast = YARD.parse_string("class X; def y; end end") + # ast.jump(:def, :class).first + # # => + # @example If the node types are not present in the AST + # ast = YARD.parse("def x; end") + # ast.jump(:def) + # @param node_types [Array<Symbol>] a set of node types to match + # @return [AstNode] the matching node, if one was found + # @return [self] if no node was found + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#193 + def jump(*node_types); end + + # @return [Boolean] whether the node is a keyword + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#236 + def kw?; end + + # @return [Fixnum] the starting line number of the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#273 + def line; end + + # @return [Range] the line range in {#full_source} represented + # by the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#70 + def line_range; end + + # Sets the attribute line_range + # + # @param value the value to set the attribute line_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def line_range=(_arg0); end + + # @return [Boolean] whether the node is a literal value + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#231 + def literal?; end + + # @return [Boolean] whether the node is a loop + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#256 + def loop?; end + + # @return [AstNode, nil] the node's parent or nil if it is a root node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#59 + def parent; end + + # @return [AstNode, nil] the node's parent or nil if it is a root node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#59 + def parent=(_arg0); end + + # @return [nil] pretty prints the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#290 + def pretty_print(q); end + + # @return [Boolean] whether the node is a reference (variable, + # constant name) + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#226 + def ref?; end + + # @return [String] the first line of source the node represents + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#285 + def show; end + + # @return [String] the parse of {#full_source} that the node represents + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#89 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def source=(_arg0); end + + # @return [Range] the character range in {#full_source} represented + # by the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#63 + def source_range; end + + # Sets the attribute source_range + # + # @param value the value to set the attribute source_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def source_range=(_arg0); end + + # Returns the value of attribute source. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def to_s; end + + # @return [Boolean] whether the node is a token + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#220 + def token?; end + + # Traverses the object and yields each node (including descendants) in order. + # + # @return [void] + # @yield each descendant node in order + # @yieldparam self, [AstNode] or a child/descendant node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#208 + def traverse; end + + # @return [Symbol] the node's unique symbolic type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#56 + def type; end + + # @return [Symbol] the node's unique symbolic type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#56 + def type=(_arg0); end + + # Resets node state in tree + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#331 + def unfreeze; end + + private + + # Resets line information + # + # @return [void] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#341 + def reset_line_info; end + + class << self + # Finds the node subclass that should be instantiated for a specific + # node type + # + # @param type [Symbol] the node type to find a subclass for + # @return [Class] a subclass of AstNode to instantiate the node with. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#111 + def node_class_for(type); end + end +end + +# List of all known keywords +# +# @return [Hash] +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#96 +YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/ast_node.rb#530 +class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#533 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#531 + def class_name; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#532 + def superclass; end +end + +# Represents a lone comment block in source +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#548 +class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + def comments; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + def docstring; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#550 + def docstring=(value); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#554 + def first_line; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#553 + def source; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#515 +class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#517 + def condition; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#516 + def condition?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#520 + def else_block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#518 + def then_block; end + + private + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#527 + def cmod?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#376 +class YARD::Parser::Ruby::KeywordNode < ::YARD::Parser::Ruby::AstNode + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#377 + def kw?; end +end + +# Handles Ruby parsing in Ruby 1.8. +# +# source://yard//lib/yard/autoload.rb#172 +module YARD::Parser::Ruby::Legacy; end + +# Lexical analyzer for Ruby source +# +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#314 +class YARD::Parser::Ruby::Legacy::RubyLex + include ::YARD::Parser::Ruby::Legacy::RubyToken + include ::IRB + + # @return [RubyLex] a new instance of RubyLex + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#437 + def initialize(content); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#472 + def char_no; end + + # Returns the value of attribute continue. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 + def continue; end + + # Returns the value of attribute exception_on_syntax_error. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 + def exception_on_syntax_error; end + + # Sets the attribute exception_on_syntax_error + # + # @param value the value to set the attribute exception_on_syntax_error to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 + def exception_on_syntax_error=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#476 + def get_read; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#480 + def getc; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#484 + def getc_of_rests; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 + def gets; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 + def identify_comment; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 + def identify_gvar; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1062 + def identify_here_document; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 + def identify_identifier; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1130 + def identify_number(start); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1111 + def identify_quotation(initial_char); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1192 + def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end + + # Returns the value of attribute indent. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#465 + def indent; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#510 + def lex; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#586 + def lex_init; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#759 + def lex_int2; end + + # Returns the value of attribute lex_state. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#431 + def lex_state; end + + # io functions + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#468 + def line_no; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#506 + def peek(i = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#502 + def peek_equal?(str); end + + # Returns the value of attribute read_auto_clean_up. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 + def read_auto_clean_up; end + + # Sets the attribute read_auto_clean_up + # + # @param value the value to set the attribute read_auto_clean_up to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 + def read_auto_clean_up=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1280 + def read_escape; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1242 + def skip_inner_expression; end + + # Returns the value of attribute skip_space. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 + def skip_space; end + + # Sets the attribute skip_space + # + # @param value the value to set the attribute skip_space to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 + def skip_space=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#526 + def token; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#498 + def ungetc(c = T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#433 + def debug?; end + end +end + +# , "when" +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#552 +YARD::Parser::Ruby::Legacy::RubyLex::ACCEPTS_COLON = T.let(T.unsafe(nil), Array) + +# Read an input stream character by character. We allow for unlimited +# ungetting of characters just read. +# +# We simplify the implementation greatly by reading the entire input +# into a buffer initially, and then simply traversing it using +# pointers. +# +# We also have to allow for the <i>here document diversion</i>. This +# little gem comes about when the lexer encounters a here +# document. At this point we effectively need to split the input +# stream into two parts: one to read the body of the here document, +# the other to read the rest of the input line where the here +# document was initially encountered. For example, we might have +# +# do_something(<<-A, <<-B) +# stuff +# for +# A +# stuff +# for +# B +# +# When the lexer encounters the <<A, it reads until the end of the +# line, and keeps it around for later. It then reads the body of the +# here document. Once complete, it needs to read the rest of the +# original line, but then skip the here document body. +# +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#343 +class YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader + # @return [BufferedReader] a new instance of BufferedReader + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#346 + def initialize(content); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#365 + def column; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#419 + def divert_read_from(reserve); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#400 + def get_read; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#369 + def getc; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#388 + def getc_already_read; end + + # Returns the value of attribute line_num. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#344 + def line_num; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#406 + def peek(at); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#415 + def peek_equal(str); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#392 + def ungetc(_ch); end +end + +# , "when" +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#553 +YARD::Parser::Ruby::Legacy::RubyLex::DEINDENT_CLAUSE = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#580 +YARD::Parser::Ruby::Legacy::RubyLex::DLtype2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#548 +YARD::Parser::Ruby::Legacy::RubyLex::ENINDENT_CLAUSE = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#571 +YARD::Parser::Ruby::Legacy::RubyLex::Ltype2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#555 +YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_LTYPE = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#564 +YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_PAREN = T.let(T.unsafe(nil), Hash) + +# Legacy Ruby parser +# +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#8 +class YARD::Parser::Ruby::Legacy::RubyParser < ::YARD::Parser::Base + # @return [RubyParser] a new instance of RubyParser + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#9 + def initialize(source, _filename); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#26 + def encoding_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#22 + def enumerator; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#13 + def parse; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#27 + def shebang_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#18 + def tokenize; end +end + +# Legacy lexical tokenizer module. +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#6 +module YARD::Parser::Ruby::Legacy::RubyToken + # @private + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#125 + def Token(token, value = T.unsafe(nil)); end + + # @private + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#119 + def set_token_position(line, char); end + + class << self + # @private + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#275 + def def_token(token_n, super_token = T.unsafe(nil), reading = T.unsafe(nil), *opts); end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#10 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_ARG = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#7 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_BEG = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#13 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_CLASS = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#12 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_DOT = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#9 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_END = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#11 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_FNAME = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#8 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_MID = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#308 +YARD::Parser::Ruby::Legacy::RubyToken::NEWLINE_TOKEN = T.let(T.unsafe(nil), YARD::Parser::Ruby::Legacy::RubyToken::TkNL) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::OPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkALIAS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAMPER < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkANDOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAREF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkASET < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkASSIGN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkASSOC < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKQUOTE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKSLASH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBACK_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITXOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBREAK < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents a block +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#54 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBlockContents < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#55 + def text; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCASE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCLASS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCMP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMA < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMENT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCONSTANT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDEFINED < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDIV < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOLLAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkELSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkELSIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEND_OF_SCRIPT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkENSURE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEQQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#115 +class YARD::Parser::Ruby::Legacy::RubyToken::TkError < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFALSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFID < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFLOAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkGEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkGT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkGVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIDENTIFIER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIF_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkINTEGER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# Represents a Ruby identifier +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#72 +class YARD::Parser::Ruby::Legacy::RubyToken::TkId < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkId] a new instance of TkId + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#73 + def initialize(line_no, char_no, name); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#77 + def name; end +end + +# Represents a Ruby keyword +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#81 +class YARD::Parser::Ruby::Legacy::RubyToken::TkKW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLABEL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMODULE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMULT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNEXT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNOTOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNTH_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#63 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNode < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # Returns the value of attribute node. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#64 + def node; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#98 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + # @return [TkOPASGN] a new instance of TkOPASGN + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#99 + def initialize(line_no, char_no, op); end + + # Returns the value of attribute op. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#104 + def op; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOROP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#92 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOp < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#93 + def name; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkPOW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkQUESTION < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkREDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRESCUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRETRY < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRETURN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# { reading => token_class } +# { reading => [token_class, *opt] } +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#271 +YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSELF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSEMICOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSPACE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSTAR < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSUPER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBEG < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBOL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# Represents an end statement +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#59 +class YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#60 + def text; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#272 +YARD::Parser::Ruby::Legacy::RubyToken::TkSymbol2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkTHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkTRUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#107 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkUnknownChar] a new instance of TkUnknownChar + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#108 + def initialize(line_no, char_no, _id); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#112 + def name; end +end + +# Represents a Ruby value +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#85 +class YARD::Parser::Ruby::Legacy::RubyToken::TkVal < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkVal] a new instance of TkVal + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#86 + def initialize(line_no, char_no, value = T.unsafe(nil)); end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents whitespace +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#68 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkYIELD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::Tk__FILE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::Tk__LINE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TklBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents a token in the Ruby lexer +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#16 +class YARD::Parser::Ruby::Legacy::RubyToken::Token + # Creates a new Token object + # + # @param line_no [Integer] the line number to initialize the token to + # @param char_no [Integer] the char number to initialize the token to + # @return [Token] a new instance of Token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#37 + def initialize(line_no, char_no); end + + # @return [Integer] the character number in the file/stream the token + # is located. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#23 + def char_no; end + + # @return [Symbol] the lexical state at the token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 + def lex_state; end + + # @return [Symbol] the lexical state at the token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 + def lex_state=(_arg0); end + + # @return [Integer] the line number in the file/stream the token is + # located. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#19 + def line_no; end + + # Chainable way to sets the text attribute + # + # @param text [String] the new text + # @return [Token] this token object + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#47 + def set_text(text); end + + # @return [String] the token text value + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#26 + def text; end +end + +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#32 +YARD::Parser::Ruby::Legacy::RubyToken::Token::NO_TEXT = T.let(T.unsafe(nil), String) + +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#147 +YARD::Parser::Ruby::Legacy::RubyToken::TokenDefinitions = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/statement.rb#4 +class YARD::Parser::Ruby::Legacy::Statement + # @return [Statement] a new instance of Statement + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#14 + def initialize(tokens, block = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Returns the value of attribute block. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def block; end + + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def comments; end + + # Returns the value of attribute comments_hash_flag. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 + def comments_hash_flag; end + + # Sets the attribute comments_hash_flag + # + # @param value the value to set the attribute comments_hash_flag to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 + def comments_hash_flag=(_arg0); end + + # Returns the value of attribute comments_range. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 + def comments_range; end + + # Sets the attribute comments_range + # + # @param value the value to set the attribute comments_range to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 + def comments_range=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 + def first_line; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 + def group=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#34 + def inspect; end + + # @return [Fixnum] the first line of Ruby source + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#46 + def line; end + + # @return [Range<Fixnum>] the first to last lines of Ruby source + # @since 0.5.4 + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#52 + def line_range; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#41 + def show; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 + def signature; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 + def source(include_block = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 + def to_s(include_block = T.unsafe(nil)); end + + # Returns the value of attribute tokens. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def tokens; end + + private + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#58 + def clean_tokens(tokens); end +end + +# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#4 +class YARD::Parser::Ruby::Legacy::StatementList < ::Array + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # Creates a new statement list + # + # @param content [TokenList, String] the tokens to create the list from + # @return [StatementList] a new instance of StatementList + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#17 + def initialize(content); end + + # Returns the value of attribute encoding_line. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def encoding_line; end + + # Sets the attribute encoding_line + # + # @param value the value to set the attribute encoding_line to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def encoding_line=(_arg0); end + + # Returns the value of attribute shebang_line. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def shebang_line; end + + # Sets the attribute shebang_line + # + # @param value the value to set the attribute shebang_line to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def shebang_line=(_arg0); end + + private + + # Handles the balancing of parentheses and blocks + # + # @param tk [RubyToken::Token] the token to process + # @return [Boolean] whether or not the current statement's parentheses and blocks + # are balanced after +tk+ + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#362 + def balances?(tk); end + + # Returns the next statement in the token stream + # + # @return [Statement] the next statement + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#45 + def next_statement; end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#34 + def parse_statements; end + + # Returns the next token in the stream that's not a space + # + # @return [RubyToken::Token] the next non-space token + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#388 + def peek_no_space; end + + # Processes a token in a block + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#194 + def process_block_token(tk); end + + # Processes a complex block-opening token; + # that is, a block opener such as +while+ or +for+ + # that is followed by an expression + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#293 + def process_complex_block_opener(tk); end + + # Processes a comment token that comes before a statement + # + # @param tk [RubyToken::Token] the token to process + # @return [Boolean] whether or not +tk+ was processed as an initial comment + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#213 + def process_initial_comment(tk); end + + # Processes a simple block-opening token; + # that is, a block opener such as +begin+ or +do+ + # that isn't followed by an expression + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#268 + def process_simple_block_opener(tk); end + + # Processes a token that closes a statement + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#305 + def process_statement_end(tk); end + + # Processes a single token + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#130 + def process_token(tk); end + + # Adds a token to the current statement, + # unless it's a newline, semicolon, or comment + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#380 + def push_token(tk); end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#111 + def sanitize_block; end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#96 + def sanitize_statement_end; end +end + +# The following list of tokens will require a block to be opened +# if used at the beginning of a statement. +# +# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#11 +YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/token_list.rb#4 +class YARD::Parser::Ruby::Legacy::TokenList < ::Array + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # @return [TokenList] a new instance of TokenList + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#7 + def initialize(content = T.unsafe(nil)); end + + # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it + # is parsed with {RubyLex}. + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 + def <<(*tokens); end + + # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it + # is parsed with {RubyLex}. + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 + def push(*tokens); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#37 + def squeeze(type = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#11 + def to_s(full_statement = T.unsafe(nil), show_block = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#53 + def convert_token(lex, tk); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#44 + def parse_content(content); end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#372 +class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#373 + def literal?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#541 +class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#544 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#543 + def condition; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#542 + def loop?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#438 +class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#464 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#462 + def block_param; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#439 + def call?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#442 + def method_name(name_only = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#440 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#453 + def parameters(include_block_param = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#474 + def call_has_paren?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#470 + def index_adjust; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#479 +class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode + def block(*_arg0); end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#481 + def def?; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#480 + def kw?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#484 + def method_name(name_only = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#482 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#489 + def parameters(include_block_param = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#495 + def signature; end + + private + + # source://yard//lib/yard/parser/ruby/ast_node.rb#510 + def index_adjust; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#536 +class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#538 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#537 + def module_name; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#380 +class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#430 + def args_forward; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#426 + def block_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#414 + def double_splat_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#396 + def named_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#406 + def splat_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#410 + def unnamed_end_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#385 + def unnamed_optional_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#381 + def unnamed_required_params; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#360 +class YARD::Parser::Ruby::ReferenceNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#367 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#363 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#361 + def ref?; end +end + +# Internal parser class +# +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#27 +class YARD::Parser::Ruby::RipperParser < ::Ripper + # @return [RipperParser] a new instance of RipperParser + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#32 + def initialize(source, filename, *args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def ast; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def charno; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def comments; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def encoding_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#64 + def enumerator; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def file; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#68 + def file_encoding; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def frozen_string_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_BEGIN(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_CHAR(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_END(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on___end__(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_alias(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_alias_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_arg_ambiguous(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_arg_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add_block(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_args_forward(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_args_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_aryptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assign_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assoc_splat(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_backref(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_backtick(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_begin(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_binary(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_block_var(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_blockarg(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_brace_block(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_break(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_call(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_case(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_class(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_class_name_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_comma(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_command(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_command_call(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_const(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_const_path_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_const_ref(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_cvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_def(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_defined(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_defs(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_do_block(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_dot2(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_dot3(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_else(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_elsif(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_embexpr_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_embexpr_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_embvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_ensure(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_excessed_comma(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_fcall(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_float(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_fndptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_for(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_gvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_heredoc_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_heredoc_dedent(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_heredoc_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_hshptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ident(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_if(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_if_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_ifop(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 + def on_ignored_nl(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ignored_sp(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_imaginary(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_in(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_int(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ivar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 + def on_kw(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_kwrest_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_label_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_lbrace(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_lparen(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_magic_comment(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_massign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_method_add_arg(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_method_add_block(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add_post(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_mlhs_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_mlhs_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_module(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mrhs_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mrhs_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_mrhs_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_mrhs_new_from_args(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_next(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 + def on_nl(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_nokw_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 + def on_op(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_opassign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_operator_ambiguous(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_param_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_period(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_qsymbols_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_qsymbols_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_qsymbols_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_qwords_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_qwords_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_qwords_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rational(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rbrace(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_redo(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_regexp_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_regexp_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_regexp_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_regexp_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_regexp_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_rescue_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_rest_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_retry(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_return(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_return0(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rparen(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_sclass(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_semicolon(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_stmts_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_stmts_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_string_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_string_concat(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_string_dvar(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_string_embexpr(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_super(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_symbeg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_symbol(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_symbol_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_symbols_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_symbols_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_symbols_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_tlambda(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tlambeg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_top_const_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_tstring_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tstring_content(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tstring_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_undef(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_unless(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_unless_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_until(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_until_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_alias(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_ref(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_vcall(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_when(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_while(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_while_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_word_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_word_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_words_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_words_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_words_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_words_sep(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_xstring_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_xstring_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_xstring_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_yield(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_yield0(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_zsuper(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#55 + def parse; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def root; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def shebang_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def tokens; end + + private + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 + def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 + def add_token(token, data); end + + # @return [Boolean] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 + def comment_starts_line?(charno); end + + # @raise [ParserSyntaxError] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 + def compile_error(msg); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 + def freeze_tree(node = T.unsafe(nil)); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 + def insert_comments; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#377 + def on_aref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 + def on_aref_field(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#391 + def on_array(other); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#352 + def on_assoc_new(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#364 + def on_assoclist_from_args(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#360 + def on_bare_assoc_hash(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + def on_body_stmt(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + def on_bodystmt(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#542 + def on_comment(comment); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#441 + def on_const_path_ref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#419 + def on_dyna_symbol(sym); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#592 + def on_embdoc(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 + def on_embdoc_beg(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#597 + def on_embdoc_end(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#356 + def on_hash(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#534 + def on_label(data); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#497 + def on_lambda(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#409 + def on_lbracket(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#515 + def on_params(*args); end + + # @raise [ParserSyntaxError] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 + def on_parse_error(msg); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#343 + def on_program(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#414 + def on_rbracket(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#506 + def on_rescue(exc, *args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#232 + def on_sp(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#501 + def on_string_content(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#484 + def on_string_literal(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#429 + def on_top_const_ref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#368 + def on_unary(op, val); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#511 + def on_void_stmt; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237 + def visit_event(node); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 + def visit_event_arr(node); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 + def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end +end + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#133 +YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136 +YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#78 +YARD::Parser::Ruby::RipperParser::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#131 +YARD::Parser::Ruby::RipperParser::REV_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# Ruby 1.9 parser +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#12 +class YARD::Parser::Ruby::RubyParser < ::YARD::Parser::Base + # @return [RubyParser] a new instance of RubyParser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#13 + def initialize(source, filename); end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#21 + def encoding_line; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#19 + def enumerator; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#22 + def frozen_string_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#17 + def parse; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#20 + def shebang_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#18 + def tokenize; end +end + +# Supports {#each} enumeration over a source's tokens, yielding +# the token and a possible {CodeObjects::Base} associated with the +# constant or identifier token. +# +# source://yard//lib/yard/parser/ruby/token_resolver.rb#8 +class YARD::Parser::Ruby::TokenResolver + include ::Enumerable + include ::YARD::CodeObjects::NamespaceMapper + + # Creates a token resolver for given source. + # + # @param source [String] the source code to tokenize + # @param namespace [CodeObjects::Base] the object/namespace to resolve from + # @raise [ParserSyntaxError] + # @return [TokenResolver] a new instance of TokenResolver + # + # source://yard//lib/yard/parser/ruby/token_resolver.rb#16 + def initialize(source, namespace = T.unsafe(nil)); end + + # Iterates over each token, yielding the token and a possible code + # object that is associated with the token. + # + # @example Yielding code objects + # r = TokenResolver.new("A::B::C") + # r.each do |tok, obj| + # if obj + # puts "#{tok[0]} -> #{obj.path.inspect}" + # else + # puts "No object: #{tok.inspect}" + # end + # end + # + # # Prints: + # # :const -> "A" + # # No object: [:op, "::"] + # # :const -> "A::B" + # # No object: [:op, "::"] + # # :const -> "A::B::C" + # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the + # current token object being iterated + # @yieldparam object [CodeObjects::Base, nil] the fully qualified code + # object associated with the current token, or nil if there is no object + # for the yielded token. + # + # source://yard//lib/yard/parser/ruby/token_resolver.rb#46 + def each; end + + protected + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def last_sep; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def last_sep=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def next_object; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def next_object=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def object; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def object=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def skip_group; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def skip_group=(v); end + + private + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#112 + def lookup(toktype, name); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#134 + def object_resolved_types(obj = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#106 + def pop_state; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#102 + def push_state; end + + class << self + # source://yard//lib/yard/parser/ruby/token_resolver.rb#92 + def state_attr(*attrs); end + end +end + +# Responsible for parsing a source file into the namespace. Parsing +# also invokes handlers to process the parsed statements and generate +# any code objects that may be recognized. +# +# == Custom Parsers +# SourceParser allows custom parsers to be registered and called when +# a certain filetype is recognized. To register a parser and hook it +# up to a set of file extensions, call {register_parser_type} +# +# @see register_parser_type +# @see Handlers::Base +# @see CodeObjects::Base +# +# source://yard//lib/yard/parser/source_parser.rb#64 +class YARD::Parser::SourceParser + # @overload initialize + # @return [SourceParser] a new instance of SourceParser + # + # source://yard//lib/yard/parser/source_parser.rb#406 + def initialize(parser_type = T.unsafe(nil), globals1 = T.unsafe(nil), globals2 = T.unsafe(nil)); end + + # @return [String] the contents of the file to be parsed + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#399 + def contents; end + + # @return [String] the filename being parsed by the parser. + # + # source://yard//lib/yard/parser/source_parser.rb#386 + def file; end + + # @return [String] the filename being parsed by the parser. + # + # source://yard//lib/yard/parser/source_parser.rb#386 + def file=(_arg0); end + + # @return [OpenStruct] an open struct containing arbitrary global state + # shared between files and handlers. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#395 + def globals; end + + # The main parser method. This should not be called directly. Instead, + # use the class methods {parse} and {parse_string}. + # + # @param content [String, #read, Object] the source file to parse + # @return [Object, nil] the parser object used to parse the source + # + # source://yard//lib/yard/parser/source_parser.rb#418 + def parse(content = T.unsafe(nil)); end + + # @return [Symbol] the parser type associated with the parser instance. + # This should be set by the {#initialize constructor}. + # + # source://yard//lib/yard/parser/source_parser.rb#390 + def parser_type; end + + # Tokenizes but does not parse the block of code using the current {#parser_type} + # + # @param content [String] the block of code to tokenize + # @return [Array] a list of tokens + # + # source://yard//lib/yard/parser/source_parser.rb#462 + def tokenize(content); end + + private + + # Searches for encoding line and forces encoding + # + # @since 0.5.3 + # + # source://yard//lib/yard/parser/source_parser.rb#471 + def convert_encoding(content); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#516 + def parser_class; end + + # source://yard//lib/yard/parser/source_parser.rb#501 + def parser_type=(value); end + + # Guesses the parser type to use depending on the file extension. + # + # @param filename [String] the filename to use to guess the parser type + # @return [Symbol] a parser type that matches the filename + # + # source://yard//lib/yard/parser/source_parser.rb#509 + def parser_type_for_filename(filename); end + + # Runs a {Handlers::Processor} object to post process the parsed statements. + # + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#491 + def post_process; end + + class << self + # Registers a callback to be called after an individual file is parsed. + # The block passed to this method will be called on subsequent parse + # calls. + # + # To register a callback that is called after the entire list of files + # is processed, see {after_parse_list}. + # + # @example Printing the length of each file after it is parsed + # SourceParser.after_parse_file do |parser| + # puts "#{parser.file} is #{parser.contents.size} characters" + # end + # YARD.parse('lib/**/*.rb') + # # prints: + # "lib/foo.rb is 1240 characters" + # "lib/foo_bar.rb is 248 characters" + # @return [Proc] the yielded block + # @see before_parse_file + # @see after_parse_list + # @since 0.7.0 + # @yield [parser] the yielded block is called once after each file + # that is parsed. This might happen many times for a single codebase. + # @yieldparam parser [SourceParser] the parser object that parsed + # the file. + # @yieldreturn [void] the return value for the block is ignored. + # + # source://yard//lib/yard/parser/source_parser.rb#324 + def after_parse_file(&block); end + + # @return [Array<Proc>] the list of callbacks to be called after + # parsing a file. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#352 + def after_parse_file_callbacks; end + + # Registers a callback to be called after a list of files is parsed + # via {parse}. The block passed to this method will be called on + # subsequent parse calls. + # + # @example Printing results after parsing occurs + # SourceParser.after_parse_list do + # puts "Finished parsing!" + # end + # YARD.parse + # # Prints "Finished parsing!" after parsing files + # @return [Proc] the yielded block + # @see before_parse_list + # @see before_parse_file + # @since 0.7.0 + # @yield [files, globals] the yielded block is called once before + # parsing all files + # @yieldparam files [Array<String>] the list of files that will be parsed. + # @yieldparam globals [OpenStruct] a global structure to store arbitrary + # state for post processing (see {Handlers::Processor#globals}) + # @yieldreturn [void] the return value for the block is ignored. + # + # source://yard//lib/yard/parser/source_parser.rb#258 + def after_parse_list(&block); end + + # @return [Array<Proc>] the list of callbacks to be called after + # parsing a list of files. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#338 + def after_parse_list_callbacks; end + + # Registers a callback to be called before an individual file is parsed. + # The block passed to this method will be called on subsequent parse + # calls. + # + # To register a callback that is called before the entire list of files + # is processed, see {before_parse_list}. + # + # @example Installing a simple callback + # SourceParser.before_parse_file do |parser| + # puts "I'm parsing #{parser.file}" + # end + # YARD.parse('lib/**/*.rb') + # # prints: + # "I'm parsing lib/foo.rb" + # "I'm parsing lib/foo_bar.rb" + # "I'm parsing lib/last_file.rb" + # @example Cancel parsing of any test_*.rb files + # SourceParser.before_parse_file do |parser| + # return false if parser.file =~ /^test_.+\.rb$/ + # end + # @return [Proc] the yielded block + # @see after_parse_file + # @see before_parse_list + # @since 0.7.0 + # @yield [parser] the yielded block is called once before each + # file that is parsed. This might happen many times for a single + # codebase. + # @yieldparam parser [SourceParser] the parser object that will {#parse} + # the file. + # @yieldreturn [Boolean] if the block returns +false+, parsing for + # the file is cancelled. + # + # source://yard//lib/yard/parser/source_parser.rb#295 + def before_parse_file(&block); end + + # @return [Array<Proc>] the list of callbacks to be called before + # parsing a file. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#345 + def before_parse_file_callbacks; end + + # Registers a callback to be called before a list of files is parsed + # via {parse}. The block passed to this method will be called on + # subsequent parse calls. + # + # @example Installing a simple callback + # SourceParser.before_parse_list do |files, globals| + # puts "Starting to parse..." + # end + # YARD.parse('lib/**/*.rb') + # # prints "Starting to parse..." + # @example Setting global state + # SourceParser.before_parse_list do |files, globals| + # globals.method_count = 0 + # end + # SourceParser.after_parse_list do |files, globals| + # puts "Found #{globals.method_count} methods" + # end + # class MyCountHandler < Handlers::Ruby::Base + # handles :def, :defs + # process { globals.method_count += 1 } + # end + # YARD.parse + # # Prints: "Found 37 methods" + # @example Using a global callback to cancel parsing + # SourceParser.before_parse_list do |files, globals| + # return false if files.include?('foo.rb') + # end + # + # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method + # YARD.parse('bar.rb') # parses normally + # @return [Proc] the yielded block + # @see after_parse_list + # @see before_parse_file + # @since 0.7.0 + # @yield [files, globals] the yielded block is called once before + # parsing all files + # @yieldparam files [Array<String>] the list of files that will be parsed. + # @yieldparam globals [OpenStruct] a global structure to store arbitrary + # state for post processing (see {Handlers::Processor#globals}) + # @yieldreturn [Boolean] if the block returns +false+, parsing is + # cancelled. + # + # source://yard//lib/yard/parser/source_parser.rb#234 + def before_parse_list(&block); end + + # @return [Array<Proc>] the list of callbacks to be called before + # parsing a list of files. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#331 + def before_parse_list_callbacks; end + + # Parses a path or set of paths + # + # @param paths [String, Array<String>] a path, glob, or list of paths to + # parse + # @param excluded [Array<String, Regexp>] a list of excluded path matchers + # @param level [Fixnum] the logger level to use during parsing. See + # {YARD::Logger} + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#100 + def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end + + # Parses a string +content+ + # + # @param content [String] the block of code to parse + # @param ptype [Symbol] the parser type to use. See {parser_type}. + # @return the parser object that was used to parse +content+ + # + # source://yard//lib/yard/parser/source_parser.rb#123 + def parse_string(content, ptype = T.unsafe(nil)); end + + # @return [Symbol] the default parser type (defaults to :ruby) + # + # source://yard//lib/yard/parser/source_parser.rb#86 + def parser_type; end + + # source://yard//lib/yard/parser/source_parser.rb#88 + def parser_type=(value); end + + # @private + # @return [Hash] a list of registered parser type extensions + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#163 + def parser_type_extensions; end + + # source://yard//lib/yard/parser/source_parser.rb#164 + def parser_type_extensions=(value); end + + # Finds a parser type that is registered for the extension. If no + # type is found, the default Ruby type is returned. + # + # @return [Symbol] the parser type to be used for the extension + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#171 + def parser_type_for_extension(extension); end + + # @private + # @return [Hash{Symbol=>Object}] a list of registered parser types + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#157 + def parser_types; end + + # source://yard//lib/yard/parser/source_parser.rb#158 + def parser_types=(value); end + + # Registers a new parser type. + # + # @example Registering a parser for "java" files + # SourceParser.register_parser_type :java, JavaParser, 'java' + # @param type [Symbol] a symbolic name for the parser type + # @param parser_klass [Base] a class that implements parsing and tokenization + # @param extensions [Array<String>, String, Regexp] a list of extensions or a + # regex to match against the file extension + # @return [void] + # @see Parser::Base + # + # source://yard//lib/yard/parser/source_parser.rb#146 + def register_parser_type(type, parser_klass, extensions = T.unsafe(nil)); end + + # Tokenizes but does not parse the block of code + # + # @param content [String] the block of code to tokenize + # @param ptype [Symbol] the parser type to use. See {parser_type}. + # @return [Array] a list of tokens + # + # source://yard//lib/yard/parser/source_parser.rb#132 + def tokenize(content, ptype = T.unsafe(nil)); end + + # Returns the validated parser type. Basically, enforces that :ruby + # type is never set if the Ripper library is not available + # + # @param type [Symbol] the parser type to set + # @private + # @return [Symbol] the validated parser type + # + # source://yard//lib/yard/parser/source_parser.rb#184 + def validated_parser_type(type); end + + private + + # Parses a list of files in a queue. + # + # @param files [Array<String>] a list of files to queue for parsing + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#364 + def parse_in_order(*files); end + end +end + +# The default glob of files to be parsed. +# +# @since 0.9.0 +# +# source://yard//lib/yard/parser/source_parser.rb#71 +YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) + +# Byte order marks for various encodings +# +# @since 0.7.0 +# +# source://yard//lib/yard/parser/source_parser.rb#75 +YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/source_parser.rb#66 +YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/parser/source_parser.rb#67 +YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/parser/source_parser.rb#65 +YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) + +# Raised when an object is recognized but cannot be documented. This +# generally occurs when the Ruby syntax used to declare an object is +# too dynamic in nature. +# +# source://yard//lib/yard/parser/source_parser.rb#10 +class YARD::Parser::UndocumentableError < ::RuntimeError; end + +# The root path for YARD source libraries +# +# source://yard//lib/yard.rb#4 +YARD::ROOT = T.let(T.unsafe(nil), String) + +# Holds Rake tasks used by YARD +# +# source://yard//lib/yard/autoload.rb#192 +module YARD::Rake; end + +# The rake task to run {CLI::Yardoc} and generate documentation. +# +# source://yard//lib/yard/rake/yardoc_task.rb#10 +class YARD::Rake::YardocTask < ::Rake::TaskLib + # Creates a new task with name +name+. + # + # @param name [String, Symbol] the name of the rake task + # @return [YardocTask] a new instance of YardocTask + # @yield a block to allow any options to be modified on the task + # @yieldparam _self [YardocTask] the task object to allow any parameters + # to be changed. + # + # source://yard//lib/yard/rake/yardoc_task.rb#50 + def initialize(name = T.unsafe(nil)); end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after; end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after=(_arg0); end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before; end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before=(_arg0); end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array<String>] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files; end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array<String>] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files=(_arg0); end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name; end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name=(_arg0); end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array<String>] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options; end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array<String>] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options=(_arg0); end + + # Options to pass to {CLI::Stats} + # + # @return [Array<String>] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options; end + + # Options to pass to {CLI::Stats} + # + # @return [Array<String>] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options=(_arg0); end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier; end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier=(_arg0); end + + protected + + # Defines the rake task + # + # @return [void] + # + # source://yard//lib/yard/rake/yardoc_task.rb#68 + def define; end +end + +# The +Registry+ is the centralized data store for all {CodeObjects} created +# during parsing. The storage is a key value store with the object's path +# (see {CodeObjects::Base#path}) as the key and the object itself as the value. +# Object paths must be unique to be stored in the Registry. All lookups for +# objects are done on the singleton Registry instance using the {Registry.at} +# or {Registry.resolve} methods. +# +# == Saving / Loading a Registry +# The registry is saved to a "yardoc file" (actually a directory), which can +# be loaded back to perform any lookups. See {Registry.load!} and +# {Registry.save} for information on saving and loading of a yardoc file. +# +# == Threading Notes +# The registry class is a singleton class that is accessed directly in many +# places across YARD. To mitigate threading issues, YARD (0.6.5+) makes +# the Registry thread local. This means all access to a registry for a specific +# object set must occur in the originating thread. +# +# @example Loading the Registry +# Registry.load!('/path/to/yardocfile') # loads all objects into memory +# Registry.at('YARD::CodeObjects::Base').docstring +# # => "+Base+ is the superclass of all code objects ..." +# @example Getting an object by a specific path +# Registry.at('YARD::CodeObjects::Base#docstring') +# @example Performing a lookup on a method anywhere in the inheritance tree +# Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true) +# +# source://yard//lib/yard/registry.rb#32 +module YARD::Registry + extend ::Enumerable + + class << self + # Returns the object at a specific path. + # + # @param path [String, :root] the pathname to look for. If +path+ is +root+, + # returns the {root} object. + # @return [CodeObjects::Base] the object at path + # @return [nil] if no object is found + # + # source://yard//lib/yard/registry.rb#261 + def [](path); end + + # Returns all objects in the registry that match one of the types provided + # in the +types+ list (if +types+ is provided). + # + # @example Returns all objects + # Registry.all + # @example Returns all classes and modules + # Registry.all(:class, :module) + # @param types [Array<Symbol>] an optional list of types to narrow the + # objects down by. Equivalent to performing a select: + # +Registry.all.select {|o| types.include(o.type) }+ + # @return [Array<CodeObjects::Base>] the list of objects found + # @see CodeObjects::Base#type + # + # source://yard//lib/yard/registry.rb#237 + def all(*types); end + + # Returns the object at a specific path. + # + # @param path [String, :root] the pathname to look for. If +path+ is +root+, + # returns the {root} object. + # @return [CodeObjects::Base] the object at path + # @return [nil] if no object is found + # + # source://yard//lib/yard/registry.rb#261 + def at(path); end + + # @param data [String] data to checksum + # @return [String] the SHA1 checksum for data + # + # source://yard//lib/yard/registry.rb#318 + def checksum_for(data); end + + # @return [Hash{String => String}] a set of checksums for files + # + # source://yard//lib/yard/registry.rb#312 + def checksums; end + + # Clears the registry + # + # @return [void] + # + # source://yard//lib/yard/registry.rb#200 + def clear; end + + # Deletes an object from the registry + # + # @param object [CodeObjects::Base] the object to remove + # @return [void] + # + # source://yard//lib/yard/registry.rb#194 + def delete(object); end + + # Deletes the yardoc file from disk + # + # @return [void] + # + # source://yard//lib/yard/registry.rb#176 + def delete_from_disk; end + + # Iterates over {all} with no arguments + # + # source://yard//lib/yard/registry.rb#221 + def each(&block); end + + # The registry singleton instance. + # + # @deprecated use Registry.methodname directly. + # @return [Registry] returns the registry instance + # + # source://yard//lib/yard/registry.rb#363 + def instance; end + + # Loads the registry and/or parses a list of files + # + # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both) + # Registry.load(['a', 'b', 'c']) + # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists + # Registry.load(['a', 'b'], true) + # @param files [String, Array] if +files+ is an Array, it should represent + # a list of files that YARD should parse into the registry. If reload is + # set to false and the yardoc file already exists, these files are skipped. + # If files is a String, it should represent the yardoc file to load + # into the registry. + # @param reparse [Boolean] if reparse is false and a yardoc file already + # exists, any files passed in will be ignored. + # @raise [ArgumentError] if files is not a String or Array + # @return [Registry] the registry object (for chaining) + # + # source://yard//lib/yard/registry.rb#109 + def load(files = T.unsafe(nil), reparse = T.unsafe(nil)); end + + # Loads a yardoc file and forces all objects cached on disk into + # memory. Equivalent to calling {load_yardoc} followed by {load_all} + # + # @param file [String] the yardoc file to load + # @return [Registry] the registry object (for chaining) + # @see #load_yardoc + # @see #load_all + # @since 0.5.1 + # + # source://yard//lib/yard/registry.rb#144 + def load!(file = T.unsafe(nil)); end + + # Forces all objects cached on disk into memory + # + # @example Loads all objects from disk + # Registry.load + # Registry.all.count #=> 0 + # Registry.load_all + # Registry.all.count #=> 17 + # @return [Registry] the registry object (for chaining) + # @since 0.5.1 + # + # source://yard//lib/yard/registry.rb#159 + def load_all; end + + # Loads a yardoc file directly + # + # @param file [String] the yardoc file to load. + # @return [Registry] the registry object (for chaining) + # + # source://yard//lib/yard/registry.rb#130 + def load_yardoc(file = T.unsafe(nil)); end + + # @param name [String] the locale name. + # @return [I18n::Locale] the locale object for +name+. + # @since 0.8.3 + # + # source://yard//lib/yard/registry.rb#271 + def locale(name); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @see locked_for_writing? + # + # source://yard//lib/yard/registry.rb#209 + def lock_for_writing(file = T.unsafe(nil), &block); end + + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/registry.rb#214 + def locked_for_writing?(file = T.unsafe(nil)); end + + # Returns the paths of all of the objects in the registry. + # + # @param reload [Boolean] whether to load entire database + # @return [Array<String>] all of the paths in the registry. + # + # source://yard//lib/yard/registry.rb#252 + def paths(reload = T.unsafe(nil)); end + + # Gets/sets the directory that has LANG.po files + # + # @return [String] the directory that has .po files + # + # source://yard//lib/yard/registry.rb#353 + def po_dir; end + + # Gets/sets the directory that has LANG.po files + # + # @return [String] the directory that has .po files + # + # source://yard//lib/yard/registry.rb#351 + def po_dir=(dir); end + + # The assumed types of a list of paths. This method is used by CodeObjects::Base + # + # @deprecated The registry no longer globally tracks proxy types. + # @private + # @return [{String => Symbol}] a set of unresolved paths and their assumed type + # + # source://yard//lib/yard/registry.rb#341 + def proxy_types; end + + # Registers a new object with the registry + # + # @param object [CodeObjects::Base] the object to register + # @return [CodeObjects::Base] the registered object + # + # source://yard//lib/yard/registry.rb#186 + def register(object); end + + # Attempts to find an object by name starting at +namespace+, performing + # a lookup similar to Ruby's method of resolving a constant in a namespace. + # + # @example Looks for instance method #reverse starting from A::B::C + # Registry.resolve(P("A::B::C"), "#reverse") + # @example Looks for a constant in the root namespace + # Registry.resolve(nil, 'CONSTANT') + # @example Looks for a class method respecting the inheritance tree + # Registry.resolve(myclass, 'mymethod', true) + # @example Looks for a constant but returns a proxy if not found + # Registry.resolve(P('A::B::C'), 'D', false, true) # => #<yardoc proxy A::B::C::D> + # @example Looks for a complex path from a namespace + # Registry.resolve(P('A::B'), 'B::D') # => #<yardoc class A::B::D> + # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace + # (module or class). If +nil+ or +:root+, starts from the {root} object. + # @param name [String, Symbol] the name (or complex path) to look for from + # +namespace+. + # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) + # when performing name resolution if set to +true+. + # @param proxy_fallback [Boolean] If +true+, returns a proxy representing + # the unresolved path (namespace + name) if no object is found. + # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved + # object must be equal to. No type checking if nil. + # @return [CodeObjects::Base] the object if it is found + # @return [CodeObjects::Proxy] a Proxy representing the object if + # +proxy_fallback+ is +true+. + # @return [nil] if +proxy_fallback+ is +false+ and no object was found. + # @see P + # + # source://yard//lib/yard/registry.rb#303 + def resolve(namespace, name, inheritance = T.unsafe(nil), proxy_fallback = T.unsafe(nil), type = T.unsafe(nil)); end + + # The root namespace object. + # + # @return [CodeObjects::RootObject] the root object in the namespace + # + # source://yard//lib/yard/registry.rb#266 + def root; end + + # Saves the registry to +file+ + # + # @param file [String] the yardoc file to save to + # @return [Boolean] true if the file was saved + # + # source://yard//lib/yard/registry.rb#170 + def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end + + # Whether or not the Registry storage should load everything into a + # single object database (for disk efficiency), or spread them out + # (for load time efficiency). + # + # @note Setting this attribute to nil will offload the decision to + # the {RegistryStore storage adapter}. + # @return [Boolean, nil] if this value is set to nil, the storage + # adapter will decide how to store the data. + # + # source://yard//lib/yard/registry.rb#335 + def single_object_db; end + + # Whether or not the Registry storage should load everything into a + # single object database (for disk efficiency), or spread them out + # (for load time efficiency). + # + # @note Setting this attribute to nil will offload the decision to + # the {RegistryStore storage adapter}. + # @return [Boolean, nil] if this value is set to nil, the storage + # adapter will decide how to store the data. + # + # source://yard//lib/yard/registry.rb#334 + def single_object_db=(v); end + + # Gets/sets the yardoc filename + # + # @return [String] the yardoc filename + # @see DEFAULT_YARDOC_FILE + # + # source://yard//lib/yard/registry.rb#88 + def yardoc_file; end + + # Gets/sets the yardoc filename + # + # @return [String] the yardoc filename + # @see DEFAULT_YARDOC_FILE + # + # source://yard//lib/yard/registry.rb#86 + def yardoc_file=(v); end + + # Returns the .yardoc file associated with a gem. + # + # @param gem [String] the name of the gem to search for + # @param ver_require [String] an optional Gem version requirement + # @param for_writing [Boolean] whether or not the method should search + # for writable locations + # @return [String] if +for_writing+ is set to +true+, returns the best + # location suitable to write the .yardoc file. Otherwise, the first + # existing location associated with the gem's .yardoc file. + # @return [nil] if +for_writing+ is set to false and no yardoc file + # is found, returns nil. + # + # source://yard//lib/yard/registry.rb#53 + def yardoc_file_for_gem(gem, ver_require = T.unsafe(nil), for_writing = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/registry.rb#390 + def global_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # source://yard//lib/yard/registry.rb#410 + def local_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # source://yard//lib/yard/registry.rb#403 + def old_global_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # Attempts to resolve a name in a namespace + # + # @param namespace [CodeObjects::NamespaceObject] the starting namespace + # @param name [String] the name to look for + # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved + # object must be equal to + # + # source://yard//lib/yard/registry.rb#375 + def partial_resolve(namespace, name, type = T.unsafe(nil)); end + + # @since 0.9.1 + # + # source://yard//lib/yard/registry.rb#434 + def thread_local_resolver; end + + # @since 0.6.5 + # + # source://yard//lib/yard/registry.rb#424 + def thread_local_store; end + + # @since 0.6.5 + # + # source://yard//lib/yard/registry.rb#429 + def thread_local_store=(value); end + end +end + +# source://yard//lib/yard/registry.rb#35 +YARD::Registry::DEFAULT_PO_DIR = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/registry.rb#33 +YARD::Registry::DEFAULT_YARDOC_FILE = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/registry.rb#34 +YARD::Registry::LOCAL_YARDOC_INDEX = T.let(T.unsafe(nil), String) + +# Handles all logic for complex lexical and inherited object resolution. +# Used by {Registry.resolve}, so there is no need to use this class +# directly. +# +# @see Registry.resolve +# @since 0.9.1 +# +# source://yard//lib/yard/registry_resolver.rb#9 +class YARD::RegistryResolver + include ::YARD::CodeObjects::NamespaceMapper + + # Creates a new resolver object for a registry. + # + # @param registry [Registry] only set this if customizing the registry + # object + # @return [RegistryResolver] a new instance of RegistryResolver + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#16 + def initialize(registry = T.unsafe(nil)); end + + # Performs a lookup on a given path in the registry. Resolution will occur + # in a similar way to standard Ruby identifier resolution, doing lexical + # lookup, as well as (optionally) through the inheritance chain. A proxy + # object can be returned if the lookup fails for future resolution. The + # proxy will be type hinted with the +type+ used in the original lookup. + # + # @example A lookup from root + # resolver.lookup_by_path("A::B::C") + # @example A lookup from the A::B namespace + # resolver.lookup_by_path("C", namespace: P("A::B")) + # @example A lookup on a method through the inheritance tree + # resolver.lookup_by_math("A::B#foo", inheritance: true) + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [CodeObjects::Base, CodeObjects::Proxy, nil] the first object + # that matches the path lookup. If proxy_fallback is provided, a proxy + # object will be returned in the event of no match, otherwise nil will + # be returned. + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#50 + def lookup_by_path(path, opts = T.unsafe(nil)); end + + private + + # Collects and returns all inherited namespaces for a given object + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#181 + def collect_namespaces(object); end + + # Performs a lexical lookup from a namespace for a path and a type hint. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#104 + def lookup_path_direct(namespace, path, type); end + + # Performs a lookup through the inheritance chain on a path with a type hint. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#121 + def lookup_path_inherited(namespace, path, type); end + + # @return [Regexp] the regexp that can be used to split a string on all + # occurrences of separator tokens + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#206 + def split_on_separators_match; end + + # @return [Regexp] the regexp match of the default separator + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#194 + def starts_with_default_separator_match; end + + # @return [Regexp] the regexp that matches strings starting with + # a separator + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#200 + def starts_with_separator_match; end + + # return [Boolean] if the obj's type matches the provided type. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#99 + def validate(obj, type); end +end + +# The data store for the {Registry}. +# +# @see Registry +# @see Serializers::YardocSerializer +# +# source://yard//lib/yard/registry_store.rb#9 +class YARD::RegistryStore + # @return [RegistryStore] a new instance of RegistryStore + # + # source://yard//lib/yard/registry_store.rb#14 + def initialize; end + + # Gets a {CodeObjects::Base} from the store + # + # @param key [String, Symbol] the path name of the object to look for. + # If it is empty or :root, returns the {#root} object. + # @return [CodeObjects::Base, nil] a code object or nil if none is found + # + # source://yard//lib/yard/registry_store.rb#33 + def [](key); end + + # Associates an object with a path + # + # @param key [String, Symbol] the path name (:root or '' for root object) + # @param value [CodeObjects::Base] the object to store + # @return [CodeObjects::Base] returns +value+ + # + # source://yard//lib/yard/registry_store.rb#55 + def []=(key, value); end + + # Returns the value of attribute checksums. + # + # source://yard//lib/yard/registry_store.rb#12 + def checksums; end + + # Deletes an object at a given path + # + # @param key [#to_sym] the key to delete + # @return [void] + # + # source://yard//lib/yard/registry_store.rb#75 + def delete(key); end + + # Deletes the .yardoc database on disk + # + # @param force [Boolean] if force is not set to true, the file/directory + # will only be removed if it ends with .yardoc. This helps with + # cases where the directory might have been named incorrectly. + # @return [Boolean] true if the .yardoc database was deleted, false + # otherwise. + # + # source://yard//lib/yard/registry_store.rb#218 + def destroy(force = T.unsafe(nil)); end + + # Returns the value of attribute file. + # + # source://yard//lib/yard/registry_store.rb#12 + def file; end + + # Gets a {CodeObjects::Base} from the store + # + # @param key [String, Symbol] the path name of the object to look for. + # If it is empty or :root, returns the {#root} object. + # @return [CodeObjects::Base, nil] a code object or nil if none is found + # + # source://yard//lib/yard/registry_store.rb#33 + def get(key); end + + # Gets all path names from the store. Loads the entire database + # if +reload+ is +true+ + # + # @param reload [Boolean] if false, does not load the entire database + # before a lookup. + # @return [Array<Symbol>] the path names of all the code objects + # + # source://yard//lib/yard/registry_store.rb#88 + def keys(reload = T.unsafe(nil)); end + + # @param file [String, nil] the name of the yardoc db to load + # @return [Boolean] whether the database was loaded + # + # source://yard//lib/yard/registry_store.rb#128 + def load(file = T.unsafe(nil)); end + + # Loads the .yardoc file and loads all cached objects into memory + # automatically. + # + # @param file [String, nil] the name of the yardoc db to load + # @return [Boolean] whether the database was loaded + # @see #load_all + # @since 0.5.1 + # + # source://yard//lib/yard/registry_store.rb#142 + def load!(file = T.unsafe(nil)); end + + # Loads all cached objects into memory + # + # @return [void] + # + # source://yard//lib/yard/registry_store.rb#153 + def load_all; end + + # @param name [String] the locale name. + # @return [I18n::Locale] the locale object for +name+. + # @since 0.8.3 + # + # source://yard//lib/yard/registry_store.rb#122 + def locale(name); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @param file [String] if supplied, the path to the database + # @see #locked_for_writing? + # + # source://yard//lib/yard/registry_store.rb#201 + def lock_for_writing(file = T.unsafe(nil), &block); end + + # @param file [String] if supplied, the path to the database + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/registry_store.rb#207 + def locked_for_writing?(file = T.unsafe(nil)); end + + # @param type [Symbol] the type to look for + # @return [Array<String>] a list of object paths with a given + # {CodeObjects::Base#type} + # @since 0.8.0 + # + # source://yard//lib/yard/registry_store.rb#102 + def paths_for_type(type, reload = T.unsafe(nil)); end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#11 + def proxy_types; end + + # Associates an object with a path + # + # @param key [String, Symbol] the path name (:root or '' for root object) + # @param value [CodeObjects::Base] the object to store + # @return [CodeObjects::Base] returns +value+ + # + # source://yard//lib/yard/registry_store.rb#55 + def put(key, value); end + + # @return [CodeObjects::RootObject] the root object + # + # source://yard//lib/yard/registry_store.rb#117 + def root; end + + # Saves the database to disk + # + # @param merge [Boolean] if true, merges the data in memory with the + # data on disk, otherwise the data on disk is deleted. + # @param file [String, nil] if supplied, the name of the file to save to + # @return [Boolean] whether the database was saved + # + # source://yard//lib/yard/registry_store.rb#177 + def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end + + # Gets all code objects from the store. Loads the entire database + # if +reload+ is +true+ + # + # @param reload [Boolean] if false, does not load the entire database + # before a lookup. + # @return [Array<CodeObjects::Base>] all the code objects + # + # source://yard//lib/yard/registry_store.rb#96 + def values(reload = T.unsafe(nil)); end + + # @param type [Symbol] the type to look for + # @return [Array<CodeObjects::Base>] a list of objects with a given + # {CodeObjects::Base#type} + # @since 0.8.0 + # + # source://yard//lib/yard/registry_store.rb#111 + def values_for_type(type, reload = T.unsafe(nil)); end + + protected + + # source://yard//lib/yard/registry_store.rb#243 + def checksums_path; end + + # source://yard//lib/yard/registry_store.rb#251 + def load_yardoc; end + + # source://yard//lib/yard/registry_store.rb#247 + def object_types_path; end + + # source://yard//lib/yard/registry_store.rb#234 + def objects_path; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#239 + def proxy_types_path; end + + private + + # source://yard//lib/yard/registry_store.rb#319 + def all_disk_objects; end + + # source://yard//lib/yard/registry_store.rb#291 + def load_checksums; end + + # source://yard//lib/yard/registry_store.rb#313 + def load_locale(name); end + + # source://yard//lib/yard/registry_store.rb#281 + def load_object_types; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#276 + def load_proxy_types; end + + # source://yard//lib/yard/registry_store.rb#299 + def load_root; end + + # source://yard//lib/yard/registry_store.rb#271 + def load_yardoc_old; end + + # source://yard//lib/yard/registry_store.rb#332 + def write_checksums; end + + # source://yard//lib/yard/registry_store.rb#338 + def write_complete_lock; end + + # source://yard//lib/yard/registry_store.rb#328 + def write_object_types; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#324 + def write_proxy_types; end +end + +# Namespace for components that serialize to various endpoints +# +# source://yard//lib/yard/autoload.rb#196 +module YARD::Serializers; end + +# The abstract base serializer. Serializers allow templates to be +# rendered to various endpoints. For instance, a {FileSystemSerializer} +# would allow template contents to be written to the filesystem +# +# To implement a custom serializer, override the following methods: +# * {#serialize} +# * {#serialized_path} +# +# Optionally, a serializer can implement before and after filters: +# * {#before_serialize} +# * {#after_serialize} +# +# @abstract Override this class to implement a custom serializer. +# +# source://yard//lib/yard/serializers/base.rb#17 +class YARD::Serializers::Base + # Creates a new serializer with options + # + # @param opts [Hash] the options to assign to {#options} + # @return [Base] a new instance of Base + # + # source://yard//lib/yard/serializers/base.rb#28 + def initialize(opts = T.unsafe(nil)); end + + # Called after serialization. + # + # @abstract Should run code after serialization. + # @param data [String] the data that was serialized. + # @return [void] + # + # source://yard//lib/yard/serializers/base.rb#80 + def after_serialize(data); end + + # Called before serialization. + # + # @abstract Should run code before serialization. Should return false + # if serialization should not occur. + # @return [Boolean] whether or not serialization should occur + # + # source://yard//lib/yard/serializers/base.rb#73 + def before_serialize; end + + # Returns whether an object has been serialized + # + # @abstract This method should return whether the endpoint already exists. + # For instance, a file system serializer would check if the file exists + # on disk. You will most likely use +#basepath+ and {#serialized_path} to + # get the endpoint's location. + # @param object [CodeObjects::Base] the object to check existence of + # @return [Boolean] whether the endpoint exists. + # @since 0.6.0 + # + # source://yard//lib/yard/serializers/base.rb#62 + def exists?(object); end + + # All serializer options are saved so they can be passed to other serializers. + # + # @return [SymbolHash] the serializer options + # + # source://yard//lib/yard/serializers/base.rb#21 + def options; end + + # Serializes an object. + # + # @abstract This method should implement the logic that serializes + # +data+ to the respective endpoint. This method should also call + # the before and after callbacks {#before_serialize} and {#after_serialize} + # @param object [CodeObjects::Base, String] the object to serialize the + # data for. The object can also be a string (for non-object serialization) + # @param data [String] the contents that should be serialized + # + # source://yard//lib/yard/serializers/base.rb#42 + def serialize(object, data); end + + # The serialized path of an object + # + # @abstract This method should return the path of the object on the + # endpoint. For instance, for a file serializer, this should return + # the filename that represents the object on disk. + # @param object [CodeObjects::Base] the object to return a path for + # @return [String] the serialized path of an object + # + # source://yard//lib/yard/serializers/base.rb#51 + def serialized_path(object); end +end + +# Implements a serializer that reads from and writes to the filesystem. +# +# source://yard//lib/yard/serializers/file_system_serializer.rb#7 +class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base + # Creates a new FileSystemSerializer with options + # + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [FileSystemSerializer] a new instance of FileSystemSerializer + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#28 + def initialize(opts = T.unsafe(nil)); end + + # The base path to write data to. + # + # @return [String] a base path + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#8 + def basepath; end + + # source://yard//lib/yard/serializers/file_system_serializer.rb#10 + def basepath=(value); end + + # Checks the disk for an object and returns whether it was serialized. + # + # @param object [CodeObjects::Base] the object to check + # @return [Boolean] whether an object has been serialized to disk + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#71 + def exists?(object); end + + # The extension of the filename (defaults to +html+) + # + # @return [String] the extension of the file. Empty string for no extension. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#17 + def extension; end + + # source://yard//lib/yard/serializers/file_system_serializer.rb#19 + def extension=(value); end + + # Serializes object with data to its serialized path (prefixed by the +#basepath+). + # + # @return [String] the written data (for chaining) + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#38 + def serialize(object, data); end + + # Implements the serialized path of a code object. + # + # @param object [CodeObjects::Base, CodeObjects::ExtraFileObject, String] the object to get a path for. The path of a string is the string itself. + # @return [String] if object is a String, returns + # object, otherwise the path on disk (without the basepath). + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#50 + def serialized_path(object); end + + private + + # Builds a filename mapping from object paths to filesystem path names. + # Needed to handle case sensitive YARD objects mapped into a case + # insensitive filesystem. Uses with {#mapped_name} to determine the + # mapping name for a given object. + # + # @note In order to use filesystem name mapping, you must initialize + # the serializer object after preparing the {YARD::Registry}. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#84 + def build_filename_map; end + + # Remove special chars from filenames. + # Windows disallows \ / : * ? " < > | but we will just remove any + # non alphanumeric (plus period, underscore and dash). + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#111 + def encode_path_components(*components); end + + # @return [String] the filesystem mapped name of a given object. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#102 + def mapped_name(object); end +end + +# Serializes an object to a process (like less) +# +# @example Serializing to a pager (less) +# serializer = ProcessSerializer.new('less') +# serializer.serialize(object, "data!") +# +# source://yard//lib/yard/serializers/process_serializer.rb#12 +class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base + # Creates a new ProcessSerializer for the shell command +cmd+ + # + # @param cmd [String] the command that will accept data on stdin + # @return [ProcessSerializer] a new instance of ProcessSerializer + # + # source://yard//lib/yard/serializers/process_serializer.rb#13 + def initialize(cmd); end + + # Overrides serialize behaviour and writes data to standard input + # of the associated command + # + # source://yard//lib/yard/serializers/process_serializer.rb#19 + def serialize(_object, data); end +end + +# A serializer that writes data to standard output. +# +# source://yard//lib/yard/serializers/stdout_serializer.rb#9 +class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base + # Creates a serializer to print text to stdout + # + # @param wrap [Fixnum, nil] if wrap is a number, wraps text to +wrap+ + # columns, otherwise no wrapping is done. + # @return [StdoutSerializer] a new instance of StdoutSerializer + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#10 + def initialize(wrap = T.unsafe(nil)); end + + # Overrides serialize behaviour to write data to standard output + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#15 + def serialize(_object, data); end + + private + + # Wraps text to a specific column length + # + # @param text [String] the text to wrap + # @param _length [Fixnum] the column length to wrap to + # @return [String] the wrapped text + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#26 + def word_wrap(text, _length = T.unsafe(nil)); end +end + +# source://yard//lib/yard/serializers/yardoc_serializer.rb#32 +class YARD::Serializers::YardocSerializer < ::YARD::Serializers::FileSystemSerializer + # @return [YardocSerializer] a new instance of YardocSerializer + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#33 + def initialize(yfile); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#40 + def checksums_path; end + + # @return [Boolean] + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#45 + def complete?; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#42 + def complete_lock_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#101 + def deserialize(path, is_path = T.unsafe(nil)); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @see #locked_for_writing? + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#54 + def lock_for_writing; end + + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#62 + def locked_for_writing?; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#41 + def object_types_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#37 + def objects_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#43 + def processing_path; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#39 + def proxy_types_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#93 + def serialize(object); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#66 + def serialized_path(object); end + + private + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#114 + def dump(object); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#119 + def internal_dump(object, first_object = T.unsafe(nil)); end +end + +# Namespace for classes and modules that handle serving documentation over HTTP +# +# == Implementing a Custom Server +# To customize the YARD server, see the {Adapter} and {Router} classes. +# +# == Rack Middleware +# If you want to use the YARD server as a Rack middleware, see the documentation +# in {RackMiddleware}. +# +# @since 0.6.0 +# +# source://yard//lib/yard/autoload.rb#214 +module YARD::Server + class << self + # Registers a static path to be used in static asset lookup. + # + # @param path [String] the pathname to register + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/server.rb#8 + def register_static_path(path); end + end +end + +# This class implements the bridge between the {Router} and the server +# backend for a specific server type. YARD implements concrete adapters +# for WEBrick and Rack respectively, though other adapters can be made +# for other server architectures. +# +# == Subclassing Notes +# To create a concrete adapter class, implement the {#start} method to +# initiate the server backend. +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#23 +class YARD::Server::Adapter + # Creates a new adapter object + # + # @option opts + # @option opts + # @option opts + # @param libs [Hash{String=>Array<LibraryVersion>}] a list of libraries, + # see {#libraries} for formulating this list. + # @param opts [Hash] extra options to pass to the adapter + # @return [Adapter] a new instance of Adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#71 + def initialize(libs, opts = T.unsafe(nil), server_opts = T.unsafe(nil)); end + + # Adds a library to the {#libraries} mapping for a given library object. + # + # @example Adding a new library to an adapter + # adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc') + # @param library [LibraryVersion] a library to add + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#88 + def add_library(library); end + + # @return [String] the location where static files are located, if any. + # To set this field on initialization, pass +:DocumentRoot+ to the + # +server_opts+ argument in {#initialize} + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#27 + def document_root; end + + # @return [String] the location where static files are located, if any. + # To set this field on initialization, pass +:DocumentRoot+ to the + # +server_opts+ argument in {#initialize} + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#27 + def document_root=(_arg0); end + + # @return [Hash{String=>Array<LibraryVersion>}] a map of libraries. + # @see LibraryVersion LibraryVersion for information on building a list of libraries + # @see #add_library + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#32 + def libraries; end + + # @return [Hash{String=>Array<LibraryVersion>}] a map of libraries. + # @see LibraryVersion LibraryVersion for information on building a list of libraries + # @see #add_library + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#32 + def libraries=(_arg0); end + + # @return [Hash] options passed and processed by adapters. The actual + # options mostly depend on the adapters themselves. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#36 + def options; end + + # @return [Hash] options passed and processed by adapters. The actual + # options mostly depend on the adapters themselves. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#36 + def options=(_arg0); end + + # @return [Router] the router object used to route URLs to commands + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#43 + def router; end + + # @return [Router] the router object used to route URLs to commands + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#43 + def router=(_arg0); end + + # @return [Hash] a set of options to pass to the server backend. Note + # that +:DocumentRoot+ also sets the {#document_root}. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#40 + def server_options; end + + # @return [Hash] a set of options to pass to the server backend. Note + # that +:DocumentRoot+ also sets the {#document_root}. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#40 + def server_options=(_arg0); end + + # Implement this method to connect your adapter to your server. + # + # @abstract + # @raise [NotImplementedError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#95 + def start; end + + class << self + # Performs any global initialization for the adapter. + # + # @note If you subclass this method, make sure to call +super+. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#48 + def setup; end + + # Performs any global shutdown procedures for the adapter. + # + # @note If you subclass this method, make sure to call +super+. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#56 + def shutdown; end + end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#16 +YARD::Server::CR = T.let(T.unsafe(nil), String) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#18 +YARD::Server::CRLF = T.let(T.unsafe(nil), String) + +# Commands implement specific kinds of server responses which are routed +# to by the {Router} class. To implement a custom command, subclass {Commands::Base}. +# +# @since 0.6.0 +# +# source://yard//lib/yard/autoload.rb#219 +module YARD::Server::Commands; end + +# This is the base command class used to implement custom commands for +# a server. A command will be routed to by the {Router} class and return +# a Rack-style response. +# +# == Attribute Initializers +# All attributes can be initialized via options passed into the {#initialize} +# method. When creating a custom command, the {Adapter#options} will +# automatically be mapped to attributes by the same name on your class. +# +# class MyCommand < Base +# attr_accessor :myattr +# end +# +# Adapter.new(libs, {:myattr => 'foo'}).start +# +# # when a request comes in, cmd.myattr == 'foo' +# +# == Subclassing Notes +# To implement a custom command, override the {#run} method, not {#call}. +# In your implementation, you should set the body and status for requests. +# See details in the +#run+ method documentation. +# +# Note that if your command deals directly with libraries, you should +# consider subclassing the more specific {LibraryCommand} class instead. +# +# @abstract +# @see #run +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/base.rb#34 +class YARD::Server::Commands::Base + # Creates a new command object, setting attributes named by keys + # in the options hash. After initialization, the options hash + # is saved in {#command_options} for further inspection. + # + # @example Creating a Command + # cmd = DisplayObjectCommand.new(:caching => true, :library => mylib) + # cmd.library # => mylib + # cmd.command_options # => {:caching => true, :library => mylib} + # @param opts [Hash] the options hash, saved to {#command_options} + # after initialization. + # @return [Base] a new instance of Base + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#75 + def initialize(opts = T.unsafe(nil)); end + + # @return [Adapter] the server adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#41 + def adapter; end + + # @return [Adapter] the server adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#41 + def adapter=(_arg0); end + + # @return [String] the response body. Defaults to empty string. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#61 + def body; end + + # @return [String] the response body. Defaults to empty string. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#61 + def body=(_arg0); end + + # @return [Boolean] whether to cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#44 + def caching; end + + # @return [Boolean] whether to cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#44 + def caching=(_arg0); end + + # The main method called by a router with a request object. + # + # @note This command should not be overridden by subclasses. Implement + # the callback method {#run} instead. + # @param request [Adapter Dependent] the request object + # @return [Array(Numeric,Hash,Array<String>)] a Rack-style response + # of status, headers, and body wrapped in an array. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#89 + def call(request); end + + # @return [Hash] the options passed to the command's constructor + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#38 + def command_options; end + + # @return [Hash] the options passed to the command's constructor + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#38 + def command_options=(_arg0); end + + # @return [Hash{String => String}] response headers + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#55 + def headers; end + + # @return [Hash{String => String}] response headers + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#55 + def headers=(_arg0); end + + # @return [String] the path after the command base URI + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#52 + def path; end + + # @return [String] the path after the command base URI + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#52 + def path=(_arg0); end + + # @return [Rack::Request] request object + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#49 + def request; end + + # @return [Rack::Request] request object + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#49 + def request=(_arg0); end + + # Subclass this method to implement a custom command. This method + # should set the {#status} and {#body}, and optionally modify the + # {#headers}. Note that +#status+ defaults to 200. + # + # @abstract + # @example A custom command + # class ErrorCommand < Base + # def run + # self.body = 'ERROR! The System is down!' + # self.status = 500 + # self.headers['Content-Type'] = 'text/plain' + # end + # end + # @raise [NotImplementedError] + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#128 + def run; end + + # @return [Numeric] status code. Defaults to 200 per request + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#58 + def status; end + + # @return [Numeric] status code. Defaults to 200 per request + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#58 + def status=(_arg0); end + + protected + + # Override this method to implement custom caching mechanisms for + # + # @example Caching to memory + # $memory_cache = {} + # def cache(data) + # $memory_cache[path] = data + # end + # @param data [String] the data to cache + # @return [String] the same cached data (for chaining) + # @see StaticCaching + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#165 + def cache(data); end + + # Sets the body and headers for a 404 response. Does not modify the + # body if already set. + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#180 + def not_found; end + + # Sets the headers and status code for a redirection to a given URL + # + # @param url [String] the URL to redirect to + # @raise [FinishRequest] causes the request to terminate. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#192 + def redirect(url); end + + # Renders a specific object if provided, or a regular template rendering + # if object is not provided. + # + # @param object [CodeObjects::Base, nil] calls {CodeObjects::Base#format} if + # an object is provided, or {Templates::Engine.render} if object is nil. Both + # receive +#options+ as an argument. + # @return [String] the resulting output to display + # @since 0.6.0 + # @todo This method is dependent on +#options+, it should be in {LibraryCommand}. + # + # source://yard//lib/yard/server/commands/base.rb#144 + def render(object = T.unsafe(nil)); end + + private + + # Add a conservative cache control policy to reduce load on + # requests served with "?1234567890" style timestamp query strings. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#202 + def add_cache_control; end +end + +# Displays a README or extra file. +# +# @since 0.6.0 +# @todo Implement better support for detecting binary (image) filetypes +# +# source://yard//lib/yard/server/commands/display_file_command.rb#8 +class YARD::Server::Commands::DisplayFileCommand < ::YARD::Server::Commands::LibraryCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#9 + def index; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#9 + def index=(_arg0); end + + # @raise [NotFoundError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#11 + def run; end +end + +# Displays documentation for a specific object identified by the path +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/display_object_command.rb#6 +class YARD::Server::Commands::DisplayObjectCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Server::DocServerHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#36 + def index; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#47 + def not_found; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#9 + def run; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#54 + def object_path; end +end + +# Displays an object wrapped in frames +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/frames_command.rb#6 +class YARD::Server::Commands::FramesCommand < ::YARD::Server::Commands::DisplayObjectCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/frames_command.rb#7 + def run; end +end + +# This is the base command for all commands that deal directly with libraries. +# Some commands do not, but most (like {DisplayObjectCommand}) do. If your +# command deals with libraries directly, subclass this class instead. +# See {Base} for notes on how to subclass a command. +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_command.rb#32 +class YARD::Server::Commands::LibraryCommand < ::YARD::Server::Commands::Base + # @return [LibraryCommand] a new instance of LibraryCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#63 + def initialize(opts = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#68 + def call(request); end + + # @return [Boolean] whether to reparse data + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#53 + def incremental; end + + # @return [Boolean] whether to reparse data + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#53 + def incremental=(_arg0); end + + # @return [LibraryVersion] the object containing library information + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#41 + def library; end + + # @return [LibraryVersion] the object containing library information + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#41 + def library=(_arg0); end + + # @return [LibraryOptions] default options for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#44 + def options; end + + # @return [LibraryOptions] default options for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#44 + def options=(_arg0); end + + # @return [Serializers::Base] the serializer used to perform file linking + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#47 + def serializer; end + + # @return [Serializers::Base] the serializer used to perform file linking + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#47 + def serializer=(_arg0); end + + # @return [Boolean] whether router should route for multiple libraries + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#50 + def single_library; end + + # @return [Boolean] whether router should route for multiple libraries + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#50 + def single_library=(_arg0); end + + # @return [Boolean] whether or not this adapter calls +fork+ when serving + # library requests. Defaults to false. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#57 + def use_fork; end + + # @return [Boolean] whether or not this adapter calls +fork+ when serving + # library requests. Defaults to false. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#57 + def use_fork=(_arg0); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#96 + def call_with_fork(request, &block); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#83 + def call_without_fork(request); end + + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#109 + def can_fork?; end + + # Hack to load a custom fulldoc template object that does + # not do any rendering/generation. We need this to access the + # generate_*_list methods. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#171 + def fulldoc_template; end + + # @raise [LibraryNotPreparedError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#147 + def load_yardoc; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#159 + def not_prepared; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#118 + def restore_template_info; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#113 + def save_default_template_info; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#123 + def setup_library; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#130 + def setup_yardopts; end +end + +# source://yard//lib/yard/server/commands/library_command.rb#35 +YARD::Server::Commands::LibraryCommand::CAN_FORK = T.let(T.unsafe(nil), TrueClass) + +# Returns the index of libraries served by the server. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_index_command.rb#13 +class YARD::Server::Commands::LibraryIndexCommand < ::YARD::Server::Commands::Base + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#14 + def options; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#14 + def options=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#16 + def run; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_index_command.rb#5 +class YARD::Server::Commands::LibraryIndexOptions < ::YARD::CLI::YardocOptions + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def adapter=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def libraries; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def libraries=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def serialize; end + + # source://yard//lib/yard/options.rb#82 + def serialize=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def template; end + + # source://yard//lib/yard/options.rb#82 + def template=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def type; end + + # source://yard//lib/yard/options.rb#82 + def type=(_arg0); end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_command.rb#7 +class YARD::Server::Commands::LibraryOptions < ::YARD::CLI::YardocOptions + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#8 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#14 + def command; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#14 + def command=(_arg0); end + + # @since 0.6.0 + # @yield [:adapter, adapter] + # + # source://yard//lib/yard/server/commands/library_command.rb#17 + def each(&block); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#15 + def frames; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#15 + def frames=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#9 + def library; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#12 + def serialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#11 + def serializer; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#10 + def single_library; end +end + +# Returns a list of objects of a specific type +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/list_command.rb#6 +class YARD::Server::Commands::ListCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Templates::Helpers::BaseHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/list_command.rb#9 + def run; end +end + +# Serves requests from the root of the server +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/root_request_command.rb#6 +class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base + include ::YARD::Server::HTTPUtils + include ::YARD::Server::Commands::StaticFileHelpers + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/root_request_command.rb#9 + def run; end +end + +# Performs a search over the objects inside of a library and returns +# the results as HTML or plaintext +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/search_command.rb#7 +class YARD::Server::Commands::SearchCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Templates::Helpers::BaseHelper + include ::YARD::Templates::Helpers::ModuleHelper + include ::YARD::Server::DocServerHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def query; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def query=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def results; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def results=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#14 + def run; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#26 + def visible_results; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#58 + def search_for_object; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#47 + def serve_normal; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#37 + def serve_xhr; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#32 + def url_for(object); end +end + +# Serves static content when no other router matches a request +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_command.rb#6 +class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Server::HTTPUtils + include ::YARD::Server::Commands::StaticFileHelpers + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_command.rb#17 + def run; end +end + +# Defines the paths used to search for static assets. To define an +# extra path, use {YARD::Server.register_static_path} rather than +# modifying this constant directly. Also note that files in the +# document root will always take precedence over these paths. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_command.rb#15 +YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), Array) + +# Include this module to get access to {#static_template_file?} +# and {favicon?} helpers. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_helpers.rb#8 +module YARD::Server::Commands::StaticFileHelpers + include ::YARD::Server::HTTPUtils + + # Serves an empty favicon. + # + # @raise [FinishRequest] finalizes an empty body if the path matches + # /favicon.ico so browsers don't complain. + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#14 + def favicon?; end + + # Attempts to route a path to a static template file. + # + # @raise [FinishRequest] if a file was found and served + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#26 + def static_template_file?; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 + def find_file(adapter, url); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 + def find_file(adapter, url); end + end +end + +# A module that is mixed into {Templates::Template} in order to customize +# certain template methods. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/doc_server_helper.rb#6 +module YARD::Server::DocServerHelper + # @param path_components [Array<String>] components of a URL + # @return [String] the absolute path from any mounted base URI. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#61 + def abs_url(*path_components); end + + # @example The base path for a library 'foo' + # base_path('docs') # => 'docs/foo' + # @param path [String] the path prefix for a base path URI + # @return [String] the base URI for a library with an extra +path+ prefix + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#69 + def base_path(path); end + + # @return [String] a timestamp for a given file + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#78 + def mtime(file); end + + # @return [String] a URL for a file with a timestamp + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#84 + def mtime_url(file); end + + # @return [Router] convenience method for accessing the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#75 + def router; end + + # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead + # of a disk location. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#11 + def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead + # of a disk location. + # + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to + # @param anchor [String] optional anchor + # @return [String] the URL pointing to the file + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#24 + def url_for_file(filename, anchor = T.unsafe(nil)); end + + # Returns the frames URL for the page + # + # @return [String] the URL pointing to the frames page + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#43 + def url_for_frameset; end + + # Returns the URL for the alphabetic index page + # + # @return [String] the URL pointing to the first main page the + # user should see. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#55 + def url_for_index; end + + # Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL + # based on the list prefix instead of a HTML filename. + # + # @param type [String, Symbol] the list type to generate a URL for + # @return [String] the URL pointing to the list + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#37 + def url_for_list(type); end + + # Returns the main URL, first checking a readme and then linking to the index + # + # @return [String] the URL pointing to the first main page the + # user should see. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#49 + def url_for_main; end +end + +# A custom {Serializers::Base serializer} which returns resource URLs instead of +# static relative paths to files on disk. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/doc_server_serializer.rb#6 +class YARD::Server::DocServerSerializer < ::YARD::Serializers::FileSystemSerializer + # @return [DocServerSerializer] a new instance of DocServerSerializer + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#7 + def initialize(_command = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#11 + def serialized_path(object); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#31 + def urlencode(name); end +end + +# Short circuits a request by raising an error. This exception is caught +# by {Commands::Base#call} to immediately end a request and return a response. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#6 +class YARD::Server::FinishRequest < ::RuntimeError; end + +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#25 +module YARD::Server::HTTPUtils + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + end +end + +# Default mime types +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#47 +YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#459 +YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#242 +class YARD::Server::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#267 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#300 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#286 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#320 + def append_data(data); end + + # Yields each entry in this FormData + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#335 + def each_data; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def list; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # A FormData will behave like an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def to_ary; end + + # This FormData's body + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#363 + def to_s; end + + protected + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#244 +YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#243 +YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#458 +YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#456 +YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#457 +YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#460 +YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#17 +YARD::Server::LF = T.let(T.unsafe(nil), String) + +# This exception is raised when {LibraryVersion#prepare!} fails, or discovers +# that the library is not "prepared" to be served by +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#9 +class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end + +# A library version encapsulates a library's documentation at a specific version. +# Although the version is optional, this allows for creating multiple documentation +# points for a specific library, each representing a unique version. The term +# "library" used in other parts of the YARD::Server documentation refers to +# objects of this class unless otherwise noted. +# +# A library points to a location where a {#yardoc_file} is located so that +# its documentation may be loaded and served. Optionally, a {#source_path} is +# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) +# should be loaded from. Both of these methods may not be known immediately, +# since the yardoc file may not be built until later. Resolving the yardoc +# file and source path are dependent on the specific library "source type" used. +# Source types (known as "library source") are discussed in detail below. +# +# == Using with Adapters +# A list of libraries need to be passed into adapters upon creation. In +# most cases, you will never do this manually, but if you use a {RackMiddleware}, +# you will need to pass in this list yourself. To build this list of libraries, +# you should create a hash of library names mapped to an *Array* of LibraryVersion +# objects. For example: +# +# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), +# LibraryVersion.new('mylib', '2.0', ...)]} +# +# Note that you can also use {Adapter#add_library} for convenience. +# +# The "array" part is required, even for just one library version. +# +# == Library Sources +# The {#source} method represents the library source type, ie. where the +# library "comes from". It might come from "disk", or it might come from a +# "gem" (technically the disk, but a separate type nonetheless). In these +# two cases, the yardoc file sits somewhere on your filesystem, though +# it may also be built dynamically if it does not yet exist. This behaviour +# is controlled through the {#prepare!} method, which prepares the yardoc file +# given a specific library source. We will see how this works in detail in +# the following section. +# +# == Implementing a Custom Library Source +# YARD can be extended to support custom library sources in order to +# build or retrieve a yardoc file at runtime from many different locations. +# +# To implement this behaviour, 3 methods can be added to the +LibraryVersion+ +# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and +# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source +# type used in {#source} when creating the library object. The +# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon +# creation and should return the location where the source code for the library +# lives. The load method is called from {#prepare!} if there is no yardoc file +# and should set {#yardoc_file}. Below is a full example for +# implementing a custom library source, +:http+, which reads packaged .yardoc +# databases from zipped archives off of an HTTP server. +# +# Note that only +#load_yardoc_from_SOURCE+ is required. The other two +# methods are optional and can be set manually (via {#source_path=} and +# {#yardoc_file=}) on the object at any time. +# +# @example Implementing a Custom Library Source +# # Adds the source type "http" for .yardoc files zipped on HTTP servers +# class LibraryVersion +# def load_yardoc_from_http +# Thread.new do +# # zip/unzip method implementations are not shown +# download_zip_file("http://mysite.com/yardocs/#{self}.zip") +# unzip_file_to("/path/to/yardocs/#{self}") +# end +# +# # tell the server it's not ready yet (but it might be next time) +# raise LibraryNotPreparedError +# end +# +# def yardoc_file_for_http +# "/path/to/yardocs/#{self}/.yardoc" +# end +# +# def source_path_for_http +# File.dirname(yardoc_file) +# end +# end +# +# # Creating a library of this source type: +# LibraryVersion.new('name', '1.0', nil, :http) +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#94 +class YARD::Server::LibraryVersion + # @param name [String] the name of the library + # @param version [String] the specific (usually, but not always, numeric) library + # version + # @param yardoc [String] the location of the yardoc file, or nil if it is + # generated later + # @param source [Symbol] the location of the files used to build the yardoc. + # Builtin source types are +:disk+ or +:gem+. + # @return [LibraryVersion] a new instance of LibraryVersion + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#134 + def initialize(name, version = T.unsafe(nil), yardoc = T.unsafe(nil), source = T.unsafe(nil)); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def ==(other); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def eql?(other); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def equal?(other); end + + # @return [Gem::Specification] a gemspec object for a given library. Used + # for :gem source types. + # @return [nil] if there is no installed gem for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#191 + def gemspec; end + + # @return [Fixnum] used for Hash mapping. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#150 + def hash; end + + # @return [String] the name of the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#96 + def name; end + + # @return [String] the name of the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#96 + def name=(_arg0); end + + # Prepares a library to be displayed by the server. This callback is + # performed before each request on a library to ensure that it is loaded + # and ready to be viewed. If any steps need to be performed prior to loading, + # they are performed through this method (though they should be implemented + # through the +load_yardoc_from_SOURCE+ method). + # + # @note You should not directly override this method. Instead, implement + # +load_yardoc_from_SOURCENAME+ when implementing loading for a specific + # source type. See the {LibraryVersion} documentation for "Implementing + # a Custom Library Source" + # @raise [LibraryNotPreparedError] if the library is not ready to be + # displayed. Usually when raising this error, you would simultaneously + # begin preparing the library for subsequent requests, although this + # is not necessary. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#182 + def prepare!; end + + # @return [Boolean] whether the library has been completely processed + # and is ready to be served + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#162 + def ready?; end + + # @return [Symbol] the source type representing where the yardoc should be + # loaded from. Defaults are +:disk+ and +:gem+, though custom sources + # may be implemented. This value is used to inform {#prepare!} about how + # to load the necessary data in order to display documentation for an object. + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#116 + def source; end + + # @return [Symbol] the source type representing where the yardoc should be + # loaded from. Defaults are +:disk+ and +:gem+, though custom sources + # may be implemented. This value is used to inform {#prepare!} about how + # to load the necessary data in order to display documentation for an object. + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#116 + def source=(_arg0); end + + # @return [String] the location of the source code for a library. This + # value is filled by calling +#source_path_for_SOURCE+ on this class. + # @return [nil] if there is no source code + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#122 + def source_path; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#125 + def source_path=(_arg0); end + + # @param url_format [Boolean] if true, returns the string in a URI-compatible + # format (for appending to a URL). Otherwise, it is given in a more human + # readable format. + # @return [String] the string representation of the library. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#145 + def to_s(url_format = T.unsafe(nil)); end + + # @return [String] the version of the specific library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#99 + def version; end + + # @return [String] the version of the specific library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#99 + def version=(_arg0); end + + # @note To implement a custom yardoc file getter, implement + # @return [String] the location of the yardoc file used to load the object + # information from. + # @return [nil] if no yardoc file exists yet. In this case, {#prepare!} will + # be called on this library to build the yardoc file. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#106 + def yardoc_file; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#109 + def yardoc_file=(_arg0); end + + protected + + # Called when a library of source type "disk" is to be prepared. In this + # case, the {#yardoc_file} should already be set, but the library may not + # be prepared. Run preparation if not done. + # + # @raise [LibraryNotPreparedError] if the yardoc file has not been + # prepared. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#206 + def load_yardoc_from_disk; end + + # Called when a library of source type "gem" is to be prepared. In this + # case, the {#yardoc_file} needs to point to the correct location for + # the installed gem. The yardoc file is built if it has not been done. + # + # @raise [LibraryNotPreparedError] if the gem does not have an existing + # yardoc file. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#226 + def load_yardoc_from_gem; end + + # @return [String] the source path for a disk source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#243 + def source_path_for_disk; end + + # @return [String] the source path for a gem source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#248 + def source_path_for_gem; end + + # @return [String] the yardoc file for a gem source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#253 + def yardoc_file_for_gem; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#261 + def load_source_path; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#266 + def load_yardoc_file; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#271 + def serializer; end +end + +# Raises an error if a resource is not found. This exception is caught by +# {Commands::Base#call} to immediately end a request and return a 404 response +# code. If a message is provided, the body is set to the exception message. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#11 +class YARD::Server::NotFoundError < ::RuntimeError; end + +# A router class implements the logic used to recognize a request for a specific +# URL and run specific {Commands::Base commands}. +# +# == Subclassing Notes +# To create a custom router, subclass this class and pass it into the adapter +# options through {Adapter#initialize} or by directly modifying {Adapter#router}. +# +# The most general customization is to change the URL prefixes recognized by +# routing, which can be done by overriding {#docs_prefix}, {#list_prefix}, +# {#static_prefix}, and {#search_prefix}. +# +# == Implementing Custom Caching +# By default, the Router class performs static disk-based caching on all +# requests through the +#check_static_cache+. To override this behaviour, +# or create your own caching mechanism, mixin your own custom module with +# this method implemented as per {StaticCaching#check_static_cache}. +# +# @example Creating a subclassed router +# # Adds 'my' to all routing prefixes +# class MyRouter < YARD::Server::Router +# def docs_prefix; 'mydocs' end +# def list_prefix; 'mylist' end +# def static_prefix; 'mystatic' end +# def search_prefix; 'mysearch' end +# end +# +# # Using it: +# WebrickAdapter.new(libraries, :router => MyRouter).start +# @since 0.6.0 +# +# source://yard//lib/yard/server/router.rb#32 +class YARD::Server::Router + include ::YARD::Server::StaticCaching + include ::YARD::Server::Commands + + # Creates a new router for a specific adapter + # + # @param adapter [Adapter] the adapter to route requests to + # @return [Router] a new instance of Router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#45 + def initialize(adapter); end + + # @return [Adapter] the adapter used by the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#40 + def adapter; end + + # @return [Adapter] the adapter used by the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#40 + def adapter=(_arg0); end + + # Perform routing on a specific request, serving the request as a static + # file through {Commands::RootRequestCommand} if no route is found. + # + # @param request [Adapter Dependent] the request object + # @return [Array(Numeric,Hash,Array)] the Rack-style server response data + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#54 + def call(request); end + + # @return [String] the URI prefix for all object documentation requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#63 + def docs_prefix; end + + # @return [String] the URI prefix for all class/method/file list requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#66 + def list_prefix; end + + # @return [Array(LibraryVersion, Array<String>)] the library followed + # by the rest of the path components in the request path. LibraryVersion + # will be nil if no matching library was found. + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#79 + def parse_library_from_path(paths); end + + # @return [Adapter Dependent] the request data coming in with the routing + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#37 + def request; end + + # @return [Adapter Dependent] the request data coming in with the routing + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#37 + def request=(_arg0); end + + # @return [String] the URI prefix for all search requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#69 + def search_prefix; end + + # @return [String] the URI prefix for all static assets (templates) + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#72 + def static_prefix; end + + protected + + # Adds extra :library/:path option keys to the adapter options. + # Use this method when passing options to a command. + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Hash] finalized options + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#181 + def final_options(library, paths); end + + # Performs routing algorithm to find which prefix is called, first + # parsing out library name/version information. + # + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#105 + def route(path = T.unsafe(nil)); end + + # Routes requests from {#docs_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#128 + def route_docs(library, paths); end + + # Routes for the index of a library / multiple libraries + # + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#146 + def route_index; end + + # Routes requests from {#list_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#157 + def route_list(library, paths); end + + # Routes requests from {#search_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#165 + def route_search(library, paths); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#170 + def route_static(library, paths); end +end + +# Implements static caching for requests. +# +# @see Router Router documentation for "Caching" +# @since 0.6.0 +# +# source://yard//lib/yard/server/static_caching.rb#7 +module YARD::Server::StaticCaching + # Called by a router to return the cached object. By default, this + # method performs disk-based caching. To perform other forms of caching, + # implement your own +#check_static_cache+ method and mix the module into + # the Router class. + # + # Note that caching does not occur here. This method simply checks for + # the existence of cached data. To actually cache a response, see + # {Commands::Base#cache}. + # + # @example Implementing In-Memory Cache Checking + # module MemoryCaching + # def check_static_cache + # # $memory_cache is filled by {Commands::Base#cache} + # cached_data = $memory_cache[request.path] + # if cached_data + # [200, {'Content-Type' => 'text/html'}, [cached_data]] + # else + # nil + # end + # end + # end + # + # class YARD::Server::Router; include MemoryCaching; end + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no cache is available and routing should continue + # @see Commands::Base#cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/static_caching.rb#34 + def check_static_cache; end +end + +# The main adapter to initialize a WEBrick server. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/webrick_adapter.rb#9 +class YARD::Server::WebrickAdapter < ::YARD::Server::Adapter + # Initializes a WEBrick server. If {Adapter#server_options} contains a + # +:daemonize+ key set to true, the server will be daemonized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#10 + def start; end +end + +# The main WEBrick servlet implementation, accepting only GET requests. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/webrick_adapter.rb#20 +class YARD::Server::WebrickServlet < ::WEBrick::HTTPServlet::AbstractServlet + # @return [WebrickServlet] a new instance of WebrickServlet + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#23 + def initialize(server, adapter); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#21 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#21 + def adapter=(_arg0); end + + # @private + # @since 0.6.0 + # + # source://yard//lib/yard/server/webrick_adapter.rb#29 + def do_GET(request, response); end +end + +# Stubs marshal dumps and acts a delegate class for an object by path +# +# @private +# +# source://yard//lib/yard/serializers/yardoc_serializer.rb#6 +class YARD::StubProxy + # @return [StubProxy] a new instance of StubProxy + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#13 + def initialize(path, transient = T.unsafe(nil)); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#9 + def _dump(_depth); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#11 + def hash; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#18 + def method_missing(meth, *args, &block); end + + class << self + # source://yard//lib/yard/serializers/yardoc_serializer.rb#10 + def _load(str); end + end +end + +# source://yard//lib/yard/serializers/yardoc_serializer.rb#28 +YARD::StubProxy::FILELEN = T.let(T.unsafe(nil), Integer) + +# The root path for YARD builtin templates +# +# source://yard//lib/yard.rb#10 +YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) + +# Namespace for Tag components +# +# source://yard//lib/yard/autoload.rb#248 +module YARD::Tags; end + +# Defines an attribute with a given name, using indented block data as the +# attribute's docstring. If the type specifier is supplied with "r", "w", or +# "rw", the attribute is made readonly, writeonly or readwrite respectively. +# A readwrite attribute is the default, if no type is specified. The comment +# containing this directive does not need to be attached to any source, but +# if it is, that source code will be used as the method's source. +# +# To define a regular method, see {tag:!method} +# +# @example Defining a simple readonly attribute +# # @!attribute [r] count +# # @return [Fixnum] the size of the list +# @example Defining a simple readwrite attribute +# # @!attribute name +# # @return [String] the name of the user +# @note This directive should only be used if there is no explicit +attr_*+ +# declaration for the attribute in any source files (i.e., the attribute +# is declared dynamically via meta-programming). In all other cases, add +# documentation to the attribute declaration itself. +# @note For backwards compatibility support, you do not need to indent +# the attribute's docstring text. If an +@!attribute+ directive is seen with +# no indented block, the entire docstring is used as the new attribute's +# docstring text. +# @see tag:!method +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#461 +class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#462 + def after_parse; end + + protected + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#470 + def method_name; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#476 + def method_signature; end + + private + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#486 + def create_attribute_data(object); end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#516 + def readable?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#512 + def writable?; end +end + +# source://yard//lib/yard/tags/default_factory.rb#4 +class YARD::Tags::DefaultFactory + # Parses tag text and creates a new tag with descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#13 + def parse_tag(tag_name, text); end + + # Parses tag text and creates a new tag with a key name and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#22 + def parse_tag_with_name(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#89 + def parse_tag_with_options(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#70 + def parse_tag_with_title_and_text(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types and + # descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @raise [TagFormatError] + # @return [Tag] a tag object with the tag_name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#33 + def parse_tag_with_types(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types, a key + # name and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#45 + def parse_tag_with_types_and_name(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types, a title + # on the first line and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#57 + def parse_tag_with_types_and_title(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#75 + def parse_tag_with_types_name_and_default(tag_name, text); end + + private + + # Extracts the name from raw tag text returning the name and remaining value + # + # @param text [String] the raw tag text + # @return [Array] an array holding the name as the first element and the + # value as the second element + # + # source://yard//lib/yard/tags/default_factory.rb#101 + def extract_name_from_text(text); end + + # @raise [TagFormatError] + # + # source://yard//lib/yard/tags/default_factory.rb#105 + def extract_title_and_desc_from_text(text); end + + # Parses a [], <>, {} or () block at the beginning of a line of text + # into a list of comma delimited values. + # + # @example + # obj.parse_types('[String, Array<Hash, String>, nil]') # => [nil, ['String', 'Array<Hash, String>', 'nil'], ""] + # obj.parse_types('b<String> A string') # => ['b', ['String'], 'A string'] + # @return [Array(String, Array<String>, String)] the text before the type + # list (or nil), followed by the type list parsed into an array of + # strings, followed by the text following the type list. + # + # source://yard//lib/yard/tags/default_factory.rb#129 + def extract_types_and_name_from_text(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/default_factory.rb#138 + def extract_types_and_name_from_text_unstripped(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end +end + +# source://yard//lib/yard/tags/default_factory.rb#6 +YARD::Tags::DefaultFactory::TYPELIST_CLOSING_CHARS = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/tags/default_factory.rb#5 +YARD::Tags::DefaultFactory::TYPELIST_OPENING_CHARS = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/tags/default_tag.rb#4 +class YARD::Tags::DefaultTag < ::YARD::Tags::Tag + # @return [DefaultTag] a new instance of DefaultTag + # + # source://yard//lib/yard/tags/default_tag.rb#7 + def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil), defaults = T.unsafe(nil)); end + + # Returns the value of attribute defaults. + # + # source://yard//lib/yard/tags/default_tag.rb#5 + def defaults; end +end + +# The base directive class. Subclass this class to create a custom +# directive, registering it with {Library.define_directive}. Directive +# classes are executed via the {#call} method, which perform all directive +# processing on the object. +# +# If processing occurs within a handler, the {#handler} attribute is +# available to access more information about parsing context and state. +# Handlers are only available when parsing from {Parser::SourceParser}, +# not when parsing directly from {DocstringParser}. If the docstring is +# attached to an object declaration, {#object} will be set and available +# to modify the generated code object directly. Note that both of these +# attributes may be nil, and directives should test their existence +# before attempting to use them. +# +# @abstract Subclasses should implement {#call}. +# @see Library.define_directive +# @since 0.8.0 +# +# source://yard//lib/yard/tags/directives.rb#23 +class YARD::Tags::Directive + # @param tag [Tag] the meta-data tag containing all input to the docstring + # @param parser [DocstringParser] the docstring parser object + # @return [Directive] a new instance of Directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#55 + def initialize(tag, parser); end + + # Called after parsing all directives and tags in the docstring. Used + # to perform any cleanup after all directives perform their main task. + # + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#74 + def after_parse; end + + # Called when processing the directive. Subclasses should implement + # this method to perform all functionality of the directive. + # + # @abstract implement this method to perform all data processing for + # the directive. + # @raise [NotImplementedError] + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#69 + def call; end + + # Set this field to replace the directive definition inside of a docstring + # with arbitrary text. For instance, the {MacroDirective} uses this field + # to expand its macro data in place of the call to a +@!macro+. + # + # @return [String] the text to expand in the original docstring in place + # of this directive definition. + # @return [nil] if no expansion should take place for this directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#34 + def expanded_text; end + + # Set this field to replace the directive definition inside of a docstring + # with arbitrary text. For instance, the {MacroDirective} uses this field + # to expand its macro data in place of the call to a +@!macro+. + # + # @return [String] the text to expand in the original docstring in place + # of this directive definition. + # @return [nil] if no expansion should take place for this directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#34 + def expanded_text=(_arg0); end + + # @return [Handlers::Base, nil] the handler object the docstring parser + # might be attached to. May be nil. Only available when parsing + # through {Parser::SourceParser}. + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#49 + def handler; end + + # @return [CodeObjects::Base, nil] the object the parent docstring is + # attached to. May be nil. + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#43 + def object; end + + # @return [DocstringParser] the parser that is parsing all tag + # information out of the docstring + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#38 + def parser=(_arg0); end + + # @return [Tag] the meta-data tag containing data input to the directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#25 + def tag; end + + # @return [Tag] the meta-data tag containing data input to the directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#25 + def tag=(_arg0); end + + protected + + # @return [Boolean] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#80 + def inside_directive?; end + + # @return [DocstringParser] the parser that is parsing all tag + # information out of the docstring + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#38 + def parser; end +end + +# Ends a group listing definition. Group definition automatically end +# when class or module blocks are closed, and defining a new group overrides +# the last group definition, but occasionally you need to end the current +# group to return to the default listing. Use {tag:!group} to begin a +# group listing. +# +# @example +# class Controller +# # @!group Callbacks +# +# def before_filter; end +# def after_filter; end +# +# # @!endgroup +# +# def index; end +# end +# @see tag:!group +# @since 0.6.0 +# +# source://yard//lib/yard/tags/directives.rb#105 +class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive + # @since 0.6.0 + # + # source://yard//lib/yard/tags/directives.rb#106 + def call; end +end + +# Defines a group listing. All methods (and attributes) seen after this +# directive are placed into a group with the given description as the +# group name. The group listing is used by templates to organize methods +# and attributes into respective logical groups. To end a group listing +# use {tag:!endgroup}. +# +# @example +# # @!group Callbacks +# +# def before_filter; end +# def after_filter; end +# @note A group definition only applies to the scope it is defined in. +# If a new class or module is opened after the directive, this directive +# will not apply to methods in that class or module. +# @see tag:!endgroup +# @since 0.6.0 +# +# source://yard//lib/yard/tags/directives.rb#128 +class YARD::Tags::GroupDirective < ::YARD::Tags::Directive + # @since 0.6.0 + # + # source://yard//lib/yard/tags/directives.rb#129 + def call; end +end + +# Keeps track of all the registered meta-data tags and directives. +# Also allows for defining of custom tags and customizing the tag parsing +# syntax. +# +# == Defining Custom Meta-Data Tags +# +# To define a custom tag, use {define_tag}. You should pass the tag +# name and the factory method to use when creating the tag. If you do not +# provide a factory method to use, it will default to {DefaultFactory#parse_tag} +# +# You can also define tag objects manually by simply implementing a "tagname_tag" +# method that returns a {Tag} object, but they will not take advantage of tag factory +# parsing: +# +# def mytag_tag(text) +# Tag.new(:mytag, text) +# end +# +# == Defining Custom Directives +# +# Directives can be defined by calling the {define_directive} method, taking +# the directive name, an optional tag factory parser method (to parse the +# data in the directive into a temporary {Tag} object) and a {Directive} subclass +# that performs the directive processing. For more information on creating a +# Directive subclass, see the {Directive} class documentation. +# +# Similar to tags, Directives can also be defined manually, in this case using +# the method name "mydirective_directive" and returning a new {Directive} object: +# +# def mydirective_directive(tag, parser) +# MyDirective.new(tag, parser) +# end +# +# == Namespaced Tags +# +# In YARD 0.8.0+, tags can be namespaced using the '.' character. It is recommended +# to namespace project specific tags, like +@yard.tag_name+, so that tags do not +# collide with other plugins or new built-in tags. +# +# == Adding/Changing the Tag Syntax +# +# If you have specialized tag parsing needs you can substitute the {#factory} +# object with your own by setting {Library.default_factory= Library.default_factory} +# to a new class with its own parsing methods before running YARD. This is useful +# if you want to change the syntax of existing tags (@see, @since, etc.) +# +# @example Defining a custom tag +# define_tag "Parameter", :param, :with_types_and_name +# define_tag "Author", :author +# @example Defining a custom directive +# define_directive :method, :with_title_and_text, MethodDirective +# @see DefaultFactory +# @see define_tag +# @see define_directive +# @see Directive +# +# source://yard//lib/yard/tags/library.rb#59 +class YARD::Tags::Library + # @return [Library] a new instance of Library + # + # source://yard//lib/yard/tags/library.rb#260 + def initialize(factory = T.unsafe(nil)); end + + # Marks a class/module/method as abstract with optional + # implementor information. + # + # @example + # # @abstract Subclass and override {#run} to implement + # # a custom Threadable class. + # class Runnable + # def run; raise NotImplementedError end + # end + # + # source://yard//lib/yard/tags/library.rb#168 + def abstract_tag(text); end + + # Declares the API that the object belongs to. Does not display in + # output, but useful for performing queries (+yardoc --query+). Any text is + # allowable in this tag, and there are no predefined values. + # + # @example + # class Post + # # @api private + # def reset_table!; table.flush end + # end + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # @note The special name +@api private+ does display a notice in + # documentation if it is listed, letting users know that the + # method is not to be used by external components. + # + # source://yard//lib/yard/tags/library.rb#168 + def api_tag(text); end + + # Declares a readonly attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr_reader [String] name the name of the structure + # # @attr_reader [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_reader_tag(text); end + + # Declares a readwrite attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr [String] name the name of the structure + # # @attr [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_tag(text); end + + # Declares a writeonly attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr_reader [String] name the name of the structure + # # @attr_reader [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_writer_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def attribute_directive(tag, parser); end + + # List the author or authors of a class, module, or method. + # + # @example + # # @author Foo Bar <foo@bar.com> + # class MyClass; end + # + # source://yard//lib/yard/tags/library.rb#168 + def author_tag(text); end + + # Marks a method/class as deprecated with an optional description. + # The description should be used to inform users of the recommended + # migration path, and/or any useful information about why the object + # was marked as deprecated. + # + # @example Deprecate a method with a replacement API + # # @deprecated Use {#bar} instead. + # def foo; end + # @example Deprecate a method with no replacement + # class Thread + # # @deprecated Exiting a thread in this way is not reliable and + # # can cause a program crash. + # def kill; end + # end + # + # source://yard//lib/yard/tags/library.rb#168 + def deprecated_tag(text); end + + # Creates a new directive with tag information and a docstring parser + # object. + # + # @param tag_name [String] the name of the tag + # @param tag_buf [String] the tag data + # @param parser [DocstringParser] the parser object parsing the docstring + # @return [Directive] the newly created directive + # + # source://yard//lib/yard/tags/library.rb#290 + def directive_create(tag_name, tag_buf, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def domain_directive(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def endgroup_directive(tag, parser); end + + # Show an example snippet of code for an object. The first line + # is an optional title. + # + # @example + # # @example Reverse a String + # # "mystring".reverse #=> "gnirtsym" + # def reverse; end + # + # source://yard//lib/yard/tags/library.rb#168 + def example_tag(text); end + + # A factory class to handle parsing of tags, defaults to {default_factory} + # + # source://yard//lib/yard/tags/library.rb#258 + def factory; end + + # A factory class to handle parsing of tags, defaults to {default_factory} + # + # source://yard//lib/yard/tags/library.rb#258 + def factory=(_arg0); end + + # source://yard//lib/yard/tags/library.rb#202 + def group_directive(tag, parser); end + + # @param tag_name [#to_s] the name of the tag to look for + # @return [Boolean] whether a directive by the given name is registered in + # the library. + # + # source://yard//lib/yard/tags/library.rb#280 + def has_directive?(tag_name); end + + # @param tag_name [#to_s] the name of the tag to look for + # @return [Boolean] whether a tag by the given name is registered in + # the library. + # + # source://yard//lib/yard/tags/library.rb#267 + def has_tag?(tag_name); end + + # source://yard//lib/yard/tags/library.rb#202 + def macro_directive(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def method_directive(tag, parser); end + + # Adds an emphasized note at the top of the docstring for the object + # + # @example + # # @note This method should only be used in outer space. + # def eject; end + # @see tag:todo + # + # source://yard//lib/yard/tags/library.rb#168 + def note_tag(text); end + + # Describe an options hash in a method. The tag takes the + # name of the options parameter first, followed by optional types, + # the option key name, a default value for the key and a + # description of the option. The default value should be placed within + # parentheses and is optional (can be omitted). + # + # Note that a +@param+ tag need not be defined for the options + # hash itself, though it is useful to do so for completeness. + # + # @example + # # @param [Hash] opts the options to create a message with. + # # @option opts [String] :subject The subject + # # @option opts [String] :from ('nobody') From address + # # @option opts [String] :to Recipient email + # # @option opts [String] :body ('') The email's body + # def send_email(opts = {}) end + # @note For keyword parameters, use +@param+, not +@option+. + # + # source://yard//lib/yard/tags/library.rb#168 + def option_tag(text); end + + # Describe that your method can be used in various + # contexts with various parameters or return types. The first + # line should declare the new method signature, and the following + # indented tag data will be a new documentation string with its + # own tags adding metadata for such an overload. + # + # @example + # # @overload set(key, value) + # # Sets a value on key + # # @param key [Symbol] describe key param + # # @param value [Object] describe value param + # # @overload set(value) + # # Sets a value on the default key +:foo+ + # # @param value [Object] describe value param + # def set(*args) end + # + # source://yard//lib/yard/tags/library.rb#161 + def overload_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def override_directive(tag, parser); end + + # Documents a single method parameter (either regular or keyword) with a given name, type + # and optional description. + # + # @example + # # @param url [String] the URL of the page to download + # # @param directory [String] the name of the directory to save to + # def load_page(url, directory: 'pages') end + # + # source://yard//lib/yard/tags/library.rb#168 + def param_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def param_tuple_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def parse_directive(tag, parser); end + + # Declares that the _logical_ visibility of an object is private. + # In other words, it specifies that this method should be marked + # private but cannot due to Ruby's visibility restrictions. This + # exists for classes, modules and constants that do not obey Ruby's + # visibility rules. For instance, an inner class might be considered + # "private", though Ruby would make no such distinction. + # + # This tag is meant to be used in conjunction with the +--no-private+ + # command-line option, and is required to actually remove these objects + # from documentation output. See {file:README.md} for more information on + # switches. + # + # If you simply want to set the API visibility of a method, you should + # look at the {tag:api} tag instead. + # + # @example + # # @private + # class InteralImplementation; end + # @note This method is not recommended for hiding undocumented or + # "unimportant" methods. This tag should only be used to mark objects + # private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you + # can use +private_constant+ to declare constants (like classes or + # modules) as private, and should be used instead of +@private+. + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # @see tag:api + # + # source://yard//lib/yard/tags/library.rb#168 + def private_tag(text); end + + # Describes that a method may raise a given exception, with + # an optional description of what it may mean. + # + # @example + # # @raise [AccountBalanceError] if the account does not have + # # sufficient funds to perform the transaction + # def withdraw(amount) end + # + # source://yard//lib/yard/tags/library.rb#168 + def raise_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def return_single_parameter_tag(text); end + + # Describes the return value (and type or types) of a method. + # You can list multiple return tags for a method in the case + # where a method has distinct return cases. In this case, each + # case should begin with "if ...". + # + # @example A regular return value + # # @return [Fixnum] the size of the file + # def size; @file.size end + # @example A method returns an Array or a single object + # # @return [String] if a single object was returned + # # from the database. + # # @return [Array<String>] if multiple objects were + # # returned. + # def find(query) end + # + # source://yard//lib/yard/tags/library.rb#168 + def return_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def return_value_parameter_tag(text); end + + # Sets the scope of a DSL method. Only applicable to DSL method + # calls. Acceptable values are 'class' or 'instance' + # + # source://yard//lib/yard/tags/library.rb#202 + def scope_directive(tag, parser); end + + # "See Also" references for an object. Accepts URLs or + # other code objects with an optional description at the end. + # Note that the URL or object will be automatically linked by + # YARD and does not need to be formatted with markup. + # + # @example + # # Synchronizes system time using NTP. + # # @see http://ntp.org/documentation.html NTP Documentation + # # @see NTPHelperMethods + # class NTPUpdater; end + # + # source://yard//lib/yard/tags/library.rb#168 + def see_tag(text); end + + # Lists the version that the object was first added. + # + # @example + # # @since 1.2.4 + # def clear_routes; end + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # + # source://yard//lib/yard/tags/library.rb#168 + def since_tag(text); end + + # Creates a new {Tag} object with a given tag name and data + # + # @return [Tag] the newly created tag object + # + # source://yard//lib/yard/tags/library.rb#273 + def tag_create(tag_name, tag_buf); end + + # Marks a TODO note in the object being documented. + # For reference, objects with TODO items can be enumerated + # from the command line with a simple command: + # + # !!!sh + # mocker$ yard list --query '@todo' + # lib/mocker/mocker.rb:15: Mocker + # lib/mocker/report/html.rb:5: Mocker::Report::Html + # + # YARD can also be used to enumerate the TODO items from + # a short script: + # + # !!!ruby + # require 'yard' + # YARD::Registry.load!.all.each do |o| + # puts o.tag(:todo).text if o.tag(:todo) + # end + # + # @example + # # @todo Add support for Jabberwocky service. + # # There is an open source Jabberwocky library available + # # at http://jbrwcky.org that can be easily integrated. + # class Wonderlander; end + # @see tag:note + # + # source://yard//lib/yard/tags/library.rb#168 + def todo_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def type_tag(text); end + + # Lists the version of a class, module or method. This is + # similar to a library version, but at finer granularity. + # In some cases, version of specific modules, classes, methods + # or generalized components might change independently between + # releases. A version tag is used to infer the API compatibility + # of a specific object. + # + # @example + # # The public REST API for http://jbrwcky.org + # # @version 2.0 + # class JabberwockyAPI; end + # + # source://yard//lib/yard/tags/library.rb#168 + def version_tag(text); end + + # Sets the visibility of a DSL method. Only applicable to + # DSL method calls. Acceptable values are public, protected, or private. + # + # source://yard//lib/yard/tags/library.rb#202 + def visibility_directive(tag, parser); end + + # Describes what a method might yield to a given block. + # The types specifier list should not list types, but names + # of the parameters yielded to the block. If you define + # parameters with +@yieldparam+, you do not need to define + # the parameters in the type specification of +@yield+ as + # well. + # + # @example + # # For a block {|a,b,c| ... } + # # @yield [a, b, c] Gives 3 random numbers to the block + # def provide3values(&block) yield(42, 42, 42) end + # @see tag:yieldparam + # @see tag:yieldreturn + # + # source://yard//lib/yard/tags/library.rb#168 + def yield_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def yieldparam_single_parameter_tag(text); end + + # Defines a parameter yielded by a block. If you define the + # parameters with +@yieldparam+, you do not need to define + # them via +@yield+ as well. + # + # @example + # # @yieldparam [String] name the name that is yielded + # def with_name(name) yield(name) end + # + # source://yard//lib/yard/tags/library.rb#168 + def yieldparam_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def yieldpublic_tag(text); end + + # Documents the value and type that the block is expected + # to return to the method. + # + # @example + # # @yieldreturn [Fixnum] the number to add 5 to. + # def add5_block(&block) 5 + yield end + # @see tag:return + # + # source://yard//lib/yard/tags/library.rb#168 + def yieldreturn_tag(text); end + + # source://yard//lib/yard/tags/library.rb#168 + def yieldself_tag(text); end + + private + + # @return [Directive] + # + # source://yard//lib/yard/tags/library.rb#244 + def directive_call(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#233 + def send_to_factory(tag_name, meth, text); end + + class << self + # Replace the factory object responsible for parsing tags by setting + # this to an object (or class) that responds to +parse_TAGNAME+ methods + # where +TAGNAME+ is the name of the tag. + # + # You should set this value before performing any source parsing with + # YARD, otherwise your factory class will not be used. + # + # @example + # YARD::Tags::Library.default_factory = MyFactory + # @see DefaultFactory + # + # source://yard//lib/yard/tags/library.rb#83 + def default_factory; end + + # Replace the factory object responsible for parsing tags by setting + # this to an object (or class) that responds to +parse_TAGNAME+ methods + # where +TAGNAME+ is the name of the tag. + # + # You should set this value before performing any source parsing with + # YARD, otherwise your factory class will not be used. + # + # @example + # YARD::Tags::Library.default_factory = MyFactory + # @see DefaultFactory + # + # source://yard//lib/yard/tags/library.rb#87 + def default_factory=(factory); end + + # @overload define_directive + # + # source://yard//lib/yard/tags/library.rb#196 + def define_directive(tag, tag_meth = T.unsafe(nil), directive_class = T.unsafe(nil)); end + + # Convenience method to define a new tag using one of {Tag}'s factory methods, or the + # regular {DefaultFactory#parse_tag} factory method if none is supplied. + # + # @param label [#to_s] the label used when displaying the tag in templates + # @param tag [#to_s] the tag name to create + # @param meth [#to_s, Class<Tag>] the {Tag} factory method to call when + # creating the tag or the name of the class to directly create a tag for + # + # source://yard//lib/yard/tags/library.rb#157 + def define_tag(label, tag, meth = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/library.rb#220 + def directive_method_name(tag_name); end + + # Returns the factory method used to parse the tag text for a specific tag + # + # @param tag [Symbol] the tag name + # @return [Symbol] the factory method name for the tag + # @return [Class<Tag>, Symbol] the Tag class to use to parse the tag + # or the method to call on the factory class + # @return [nil] if the tag is freeform text + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#99 + def factory_method_for(tag); end + + # Returns the factory method used to parse the tag text for a specific + # directive + # + # @param directive [Symbol] the directive name + # @return [Symbol] the factory method name for the tag + # @return [Class<Tag>, Symbol] the Tag class to use to parse the tag or + # the methods to call on the factory class + # @return [nil] if the tag is freeform text + # @since 0.8.0 + # + # source://yard//lib/yard/tags/library.rb#112 + def factory_method_for_directive(directive); end + + # @return [Library] the main Library instance object. + # + # source://yard//lib/yard/tags/library.rb#67 + def instance; end + + # @return [SymbolHash{Symbol=>String}] the map of tag names and their + # respective display labels. + # + # source://yard//lib/yard/tags/library.rb#63 + def labels; end + + # Sorts the labels lexically by their label name, often used when displaying + # the tags. + # + # @return [Array<Symbol>, String] the sorted labels as an array of the tag name and label + # + # source://yard//lib/yard/tags/library.rb#142 + def sorted_labels; end + + # source://yard//lib/yard/tags/library.rb#216 + def tag_method_name(tag_name); end + + # Sets the list of tags that should apply to any children inside the + # namespace they are defined in. For instance, a "@since" tag should + # apply to all methods inside a module it is defined in. Transitive + # tags can be overridden by directly defining a tag on the child object. + # + # @return [Array<Symbol>] a list of transitive tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#136 + def transitive_tags; end + + # Sets the list of tags that should apply to any children inside the + # namespace they are defined in. For instance, a "@since" tag should + # apply to all methods inside a module it is defined in. Transitive + # tags can be overridden by directly defining a tag on the child object. + # + # @return [Array<Symbol>] a list of transitive tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#136 + def transitive_tags=(_arg0); end + + # Sets the list of tags to display when rendering templates. The order of + # tags in the list is also significant, as it represents the order that + # tags are displayed in templates. + # + # You can use the {Array#place} to insert new tags to be displayed in + # the templates at specific positions: + # + # Library.visible_tags.place(:mytag).before(:return) + # + # @return [Array<Symbol>] a list of ordered tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#127 + def visible_tags; end + + # Sets the list of tags to display when rendering templates. The order of + # tags in the list is also significant, as it represents the order that + # tags are displayed in templates. + # + # You can use the {Array#place} to insert new tags to be displayed in + # the templates at specific positions: + # + # Library.visible_tags.place(:mytag).before(:return) + # + # @return [Array<Symbol>] a list of ordered tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#127 + def visible_tags=(_arg0); end + + private + + # source://yard//lib/yard/tags/library.rb#226 + def tag_or_directive_method_name(tag_name, type = T.unsafe(nil)); end + end +end + +# Defines a block of text to be expanded whenever the macro is called by name +# in subsequent docstrings. The macro data can be any arbitrary text data, be +# it regular documentation, meta-data tags or directives. +# +# == Defining a Macro +# +# A macro must first be defined in order to be used. Note that a macro is also +# expanded upon definition if it defined on an object (the docstring of a +# method, class, module or constant object as opposed to a free standing +# comment). To define a macro, use the "new" or "attach" identifier in the +# types specifier list. A macro will also automatically be created if an +# indented macro data block is given, so the keywords are not strictly needed. +# +# === Anonymous Macros +# +# In addition to standard named macros, macros can be defined anonymously if +# no name is given. In this case, they can not be re-used in future docstrings, +# but they will expand in the first definition. This is useful when needing +# to take advantage of the macro expansion variables (described below). +# +# == Using a Macro +# +# To re-use a macro in another docstring after it is defined, simply use +# <tt>@!macro the_name</tt> with no indented block of macro data. The resulting +# data will be expanded in place. +# +# == Attaching a Macro to a DSL Method +# +# Macros can be defined to auto-expand on DSL-style class method calls. To +# define a macro to be auto expanded in this way, use the "attach" keyword +# in the type specifier list ("new" is implied). +# +# Attached macros can also be attached directly on the class method declaration +# that provides the DSL method to its subclasses. The syntax in either case +# is the same. +# +# == Macro Expansion Variables +# +# In the case of using macros on DSL-style method calls, a number of expansion +# variables can be used for interpolation inside of the macro data. The variables, +# similar in syntax to Ruby's global variables, are as follows: +# +# * $0 - the method name being called +# * $1, $2, $3, ... - the Nth argument in the method call +# * $& - the full source line +# +# The following example shows what the expansion variables might hold for a given +# DSL method call: +# +# property :foo, :a, :b, :c, String +# # $0 => "property" +# # $1 => "foo" +# # $2 => "a" +# # $& => "property :foo, :a, :b, :c, String" +# +# === Ranges +# +# Ranges are also acceptable with the syntax <tt>${N-M}</tt>. Negative values +# on either N or M are valid, and refer to indexes from the end of the list. +# Consider a DSL method that creates a method using the first argument with +# argument names following, ending with the return type of the method. This +# could be documented as: +# +# # @!macro dsl_method +# # @!method $1(${2--2}) +# # @return [${-1}] the return value of $0 +# create_method_with_args :foo, :a, :b, :c, String +# +# As described, the method is using the signature <tt>foo(a, b, c)</tt> and the return +# type from the last argument, +String+. When using ranges, tokens are joined +# with commas. Note that this includes using $0: +# +# !!!plain +# $0-1 # => Interpolates to "create_method_with_args, foo" +# +# If you want to separate them with spaces, use <tt>$1 $2 $3 $4 ...</tt>. Note that +# if the token cannot be expanded, it will return the empty string (not an error), +# so it would be safe to list <tt>$1 $2 ... $10</tt>, for example. +# +# === Escaping Interpolation +# +# Interpolation can be escaped by prefixing the +$+ with +\\\+, like so: +# +# # @!macro foo +# # I have \$2.00 USD. +# +# @example Defining a simple macro +# # @!macro [new] returnself +# # @return [self] returns itself +# @example Using a simple macro in multiple docstrings +# # Documentation for map +# # ... +# # @macro returnself +# def map; end +# +# # Documentation for filter +# # ... +# # @macro returnself +# def filter; end +# @example Attaching a macro to a class method (for DSL usage) +# class Resource +# # Defines a new property +# # @param [String] name the property name +# # @param [Class] type the property's type +# # @!macro [attach] property +# # @return [$2] the $1 property +# def self.property(name, type) end +# end +# +# class Post < Resource +# property :title, String +# property :view_count, Integer +# end +# @example Attaching a macro directly to a DSL method +# class Post < Resource +# # @!macro [attach] property +# # @return [$2] the $1 property +# property :title, String +# +# # Macro will expand on this definition too +# property :view_count, Integer +# end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#258 +class YARD::Tags::MacroDirective < ::YARD::Tags::Directive + # @raise [TagFormatError] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#259 + def call; end + + private + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#288 + def anonymous?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#277 + def attach?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#283 + def class_method?; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#292 + def expand(macro_data); end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#308 + def find_or_create; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#272 + def new?; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#332 + def warn; end +end + +# Defines a method object with a given method signature, using indented +# block data as the method's docstring. The signature is similar to the +# {tag:overload} tag. The comment containing this directive does not need +# to be attached to any source, but if it is, that source code will be +# used as the method's source. +# +# To define an attribute method, see {tag:!attribute} +# +# @example Defining a simple method +# # @!method quit(username, message = "Quit") +# # Sends a quit message to the server for a +username+. +# # @param [String] username the username to quit +# # @param [String] message the quit message +# quit_message_method +# @example Attaching multiple methods to the same source +# # @!method method1 +# # @!method method2 +# create_methods :method1, :method2 +# @note This directive should only be used if there is no explicit +# declaration for the method in any source files (i.e., the method +# is declared dynamically via meta-programming). In all other cases, add +# documentation to the method definition itself. +# @note For backwards compatibility support, you do not need to indent +# the method's docstring text. If a +@!method+ directive is seen with +# no indented block, the entire docstring is used as the new method's +# docstring text. +# @see tag:!attribute +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#368 +class YARD::Tags::MethodDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#373 + def after_parse; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#371 + def call; end + + protected + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#413 + def create_object; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#381 + def method_name; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#390 + def method_signature; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#394 + def sanitized_tag_signature; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#403 + def use_indented_text; end +end + +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#369 +YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/tags/option_tag.rb#4 +class YARD::Tags::OptionTag < ::YARD::Tags::Tag + # @return [OptionTag] a new instance of OptionTag + # + # source://yard//lib/yard/tags/option_tag.rb#7 + def initialize(tag_name, name, pair); end + + # Returns the value of attribute pair. + # + # source://yard//lib/yard/tags/option_tag.rb#5 + def pair; end + + # Sets the attribute pair + # + # @param value the value to set the attribute pair to. + # + # source://yard//lib/yard/tags/option_tag.rb#5 + def pair=(_arg0); end +end + +# source://yard//lib/yard/tags/overload_tag.rb#4 +class YARD::Tags::OverloadTag < ::YARD::Tags::Tag + # @return [OverloadTag] a new instance of OverloadTag + # + # source://yard//lib/yard/tags/overload_tag.rb#7 + def initialize(tag_name, text); end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def docstring; end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#15 + def has_tag?(name); end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#36 + def is_a?(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#36 + def kind_of?(other); end + + # source://yard//lib/yard/tags/overload_tag.rb#28 + def method_missing(*args, &block); end + + # source://yard//lib/yard/tags/overload_tag.rb#23 + def name(prefix = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/overload_tag.rb#17 + def object=(value); end + + # Returns the value of attribute parameters. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def parameters; end + + # Returns the value of attribute signature. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def signature; end + + # source://yard//lib/yard/tags/overload_tag.rb#13 + def tag(name); end + + # source://yard//lib/yard/tags/overload_tag.rb#14 + def tags(name = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/overload_tag.rb#32 + def type; end + + private + + # source://yard//lib/yard/tags/overload_tag.rb#53 + def parse_signature; end + + # source://yard//lib/yard/tags/overload_tag.rb#43 + def parse_tag(text); end +end + +# Parses a block of code as if it were present in the source file at that +# location. This directive is useful if a class has dynamic meta-programmed +# behaviour that cannot be recognized by YARD. +# +# You can specify the language of the code block using the types +# specification list. By default, the code language is "ruby". +# +# @example Documenting dynamic module inclusion +# class User +# # includes "UserMixin" and extends "UserMixin::ClassMethods" +# # using the UserMixin.included callback. +# # @!parse include UserMixin +# # @!parse extend UserMixin::ClassMethods +# end +# @example Declaring a method as an attribute +# # This should really be an attribute +# # @!parse attr_reader :foo +# def object; @parent.object end +# @example Parsing C code +# # @!parse [c] +# # void Init_Foo() { +# # rb_define_method(rb_cFoo, "method", method, 0); +# # } +# @since 0.8.0 +# +# source://yard//lib/yard/tags/directives.rb#545 +class YARD::Tags::ParseDirective < ::YARD::Tags::Directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#546 + def call; end +end + +# source://yard//lib/yard/tags/ref_tag.rb#4 +module YARD::Tags::RefTag + # Returns the value of attribute owner. + # + # source://yard//lib/yard/tags/ref_tag.rb#5 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/tags/ref_tag.rb#5 + def owner=(_arg0); end +end + +# source://yard//lib/yard/tags/ref_tag_list.rb#4 +class YARD::Tags::RefTagList + # @return [RefTagList] a new instance of RefTagList + # + # source://yard//lib/yard/tags/ref_tag_list.rb#7 + def initialize(tag_name, owner, name = T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def name=(_arg0); end + + # Returns the value of attribute owner. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def owner=(_arg0); end + + # Returns the value of attribute tag_name. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def tag_name; end + + # Sets the attribute tag_name + # + # @param value the value to set the attribute tag_name to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def tag_name=(_arg0); end + + # source://yard//lib/yard/tags/ref_tag_list.rb#13 + def tags; end +end + +# Modifies the current parsing scope (class or instance). If this +# directive is defined on a docstring attached to an object definition, +# it is applied only to that object. Otherwise, it applies the scope +# to all future objects in the namespace. +# +# @example Modifying the scope of a DSL method +# # @!scope class +# cattr_accessor :subclasses +# @example Modifying the scope of a set of methods +# # @!scope class +# +# # Documentation for method1 +# def method1; end +# +# # Documentation for method2 +# def method2; end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#579 +class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#580 + def call; end +end + +# Represents a metadata tag value (+@tag+). Tags can have any combination of +# {#types}, {#name} and {#text}, or none of the above. +# +# @example Programmatic tag creation +# # The following docstring syntax: +# # @param [String, nil] arg an argument +# # +# # is equivalent to: +# Tag.new(:param, 'an argument', ['String', 'nil'], 'arg') +# +# source://yard//lib/yard/tags/tag.rb#13 +class YARD::Tags::Tag + # Creates a new tag object with a tag name and text. Optionally, formally declared types + # and a key name can be specified. + # + # Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc. + # + # Key names are for tags that declare meta data for a specific key or name, such as +param+, + # +raise+, etc. + # + # @param tag_name [#to_s] the tag name to create the tag for + # @param text [String] the descriptive text for this tag + # @param types [Array<String>] optional type list of formally declared types + # for the tag + # @param name [String] optional key name which the tag refers to + # @return [Tag] a new instance of Tag + # + # source://yard//lib/yard/tags/tag.rb#44 + def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end + + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/tag.rb#65 + def explain_types; end + + # @return [String] a name associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#26 + def name; end + + # @return [String] a name associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#26 + def name=(_arg0); end + + # @return [CodeObjects::Base] the associated object + # + # source://yard//lib/yard/tags/tag.rb#29 + def object; end + + # @return [CodeObjects::Base] the associated object + # + # source://yard//lib/yard/tags/tag.rb#29 + def object=(_arg0); end + + # @return [String] the name of the tag + # + # source://yard//lib/yard/tags/tag.rb#15 + def tag_name; end + + # @return [String] the name of the tag + # + # source://yard//lib/yard/tags/tag.rb#15 + def tag_name=(_arg0); end + + # @return [String] the tag text associated with the tag + # @return [nil] if no tag text is supplied + # + # source://yard//lib/yard/tags/tag.rb#19 + def text; end + + # @return [String] the tag text associated with the tag + # @return [nil] if no tag text is supplied + # + # source://yard//lib/yard/tags/tag.rb#19 + def text=(_arg0); end + + # Convenience method to access the first type specified. This should mainly + # be used for tags that only specify one type. + # + # @return [String] the first of the list of specified types + # @see #types + # + # source://yard//lib/yard/tags/tag.rb#56 + def type; end + + # @return [Array<String>] a list of types associated with the tag + # @return [nil] if no types are associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#23 + def types; end + + # @return [Array<String>] a list of types associated with the tag + # @return [nil] if no types are associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#23 + def types=(_arg0); end +end + +# source://yard//lib/yard/tags/tag_format_error.rb#4 +class YARD::Tags::TagFormatError < ::RuntimeError; end + +# source://yard//lib/yard/tags/types_explainer.rb#6 +class YARD::Tags::TypesExplainer + class << self + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @param types [Array<String>] a list of types to parse and summarize + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/types_explainer.rb#9 + def explain(*types); end + + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @param types [Array<String>] a list of types to parse and summarize + # @raise [SyntaxError] if the types are not parsable + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/types_explainer.rb#17 + def explain!(*types); end + + private + + def new(*_arg0); end + end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#58 +class YARD::Tags::TypesExplainer::CollectionType < ::YARD::Tags::TypesExplainer::Type + # @return [CollectionType] a new instance of CollectionType + # + # source://yard//lib/yard/tags/types_explainer.rb#61 + def initialize(name, types); end + + # source://yard//lib/yard/tags/types_explainer.rb#66 + def to_s(_singular = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://yard//lib/yard/tags/types_explainer.rb#59 + def types; end + + # Sets the attribute types + # + # @param value the value to set the attribute types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#59 + def types=(_arg0); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#72 +class YARD::Tags::TypesExplainer::FixedCollectionType < ::YARD::Tags::TypesExplainer::CollectionType + # source://yard//lib/yard/tags/types_explainer.rb#73 + def to_s(_singular = T.unsafe(nil)); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#79 +class YARD::Tags::TypesExplainer::HashCollectionType < ::YARD::Tags::TypesExplainer::Type + # @return [HashCollectionType] a new instance of HashCollectionType + # + # source://yard//lib/yard/tags/types_explainer.rb#82 + def initialize(name, key_types, value_types); end + + # Returns the value of attribute key_types. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def key_types; end + + # Sets the attribute key_types + # + # @param value the value to set the attribute key_types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def key_types=(_arg0); end + + # source://yard//lib/yard/tags/types_explainer.rb#88 + def to_s(_singular = T.unsafe(nil)); end + + # Returns the value of attribute value_types. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def value_types; end + + # Sets the attribute value_types + # + # @param value the value to set the attribute value_types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def value_types=(_arg0); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#96 +class YARD::Tags::TypesExplainer::Parser + include ::YARD::CodeObjects + + # @return [Parser] a new instance of Parser + # + # source://yard//lib/yard/tags/types_explainer.rb#117 + def initialize(string); end + + # source://yard//lib/yard/tags/types_explainer.rb#121 + def parse; end + + class << self + # source://yard//lib/yard/tags/types_explainer.rb#113 + def parse(string); end + end +end + +# source://yard//lib/yard/tags/types_explainer.rb#99 +YARD::Tags::TypesExplainer::Parser::TOKENS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#26 +class YARD::Tags::TypesExplainer::Type + # @return [Type] a new instance of Type + # + # source://yard//lib/yard/tags/types_explainer.rb#29 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/tags/types_explainer.rb#27 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/tags/types_explainer.rb#27 + def name=(_arg0); end + + # source://yard//lib/yard/tags/types_explainer.rb#33 + def to_s(singular = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/tags/types_explainer.rb#45 + def list_join(list); end +end + +# Modifies the current parsing visibility (public, protected, or private). +# If this directive is defined on a docstring attached to an object +# definition, it is applied only to that object. Otherwise, it applies +# the visibility to all future objects in the namespace. +# +# @example Modifying the visibility of a DSL method +# # @!visibility private +# cattr_accessor :subclasses +# @example Modifying the visibility of a set of methods +# # Note that Ruby's "protected" is recommended over this directive +# # @!visibility protected +# +# # Documentation for method1 +# def method1; end +# +# # Documentation for method2 +# def method2; end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#611 +class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#612 + def call; end +end + +# Namespace for templating system +# +# source://yard//lib/yard/autoload.rb#271 +module YARD::Templates; end + +# This module manages all creation, handling and rendering of {Template} +# objects. +# +# * To create a template object at a path, use {template}. +# * To render a template, call {render}. +# * To register a template path in the lookup paths, call {register_template_path}. +# +# source://yard//lib/yard/templates/engine.rb#12 +module YARD::Templates::Engine + class << self + # Passes a set of objects to the +:fulldoc+ template for full documentation generation. + # This is called by {CLI::Yardoc} to most commonly perform HTML + # documentation generation. + # + # @param objects [Array<CodeObjects::Base>] a list of {CodeObjects::Base} + # objects to pass to the template + # @param options [Hash] (see {render}) + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#101 + def generate(objects, options = T.unsafe(nil)); end + + # Registers a new template path in {template_paths} + # + # @param path [String] a new template path + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#21 + def register_template_path(path); end + + # Renders a template on a {CodeObjects::Base code object} using + # a set of default (overridable) options. Either the +:object+ + # or +:type+ keys must be provided. + # + # If a +:serializer+ key is provided and +:serialize+ is not set to + # false, the rendered contents will be serialized through the {Serializers::Base} + # object. See {with_serializer}. + # + # @example Renders an object with html formatting + # Engine.render(:format => :html, :object => obj) + # @example Renders without an object + # Engine.render(:type => :fulldoc, :otheropts => somevalue) + # @option options + # @option options + # @option options + # @param options [Hash] the options hash + # @return [String] the rendered template + # + # source://yard//lib/yard/templates/engine.rb#82 + def render(options = T.unsafe(nil)); end + + # Creates a template module representing the path. Searches on disk + # for the first directory named +path+ (joined by '/') within the + # template paths and builds a template module for. All other matching + # directories in other template paths will be included in the + # generated module as mixins (for overriding). + # + # @param path [Array<String, Symbol>] a list of path components + # @raise [ArgumentError] if the path does not exist within one of the + # {template_paths} on disk. + # @return [Template] the module representing the template + # + # source://yard//lib/yard/templates/engine.rb#35 + def template(*path); end + + # Forces creation of a template at +path+ within a +full_path+. + # + # @param path [String] the path name of the template + # @param full_paths [Array<String>] the full path on disk of the template + # @return [Template] the template module representing the +path+ + # + # source://yard//lib/yard/templates/engine.rb#53 + def template!(path, full_paths = T.unsafe(nil)); end + + # @return [Array<String>] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#15 + def template_paths; end + + # @return [Array<String>] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#15 + def template_paths=(_arg0); end + + # Serializes the results of a block with a +serializer+ object. + # + # @param object [CodeObjects::Base] the code object to serialize + # @param serializer [Serializers::Base] the serializer object + # @see Serializers::Base + # @yield a block whose result will be serialize + # @yieldreturn [String] the contents to serialize + # + # source://yard//lib/yard/templates/engine.rb#115 + def with_serializer(object, serializer); end + + private + + # Searches through the registered {template_paths} and returns + # all full directories that have the +path+ within them on disk. + # + # @param from_template [Template] if provided, allows a relative + # path to be specified from this template's full path. + # @param path [String] the path component to search for in the + # {template_paths} + # @return [Array<String>] a list of full paths that are existing + # candidates for a template module + # + # source://yard//lib/yard/templates/engine.rb#161 + def find_template_paths(from_template, path); end + + # Sets default options on the options hash + # + # @option options + # @option options + # @option options + # @param options [Hash] the options hash + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#141 + def set_default_options(options = T.unsafe(nil)); end + + # The name of the module that represents a +path+ + # + # @param path [String] the path to generate a module name for + # @return [String] the module name + # + # source://yard//lib/yard/templates/engine.rb#176 + def template_module_name(path); end + end +end + +# @since 0.5.4 +# +# source://yard//lib/yard/templates/erb_cache.rb#5 +module YARD::Templates::ErbCache + class << self + # @since 0.5.4 + # + # source://yard//lib/yard/templates/erb_cache.rb#17 + def clear!; end + + # @since 0.5.4 + # + # source://yard//lib/yard/templates/erb_cache.rb#6 + def method_for(filename); end + end +end + +# Namespace for template helpers +# +# source://yard//lib/yard/autoload.rb#272 +module YARD::Templates::Helpers; end + +# The base helper module included in all templates. +# +# source://yard//lib/yard/templates/helpers/base_helper.rb#4 +module YARD::Templates::Helpers::BaseHelper + # @example + # s = format_object_title ModuleObject.new(:root, :MyModuleName) + # s # => "Module: MyModuleName" + # @param object [CodeObjects::Base] the object to retrieve a title for + # @return [String] the page title name for a given object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#196 + def format_object_title(object); end + + # @example Formatted type of an exception class + # o = ClassObject.new(:root, :MyError) + # o.superclass = P('RuntimeError') + # format_object_type(o) # => "Exception" + # @example Formatted type of a method + # o = MethodObject.new(:root, :to_s) + # format_object_type(o) # => "Method" + # @param object [CodeObjects::Base] the object to retrieve the type for + # @return [String] the human-readable formatted {CodeObjects::Base#type #type} + # for the object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#182 + def format_object_type(object); end + + # Indents and formats source code + # + # @param value [String] the input source code + # @return [String] formatted source code + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#209 + def format_source(value); end + + # Formats a list of return types for output and links each type. + # + # @example Formatting types + # format_types(['String', 'Array']) #=> "(String, Array)" + # @example Formatting types without surrounding brackets + # format_types(['String', 'Array'], false) #=> "String, Array" + # @param list [Array<String>] a list of types + # @param brackets [Boolean] whether to surround the types in brackets + # @return [String] the formatted list of Ruby types + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#168 + def format_types(list, brackets = T.unsafe(nil)); end + + # An object that keeps track of global state throughout the entire template + # rendering process (including any sub-templates). + # + # @return [OpenStruct] a struct object that stores state + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#20 + def globals; end + + # Escapes text. This is used a lot by the HtmlHelper and there should + # be some helper to "clean up" text for whatever, this is it. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#38 + def h(text); end + + # Links to an extra file + # + # @param filename [String] the filename to link to + # @param title [String] the title of the link + # @param anchor [String] optional anchor + # @return [String] the link to the file + # @since 0.5.5 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#152 + def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end + + # Include a file as a docstring in output + # + # @param file [String] the filename to include + # @return [String] the file's contents + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#113 + def link_include_file(file); end + + # Includes an object's docstring into output. + # + # @param obj [CodeObjects::Base] the object to include + # @return [String] the object's docstring (no tags) + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#105 + def link_include_object(obj); end + + # Links to an object with an optional title + # + # @param obj [CodeObjects::Base] the object to link to + # @param title [String] the title to use for the link + # @return [String] the linked object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#122 + def link_object(obj, title = T.unsafe(nil)); end + + # Links to a URL + # + # @param url [String] the URL to link to + # @param title [String] the optional title to display the link as + # @param params [Hash] optional parameters for the link + # @return [String] the linked URL + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#141 + def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end + + # Links objects or URLs. This method will delegate to the correct +link_+ + # method depending on the arguments passed in. + # + # @example Linking a URL + # linkify('http://example.com') + # @example Including docstring contents of an object + # linkify('include:YARD::Docstring') + # @example Linking to an extra file + # linkify('file:README') + # @example Linking an object by path + # linkify('YARD::Docstring') + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#55 + def linkify(*args); end + + # Returns the value of attribute object. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def object=(_arg0); end + + # @return [CodeObjects::Base] the object representing the current generated + # page. Might not be the current {#object} when inside sub-templates. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#11 + def owner; end + + # Runs a list of objects against the {Verifier} object passed into the + # template and returns the subset of verified objects. + # + # @param list [Array<CodeObjects::Base>] a list of code objects + # @return [Array<CodeObjects::Base>] a list of code objects that match + # the verifier. If no verifier is supplied, all objects are returned. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#30 + def run_verifier(list); end + + # Returns the value of attribute serializer. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def serializer; end + + # Sets the attribute serializer + # + # @param value the value to set the attribute serializer to. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def serializer=(_arg0); end +end + +# Helpers for various object types +# +# source://yard//lib/yard/templates/helpers/filter_helper.rb#5 +module YARD::Templates::Helpers::FilterHelper + # @return [Boolean] whether an object is a class + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#17 + def is_class?(object); end + + # @return [Boolean] whether an object is a method + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#7 + def is_method?(object); end + + # @return [Boolean] whether an object is a module + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#22 + def is_module?(object); end + + # @return [Boolean] whether an object is a namespace + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#12 + def is_namespace?(object); end +end + +# The helper module for HTML templates. +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#7 +module YARD::Templates::Helpers::HtmlHelper + include ::YARD::Templates::Helpers::MarkupHelper + include ::YARD::Templates::Helpers::ModuleHelper + include ::YARD::Templates::Helpers::HtmlSyntaxHighlightHelper + + # @param object [CodeObjects::Base] the object to get an anchor for + # @return [String] the anchor for a specific object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#347 + def anchor_for(object); end + + # Returns the current character set. The default value can be overridden + # by setting the +LANG+ environment variable or by overriding this + # method. In Ruby 1.9 you can also modify this value by setting + # +Encoding.default_external+. + # + # @return [String] the current character set + # @since 0.5.4 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#574 + def charset; end + + # Formats a list of objects and links them + # + # @return [String] a formatted list of objects + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#458 + def format_object_name_list(objects); end + + # Formats a list of types from a tag. + # + # @param typelist [Array<String>, FalseClass] the list of types to be formatted. + # @param brackets [Boolean] omits the surrounding + # brackets if +brackets+ is set to +false+. + # @return [String] the list of types formatted + # as [Type1, Type2, ...] with the types linked + # to their respective descriptions. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#476 + def format_types(typelist, brackets = T.unsafe(nil)); end + + # Escapes HTML entities + # + # @param text [String] the text to escape + # @return [String] the HTML with escaped entities + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#23 + def h(text); end + + # Converts Asciidoc to HTML + # + # @param text [String] input Asciidoc text + # @return [String] output HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#109 + def html_markup_asciidoc(text); end + + # Converts HTML to HTML + # + # @param text [String] input html + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#168 + def html_markup_html(text); end + + # Converts Markdown to HTML + # + # @param text [String] input Markdown text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#78 + def html_markup_markdown(text); end + + # @return [String] the same text with no markup + # @since 0.6.6 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#160 + def html_markup_none(text); end + + # Converts org-mode to HTML + # + # @param text [String] input org-mode text + # @return [String] output HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#102 + def html_markup_org(text); end + + # Converts plaintext to pre-formatted HTML + # + # @param text [String] the input text + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#146 + def html_markup_pre(text); end + + # Converts RDoc formatting (SimpleMarkup) to HTML + # + # @param text [String] the input RDoc formatted text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#136 + def html_markup_rdoc(text); end + + # Highlights Ruby source. Similar to {#html_syntax_highlight}, but + # this method is meant to be called from {#htmlify} when markup is + # set to "ruby". + # + # @param source [String] the Ruby source + # @return [String] the highlighted HTML + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#179 + def html_markup_ruby(source); end + + # Converts plaintext to regular HTML + # + # @param text [String] the input text + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#154 + def html_markup_text(text); end + + # Converts Textile to HTML + # + # @param text [String] the input Textile text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#118 + def html_markup_textile(text); end + + # Converts plaintext to strict Textile (hard breaks) + # + # @param text [String] the input textile data + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#128 + def html_markup_textile_strict(text); end + + # Syntax highlights +source+ in language +type+. + # + # @note To support a specific language +type+, implement the method + # +html_syntax_highlight_TYPE+ in this class. + # @param source [String] the source code to highlight + # @param type [Symbol, String] the language type (:ruby, :plain, etc). Use + # :plain for no syntax highlighting. + # @return [String] the highlighted source + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#199 + def html_syntax_highlight(source, type = T.unsafe(nil)); end + + # @return [String] unhighlighted source + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#210 + def html_syntax_highlight_plain(source); end + + # Turns text into HTML using +markup+ style formatting. + # + # @param text [String] the text to format + # @param markup [Symbol] examples are +:markdown+, +:textile+, +:rdoc+. + # To add a custom markup type, see {MarkupHelper} + # @return [String] the HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#57 + def htmlify(text, markup = T.unsafe(nil)); end + + # @return [String] HTMLified text as a single line (paragraphs removed) + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#184 + def htmlify_line(*args); end + + # Inserts an include link while respecting inlining + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#296 + def insert_include(text, markup = T.unsafe(nil)); end + + # Links to an extra file + # + # @param filename [String] the filename to link to + # @param title [String] the title of the link + # @param anchor [String] optional anchor + # @return [String] the link to the file + # @since 0.5.5 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#270 + def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end + + # Include a file as a docstring in output + # + # @param file [String] the filename to include + # @return [String] the file's contents + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#282 + def link_include_file(file); end + + # Includes an object's docstring into output. + # + # @param obj [CodeObjects::Base] the object to include + # @return [String] the object's docstring (no tags) + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#291 + def link_include_object(obj); end + + # Links to an object with an optional title + # + # @param obj [CodeObjects::Base] the object to link to + # @param title [String] the title to use for the link + # @return [String] the linked object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#301 + def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Links to a URL + # + # @param url [String] the URL to link to + # @param title [String] the optional title to display the link as + # @param params [Hash] optional parameters for the link + # @return [String] the linked URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#332 + def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://yard//lib/yard/templates/helpers/html_helper.rb#400 + def mtime(_file); end + + # Returns the URL for an object. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Resolves any text in the form of +{Name}+ to the object specified by + # Name. Also supports link titles in the form +{Name title}+. + # + # @example Linking to an instance method + # resolve_links("{MyClass#method}") # => "<a href='...'>MyClass#method</a>" + # @example Linking to a class with a title + # resolve_links("{A::B::C the C class}") # => "<a href='...'>the c class</a>" + # @param text [String] the text to resolve links in + # @return [String] HTML with linkified references + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#225 + def resolve_links(text); end + + # Formats the signature of method +meth+. + # + # @param meth [CodeObjects::MethodObject] the method object to list + # the signature of + # @param link [Boolean] whether to link the method signature to the details view + # @param show_extras [Boolean] whether to show extra meta-data (visibility, attribute info) + # @param full_attr_name [Boolean] whether to show the full attribute name + # ("name=" instead of "name") + # @return [String] the formatted method signature + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#529 + def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end + + # Get the return types for a method signature. + # + # @param meth [CodeObjects::MethodObject] the method object + # @param link [Boolean] whether to link the types + # @return [String] the signature types + # @since 0.5.3 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#492 + def signature_types(meth, link = T.unsafe(nil)); end + + # Returns the URL for an object. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Returns the URL for a specific file + # + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to + # @param anchor [String] optional anchor + # @return [String] the URL pointing to the file + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#407 + def url_for_file(filename, anchor = T.unsafe(nil)); end + + # Returns the URL for the frameset page + # + # @return [String] the URL pointing to the frames page + # @since 0.8.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#434 + def url_for_frameset; end + + # Returns the URL for the alphabetic index page + # + # @return [String] the URL pointing to the first main page the + # user should see. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#450 + def url_for_index; end + + # Returns the URL for a list type + # + # @param type [String, Symbol] the list type to generate a URL for + # @return [String] the URL pointing to the list + # @since 0.8.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#426 + def url_for_list(type); end + + # Returns the URL for the main page (README or alphabetic index) + # + # @return [String] the URL pointing to the first main page the + # user should see. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#442 + def url_for_main; end + + private + + # Converts a {CodeObjects::MethodObject} into an overload object + # + # @since 0.5.3 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#609 + def convert_method_to_overload(meth); end + + # Parses code block's HTML attributes in order to detect the programming + # language of what's enclosed in that code block. + # + # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element + # @param code_html_attrs [String, nil] HTML attribute list of +code+ + # element + # @return [String, nil] detected programming language + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#664 + def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end + + # Parses code blocks out of html and performs syntax highlighting + # on code inside of the blocks. + # + # @param html [String] the html to search for code in + # @return [String] highlighted html + # @see #html_syntax_highlight + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#640 + def parse_codeblocks(html); end + + # Parses !!!lang out of codeblock, returning the codeblock language + # followed by the source code. + # + # @param source [String] the source code whose language to determine + # @return [Array(String, String)] the language, if any, and the + # remaining source + # @since 0.7.5 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#624 + def parse_lang_for_codeblock(source); end + + # Converts a set of hash options into HTML attributes for a tag + # + # @param opts [Hash{String => String}] the tag options + # @return [String] the tag attributes of an HTML tag + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#603 + def tag_attrs(opts = T.unsafe(nil)); end + + # Escapes a URL + # + # @param text [String] the URL + # @return [String] the escaped URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + def urlencode(text); end + + class << self + # Escapes a URL + # + # @param text [String] the URL + # @return [String] the escaped URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + def urlencode(text); end + end +end + +# @private +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#15 +YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#12 +YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp) + +# Helper methods for syntax highlighting. +# +# source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#6 +module YARD::Templates::Helpers::HtmlSyntaxHighlightHelper + include ::YARD::Templates::Helpers::ModuleHelper + + # Highlights Ruby source + # + # @param source [String] the Ruby source code + # @return [String] the highlighted Ruby source + # + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#12 + def html_syntax_highlight_ruby(source); end + + private + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#63 + def clean_token_object(token_obj); end + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#45 + def html_syntax_highlight_ruby_legacy(source); end + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#22 + def html_syntax_highlight_ruby_ripper(source); end +end + +# Namespace for markup providers +# +# source://yard//lib/yard/autoload.rb#273 +module YARD::Templates::Helpers::Markup; end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkdown] a new instance of RDocMarkdown + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#14 + def initialize(text); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#18 + def fix_typewriter(html); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +class YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkup] a new instance of RDocMarkup + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#41 + def initialize(text); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path=(_arg0); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#50 + def to_html; end + + private + + # Don't allow -- to turn into — element. The chances of this being + # some --option is far more likely than the typographical meaning. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#87 + def fix_dash_dash(text); end + + # Fixes RDoc behaviour with ++ only supporting alphanumeric text. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#66 + def fix_typewriter(text); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16 + def initialize; end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#100 + def accept_paragraph(*args); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path=(_arg0); end + + # Disable auto-link of URLs + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#96 + def handle_special_HYPERLINK(special); end +end + +# Helper methods for loading and managing markup types. +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#7 +module YARD::Templates::Helpers::MarkupHelper + # Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}. + # If a provider is specified, immediately try to load it. + # + # On success this sets `@markup_provider` and `@markup_class` to + # the provider name and library constant class/module respectively for + # the loaded provider. + # + # On failure this method will inform the user that no provider could be + # found and exit the program. + # + # @return [Boolean] whether the markup provider was successfully loaded. + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#87 + def load_markup_provider(type = T.unsafe(nil)); end + + # Gets the markup provider class/module constant for a markup type + # Call {#load_markup_provider} before using this method. + # + # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) + # @return [Class] the markup class + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#158 + def markup_class(type = T.unsafe(nil)); end + + # Strips any shebang lines on the file contents that pertain to + # markup or preprocessing data. + # + # @deprecated Use {CodeObjects::ExtraFileObject#contents} instead + # @return [String] the file contents minus any preprocessing tags + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#149 + def markup_file_contents(contents); end + + # Checks for a shebang or looks at the file extension to determine + # the markup type for the file contents. File extensions are registered + # for a markup type in {MARKUP_EXTENSIONS}. + # + # A shebang should be on the first line of a file and be in the form: + # + # #!markup_type + # + # Standard markup types are text, html, rdoc, markdown, textile + # + # @param contents [String] Unused. Was necessary prior to 0.7.0. + # Newer versions of YARD use {CodeObjects::ExtraFileObject#contents} + # @return [Symbol] the markup type recognized for the file + # @see MARKUP_EXTENSIONS + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#133 + def markup_for_file(contents, filename); end + + # Gets the markup provider name for a markup type + # Call {#load_markup_provider} before using this method. + # + # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) + # @return [Symbol] the markup provider name (usually the gem name of the library) + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#168 + def markup_provider(type = T.unsafe(nil)); end + + class << self + # Clears the markup provider cache information. Mainly used for testing. + # + # @return [void] + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#11 + def clear_markup_cache; end + + # @private + # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers + # @since 0.6.4 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 + def markup_cache; end + + # @private + # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers + # @since 0.6.4 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 + def markup_cache=(_arg0); end + end +end + +# Returns a list of extensions for various markup types. To register +# extensions for a type, add them to the array of extensions for the +# type. +# +# @since 0.6.0 +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#61 +YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# Contains the Regexp object that matches the shebang line of extra +# files to detect the markup type. +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#74 +YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG = T.let(T.unsafe(nil), Regexp) + +# The default list of markup providers for each markup type +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#24 +YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS = T.let(T.unsafe(nil), Hash) + +# Helper methods for method objects. +# +# source://yard//lib/yard/templates/helpers/method_helper.rb#5 +module YARD::Templates::Helpers::MethodHelper + # @return [String] formatted arguments for a method + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#7 + def format_args(object); end + + # @return [String] formatted block if one exists + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#35 + def format_block(object); end + + # @return [String] formats source of an object + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#57 + def format_code(object, _show_lines = T.unsafe(nil)); end + + # @return [String] formats source code of a constant value + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#68 + def format_constant(value); end + + # @return [String] formats line numbers for source code of an object + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#50 + def format_lines(object); end + + # @return [String] formatted and linked return types for a method + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#28 + def format_return_types(object); end +end + +# Helper methods for managing module objects. +# +# source://yard//lib/yard/templates/helpers/module_helper.rb#6 +module YARD::Templates::Helpers::ModuleHelper + # Prunes the method listing by running the verifier and removing attributes/aliases + # + # @param list [Array<CodeObjects::Base>] a list of methods + # @param hide_attributes [Boolean] whether to prune attribute methods from the list + # @return [Array<CodeObjects::Base>] a pruned list of methods + # + # source://yard//lib/yard/templates/helpers/module_helper.rb#11 + def prune_method_listing(list, hide_attributes = T.unsafe(nil)); end +end + +# Helper methods for text template formats. +# +# source://yard//lib/yard/templates/helpers/text_helper.rb#6 +module YARD::Templates::Helpers::TextHelper + # @return [String] aligns text to the right + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#39 + def align_right(text, spacer = T.unsafe(nil), col = T.unsafe(nil)); end + + # @return [String] escapes text + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#8 + def h(text); end + + # @return [String] returns a horizontal rule for output + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#45 + def hr(col = T.unsafe(nil), sep = T.unsafe(nil)); end + + # @return [String] indents +text+ by +len+ characters. + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#29 + def indent(text, len = T.unsafe(nil)); end + + # @return [String] the formatted signature for a method + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#50 + def signature(meth); end + + # @return [String] aligns a title to the right + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#34 + def title_align_right(text, col = T.unsafe(nil)); end + + # @return [String] wraps text at +col+ columns. + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#24 + def wrap(text, col = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/templates/helpers/text_helper.rb#98 + def resolve_links(text); end +end + +# Helpers for UML template format +# +# source://yard//lib/yard/templates/helpers/uml_helper.rb#5 +module YARD::Templates::Helpers::UMLHelper + # Formats the path of an object for Graphviz syntax + # + # @param object [CodeObjects::Base] an object to format the path of + # @return [String] the encoded path + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#20 + def format_path(object); end + + # Encodes text in escaped Graphviz syntax + # + # @param text [String] text to encode + # @return [String] the encoded text + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#27 + def h(text); end + + # Tidies data by formatting and indenting text + # + # @param data [String] pre-formatted text + # @return [String] tidied text. + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#34 + def tidy(data); end + + # Official UML visibility prefix syntax for an object given its visibility + # + # @param object [CodeObjects::Base] the object to retrieve visibility for + # @return [String] the UML visibility prefix + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#9 + def uml_visibility(object); end +end + +# Abstracts the structure for a section and its subsections into an ordered +# list of sections and subsections. +# +# @since 0.6.0 +# +# source://yard//lib/yard/templates/section.rb#7 +class YARD::Templates::Section < ::Array + # @return [Section] a new instance of Section + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#10 + def initialize(name, *args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#45 + def <<(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#34 + def ==(other); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#21 + def [](*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#74 + def any(item); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#15 + def dup; end + + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#30 + def eql?(other); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#54 + def inspect; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#8 + def name; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#8 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#60 + def place(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#45 + def push(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#64 + def to_a; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#50 + def unshift(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#84 + def parse_sections(args); end +end + +# source://yard//lib/yard/templates/template.rb#6 +module YARD::Templates::Template + include ::YARD::Templates::ErbCache + include ::YARD::Templates::Helpers::BaseHelper + include ::YARD::Templates::Helpers::MethodHelper + + mixes_in_class_methods ::YARD::Templates::Template::ClassMethods + + # source://yard//lib/yard/templates/template.rb#186 + def initialize(opts = T.unsafe(nil)); end + + # Loads a template specified by path. If +:template+ or +:format+ is + # specified in the {#options} hash, they are prepended and appended + # to the path respectively. + # + # @param path [Array<String, Symbol>] the path of the template + # @return [Template] the loaded template module + # + # source://yard//lib/yard/templates/template.rb#204 + def T(*path); end + + # Returns the value of attribute class. + # + # source://yard//lib/yard/templates/template.rb#7 + def class; end + + # Sets the attribute class + # + # @param value the value to set the attribute class to. + # + # source://yard//lib/yard/templates/template.rb#7 + def class=(_arg0); end + + # @param section [String, Symbol] the section name + # @return [String] the contents of the ERB rendered section + # @yield calls subsections to be rendered + # + # source://yard//lib/yard/templates/template.rb#285 + def erb(section, &block); end + + # Returns the contents of a file. If +allow_inherited+ is set to +true+, + # use +{{{__super__}}}+ inside the file contents to insert the contents + # of the file from an inherited template. For instance, if +templates/b+ + # inherits from +templates/a+ and file "test.css" exists in both directories, + # both file contents can be retrieved by having +templates/b/test.css+ look + # like: + # + # {{{__super__}}} + # ... + # body { css styles here } + # p.class { other styles } + # + # @param basename [String] the name of the file + # @param allow_inherited [Boolean] whether inherited templates can + # be inserted with +{{{__super__}}}+ + # @raise [ArgumentError] + # @return [String] the contents of a file identified by +basename+. All + # template paths (including any mixed in templates) are searched for + # the file + # @see ClassMethods#find_file + # @see ClassMethods#find_nth_file + # + # source://yard//lib/yard/templates/template.rb#312 + def file(basename, allow_inherited = T.unsafe(nil)); end + + # Initialization called on the template. Override this in a 'setup.rb' + # file in the template's path to implement a template + # + # @example A default set of sections + # def init + # sections :section1, :section2, [:subsection1, :etc] + # end + # @see #sections + # + # source://yard//lib/yard/templates/template.rb#239 + def init; end + + # source://yard//lib/yard/templates/template.rb#342 + def inspect; end + + # Returns the value of attribute options. + # + # source://yard//lib/yard/templates/template.rb#8 + def options; end + + # source://yard//lib/yard/templates/template.rb#337 + def options=(value); end + + # Runs a template on +sects+ using extra options. This method should + # not be called directly. Instead, call the class method {ClassMethods#run} + # + # @param opts [Hash, nil] any extra options to apply to sections + # @param sects [Section, Array] a section list of sections to render + # @param start_at [Fixnum] the index in the section list to start from + # @param break_first [Boolean] if true, renders only the first section + # @return [String] the rendered sections joined together + # @yield [opts] calls for the subsections to be rendered + # @yieldparam opts [Hash] any extra options to yield + # + # source://yard//lib/yard/templates/template.rb#252 + def run(opts = T.unsafe(nil), sects = T.unsafe(nil), start_at = T.unsafe(nil), break_first = T.unsafe(nil), &block); end + + # Returns the value of attribute section. + # + # source://yard//lib/yard/templates/template.rb#7 + def section; end + + # Sets the attribute section + # + # @param value the value to set the attribute section to. + # + # source://yard//lib/yard/templates/template.rb#7 + def section=(_arg0); end + + # Sets the sections (and subsections) to be rendered for the template + # + # @example Sets a set of erb sections + # sections :a, :b, :c # searches for a.erb, b.erb, c.erb + # @example Sets a set of method and erb sections + # sections :a, :b, :c # a is a method, the rest are erb files + # @example Sections with subsections + # sections :header, [:name, :children] + # # the above will call header.erb and only renders the subsections + # # if they are yielded by the template (see #yieldall) + # @param args [Array<Symbol, String, Template, Array>] the sections + # to use to render the template. For symbols and strings, the + # section will be executed as a method (if one exists), or rendered + # from the file "name.erb" where name is the section name. For + # templates, they will have {Template::ClassMethods#run} called on them. + # Any subsections can be yielded to using yield or {#yieldall} + # + # source://yard//lib/yard/templates/template.rb#226 + def sections(*args); end + + # Calls the ERB file from the last inherited template with {#section}.erb + # + # @param sect [Symbol, String] if provided, uses a specific section name + # @return [String] the rendered ERB file in any of the inherited template + # paths. + # + # source://yard//lib/yard/templates/template.rb#330 + def superb(sect = T.unsafe(nil), &block); end + + # Yields all subsections with any extra options + # + # @param opts [Hash] extra options to be applied to subsections + # + # source://yard//lib/yard/templates/template.rb#278 + def yieldall(opts = T.unsafe(nil), &block); end + + protected + + # source://yard//lib/yard/templates/template.rb#348 + def erb_file_for(section); end + + # source://yard//lib/yard/templates/template.rb#352 + def erb_with(content, filename = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/templates/template.rb#399 + def add_options(opts = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://yard//lib/yard/templates/template.rb#378 + def cache(section); end + + # source://yard//lib/yard/templates/template.rb#388 + def cache_filename(section); end + + # source://yard//lib/yard/templates/template.rb#364 + def render_section(section, &block); end + + # source://yard//lib/yard/templates/template.rb#393 + def set_ivars; end + + # source://yard//lib/yard/templates/template.rb#412 + def with_section; end + + class << self + # Extra includes are mixins that are included after a template is created. These + # mixins can be registered by plugins to operate on templates and override behaviour. + # + # Note that this array can be filled with modules or proc objects. If a proc object + # is given, the proc will be called with the {Template#options} hash containing + # relevant template information like the object, format, and more. The proc should + # return a module or nil if there is none. + # + # @example Adding in extra mixins to include on a template + # Template.extra_includes << MyHelper + # @example Conditionally including a mixin if the format is html + # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } + # @return [Array<Module, Proc>] a list of modules to be automatically included + # into any new template module + # + # source://yard//lib/yard/templates/template.rb#25 + def extra_includes; end + + # Extra includes are mixins that are included after a template is created. These + # mixins can be registered by plugins to operate on templates and override behaviour. + # + # Note that this array can be filled with modules or proc objects. If a proc object + # is given, the proc will be called with the {Template#options} hash containing + # relevant template information like the object, format, and more. The proc should + # return a module or nil if there is none. + # + # @example Adding in extra mixins to include on a template + # Template.extra_includes << MyHelper + # @example Conditionally including a mixin if the format is html + # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } + # @return [Array<Module, Proc>] a list of modules to be automatically included + # into any new template module + # + # source://yard//lib/yard/templates/template.rb#25 + def extra_includes=(_arg0); end + + # Includes the {extra_includes} modules into the template object. + # + # @param template [Template] the template object to mixin the extra includes. + # @param options [SymbolHash] the options hash containing all template information + # @return [void] + # + # source://yard//lib/yard/templates/template.rb#38 + def include_extra(template, options); end + + # @private + # @private + # + # source://yard//lib/yard/templates/template.rb#29 + def included(klass); end + end +end + +# source://yard//lib/yard/templates/template.rb#59 +module YARD::Templates::Template::ClassMethods + # source://yard//lib/yard/templates/template.rb#81 + def initialize(path, full_paths); end + + # Alias for creating a {Section} with arguments + # + # @see Section#initialize + # @since 0.6.0 + # + # source://yard//lib/yard/templates/template.rb#149 + def S(*args); end + + # Alias for creating {Engine.template}. + # + # source://yard//lib/yard/templates/template.rb#142 + def T(*path); end + + # Searches for a file identified by +basename+ in the template's + # path as well as any mixed in template paths. Equivalent to calling + # {ClassMethods#find_nth_file} with index of 1. + # + # @param basename [String] the filename to search for + # @return [String] the full path of a file on disk with filename + # +basename+ in one of the template's paths. + # @see find_nth_file + # + # source://yard//lib/yard/templates/template.rb#98 + def find_file(basename); end + + # Searches for the nth file (where n = +index+) identified + # by basename in the template's path and any mixed in template paths. + # + # @param basename [String] the filename to search for + # @param index [Fixnum] the nth existing file to return + # @return [String] the full path of the nth file on disk with + # filename +basename+ in one of the template paths + # + # source://yard//lib/yard/templates/template.rb#109 + def find_nth_file(basename, index = T.unsafe(nil)); end + + # Returns the value of attribute full_path. + # + # source://yard//lib/yard/templates/template.rb#60 + def full_path; end + + # Sets the attribute full_path + # + # @param value the value to set the attribute full_path to. + # + # source://yard//lib/yard/templates/template.rb#60 + def full_path=(_arg0); end + + # @note This method caches path results. Paths should not be modified + # after this method is called; call {#reset_full_paths} to reset cache. + # @return [Array<String>] a list of full paths + # + # source://yard//lib/yard/templates/template.rb#65 + def full_paths; end + + # @return [Boolean] + # + # source://yard//lib/yard/templates/template.rb#122 + def is_a?(klass); end + + # Creates a new template object to be rendered with {Template#run} + # + # source://yard//lib/yard/templates/template.rb#128 + def new(*args); end + + # Returns the value of attribute path. + # + # source://yard//lib/yard/templates/template.rb#60 + def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://yard//lib/yard/templates/template.rb#60 + def path=(_arg0); end + + # Resets cache for {#full_paths} + # + # source://yard//lib/yard/templates/template.rb#77 + def reset_full_paths; end + + # source://yard//lib/yard/templates/template.rb#135 + def run(*args); end + + private + + # source://yard//lib/yard/templates/template.rb#170 + def include_inherited(full_paths); end + + # source://yard//lib/yard/templates/template.rb#157 + def include_parent; end + + # source://yard//lib/yard/templates/template.rb#176 + def load_setup_rb; end +end + +# An Options class containing default options for base template rendering. For +# options specific to generation of HTML output, see {CLI::YardocOptions}. +# +# @see CLI::YardocOptions +# +# source://yard//lib/yard/templates/template_options.rb#11 +class YARD::Templates::TemplateOptions < ::YARD::Options + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def __globals; end + + # @return [String] the default return type for a method with no return tags + # + # source://yard//lib/yard/options.rb#82 + def default_return; end + + # @return [String] the default return type for a method with no return tags + # + # source://yard//lib/yard/options.rb#82 + def default_return=(_arg0); end + + # @example A list of mixin path names (including wildcards) + # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] + # @return [Array<String>] an array of module name wildcards to embed into + # class documentation as if their methods were defined directly in the class. + # Useful for modules like ClassMethods. If the name contains '::', the module + # is matched against the full mixin path, otherwise only the module name is used. + # + # source://yard//lib/yard/options.rb#82 + def embed_mixins; end + + # @example A list of mixin path names (including wildcards) + # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] + # @return [Array<String>] an array of module name wildcards to embed into + # class documentation as if their methods were defined directly in the class. + # Useful for modules like ClassMethods. If the name contains '::', the module + # is matched against the full mixin path, otherwise only the module name is used. + # + # source://yard//lib/yard/options.rb#82 + def embed_mixins=(_arg0); end + + # @param mixin [CodeObjects::Base] accepts any code object, but returns + # nil unless the object is a module. + # @return [Boolean] whether a mixin matches the embed_mixins list + # @return [nil] if the mixin is not a module object + # + # source://yard//lib/yard/templates/template_options.rb#78 + def embed_mixins_match?(mixin); end + + # @return [Symbol] the template output format + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # @return [Symbol] the template output format + # + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def globals; end + + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def globals=(_arg0); end + + # @return [Boolean] whether void methods should show "void" in their signature + # + # source://yard//lib/yard/options.rb#82 + def hide_void_return; end + + # @return [Boolean] whether void methods should show "void" in their signature + # + # source://yard//lib/yard/options.rb#82 + def hide_void_return=(_arg0); end + + # @return [Boolean] whether code blocks should be syntax highlighted + # + # source://yard//lib/yard/options.rb#82 + def highlight; end + + # @return [Boolean] whether code blocks should be syntax highlighted + # + # source://yard//lib/yard/options.rb#82 + def highlight=(_arg0); end + + # @return [Boolean] whether the page is the "index" + # + # source://yard//lib/yard/templates/template_options.rb#64 + def index; end + + # @return [Boolean] whether the page is the "index" + # + # source://yard//lib/yard/templates/template_options.rb#64 + def index=(_arg0); end + + # @return [Symbol] the markup format to use when parsing docstrings + # + # source://yard//lib/yard/options.rb#82 + def markup; end + + # @return [Symbol] the markup format to use when parsing docstrings + # + # source://yard//lib/yard/options.rb#82 + def markup=(_arg0); end + + # @return [Class] the markup provider class for the markup format + # + # source://yard//lib/yard/templates/template_options.rb#30 + def markup_provider; end + + # @return [Class] the markup provider class for the markup format + # + # source://yard//lib/yard/templates/template_options.rb#30 + def markup_provider=(_arg0); end + + # @deprecated use {#highlight} instead. + # @return [Boolean] whether highlighting should be ignored + # + # source://yard//lib/yard/templates/template_options.rb#57 + def no_highlight; end + + # source://yard//lib/yard/templates/template_options.rb#58 + def no_highlight=(value); end + + # @return [CodeObjects::Base] the main object being generated in the template + # + # source://yard//lib/yard/templates/template_options.rb#38 + def object; end + + # @return [CodeObjects::Base] the main object being generated in the template + # + # source://yard//lib/yard/templates/template_options.rb#38 + def object=(_arg0); end + + # @return [CodeObjects::Base] the owner of the generated object + # + # source://yard//lib/yard/templates/template_options.rb#41 + def owner; end + + # @return [CodeObjects::Base] the owner of the generated object + # + # source://yard//lib/yard/templates/template_options.rb#41 + def owner=(_arg0); end + + # @return [String] the title of a given page + # + # source://yard//lib/yard/templates/template_options.rb#61 + def page_title; end + + # @return [String] the title of a given page + # + # source://yard//lib/yard/templates/template_options.rb#61 + def page_title=(_arg0); end + + # @return [Boolean] whether serialization should be performed + # + # source://yard//lib/yard/options.rb#82 + def serialize; end + + # @return [Boolean] whether serialization should be performed + # + # source://yard//lib/yard/options.rb#82 + def serialize=(_arg0); end + + # @return [Serializers::Base] the serializer used to generate links and serialize + # output. Serialization output only occurs if {#serialize} is +true+. + # + # source://yard//lib/yard/templates/template_options.rb#51 + def serializer; end + + # @return [Serializers::Base] the serializer used to generate links and serialize + # output. Serialization output only occurs if {#serialize} is +true+. + # + # source://yard//lib/yard/templates/template_options.rb#51 + def serializer=(_arg0); end + + # @return [Symbol] the template name used to render output + # + # source://yard//lib/yard/options.rb#82 + def template; end + + # @return [Symbol] the template name used to render output + # + # source://yard//lib/yard/options.rb#82 + def template=(_arg0); end + + # @return [Symbol] the template type used to generate output + # + # source://yard//lib/yard/templates/template_options.rb#44 + def type; end + + # @return [Symbol] the template type used to generate output + # + # source://yard//lib/yard/templates/template_options.rb#44 + def type=(_arg0); end + + # @return [Verifier] the verifier object + # + # source://yard//lib/yard/templates/template_options.rb#89 + def verifier; end + + # @return [Verifier] the verifier object + # + # source://yard//lib/yard/templates/template_options.rb#89 + def verifier=(_arg0); end +end + +# source://yard//lib/yard/version.rb#5 +YARD::VERSION = T.let(T.unsafe(nil), String) + +# Similar to a Proc, but runs a set of Ruby expressions using a small +# DSL to make tag lookups easier. +# +# The syntax is as follows: +# * All syntax is Ruby compatible +# * +object+ (+o+ for short) exist to access the object being verified +# * +@TAGNAME+ is translated into +object.tag('TAGNAME')+ +# * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+ +# * +object+ can be omitted as target for method calls (it is implied) +# +# @example Create a verifier to check for objects that don't have @private tags +# verifier = Verifier.new('!@private') +# verifier.call(object) # => true (no @private tag) +# @example Create a verifier to find any return tag with an empty description +# Verifier.new('@return.text.empty?') +# # Equivalent to: +# Verifier.new('object.tag(:return).text.empty?') +# @example Check if there are any @param tags +# Verifier.new('@@param.empty?') +# # Equivalent to: +# Verifier.new('object.tags(:param).empty?') +# @example Using +object+ or +o+ to look up object attributes directly +# Verifier.new('object.docstring == "hello world"') +# # Equivalent to: +# Verifier.new('o.docstring == "hello world"') +# @example Without using +object+ or +o+ +# Verifier.new('tag(:return).size == 1 || has_tag?(:author)') +# @example Specifying multiple expressions +# Verifier.new('@return', '@param', '@yield') +# # Equivalent to: +# Verifier.new('@return && @param && @yield') +# +# source://yard//lib/yard/verifier.rb#34 +class YARD::Verifier + # Creates a verifier from a set of expressions + # + # @param expressions [Array<String>] a list of Ruby expressions to + # parse. + # @return [Verifier] a new instance of Verifier + # + # source://yard//lib/yard/verifier.rb#48 + def initialize(*expressions); end + + # Adds a set of expressions and recompiles the verifier + # + # @param expressions [Array<String>] a list of expressions + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/verifier.rb#58 + def add_expressions(*expressions); end + + # Tests the expressions on the object. + # + # @note If the object is a {CodeObjects::Proxy} the result will always be true. + # @param object [CodeObjects::Base] the object to verify + # @return [Boolean] the result of the expressions + # + # source://yard//lib/yard/verifier.rb#76 + def call(object); end + + # @return [Array<String>] a list of all expressions the verifier checks for + # @since 0.5.6 + # + # source://yard//lib/yard/verifier.rb#37 + def expressions; end + + # source://yard//lib/yard/verifier.rb#39 + def expressions=(value); end + + # Passes any method calls to the object from the {#call} + # + # source://yard//lib/yard/verifier.rb#63 + def method_missing(sym, *args, &block); end + + # Runs a list of objects against the verifier and returns the subset + # of verified objects. + # + # @param list [Array<CodeObjects::Base>] a list of code objects + # @return [Array<CodeObjects::Base>] a list of code objects that match + # the verifier. + # + # source://yard//lib/yard/verifier.rb#91 + def run(list); end + + protected + + # @return [CodeObjects::Base] the current object being tested + # + # source://yard//lib/yard/verifier.rb#98 + def o; end + + # @return [CodeObjects::Base] the current object being tested + # + # source://yard//lib/yard/verifier.rb#98 + def object; end + + private + + # Creates the +__execute+ method by evaluating the expressions + # as Ruby code + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#130 + def create_method_from_expressions; end + + # Modifies nil to not throw NoMethodErrors. This allows + # syntax like object.tag(:return).text to work if the #tag + # call returns nil, which means users don't need to perform + # stringent nil checking + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#112 + def modify_nilclass; end + + # Parses a single expression, handling some of the DSL syntax. + # + # The syntax "@tag" should be turned into object.tag(:tag), + # and "@@tag" should be turned into object.tags(:tag) + # + # @return [String] the parsed expression + # + # source://yard//lib/yard/verifier.rb#145 + def parse_expression(expr); end + + # Returns the state of NilClass back to normal + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#120 + def unmodify_nilclass; end +end + +# @private +# +# source://yard//lib/yard/verifier.rb#104 +YARD::Verifier::NILCLASS_METHODS = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/todo.rbi b/sorbet/rbi/todo.rbi new file mode 100644 index 0000000000..3a7ddafec0 --- /dev/null +++ b/sorbet/rbi/todo.rbi @@ -0,0 +1,16 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for unresolved constants. +# Please instead update this file by running `bin/tapioca todo`. + +# typed: false + +module ::Azure::Error::NotFound; end +module Aws::CodeCommit::Client; end +module Aws::CodeCommit::Errors::BranchDoesNotExistException; end +module Aws::CodeCommit::Errors::FileDoesNotExistException; end +module Aws::ECR::Errors::InvalidSignatureException; end +module Aws::ECR::Errors::UnrecognizedClientException; end +module Bundler::CompactIndexClient::Updater; end +module Bundler::SolveFailure; end +module Dependabot::NpmAndYarn::FileFetcher::Pysch::SyntaxError; end +module Dependabot::NpmAndYarn::FileParser::DependencySet; end diff --git a/sorbet/tapioca/config.yml b/sorbet/tapioca/config.yml new file mode 100644 index 0000000000..886ae58703 --- /dev/null +++ b/sorbet/tapioca/config.yml @@ -0,0 +1,13 @@ +gem: + # Add your `gem` command parameters here: + # + # exclude: + # - gem_name + # doc: true + # workers: 5 +dsl: + # Add your `dsl` command parameters here: + # + # exclude: + # - SomeGeneratorName + # workers: 5 diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb new file mode 100644 index 0000000000..80f31f8e07 --- /dev/null +++ b/sorbet/tapioca/require.rb @@ -0,0 +1,4 @@ +# typed: true +# frozen_string_literal: true + +# Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list)